add.vue 80 KB

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