add.vue 74 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203
  1. <template>
  2. <div id="addOder">
  3. <el-card style="position: relative">
  4. <span>基本信息</span>
  5. <el-form :model="basicForm" :rules="basicRules" ref="basic" label-width="auto">
  6. <el-row :gutter="10">
  7. <el-col :span="1.5">
  8. <el-form-item label="调出库存组织">
  9. <el-select clearable :disabled="sonDisable" size="mini" v-model="basicForm.deliveryInventoryOrg"
  10. @clear="clean('调出库存组织')"
  11. @change="controlCk('调出库存组织')"
  12. @focus="chooseRefer('ORG_PARAM', true, '调出库存组织')"
  13. style="width: 200px"
  14. >
  15. <el-option v-for="item in chuOrgOptions" :key="item.id" :label="item.name" :value="item.id"/>
  16. </el-select>
  17. </el-form-item>
  18. </el-col>
  19. <el-col :span="1.5">
  20. <el-form-item label="调入库存组织">
  21. <el-select clearable :disabled="sonDisable" size="mini" v-model="basicForm.storageInventoryOrg"
  22. @clear="clean('调入库存组织')"
  23. @change="controlCk('调入库存组织')"
  24. @focus="chooseRefer('ORG_PARAM', true, '调入库存组织')"
  25. style="width: 200px"
  26. >
  27. <el-option v-for="item in ruOrgOptions" :key="item.id" :label="item.name" :value="item.id"/>
  28. </el-select>
  29. </el-form-item>
  30. </el-col>
  31. <el-col :span="1.5">
  32. <el-form-item label="调出部门">
  33. <el-select clearable :disabled="sonDisable || isOrg"
  34. size="mini"
  35. v-model="basicForm.deliveryDept"
  36. @focus="chooseRefer('DEPT_PARAM', true, '调出部门', basicForm.deliveryInventoryOrg)"
  37. style="width: 200px"
  38. >
  39. <el-option v-for="item in deptOptions" :key="item.id" :label="item.name" :value="item.id"/>
  40. </el-select>
  41. </el-form-item>
  42. </el-col>
  43. <el-col :span="1.5">
  44. <el-form-item label="调出仓库">
  45. <el-select clearable :disabled="sonDisable || isOrg"
  46. size="mini"
  47. v-model="basicForm.deliveryWarehouse"
  48. @clear="clean('调出仓库')"
  49. @change="controlDCHW"
  50. @focus="chooseRefer('WAREHOUSE_PARAM', true, '调出仓库', basicForm.deliveryInventoryOrg, 'N', 'N')"
  51. style="width: 200px"
  52. >
  53. <el-option v-for="item in chuHouseOptions" :key="item.id" :label="item.name" :value="item.id"/>
  54. </el-select>
  55. </el-form-item>
  56. </el-col>
  57. <el-col :span="1.5">
  58. <el-form-item label="调出业务员">
  59. <el-select clearable :disabled="sonDisable"
  60. size="mini"
  61. v-model="basicForm.businessPersonal"
  62. @clear="clean('调出业务员')"
  63. @focus="chooseRefer('CONTACTS_PARAM', true, '调出业务员')"
  64. style="width: 200px"
  65. >
  66. <el-option v-for="item in manOptions" :key="item.id" :label="item.name" :value="item.code"/>
  67. </el-select>
  68. </el-form-item>
  69. </el-col>
  70. <el-col :span="1.5">
  71. <el-form-item label="调入仓库">
  72. <el-select clearable :disabled="sonDisable || isOrg"
  73. size="mini"
  74. v-model="basicForm.storageWarehouse"
  75. @clear="clean('调入仓库')"
  76. @change="controlDRHW"
  77. @focus="chooseRefer('WAREHOUSE_PARAM', true, '调入仓库', basicForm.storageInventoryOrg, 'N', 'N')"
  78. style="width: 200px"
  79. >
  80. <el-option v-for="item in ruHouseOptions" :key="item.id" :label="item.name" :value="item.id"/>
  81. </el-select>
  82. </el-form-item>
  83. </el-col>
  84. <el-col :span="1.5">
  85. <el-form-item label="订单类型">
  86. <el-select clearable v-model="basicForm.billType" :disabled="sonDisable" size="mini" style="width: 200px">
  87. <el-option v-for="dict in dict.type.sys_allot_billtype" :key="dict.value" :label="dict.label" :value="dict.value">
  88. </el-option>
  89. </el-select>
  90. </el-form-item>
  91. </el-col>
  92. <el-col :span="1.5">
  93. <el-form-item label="调拨方式">
  94. <el-select clearable disabled v-model="basicForm.allotType" size="mini" style="width: 200px">
  95. <el-option v-for="dict in dict.type.sys_to_type" :key="dict.value" :label="dict.label" :value="dict.value">
  96. </el-option>
  97. </el-select>
  98. </el-form-item>
  99. </el-col>
  100. <el-col :span="1.5">
  101. <el-form-item label="单据号">
  102. <el-input clearable :disabled="sonDisable" v-model="basicForm.code" size="mini" style="width: 200px"/>
  103. </el-form-item>
  104. </el-col>
  105. <el-col :span="1.5">
  106. <el-form-item label="单据日期">
  107. <el-date-picker clearable :disabled="sonDisable" v-model="basicForm.billDate" size="mini" type="date"
  108. @change="changeBillDate"
  109. value-format="yyyy-MM-dd"
  110. style="width: 200px"
  111. >
  112. </el-date-picker>
  113. </el-form-item>
  114. </el-col>
  115. <el-col :span="1.5">
  116. <el-form-item label="调拨出库单号">
  117. <el-input
  118. v-model="basicForm.deliveryCode"
  119. size="mini"
  120. :disabled="sonDisable"
  121. clearable
  122. style="width: 200px"
  123. />
  124. </el-form-item>
  125. </el-col>
  126. <el-col :span="1.5">
  127. <el-form-item label="调拨入库单号">
  128. <el-input
  129. v-model="basicForm.storageCode"
  130. size="mini"
  131. :disabled="sonDisable"
  132. clearable
  133. style="width: 200px"
  134. />
  135. </el-form-item>
  136. </el-col>
  137. <el-col :span="1.5">
  138. <el-form-item label="币种">
  139. <el-select clearable :disabled="sonDisable"
  140. size="mini"
  141. v-model="basicForm.currency"
  142. @focus="chooseRefer('CURRENCY_PARAM', true, '币种')"
  143. style="width: 200px"
  144. >
  145. <el-option v-for="item in currencyOptions" :key="item.id" :label="item.name" :value="item.id"/>
  146. </el-select>
  147. </el-form-item>
  148. </el-col>
  149. <el-col :span="1.5">
  150. <el-form-item label="总数量">
  151. <el-input clearable :disabled="sonDisable" v-model="basicForm.qty" type="number" min="0" size="mini" style="width: 200px"/>
  152. </el-form-item>
  153. </el-col>
  154. <el-col :span="1.5">
  155. <el-form-item label="结算路径">
  156. <el-input clearable :disabled="sonDisable" v-model="basicForm.accountPath" size="mini" style="width: 200px"/>
  157. </el-form-item>
  158. </el-col>
  159. <el-col :span="1.5">
  160. <el-form-item label="折本汇率">
  161. <el-input-number
  162. v-model="basicForm.rate" size="mini" disabled :precision="2" :step="0.1" :max="10" style="width: 200px"></el-input-number>
  163. </el-form-item>
  164. </el-col>
  165. <el-col :span="1.5">
  166. <el-form-item label="客户">
  167. <el-select clearable :disabled="sonDisable"
  168. size="mini"
  169. v-model="basicForm.customer"
  170. @clear="clean('客户')"
  171. @focus="chooseRefer('CUSTOMER_PARAM', true, '客户')"
  172. style="width: 200px"
  173. >
  174. <!-- @change="controlDRHW" -->
  175. <el-option v-for="item in customerOptions" :key="item.id" :label="item.name" :value="item.id"/>
  176. </el-select>
  177. </el-form-item>
  178. </el-col>
  179. <el-col :span="1.5">
  180. <el-form-item label="物流项目组">
  181. <el-select clearable :disabled="sonDisable" v-model="basicForm.materialProject"
  182. size="mini"
  183. style="width: 200px"
  184. >
  185. <el-option v-for="dict in dict.type.sys_project_group" :key="dict.value" :label="dict.label" :value="dict.value">
  186. </el-option>
  187. </el-select>
  188. </el-form-item>
  189. </el-col>
  190. <el-col :span="1.5">
  191. <el-form-item label="利润中心">
  192. <el-select clearable :disabled="sonDisable"
  193. size="mini"
  194. v-model="basicForm.liacenter"
  195. @clear="clean('利润中心')"
  196. @focus="chooseTreeRefer('LIACENTER_PARAM', false, '利润中心')"
  197. style="width: 200px"
  198. >
  199. <el-option v-for="item in liacenterOptions" :key="item.id" :label="item.name" :value="item.id"/>
  200. </el-select>
  201. </el-form-item>
  202. </el-col>
  203. <el-col :span="1.5">
  204. <el-form-item label="在途归属">
  205. <el-input clearable disabled v-model="basicForm.onRouteAffilliation" size="mini" style="width: 200px"/>
  206. </el-form-item>
  207. </el-col>
  208. <el-col :span="1.5">
  209. <el-form-item label="单据状态">
  210. <el-select disabled v-model="basicForm.status"
  211. size="mini"
  212. style="width: 200px"
  213. >
  214. <el-option v-for="dict in dict.type.sys_status" :key="dict.value" :label="dict.label" :value="dict.value">
  215. </el-option>
  216. </el-select>
  217. </el-form-item>
  218. </el-col>
  219. <el-col :span="1.5">
  220. <el-form-item label="备注">
  221. <el-input
  222. v-model="basicForm.remark"
  223. size="mini"
  224. :disabled="sonDisable"
  225. clearable
  226. style="width: 200px"
  227. />
  228. </el-form-item>
  229. </el-col>
  230. </el-row>
  231. <el-row>
  232. <el-col :span="1.5">
  233. <el-form-item label="NC单据号">
  234. <el-input
  235. v-model="basicForm.ncCode"
  236. size="mini"
  237. disabled
  238. style="width: 200px"
  239. />
  240. </el-form-item>
  241. </el-col>
  242. </el-row>
  243. <el-row>
  244. <el-col :span="20">
  245. <el-form-item label="同步NC结果">
  246. <el-input
  247. v-model="basicForm.isSendWms"
  248. type="textarea"
  249. :rows="3"
  250. size="mini"
  251. disabled
  252. clearable
  253. />
  254. </el-form-item>
  255. </el-col>
  256. </el-row>
  257. <el-tabs style="margin-top: 10px" type="border-card">
  258. <el-tab-pane label="物料信息">
  259. <div class="btn_grooup">
  260. <el-button type="primary" size="mini" v-if="!sonDisable" @click="addLine">增行</el-button>
  261. </div>
  262. <el-table
  263. v-loading="loading"
  264. :data="materialInfo"
  265. fit
  266. border
  267. max-height="280"
  268. style="font-size: 12px"
  269. :row-class-name="rowClassName"
  270. >
  271. <el-table-column
  272. show-overflow-tooltip
  273. label="行号"
  274. align="center"
  275. prop="rowno"
  276. >
  277. <template slot-scope="scope">
  278. {{ scope.row.rowno = scope.$index + 1 + "0" }}
  279. </template>
  280. </el-table-column>
  281. <el-table-column
  282. show-overflow-tooltip
  283. label="采购需求单单号"
  284. align="center"
  285. prop="demandCode"
  286. width="150px"
  287. />
  288. <el-table-column
  289. show-overflow-tooltip
  290. label="物料编码"
  291. align="center"
  292. prop="materialCode"
  293. width="200px"
  294. >
  295. <template slot-scope="scope">
  296. <el-form-item class="hang">
  297. <el-input
  298. clearable
  299. :disabled="sonDisable"
  300. size="mini"
  301. v-model="scope.row.materialCode"
  302. @clear="cleanMx(scope.$index, '物料编码')"
  303. @focus="chooseMaterial(scope.$index)"
  304. >
  305. <el-button
  306. size="mini"
  307. :disabled="sonDisable"
  308. slot="append"
  309. icon="el-icon-more"
  310. @click="chooseMaterial(scope.$index)"
  311. ></el-button>
  312. </el-input>
  313. </el-form-item>
  314. </template>
  315. </el-table-column>
  316. <el-table-column
  317. show-overflow-tooltip
  318. label="物料名称"
  319. align="center"
  320. prop="materialName"
  321. width="180px"
  322. />
  323. <el-table-column
  324. show-overflow-tooltip
  325. label="调拨出库单号"
  326. align="center"
  327. prop="deliveryCode"
  328. width="180px"
  329. />
  330. <el-table-column
  331. show-overflow-tooltip
  332. label="调拨入库单号"
  333. align="center"
  334. prop="storageCode"
  335. width="180px"
  336. />
  337. <el-table-column
  338. show-overflow-tooltip
  339. label="规格"
  340. align="center"
  341. prop="specification"
  342. />
  343. <el-table-column
  344. show-overflow-tooltip
  345. label="生产厂家/代理人"
  346. align="center"
  347. prop="manufacturer"
  348. width="250px"
  349. />
  350. <el-table-column
  351. show-overflow-tooltip
  352. label="产地"
  353. align="center"
  354. prop="originPlaceName"
  355. />
  356. <el-table-column
  357. show-overflow-tooltip
  358. label="型号"
  359. align="center"
  360. prop="model"
  361. />
  362. <el-table-column
  363. show-overflow-tooltip
  364. label="单位"
  365. align="center"
  366. prop="unitName"
  367. />
  368. <!-- <el-table-column show-overflow-tooltip label="调出仓库" align="center" prop="deliveryWarehouseName"/> -->
  369. <el-table-column
  370. show-overflow-tooltip
  371. label="数量"
  372. align="center"
  373. prop="qty"
  374. width="150px"
  375. >
  376. <template slot-scope="scope">
  377. <el-form-item class="hang">
  378. <el-input
  379. type="number"
  380. min="0"
  381. :disabled="sonDisable"
  382. clearable
  383. size="mini"
  384. v-model="scope.row.qty"
  385. @input="getSL(scope)"
  386. />
  387. </el-form-item>
  388. </template>
  389. </el-table-column>
  390. <el-table-column
  391. show-overflow-tooltip
  392. label="主单位"
  393. align="center"
  394. prop="mainUnitName"
  395. />
  396. <el-table-column
  397. show-overflow-tooltip
  398. label="换算率"
  399. align="center"
  400. prop="equation"
  401. />
  402. <el-table-column
  403. show-overflow-tooltip
  404. label="主数量"
  405. align="center"
  406. prop="mainQty"
  407. width="150px"
  408. >
  409. <template slot-scope="scope">
  410. <el-form-item class="hang">
  411. <el-input
  412. type="number"
  413. min="0"
  414. :disabled="sonDisable"
  415. clearable
  416. size="mini"
  417. v-model="scope.row.mainQty"
  418. @input="getZSL(scope)"
  419. />
  420. </el-form-item>
  421. </template>
  422. </el-table-column>
  423. <el-table-column
  424. show-overflow-tooltip
  425. label="税率"
  426. align="center"
  427. prop="rate"
  428. />
  429. <el-table-column
  430. show-overflow-tooltip
  431. label="调出货位"
  432. align="center"
  433. prop="deliveryAllocationName"
  434. width="220px"
  435. >
  436. <template slot-scope="scope">
  437. <el-form-item class="hang">
  438. <el-input
  439. clearable
  440. :disabled="sonDisable || isDCCk"
  441. size="mini"
  442. v-model="scope.row.deliveryAllocationName"
  443. @clear="cleanMx(scope.$index, '调出货位')"
  444. @focus="
  445. chooseMxHW(
  446. scope.$index,
  447. 'ALLOCATION_PARAM',
  448. true,
  449. '调出货位',
  450. basicForm.deliveryWarehouse
  451. )
  452. "
  453. >
  454. <el-button
  455. size="mini"
  456. :disabled="sonDisable || isDCCk"
  457. slot="append"
  458. icon="el-icon-more"
  459. @click="
  460. chooseMxHW(
  461. scope.$index,
  462. 'ALLOCATION_PARAM',
  463. true,
  464. '调出货位',
  465. basicForm.deliveryWarehouse
  466. )
  467. "
  468. ></el-button>
  469. </el-input>
  470. </el-form-item>
  471. </template>
  472. </el-table-column>
  473. <el-table-column
  474. show-overflow-tooltip
  475. label="调入部门"
  476. align="center"
  477. prop="storageDeptName"
  478. width="220px"
  479. >
  480. <template slot-scope="scope">
  481. <el-form-item class="hang">
  482. <el-input
  483. clearable
  484. :disabled="sonDisable || isOrg"
  485. size="mini"
  486. v-model="scope.row.storageDeptName"
  487. @clear="cleanMx(scope.$index, '调入部门')"
  488. @focus="
  489. chooseMxBM(
  490. scope.$index,
  491. 'DEPT_PARAM',
  492. true,
  493. '调入部门',
  494. basicForm.storageInventoryOrg
  495. )
  496. "
  497. >
  498. <el-button
  499. size="mini"
  500. :disabled="sonDisable || isOrg"
  501. slot="append"
  502. icon="el-icon-more"
  503. @click="
  504. chooseMxBM(
  505. scope.$index,
  506. 'DEPT_PARAM',
  507. true,
  508. '调入部门',
  509. basicForm.storageInventoryOrg
  510. )
  511. "
  512. ></el-button>
  513. </el-input>
  514. </el-form-item>
  515. </template>
  516. </el-table-column>
  517. <el-table-column
  518. show-overflow-tooltip
  519. label="调入货位"
  520. align="center"
  521. prop="storageAllocationName"
  522. width="220px"
  523. >
  524. <template slot-scope="scope">
  525. <el-form-item class="hang">
  526. <el-input
  527. clearable
  528. :disabled="sonDisable || isDRCk"
  529. size="mini"
  530. v-model="scope.row.storageAllocationName"
  531. @clear="cleanMx(scope.$index, '调入货位')"
  532. @focus="
  533. chooseMxHW(
  534. scope.$index,
  535. 'ALLOCATION_PARAM',
  536. true,
  537. '调入货位',
  538. basicForm.storageWarehouse
  539. )
  540. "
  541. >
  542. <el-button
  543. size="mini"
  544. :disabled="sonDisable || isDRCk"
  545. slot="append"
  546. icon="el-icon-more"
  547. @click="
  548. chooseMxHW(
  549. scope.$index,
  550. 'ALLOCATION_PARAM',
  551. true,
  552. '调入货位',
  553. basicForm.storageWarehouse
  554. )
  555. "
  556. ></el-button>
  557. </el-input>
  558. </el-form-item>
  559. </template>
  560. </el-table-column>
  561. <el-table-column
  562. show-overflow-tooltip
  563. label="批次号"
  564. align="center"
  565. prop="patchNo"
  566. />
  567. <el-table-column
  568. show-overflow-tooltip
  569. label="产品批号"
  570. align="center"
  571. prop="producBatch"
  572. width="220px"
  573. >
  574. <template slot-scope="scope">
  575. <el-form-item class="hang">
  576. <el-input
  577. disabled
  578. size="mini"
  579. v-model="scope.row.producBatch"
  580. >
  581. <el-button
  582. size="mini"
  583. :disabled="sonDisable"
  584. slot="append"
  585. icon="el-icon-more"
  586. @click="chooseBatch(scope.$index)"
  587. ></el-button>
  588. </el-input>
  589. </el-form-item>
  590. </template>
  591. </el-table-column>
  592. <el-table-column
  593. show-overflow-tooltip
  594. label="生产日期"
  595. align="center"
  596. prop="manufactureDate"
  597. width="230px"
  598. >
  599. <template slot-scope="scope">
  600. <el-form-item class="hang">
  601. <el-date-picker
  602. v-model="scope.row.manufactureDate"
  603. :disabled="sonDisable"
  604. type="date"
  605. size="mini"
  606. value-format="yyyy-MM-dd"
  607. >
  608. </el-date-picker>
  609. </el-form-item>
  610. </template>
  611. </el-table-column>
  612. <el-table-column
  613. show-overflow-tooltip
  614. label="有效期至/失效日期"
  615. align="center"
  616. prop="periodEndDate"
  617. width="150px"
  618. />
  619. <el-table-column
  620. show-overflow-tooltip
  621. label="调拨日期"
  622. align="center"
  623. prop="allotDate"
  624. width="230px"
  625. >
  626. <template slot-scope="scope">
  627. <el-form-item class="hang">
  628. <el-date-picker
  629. ref="findDate"
  630. v-model="scope.row.allotDate"
  631. :disabled="sonDisable"
  632. type="date"
  633. size="mini"
  634. :picker-options="pickerOptionsEnd"
  635. value-format="yyyy-MM-dd"
  636. >
  637. </el-date-picker>
  638. </el-form-item>
  639. </template>
  640. </el-table-column>
  641. <el-table-column
  642. show-overflow-tooltip
  643. label="批准文号"
  644. align="center"
  645. prop="ratifyCode"
  646. />
  647. <el-table-column
  648. show-overflow-tooltip
  649. label="注册证号"
  650. align="center"
  651. prop="registration"
  652. />
  653. <el-table-column
  654. show-overflow-tooltip
  655. label="商品名"
  656. align="center"
  657. prop="productCode"
  658. />
  659. <el-table-column
  660. show-overflow-tooltip
  661. label="通用名"
  662. align="center"
  663. prop="commonCode"
  664. width="150px"
  665. />
  666. <el-table-column
  667. show-overflow-tooltip
  668. label="剂型"
  669. align="center"
  670. prop="drug"
  671. />
  672. <el-table-column
  673. show-overflow-tooltip
  674. label="调入调出结算规则明细"
  675. align="center"
  676. prop="ruleDetail"
  677. width="200px"
  678. />
  679. <el-table-column
  680. show-overflow-tooltip
  681. label="上市许可持有人"
  682. align="center"
  683. prop="marketingApprovalPersonal"
  684. width="150px"
  685. />
  686. <el-table-column
  687. show-overflow-tooltip
  688. label="生产许可证号/经营许可证号/备案凭证号"
  689. align="center"
  690. prop="production"
  691. width="270px"
  692. />
  693. <el-table-column
  694. show-overflow-tooltip
  695. label="pi码"
  696. align="center"
  697. prop="pi"
  698. >
  699. <template slot-scope="scope">
  700. <el-form-item class="hang">
  701. <el-input
  702. :disabled="sonDisable"
  703. size="mini"
  704. v-model="scope.row.pi"
  705. />
  706. </el-form-item>
  707. </template>
  708. </el-table-column>
  709. <!-- <el-table-column show-overflow-tooltip label="无税金额" align="center" prop="code"/> -->
  710. <!-- <el-table-column show-overflow-tooltip label="备注" align="center" prop="code"/> -->
  711. <el-table-column
  712. show-overflow-tooltip
  713. label="类别"
  714. align="center"
  715. prop="classify"
  716. />
  717. <el-table-column
  718. show-overflow-tooltip
  719. label="客户物料码"
  720. align="center"
  721. prop="customerLogistic"
  722. width="150px"
  723. />
  724. <el-table-column
  725. show-overflow-tooltip
  726. label="客户物料名称"
  727. align="center"
  728. prop="customerLogisticName"
  729. width="150px"
  730. />
  731. <el-table-column fixed="right" label="操作" align="center">
  732. <template slot-scope="scope">
  733. <el-button
  734. type="text"
  735. size="mini"
  736. :disabled="sonDisable"
  737. @click="delLine(scope.$index, scope.row)"
  738. >删除</el-button
  739. >
  740. </template>
  741. </el-table-column>
  742. </el-table>
  743. </el-tab-pane>
  744. <el-tab-pane label="收发货信息">
  745. <el-table
  746. :data="receiveInfo"
  747. fit
  748. border
  749. max-height="280"
  750. style="font-size: 12px"
  751. >
  752. <el-table-column
  753. show-overflow-tooltip
  754. label="行号"
  755. align="center"
  756. prop="rowno"
  757. />
  758. <el-table-column
  759. show-overflow-tooltip
  760. label="调拨出库单号"
  761. align="center"
  762. prop="deliveryCode"
  763. width="150px"
  764. />
  765. <el-table-column
  766. show-overflow-tooltip
  767. label="调拨入库单号"
  768. align="center"
  769. prop="storageCode"
  770. width="150px"
  771. />
  772. <el-table-column
  773. show-overflow-tooltip
  774. label="生产厂家/代理人"
  775. align="center"
  776. prop="manufacturer"
  777. width="150px"
  778. />
  779. <el-table-column
  780. show-overflow-tooltip
  781. label="产地"
  782. align="center"
  783. prop="originPlace"
  784. width="150px"
  785. />
  786. <el-table-column
  787. show-overflow-tooltip
  788. label="类别"
  789. align="center"
  790. prop="classify"
  791. width="150px"
  792. />
  793. <el-table-column
  794. show-overflow-tooltip
  795. label="调出仓库"
  796. align="center"
  797. prop="deliveryWarehouseName"
  798. width="150px"
  799. />
  800. <el-table-column
  801. show-overflow-tooltip
  802. label="调入仓库"
  803. align="center"
  804. prop="storageWarehouseName"
  805. width="150px"
  806. />
  807. <!-- <el-table-column show-overflow-tooltip label="收货利润中心" align="center" prop="code"/>
  808. <el-table-column show-overflow-tooltip label="发货利润中心" align="center" prop="code"/> -->
  809. <el-table-column
  810. show-overflow-tooltip
  811. label="调入业务员"
  812. align="center"
  813. prop="businessPersonalName"
  814. width="150px"
  815. />
  816. <el-table-column
  817. show-overflow-tooltip
  818. label="产品批号"
  819. align="center"
  820. prop="productBatch"
  821. width="150px"
  822. />
  823. <el-table-column
  824. show-overflow-tooltip
  825. label="生产日期"
  826. align="center"
  827. prop="manufactureDate"
  828. width="150px"
  829. />
  830. <el-table-column
  831. show-overflow-tooltip
  832. label="有效期至/失效日期"
  833. align="center"
  834. prop="periodEndDate"
  835. width="150px"
  836. />
  837. <el-table-column
  838. show-overflow-tooltip
  839. label="批准文号"
  840. align="center"
  841. prop="ratifyCode"
  842. width="150px"
  843. />
  844. <el-table-column
  845. show-overflow-tooltip
  846. label="注册证号"
  847. align="center"
  848. prop="registration"
  849. width="150px"
  850. />
  851. <el-table-column
  852. show-overflow-tooltip
  853. label="商品名"
  854. align="center"
  855. prop="productCode"
  856. width="150px"
  857. />
  858. <el-table-column
  859. show-overflow-tooltip
  860. label="通用名"
  861. align="center"
  862. prop="commonCode"
  863. width="150px"
  864. />
  865. <el-table-column
  866. show-overflow-tooltip
  867. label="剂型"
  868. align="center"
  869. prop="drug"
  870. width="150px"
  871. />
  872. <el-table-column
  873. show-overflow-tooltip
  874. label="收货客户"
  875. align="center"
  876. prop="customerName"
  877. width="150px"
  878. />
  879. <el-table-column
  880. show-overflow-tooltip
  881. label="收货地址"
  882. align="center"
  883. prop="addressaddress"
  884. width="150px"
  885. />
  886. <el-table-column
  887. show-overflow-tooltip
  888. label="收货地区"
  889. align="center"
  890. prop="area"
  891. width="150px"
  892. />
  893. <el-table-column
  894. show-overflow-tooltip
  895. label="收货地点"
  896. align="center"
  897. prop="place"
  898. width="150px"
  899. />
  900. <el-table-column
  901. show-overflow-tooltip
  902. label="计划发货日期"
  903. align="center"
  904. prop="deliveryDate"
  905. width="150px"
  906. />
  907. <el-table-column
  908. show-overflow-tooltip
  909. label="计划到货日期"
  910. align="center"
  911. prop="strageDate"
  912. width="150px"
  913. />
  914. <el-table-column
  915. show-overflow-tooltip
  916. label="运输方式"
  917. align="center"
  918. prop="transportation"
  919. width="150px"
  920. />
  921. <el-table-column
  922. show-overflow-tooltip
  923. label="备注"
  924. align="center"
  925. prop="remark"
  926. width="150px"
  927. />
  928. <el-table-column
  929. show-overflow-tooltip
  930. label="客户物料编码"
  931. align="center"
  932. prop="customerLogistic"
  933. width="150px"
  934. />
  935. <el-table-column
  936. show-overflow-tooltip
  937. label="客户物料名称"
  938. align="center"
  939. prop="customerLogisticName"
  940. width="150px"
  941. />
  942. </el-table>
  943. </el-tab-pane>
  944. <el-tab-pane label="价格费用">
  945. <el-table
  946. :data="priceList"
  947. fit
  948. border
  949. max-height="280"
  950. style="font-size: 12px"
  951. >
  952. <el-table-column
  953. show-overflow-tooltip
  954. label="行号"
  955. align="center"
  956. prop="rowno"
  957. />
  958. <el-table-column
  959. show-overflow-tooltip
  960. label="调拨出库单号"
  961. align="center"
  962. prop="deliveryCode"
  963. width="150px"
  964. />
  965. <el-table-column
  966. show-overflow-tooltip
  967. label="调拨入库单号"
  968. align="center"
  969. prop="storageCode"
  970. width="150px"
  971. />
  972. <el-table-column
  973. show-overflow-tooltip
  974. label="生产厂家/代理人"
  975. align="center"
  976. prop="manufacturer"
  977. width="150px"
  978. />
  979. <el-table-column
  980. show-overflow-tooltip
  981. label="产地"
  982. align="center"
  983. prop="originPlace"
  984. width="150px"
  985. />
  986. <el-table-column
  987. show-overflow-tooltip
  988. label="类别"
  989. align="center"
  990. prop="classify"
  991. width="150px"
  992. />
  993. <!-- <el-table-column show-overflow-tooltip label="税率" align="center" prop="code"/> -->
  994. <!-- <el-table-column show-overflow-tooltip label="无税单价" align="center" prop="code"/> -->
  995. <!-- <el-table-column show-overflow-tooltip label="含税单价" align="center" prop="code"/> -->
  996. <el-table-column
  997. show-overflow-tooltip
  998. label="产品批号"
  999. align="center"
  1000. prop="productBatch"
  1001. width="150px"
  1002. />
  1003. <el-table-column
  1004. show-overflow-tooltip
  1005. label="生产日期"
  1006. align="center"
  1007. prop="manufactureDate"
  1008. width="150px"
  1009. />
  1010. <el-table-column
  1011. show-overflow-tooltip
  1012. label="有效期至/失效日期"
  1013. align="center"
  1014. prop="periodEndDate"
  1015. width="150px"
  1016. />
  1017. <el-table-column
  1018. show-overflow-tooltip
  1019. label="批准文号"
  1020. align="center"
  1021. prop="ratifyCode"
  1022. width="150px"
  1023. />
  1024. <el-table-column
  1025. show-overflow-tooltip
  1026. label="注册证号"
  1027. align="center"
  1028. prop="registration"
  1029. width="150px"
  1030. />
  1031. <el-table-column
  1032. show-overflow-tooltip
  1033. label="商品名"
  1034. align="center"
  1035. prop="productCode"
  1036. width="150px"
  1037. />
  1038. <el-table-column
  1039. show-overflow-tooltip
  1040. label="通用名"
  1041. align="center"
  1042. prop="commonCode"
  1043. width="150px"
  1044. />
  1045. <el-table-column
  1046. show-overflow-tooltip
  1047. label="剂型"
  1048. align="center"
  1049. prop="drug"
  1050. width="150px"
  1051. />
  1052. <!-- <el-table-column show-overflow-tooltip label="询价无税价" align="center" prop="code"/> -->
  1053. <!-- <el-table-column show-overflow-tooltip label="询价含税价" align="center" prop="code"/> -->
  1054. <!-- <el-table-column show-overflow-tooltip label="税额" align="center" prop="code"/> -->
  1055. <!-- <el-table-column show-overflow-tooltip label="加价率" align="center" prop="code"/> -->
  1056. <!-- <el-table-column show-overflow-tooltip label="无税金额" align="center" prop="code"/> -->
  1057. <!-- <el-table-column show-overflow-tooltip label="价税合计" align="center" prop="code"/> -->
  1058. <el-table-column
  1059. show-overflow-tooltip
  1060. label="客户物料码"
  1061. align="center"
  1062. prop="customerLogistic"
  1063. width="150px"
  1064. />
  1065. <el-table-column
  1066. show-overflow-tooltip
  1067. label="客户物料名称"
  1068. align="center"
  1069. prop="customerLogisticName"
  1070. width="150px"
  1071. />
  1072. </el-table>
  1073. </el-tab-pane>
  1074. <el-tab-pane label="执行结果">
  1075. <el-table
  1076. :data="resultList"
  1077. fit
  1078. border
  1079. max-height="280"
  1080. style="font-size: 12px"
  1081. >
  1082. <el-table-column
  1083. show-overflow-tooltip
  1084. label="行号"
  1085. align="center"
  1086. prop="rowno"
  1087. />
  1088. <el-table-column
  1089. show-overflow-tooltip
  1090. label="调拨出库单号"
  1091. align="center"
  1092. prop="deliveryCode"
  1093. width="150px"
  1094. />
  1095. <el-table-column
  1096. show-overflow-tooltip
  1097. label="调拨入库单号"
  1098. align="center"
  1099. prop="storageCode"
  1100. width="150px"
  1101. />
  1102. <el-table-column
  1103. show-overflow-tooltip
  1104. label="生产厂家/代理人"
  1105. align="center"
  1106. prop="manufacturer"
  1107. width="150px"
  1108. />
  1109. <el-table-column
  1110. show-overflow-tooltip
  1111. label="产地"
  1112. align="center"
  1113. prop="originPlace"
  1114. width="150px"
  1115. />
  1116. <el-table-column
  1117. show-overflow-tooltip
  1118. label="类别"
  1119. align="center"
  1120. prop="classify"
  1121. width="150px"
  1122. />
  1123. <el-table-column
  1124. show-overflow-tooltip
  1125. label="产品批号"
  1126. align="center"
  1127. prop="productBatch"
  1128. width="150px"
  1129. />
  1130. <el-table-column
  1131. show-overflow-tooltip
  1132. label="生产日期"
  1133. align="center"
  1134. prop="manufactureDate"
  1135. width="150px"
  1136. />
  1137. <el-table-column
  1138. show-overflow-tooltip
  1139. label="有效期至/失效日期"
  1140. align="center"
  1141. prop="periodEndDate"
  1142. width="150px"
  1143. />
  1144. <el-table-column
  1145. show-overflow-tooltip
  1146. label="批准文号"
  1147. align="center"
  1148. prop="ratifyCode"
  1149. width="150px"
  1150. />
  1151. <el-table-column
  1152. show-overflow-tooltip
  1153. label="注册证号"
  1154. align="center"
  1155. prop="registration"
  1156. width="150px"
  1157. />
  1158. <el-table-column
  1159. show-overflow-tooltip
  1160. label="商品名"
  1161. align="center"
  1162. prop="productCode"
  1163. width="150px"
  1164. />
  1165. <el-table-column
  1166. show-overflow-tooltip
  1167. label="通用名"
  1168. align="center"
  1169. prop="commonCode"
  1170. width="150px"
  1171. />
  1172. <el-table-column
  1173. show-overflow-tooltip
  1174. label="剂型"
  1175. align="center"
  1176. prop="drug"
  1177. width="150px"
  1178. />
  1179. <!-- <el-table-column show-overflow-tooltip label="已调出主数量" align="center" prop="code"/>
  1180. <el-table-column show-overflow-tooltip label="已调入主数量" align="center" prop="code"/> -->
  1181. <!-- <el-table-column show-overflow-tooltip label="调拨在途主数量" align="center" prop="code"/> -->
  1182. <!-- <el-table-column show-overflow-tooltip label="已发货主数量" align="center" prop="code"/> -->
  1183. <!-- <el-table-column show-overflow-tooltip label="途损主数量" align="center" prop="code"/> -->
  1184. <!-- <el-table-column show-overflow-tooltip label="累计退货主数量" align="center" prop="code"/> -->
  1185. <!-- <el-table-column show-overflow-tooltip label="调出与调入已结算主数量" align="center" prop="code"/> -->
  1186. <!-- <el-table-column show-overflow-tooltip label="调出与调入已结算金额" align="center" prop="code"/> -->
  1187. <el-table-column
  1188. show-overflow-tooltip
  1189. label="客户物料码"
  1190. align="center"
  1191. prop="customerLogistic"
  1192. width="150px"
  1193. />
  1194. <el-table-column
  1195. show-overflow-tooltip
  1196. label="客户物料名称"
  1197. align="center"
  1198. prop="customerLogisticName"
  1199. width="150px"
  1200. />
  1201. </el-table>
  1202. </el-tab-pane>
  1203. </el-tabs>
  1204. <el-divider content-position="left">表尾信息</el-divider>
  1205. <el-row :gutter="10">
  1206. <el-col :span="1.5">
  1207. <el-form-item label="制单人">
  1208. <el-input
  1209. v-model="basicForm.createByName"
  1210. size="mini"
  1211. disabled
  1212. clearable
  1213. style="width: 200px"
  1214. />
  1215. </el-form-item>
  1216. </el-col>
  1217. <el-col :span="1.5">
  1218. <el-form-item label="制单日期">
  1219. <el-input
  1220. v-model="basicForm.createTime"
  1221. size="mini"
  1222. disabled
  1223. clearable
  1224. style="width: 200px"
  1225. />
  1226. </el-form-item>
  1227. </el-col>
  1228. <!-- <el-col :span="1.5">
  1229. <el-form-item label="审批人">
  1230. <el-input
  1231. v-model="basicForm.code"
  1232. size="mini"
  1233. disabled
  1234. clearable
  1235. style="width: 200px"
  1236. />
  1237. </el-form-item>
  1238. </el-col>
  1239. <el-col :span="1.5">
  1240. <el-form-item label="审批日期">
  1241. <el-input
  1242. v-model="basicForm.code"
  1243. size="mini"
  1244. disabled
  1245. clearable
  1246. style="width: 200px"
  1247. />
  1248. </el-form-item>
  1249. </el-col> -->
  1250. </el-row>
  1251. <el-divider content-position="left">审计信息</el-divider>
  1252. <el-row :gutter="10">
  1253. <el-col :span="1.5">
  1254. <el-form-item label="创建人">
  1255. <el-input
  1256. v-model="basicForm.createByName"
  1257. size="mini"
  1258. disabled
  1259. clearable
  1260. style="width: 200px"
  1261. />
  1262. </el-form-item>
  1263. </el-col>
  1264. <el-col :span="1.5">
  1265. <el-form-item label="创建时间">
  1266. <el-input
  1267. v-model="basicForm.createTime"
  1268. size="mini"
  1269. disabled
  1270. clearable
  1271. style="width: 200px"
  1272. />
  1273. </el-form-item>
  1274. </el-col>
  1275. <el-col :span="1.5">
  1276. <el-form-item label="最后修改人">
  1277. <el-input
  1278. v-model="basicForm.updateByName"
  1279. size="mini"
  1280. disabled
  1281. clearable
  1282. style="width: 200px"
  1283. />
  1284. </el-form-item>
  1285. </el-col>
  1286. <el-col :span="1.5">
  1287. <el-form-item label="最后修改时间">
  1288. <el-input
  1289. v-model="basicForm.updateTime"
  1290. size="mini"
  1291. disabled
  1292. clearable
  1293. style="width: 200px"
  1294. />
  1295. </el-form-item>
  1296. </el-col>
  1297. </el-row>
  1298. </el-form>
  1299. <div class="btn_group">
  1300. <el-button
  1301. type="primary"
  1302. size="mini"
  1303. plain
  1304. @click="jumpOA"
  1305. v-if="
  1306. sonPageStu == 'check' &&
  1307. (row.status == '1' || row.status == '2') &&
  1308. row.oaId
  1309. "
  1310. >审批</el-button
  1311. >
  1312. <el-button
  1313. type="primary"
  1314. size="mini"
  1315. plain
  1316. @click="copy"
  1317. v-if="sonPageStu == 'check'"
  1318. >复制</el-button
  1319. >
  1320. <el-button
  1321. type="danger"
  1322. size="mini"
  1323. plain
  1324. @click="toNC"
  1325. v-if="sonPageStu == 'check' && row.status == '2'"
  1326. >重传NC</el-button
  1327. >
  1328. <el-button
  1329. type="primary"
  1330. size="mini"
  1331. plain
  1332. @click="save"
  1333. v-if="sonPageStu == 'add' || sonPageStu == 'edit'"
  1334. >保存</el-button
  1335. >
  1336. <el-button
  1337. type="primary"
  1338. size="mini"
  1339. plain
  1340. @click="submit"
  1341. v-if="
  1342. sonPageStu == 'check' && (row.status == '0' || row.status == '3')
  1343. "
  1344. >提交</el-button
  1345. >
  1346. <el-button size="mini" plain @click="back">返回</el-button>
  1347. </div>
  1348. </el-card>
  1349. <Refers ref="refer" @doSubmit="selectionsToInput" :single="true" />
  1350. <TreeRefers ref="tree" @doSubmit="selectionsToInput2" :single="true" />
  1351. <popDialog ref="materialRefer" @doSubmit="selectMaterial" :single="true" />
  1352. <batchRefers ref="batchRefer" @doSubmit="selectBatch" :single="true" />
  1353. </div>
  1354. </template>
  1355. <script>
  1356. import { toOA } from "@/api/purchase/purchaseDemand.js";
  1357. import {
  1358. addOrder,
  1359. getOrderDetail,
  1360. editOrder,
  1361. submitOrder,
  1362. againToNC,
  1363. } from "@/api/purchase/transferOrder.js";
  1364. import Refers from "@/components/Refers/refers.vue";
  1365. // 用于回显参照框数据
  1366. import { getRefer } from "@/api/purchase/basic.js";
  1367. import TreeRefers from "@/components/Refers/treeRefer.vue";
  1368. // 明细行选择物料参照
  1369. import popDialog from "@/components/PopDialog/index.vue";
  1370. // 明细行选择批次号
  1371. import batchRefers from "@/components/Refers/batchRefer.vue";
  1372. export default {
  1373. name: "addOder",
  1374. dicts: [
  1375. "sys_allot_billtype",
  1376. "sys_project_group",
  1377. "sys_status",
  1378. "sys_to_type",
  1379. ],
  1380. props: ["pageStu", "row", "disable"],
  1381. components: {
  1382. Refers,
  1383. TreeRefers,
  1384. popDialog,
  1385. batchRefers,
  1386. },
  1387. model: {
  1388. prop: "isList",
  1389. event: "jugislist",
  1390. },
  1391. data() {
  1392. return {
  1393. loading: true,
  1394. // 不能直接改变props传来的值
  1395. sonPageStu: this.pageStu,
  1396. sonDisable: this.disable,
  1397. basicForm: {
  1398. deliveryInventoryOrg: "",
  1399. deliveryInventoryOrgCode: "",
  1400. deliveryInventoryOrgName: "",
  1401. billType: "",
  1402. code: "",
  1403. billDate: "",
  1404. allotType: "",
  1405. deliveryCode: "",
  1406. storageCode: "",
  1407. storageInventoryOrg: "",
  1408. storageInventory: "",
  1409. storageInventoryOrgName: "",
  1410. businessPersonal: "",
  1411. businessPersonalName: "",
  1412. deliveryDept: "",
  1413. deliveryDeptName: "",
  1414. currency: "",
  1415. currencyName: "",
  1416. rate: 1,
  1417. onRouteAffilliation: "",
  1418. qty: "",
  1419. accountPath: "",
  1420. customer: "",
  1421. customerName: "",
  1422. deliveryWarehouse: "",
  1423. deliveryWarehouseCode: "",
  1424. deliveryWarehouseName: "",
  1425. storageWarehouse: "",
  1426. storageWarehouseName: "",
  1427. materialProject: "",
  1428. liacenter: "",
  1429. liacenterName: "",
  1430. sourceIdentification: "",
  1431. remark: "",
  1432. ncCode: "",
  1433. isSendWms: "",
  1434. status: "0",
  1435. tenantId: "",
  1436. revision: "",
  1437. createByName: "",
  1438. updateByName: "",
  1439. delFlag: "",
  1440. },
  1441. referCondition: {
  1442. type: "",
  1443. isPage: true,
  1444. title: "",
  1445. // 仓库编码
  1446. stordocId: "",
  1447. orgCode: "",
  1448. materialCode: "",
  1449. unitCode: "",
  1450. warehouseCode: "",
  1451. },
  1452. options: [
  1453. {
  1454. value: "Y",
  1455. label: "是",
  1456. },
  1457. {
  1458. value: "N",
  1459. label: "否",
  1460. },
  1461. ],
  1462. tableIndex: null,
  1463. chuOrgOptions: [],
  1464. ruOrgOptions: [],
  1465. manOptions: [],
  1466. deptOptions: [],
  1467. currencyOptions: [],
  1468. customerOptions: [],
  1469. ruHouseOptions: [],
  1470. chuHouseOptions: [],
  1471. liacenterOptions: [],
  1472. basicRules: {},
  1473. materialInfo: [],
  1474. receiveInfo: [],
  1475. priceList: [],
  1476. resultList: [],
  1477. pickerOptionsEnd: {
  1478. disabledDate: (time) => {
  1479. let beginDateVal = this.basicForm.billDate;
  1480. if (beginDateVal) {
  1481. return time.getTime() < new Date(beginDateVal).getTime() - 8.64e7;
  1482. }
  1483. },
  1484. },
  1485. isOrg: true,
  1486. isDRCk: true,
  1487. isDCCk: true,
  1488. };
  1489. },
  1490. created() {
  1491. if (this.pageStu == "check") {
  1492. console.log("数据", this.row);
  1493. this.getDetails(this.row);
  1494. } else if (this.pageStu == "edit") {
  1495. this.getDetails(this.row);
  1496. this.isDRCk = false;
  1497. this.isDCCk = false;
  1498. } else if (this.pageStu == "add") {
  1499. this.loading = false
  1500. }
  1501. },
  1502. methods: {
  1503. // 改变单据日期时清空子表的调拨日期
  1504. changeBillDate() {
  1505. this.materialInfo.forEach((item) => {
  1506. item.allotDate = null;
  1507. });
  1508. },
  1509. // 控制先选调出库存组织和调入库存组织再选调出部门和调入调出仓库
  1510. controlCk(val) {
  1511. if (val = '调出库存组织') {console.log("进了吗");}
  1512. if (
  1513. this.basicForm.deliveryInventoryOrg &&
  1514. this.basicForm.storageInventoryOrg
  1515. ) {
  1516. this.isOrg = false;
  1517. } else {
  1518. this.basicForm.deliveryDept = "";
  1519. this.basicForm.storageWarehouse = "";
  1520. this.basicForm.deliveryWarehouse = "";
  1521. this.isOrg = true;
  1522. // 选择调入库存组织时判断调拨方式
  1523. this.basicForm.allotType = "";
  1524. }
  1525. },
  1526. // 控制子表内货位是否可以填写,根据选择仓库内csFlag
  1527. controlDCHW() {
  1528. console.log("🚀 ~ file: add.vue:735 调出货位");
  1529. this.isDCCk = true;
  1530. this.materialInfo.forEach((item) => {
  1531. item.deliveryAllocation = null;
  1532. item.deliveryAllocationName = null;
  1533. });
  1534. },
  1535. controlDRHW() {
  1536. console.log("🚀 ~ file: add.vue:735 调入货位");
  1537. this.isDRCk = true;
  1538. this.materialInfo.forEach((item) => {
  1539. item.storageAllocation = null;
  1540. item.storageAllocationName = null;
  1541. });
  1542. },
  1543. // 输入数量或者主数量同步改变
  1544. getZSL(scope) {
  1545. scope.row.qty = scope.row.mainQty;
  1546. },
  1547. getSL(scope) {
  1548. scope.row.mainQty = scope.row.qty;
  1549. },
  1550. copy() {
  1551. // await this.getDetails(this.row)
  1552. this.$modal.notifySuccess("复制成功");
  1553. this.sonPageStu = "add";
  1554. this.sonDisable = false;
  1555. this.basicForm.id = "";
  1556. this.basicForm.code = "";
  1557. this.basicForm.createByName = "";
  1558. this.basicForm.createBy = "";
  1559. this.basicForm.createTime = "";
  1560. this.basicForm.isSendWms = "";
  1561. this.basicForm.ncCode = "";
  1562. this.basicForm.oaId = "";
  1563. this.basicForm.updateBy = "";
  1564. this.basicForm.updateByName = "";
  1565. this.basicForm.updateTime = "";
  1566. this.basicForm.storageCode = "";
  1567. this.basicForm.deliveryCode = "";
  1568. // 复制新增把id,编码,创建人置为空,子表去掉id
  1569. if (this.materialInfo.length !== 0) {
  1570. this.materialInfo.forEach((item) => {
  1571. if (item.deliveryCode) {
  1572. item.deliveryCode = "";
  1573. }
  1574. if (item.storageCode) {
  1575. item.storageCode = "";
  1576. }
  1577. if (item.demandCode) {
  1578. item.demandCode = "";
  1579. }
  1580. if (item.allotId) {
  1581. delete item.allotId;
  1582. }
  1583. if (item.id) {
  1584. delete item.id;
  1585. }
  1586. if (item.createBy) {
  1587. delete item.createBy;
  1588. delete item.createByName;
  1589. delete item.createTime;
  1590. }
  1591. if (item.updateBy) {
  1592. delete item.updateBy;
  1593. delete item.updateByName;
  1594. delete item.updateTime;
  1595. }
  1596. });
  1597. }
  1598. this.isDRCk = false;
  1599. this.isDCCk = false;
  1600. },
  1601. toNC() {
  1602. againToNC(this.row)
  1603. .then((res) => {
  1604. this.getDetails(this.row);
  1605. })
  1606. .catch((err) => {
  1607. this.getDetails(this.row);
  1608. });
  1609. },
  1610. submit() {
  1611. this.$modal.loading("提交中...");
  1612. this.basicForm.stAllotMaterialList = this.materialInfo;
  1613. this.basicForm.stAllotReceiveDeliverList = this.receiveInfo;
  1614. this.basicForm.stAllotReceiveExecuteList = this.priceList;
  1615. this.basicForm.stAllotReceiveExpenseList = this.resultList;
  1616. submitOrder(this.basicForm)
  1617. .then((res) => {
  1618. if (res.code === 200) {
  1619. this.$modal.closeLoading();
  1620. this.$modal.notifySuccess("提交成功");
  1621. this.back();
  1622. }
  1623. })
  1624. .catch((err) => {
  1625. this.$modal.closeLoading();
  1626. });
  1627. },
  1628. save() {
  1629. if (this.materialInfo.length !== 0) {
  1630. if (this.sonPageStu == "add") {
  1631. this.basicForm.stAllotMaterialList = this.materialInfo;
  1632. this.basicForm.stAllotReceiveDeliverList = this.receiveInfo;
  1633. this.basicForm.stAllotReceiveExecuteList = this.priceList;
  1634. this.basicForm.stAllotReceiveExpenseList = this.resultList;
  1635. this.$modal.loading("保存中...");
  1636. addOrder(this.basicForm)
  1637. .then((res) => {
  1638. if (res.code === 200) {
  1639. this.$modal.notifySuccess("保存成功");
  1640. this.$modal.closeLoading();
  1641. this.back();
  1642. }
  1643. })
  1644. .catch((err) => {
  1645. this.$modal.closeLoading();
  1646. });
  1647. } else if (this.sonPageStu == "edit") {
  1648. this.basicForm.stAllotMaterialList = this.materialInfo;
  1649. this.basicForm.stAllotReceiveDeliverList = this.receiveInfo;
  1650. this.basicForm.stAllotReceiveExecuteList = this.priceList;
  1651. this.basicForm.stAllotReceiveExpenseList = this.resultList;
  1652. this.$modal.loading("保存中...");
  1653. editOrder(this.basicForm)
  1654. .then((res) => {
  1655. if (res.code === 200) {
  1656. this.$modal.notifySuccess("编辑成功");
  1657. this.$modal.closeLoading();
  1658. this.back();
  1659. }
  1660. })
  1661. .catch((err) => {
  1662. this.$modal.closeLoading();
  1663. });
  1664. }
  1665. } else {
  1666. this.$modal.notifyWarning("明细行不能为空");
  1667. }
  1668. },
  1669. back() {
  1670. this.$emit("jugislist", true);
  1671. // let queryParams = {
  1672. // pageNum: 1,
  1673. // pageSize: 5
  1674. // }
  1675. this.$emit("refresh");
  1676. },
  1677. // 如果需要回显则调用详情接口
  1678. getDetails(row) {
  1679. getOrderDetail(row.id).then((res) => {
  1680. if (res.code === 200) {
  1681. this.basicForm = res.data;
  1682. this.materialInfo = res.data.stAllotMaterialList;
  1683. this.receiveInfo = res.data.stAllotReceiveDeliverList;
  1684. this.priceList = res.data.stAllotReceiveExecuteList;
  1685. this.resultList = res.data.stAllotReceiveExpenseList;
  1686. if (this.basicForm.deliveryInventoryOrg) {
  1687. this.reBackRefer(
  1688. "ORG_PARAM",
  1689. this.basicForm.deliveryInventoryOrg,
  1690. "调出库存组织"
  1691. );
  1692. }
  1693. if (this.basicForm.storageInventoryOrg) {
  1694. this.reBackRefer(
  1695. "ORG_PARAM",
  1696. this.basicForm.storageInventoryOrg,
  1697. "调入库存组织"
  1698. );
  1699. }
  1700. if (this.basicForm.businessPersonal) {
  1701. this.reBackRefer("CONTACTS_PARAM", this.basicForm.businessPersonal);
  1702. }
  1703. if (this.basicForm.deliveryDept) {
  1704. this.reBackRefer("DEPT_PARAM", this.basicForm.deliveryDept);
  1705. }
  1706. if (this.basicForm.currency) {
  1707. this.reBackRefer("CURRENCY_PARAM", this.basicForm.currency);
  1708. }
  1709. // 客户
  1710. if (this.basicForm.customer) {
  1711. this.reBackRefer("CUSTOMER_PARAM", this.basicForm.customer);
  1712. }
  1713. if (this.basicForm.storageWarehouse) {
  1714. this.reBackRefer(
  1715. "WAREHOUSE_PARAM",
  1716. this.basicForm.storageWarehouse,
  1717. "调入仓库"
  1718. );
  1719. }
  1720. if (this.basicForm.deliveryWarehouse) {
  1721. this.reBackRefer(
  1722. "WAREHOUSE_PARAM",
  1723. this.basicForm.deliveryWarehouse,
  1724. "调出仓库"
  1725. );
  1726. }
  1727. if (this.basicForm.liacenter) {
  1728. this.reBackRefer("LIACENTER_PARAM", this.basicForm.liacenter);
  1729. }
  1730. // 控制先选调出库存组织和调入库存组织再选调出部门和调入调出仓库
  1731. this.controlCk();
  1732. }
  1733. }).then(() => {
  1734. this.loading = false
  1735. }).catch(err => {
  1736. this.loading = false
  1737. })
  1738. },
  1739. // 回显参照框
  1740. reBackRefer(type, id, title) {
  1741. getRefer({ type: type, id: id, title: title }).then((res) => {
  1742. if (type == "ORG_PARAM" && title == "调出库存组织") {
  1743. this.chuOrgOptions = res.rows;
  1744. }
  1745. if (type == "ORG_PARAM" && title == "调入库存组织") {
  1746. this.ruOrgOptions = res.rows;
  1747. }
  1748. if (type == "CONTACTS_PARAM") {
  1749. this.manOptions = res.rows;
  1750. }
  1751. if (type == "DEPT_PARAM") {
  1752. this.deptOptions = res.rows;
  1753. }
  1754. if (type == "CURRENCY_PARAM") {
  1755. this.currencyOptions = res.rows;
  1756. }
  1757. if (type == "LIACENTER_PARAM") {
  1758. this.liacenterOptions = res.rows;
  1759. }
  1760. if (type == "CUSTOMER_PARAM") {
  1761. this.customerOptions = res.rows;
  1762. }
  1763. if (type == "WAREHOUSE_PARAM" && title == "调入仓库") {
  1764. this.ruHouseOptions = res.rows;
  1765. }
  1766. if (type == "WAREHOUSE_PARAM" && title == "调出仓库") {
  1767. this.chuHouseOptions = res.rows;
  1768. }
  1769. if (type == "UNIT_PARAM") {
  1770. this.materialInfo[this.tableIndex].unitCode = res.rows[0].code;
  1771. }
  1772. });
  1773. },
  1774. addLine() {
  1775. const newLine = {
  1776. rowno: null,
  1777. demandCode: null,
  1778. material: null,
  1779. materialCode: null,
  1780. materialName: null,
  1781. deliveryCode: null,
  1782. storageCode: null,
  1783. specification: null,
  1784. manufacturer: null,
  1785. originPlace: null,
  1786. originPlaceName: null,
  1787. model: null,
  1788. unit: null,
  1789. unitCode: null,
  1790. unitName: null,
  1791. deliveryWarehouseName: null,
  1792. qty: null,
  1793. mainUnit: null,
  1794. mainUnitName: null,
  1795. equation: "1/1",
  1796. mainQty: null,
  1797. rate: "0.00",
  1798. storageWarehouseName: null,
  1799. deliveryAllocationName: null,
  1800. deliveryAllocation: null,
  1801. storageDept: null,
  1802. storageDeptName: null,
  1803. storageAllocationName: null,
  1804. storageAllocation: null,
  1805. patchNo: null,
  1806. producBatch: null,
  1807. manufactureDate: null,
  1808. periodEndDate: null,
  1809. allotDate: null,
  1810. ratifyCode: null,
  1811. registration: null,
  1812. productCode: null,
  1813. commonCode: null,
  1814. drug: null,
  1815. ruleDetail: null,
  1816. marketingApprovalPersonal: null,
  1817. production: null,
  1818. pi: null,
  1819. classify: null,
  1820. customerLogistic: null,
  1821. customerLogisticName: null,
  1822. delFlag: 0,
  1823. };
  1824. this.materialInfo.push(newLine);
  1825. },
  1826. delLine($index) {
  1827. console.log("删除行:", $index);
  1828. this.materialInfo = this.materialInfo.map((item, index) => ({
  1829. ...item,
  1830. delFlag: index === $index ? "2" : item.delFlag,
  1831. }));
  1832. console.log("看看列表", this.materialInfo);
  1833. },
  1834. //
  1835. rowClassName(prop) {
  1836. const {
  1837. row: { delFlag },
  1838. } = prop;
  1839. if (delFlag === "2") {
  1840. return "is-hidden";
  1841. } else {
  1842. return "";
  1843. }
  1844. },
  1845. chooseRefer(type, isPage, title, pkOrg, isDirectStore, gubFlag) {
  1846. this.referCondition.type = type;
  1847. this.referCondition.isPage = isPage;
  1848. this.referCondition.title = title;
  1849. this.referCondition.pkOrg = pkOrg;
  1850. this.referCondition.isDirectStore = isDirectStore;
  1851. this.referCondition.gubFlag = gubFlag;
  1852. this.$refs.refer.init(this.referCondition);
  1853. },
  1854. selectionsToInput(selection) {
  1855. if (this.referCondition.title == "调出库存组织") {
  1856. this.chuOrgOptions = selection;
  1857. this.basicForm.deliveryInventoryOrg = selection[0].id;
  1858. this.basicForm.deliveryInventoryOrgCode = selection[0].code;
  1859. this.basicForm.deliveryInventoryOrgName = selection[0].name;
  1860. this.clearDCZZ()
  1861. }
  1862. if (this.referCondition.title == "调入库存组织") {
  1863. this.ruOrgOptions = selection;
  1864. this.basicForm.storageInventoryOrg = selection[0].id;
  1865. this.basicForm.storageInventory = selection[0].code;
  1866. this.basicForm.storageInventoryOrgName = selection[0].name;
  1867. this.basicForm.onRouteAffilliation = selection[0].name;
  1868. this.clearDRZZ()
  1869. }
  1870. if (this.referCondition.title == "调出业务员") {
  1871. this.manOptions = selection;
  1872. this.basicForm.businessPersonal = selection[0].code;
  1873. this.basicForm.businessPersonalName = selection[0].name;
  1874. }
  1875. if (this.referCondition.title == "调出部门") {
  1876. this.deptOptions = selection;
  1877. this.basicForm.deliveryDept = selection[0].id;
  1878. this.basicForm.deliveryDeptName = selection[0].name;
  1879. }
  1880. if (this.referCondition.title == "币种") {
  1881. this.currencyOptions = selection;
  1882. this.basicForm.currency = selection[0].id;
  1883. this.basicForm.currencyName = selection[0].name;
  1884. }
  1885. if (this.referCondition.title == "客户") {
  1886. this.customerOptions = selection;
  1887. this.basicForm.customer = selection[0].id;
  1888. this.basicForm.customerName = selection[0].name;
  1889. }
  1890. if (this.referCondition.title == "调入仓库") {
  1891. this.ruHouseOptions = selection;
  1892. this.basicForm.storageWarehouse = selection[0].id;
  1893. this.basicForm.storageWarehouseName = selection[0].name;
  1894. console.log("1111", selection[0].csFlag);
  1895. // 清空调入货位
  1896. this.materialInfo.forEach((item) => {
  1897. item.storageAllocation = null;
  1898. item.storageAllocationName = null;
  1899. });
  1900. if (selection[0].csFlag == "N") {
  1901. this.isDRCk = true;
  1902. } else {
  1903. this.isDRCk = false;
  1904. }
  1905. }
  1906. if (this.referCondition.title == "调出仓库") {
  1907. this.chuHouseOptions = selection;
  1908. this.basicForm.deliveryWarehouse = selection[0].id;
  1909. this.basicForm.deliveryWarehouseCode = selection[0].code;
  1910. this.basicForm.deliveryWarehouseName = selection[0].name;
  1911. console.log("2222", selection[0].csFlag);
  1912. // 清空调出货位
  1913. this.materialInfo.forEach((item) => {
  1914. item.deliveryAllocation = null;
  1915. item.deliveryAllocationName = null;
  1916. });
  1917. if (selection[0].csFlag == "N") {
  1918. this.isDCCk = true;
  1919. } else {
  1920. this.isDCCk = false;
  1921. }
  1922. }
  1923. if (this.referCondition.title == "调出货位") {
  1924. this.materialInfo[this.tableIndex].deliveryAllocationName =
  1925. selection[0].name;
  1926. this.materialInfo[this.tableIndex].deliveryAllocation = selection[0].id;
  1927. }
  1928. if (this.referCondition.title == "调入货位") {
  1929. this.materialInfo[this.tableIndex].storageAllocationName =
  1930. selection[0].name;
  1931. this.materialInfo[this.tableIndex].storageAllocation = selection[0].id;
  1932. }
  1933. if (this.referCondition.title == "调入部门") {
  1934. this.materialInfo[this.tableIndex].storageDeptName = selection[0].name;
  1935. this.materialInfo[this.tableIndex].storageDept = selection[0].id;
  1936. }
  1937. // 控制先选调出库存组织和调入库存组织再选调出部门和调入调出仓库
  1938. this.controlCk();
  1939. },
  1940. // 调出库存组织清空相关数据
  1941. clearDCZZ() {
  1942. // 清空调出仓库,部门
  1943. this.basicForm.deliveryWarehouse = "";
  1944. this.basicForm.deliveryWarehouseCode = "";
  1945. this.basicForm.deliveryWarehouseName = "";
  1946. this.basicForm.deliveryDept = "";
  1947. this.basicForm.deliveryDeptName = "";
  1948. // 清空调出货位且禁用
  1949. this.materialInfo.forEach((item) => {
  1950. item.deliveryAllocation = null;
  1951. item.deliveryAllocationName = null;
  1952. });
  1953. this.isDCCk = true;
  1954. // 选择调入库存组织时判断调拨方式
  1955. if (
  1956. this.basicForm.storageInventoryOrg ==
  1957. this.basicForm.deliveryInventoryOrg
  1958. ) {
  1959. this.basicForm.allotType = "4";
  1960. } else {
  1961. this.basicForm.allotType = "2";
  1962. }
  1963. },
  1964. // 调入库存组织清空相关数据
  1965. clearDRZZ() {
  1966. // 选择调入库存组织清空仓库
  1967. this.basicForm.storageWarehouse = "";
  1968. this.basicForm.storageWarehouseName = "";
  1969. // 清空调入部门
  1970. this.materialInfo.forEach((item) => {
  1971. item.storageDept = null;
  1972. item.storageDeptName = null;
  1973. });
  1974. // 清空调入货位且禁用
  1975. this.materialInfo.forEach((item) => {
  1976. item.storageAllocation = null;
  1977. item.storageAllocationName = null;
  1978. });
  1979. this.isDRCk = true
  1980. // 选择调入库存组织时判断调拨方式
  1981. if (
  1982. this.basicForm.storageInventoryOrg ==
  1983. this.basicForm.deliveryInventoryOrg
  1984. ) {
  1985. this.basicForm.allotType = "4";
  1986. } else {
  1987. this.basicForm.allotType = "2";
  1988. }
  1989. },
  1990. chooseTreeRefer(type, isPage, title) {
  1991. this.referCondition.type = type;
  1992. this.referCondition.isPage = isPage;
  1993. this.referCondition.title = title;
  1994. this.$refs.tree.init(this.referCondition);
  1995. },
  1996. selectionsToInput2(selection) {
  1997. this.liacenterOptions.push(selection);
  1998. this.basicForm.liacenter = selection.id;
  1999. this.basicForm.liacenterName = selection.name;
  2000. },
  2001. // 明细行选择物料编码带出数据
  2002. chooseMaterial(index) {
  2003. console.log("🚀 ~ file: add.vue:790 ~ chooseMaterial ~ index:", index);
  2004. this.tableIndex = index;
  2005. this.$refs.materialRefer.init();
  2006. },
  2007. selectMaterial(selection) {
  2008. console.log("选中的物料", selection);
  2009. // 先清空通用名,调入调出结算规则明细
  2010. this.materialInfo[this.tableIndex].ruleDetail = ''
  2011. this.materialInfo[this.tableIndex].commonCode = ''
  2012. this.materialInfo[this.tableIndex].material = selection[0].id;
  2013. this.materialInfo[this.tableIndex].materialCode = selection[0].code;
  2014. this.materialInfo[this.tableIndex].materialName = selection[0].name;
  2015. this.materialInfo[this.tableIndex].specification = selection[0].specification;
  2016. this.materialInfo[this.tableIndex].model = selection[0].model;
  2017. this.materialInfo[this.tableIndex].originPlace = selection[0].originPlace;
  2018. this.materialInfo[this.tableIndex].originPlaceName = selection[0].originPlaceName;
  2019. this.materialInfo[this.tableIndex].unit = selection[0].unitId;
  2020. this.materialInfo[this.tableIndex].mainUnit = selection[0].unitId;
  2021. this.materialInfo[this.tableIndex].unitName = selection[0].unitIdName;
  2022. this.materialInfo[this.tableIndex].mainUnitName = selection[0].unitIdName;
  2023. this.materialInfo[this.tableIndex].manufacturer = selection[0].manufacturerIdName;
  2024. this.materialInfo[this.tableIndex].marketingApprovalPersonal = selection[0].registrant;
  2025. this.materialInfo[this.tableIndex].production = selection[0].productionPermit;
  2026. // 根据物料单位id查询单位code
  2027. this.reBackRefer("UNIT_PARAM", selection[0].unitId);
  2028. },
  2029. // 明细行选择批次号
  2030. chooseBatch(index) {
  2031. this.tableIndex = index;
  2032. this.referCondition.orgId = this.basicForm.deliveryInventoryOrg;
  2033. this.referCondition.materialCode =
  2034. this.materialInfo[this.tableIndex].materialCode;
  2035. this.referCondition.unitId = this.materialInfo[this.tableIndex].unit;
  2036. this.referCondition.warehouseId = this.basicForm.deliveryWarehouse;
  2037. this.$refs.batchRefer.init(this.referCondition);
  2038. },
  2039. selectBatch(selection) {
  2040. console.log("选中的批次号", selection);
  2041. },
  2042. // 明细行选择货位
  2043. chooseMxHW(index, type, isPage, title, stordocId) {
  2044. this.tableIndex = index;
  2045. this.referCondition.type = type;
  2046. this.referCondition.isPage = isPage;
  2047. this.referCondition.title = title;
  2048. this.referCondition.pkOrg = "";
  2049. this.referCondition.stordocId = stordocId;
  2050. this.$refs.refer.init(this.referCondition);
  2051. },
  2052. // 明细行选择调入部门
  2053. chooseMxBM(index, type, isPage, title, pkOrg) {
  2054. this.tableIndex = index;
  2055. this.referCondition.type = type;
  2056. this.referCondition.isPage = isPage;
  2057. this.referCondition.title = title;
  2058. this.referCondition.pkOrg = pkOrg;
  2059. this.referCondition.drpOrg = pkOrg;
  2060. this.$refs.refer.init(this.referCondition);
  2061. },
  2062. // 选择框彻底清空
  2063. clean(val) {
  2064. if (val == "调出库存组织") {
  2065. this.clearDCZZ()
  2066. }
  2067. if (val == "调入库存组织") {
  2068. this.clearDRZZ()
  2069. }
  2070. if (val == "调出业务员") {
  2071. this.basicForm.businessPersonal = "";
  2072. this.basicForm.businessPersonalName = "";
  2073. }
  2074. if (val == "调入仓库") {
  2075. this.basicForm.storageWarehouse = "";
  2076. this.basicForm.storageWarehouseName = "";
  2077. this.materialInfo.forEach((item) => {
  2078. item.storageAllocation = null;
  2079. item.storageAllocationName = null;
  2080. });
  2081. this.isDRCk = true
  2082. }
  2083. if (val == "调出仓库") {
  2084. this.basicForm.deliveryWarehouse = "";
  2085. this.basicForm.deliveryWarehouseCode = "";
  2086. this.basicForm.deliveryWarehouseName = "";
  2087. }
  2088. if (val == "利润中心") {
  2089. this.basicForm.liacenter = "";
  2090. this.basicForm.liacenterName = "";
  2091. }
  2092. },
  2093. // 明细选择框清空
  2094. cleanMx(index, val) {
  2095. if (val == "物料编码") {
  2096. this.materialInfo[index].material = "";
  2097. this.materialInfo[index].materialCode = "";
  2098. this.materialInfo[index].materialName = "";
  2099. this.materialInfo[index].specification = "";
  2100. this.materialInfo[index].model = "";
  2101. this.materialInfo[index].originPlace = "";
  2102. this.materialInfo[index].originPlaceName = "";
  2103. this.materialInfo[index].unit = "";
  2104. this.materialInfo[index].mainUnit = "";
  2105. this.materialInfo[index].unitName = "";
  2106. this.materialInfo[index].mainUnitName = "";
  2107. this.materialInfo[index].manufacturer = "";
  2108. this.materialInfo[index].ruleDetail = ''
  2109. this.materialInfo[index].commonCode = ''
  2110. this.materialInfo[index].marketingApprovalPersonal = "";
  2111. this.materialInfo[index].production = "";
  2112. this.materialInfo[index].unitCode = "";
  2113. }
  2114. if (val == "调出货位") {
  2115. this.materialInfo[index].deliveryAllocationName = "";
  2116. this.materialInfo[index].deliveryAllocation = "";
  2117. }
  2118. if (val == "调入部门") {
  2119. this.materialInfo[index].storageDeptName = "";
  2120. this.materialInfo[index].storageDept = "";
  2121. }
  2122. if (val == "调入货位") {
  2123. this.materialInfo[index].storageAllocationName = "";
  2124. this.materialInfo[index].storageAllocation = "";
  2125. }
  2126. },
  2127. jumpOA() {
  2128. toOA(this.$store.state.user.name, this.basicForm.oaId).then((res) => {
  2129. if (res.code === 200) {
  2130. window.open(res.oaUrl);
  2131. }
  2132. });
  2133. },
  2134. },
  2135. };
  2136. </script>
  2137. <style lang="scss" scoped>
  2138. ::v-deep .el-table__row.is-hidden {
  2139. display: none;
  2140. }
  2141. .btn_group {
  2142. // width: 100%;
  2143. // margin: 20px 0;
  2144. display: flex;
  2145. // justify-content: center;
  2146. position: absolute;
  2147. top: 10px;
  2148. right: 20px;
  2149. }
  2150. .btn_grooup {
  2151. margin-bottom: 10px;
  2152. display: flex;
  2153. justify-content: flex-end;
  2154. }
  2155. .hang {
  2156. margin: auto;
  2157. }
  2158. .hang ::v-deep .el-form-item__content {
  2159. margin-left: 0px !important;
  2160. }
  2161. ::v-deep .el-table__row > td {
  2162. border: none;
  2163. }
  2164. </style>