add.vue 81 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299
  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="客户" prop="customer">
  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="sonPageStu == 'check' || sonPageStu == 'edit'" @click="showReserved">货权预留单</el-button>
  1218. <el-button type="primary" style='position: absolute;right:10px;top:5px;' size="mini" v-if="!sonDisable" @click="addLine">增行</el-button>
  1219. </div>
  1220. <el-divider content-position="left">表尾信息</el-divider>
  1221. <el-row :gutter="10">
  1222. <el-col :span="1.5">
  1223. <el-form-item label="制单人">
  1224. <el-input
  1225. v-model="basicForm.createByName"
  1226. size="mini"
  1227. disabled
  1228. clearable
  1229. style="width: 200px"
  1230. />
  1231. </el-form-item>
  1232. </el-col>
  1233. <el-col :span="1.5">
  1234. <el-form-item label="制单日期">
  1235. <el-input
  1236. v-model="basicForm.createTime"
  1237. size="mini"
  1238. disabled
  1239. clearable
  1240. style="width: 200px"
  1241. />
  1242. </el-form-item>
  1243. </el-col>
  1244. <!-- <el-col :span="1.5">
  1245. <el-form-item label="审批人">
  1246. <el-input
  1247. v-model="basicForm.code"
  1248. size="mini"
  1249. disabled
  1250. clearable
  1251. style="width: 200px"
  1252. />
  1253. </el-form-item>
  1254. </el-col>
  1255. <el-col :span="1.5">
  1256. <el-form-item label="审批日期">
  1257. <el-input
  1258. v-model="basicForm.code"
  1259. size="mini"
  1260. disabled
  1261. clearable
  1262. style="width: 200px"
  1263. />
  1264. </el-form-item>
  1265. </el-col> -->
  1266. </el-row>
  1267. <el-divider content-position="left">审计信息</el-divider>
  1268. <el-row :gutter="10">
  1269. <el-col :span="1.5">
  1270. <el-form-item label="创建人">
  1271. <el-input
  1272. v-model="basicForm.createByName"
  1273. size="mini"
  1274. disabled
  1275. clearable
  1276. style="width: 200px"
  1277. />
  1278. </el-form-item>
  1279. </el-col>
  1280. <el-col :span="1.5">
  1281. <el-form-item label="创建时间">
  1282. <el-input
  1283. v-model="basicForm.createTime"
  1284. size="mini"
  1285. disabled
  1286. clearable
  1287. style="width: 200px"
  1288. />
  1289. </el-form-item>
  1290. </el-col>
  1291. <el-col :span="1.5">
  1292. <el-form-item label="最后修改人">
  1293. <el-input
  1294. v-model="basicForm.updateByName"
  1295. size="mini"
  1296. disabled
  1297. clearable
  1298. style="width: 200px"
  1299. />
  1300. </el-form-item>
  1301. </el-col>
  1302. <el-col :span="1.5">
  1303. <el-form-item label="最后修改时间">
  1304. <el-input
  1305. v-model="basicForm.updateTime"
  1306. size="mini"
  1307. disabled
  1308. clearable
  1309. style="width: 200px"
  1310. />
  1311. </el-form-item>
  1312. </el-col>
  1313. </el-row>
  1314. </el-form>
  1315. <div class="btn_group">
  1316. <el-button
  1317. type="primary"
  1318. size="mini"
  1319. plain
  1320. @click="jumpOA"
  1321. v-if="
  1322. sonPageStu == 'check' &&
  1323. (row.status == '1' || row.status == '2') &&
  1324. row.oaId
  1325. "
  1326. >流程跳转</el-button
  1327. >
  1328. <el-button
  1329. type="primary"
  1330. size="mini"
  1331. plain
  1332. @click="copy"
  1333. v-if="sonPageStu == 'check'"
  1334. >复制</el-button
  1335. >
  1336. <el-button
  1337. type="primary"
  1338. size="mini"
  1339. plain
  1340. @click="editPage"
  1341. v-if="sonPageStu == 'check' && row.status == '0'"
  1342. >编辑</el-button
  1343. >
  1344. <el-button
  1345. type="danger"
  1346. size="mini"
  1347. plain
  1348. @click="toNC"
  1349. v-if="sonPageStu == 'check' && row.status == '2'"
  1350. >重传NC</el-button
  1351. >
  1352. <el-button
  1353. type="primary"
  1354. size="mini"
  1355. plain
  1356. @click="save"
  1357. v-if="sonPageStu == 'add' || sonPageStu == 'edit'"
  1358. >保存</el-button
  1359. >
  1360. <el-button
  1361. type="primary"
  1362. size="mini"
  1363. plain
  1364. @click="submit"
  1365. v-if="
  1366. sonPageStu == 'check' && (row.status == '0' || row.status == '3')
  1367. "
  1368. >提交</el-button
  1369. >
  1370. <el-button size="mini" plain @click="back">返回</el-button>
  1371. </div>
  1372. </el-card>
  1373. <Reserved v-if="dialog.config" :isVisible="dialog.config" :info="row" @updateReserved="updateReserved"/>
  1374. <Refers ref="refer" @doSubmit="selectionsToInput" :single="true" />
  1375. <TreeRefers ref="tree" @doSubmit="selectionsToInput2" :single="true" />
  1376. <popDialog ref="materialRefer" @doSubmit="selectMaterial" :single="true" />
  1377. <batchRefers ref="batchRefer" @doSubmit="selectBatch" :single="true" />
  1378. </div>
  1379. </template>
  1380. <script>
  1381. import Reserved from './reserved.vue'
  1382. import { toOA } from "@/api/purchase/purchaseDemand.js";
  1383. import {
  1384. addOrder,
  1385. getOrderDetail,
  1386. editOrder,
  1387. submitOrder,
  1388. againToNC,
  1389. } from "@/api/purchase/transferOrder.js";
  1390. import Refers from "@/components/Refers/refers.vue";
  1391. // 用于回显参照框数据
  1392. import { getRefer } from "@/api/purchase/basic.js";
  1393. import TreeRefers from "@/components/Refers/treeRefer.vue";
  1394. // 明细行选择物料参照
  1395. import popDialog from "@/components/PopDialog/index.vue";
  1396. // 明细行选择批次号
  1397. import batchRefers from "@/components/Refers/batchRefer.vue";
  1398. export default {
  1399. name: "addOder",
  1400. dicts: [
  1401. "sys_allot_billtype",
  1402. "sys_project_group",
  1403. "sys_status",
  1404. "sys_to_type",
  1405. ],
  1406. props: ["pageStu", "row", "disable"],
  1407. components: {
  1408. Reserved,
  1409. Refers,
  1410. TreeRefers,
  1411. popDialog,
  1412. batchRefers,
  1413. },
  1414. model: {
  1415. prop: "isList",
  1416. event: "jugislist",
  1417. },
  1418. data() {
  1419. return {
  1420. loading: true,
  1421. // 不能直接改变props传来的值
  1422. sonPageStu: this.pageStu,
  1423. sonDisable: this.disable,
  1424. basicForm: {
  1425. deliveryInventoryOrg: "",
  1426. deliveryInventoryOrgCode: "",
  1427. deliveryInventoryOrgName: "",
  1428. billType: "",
  1429. code: "",
  1430. billDate: "",
  1431. allotType: "",
  1432. deliveryCode: "",
  1433. storageCode: "",
  1434. storageInventoryOrg: "",
  1435. storageInventory: "",
  1436. storageInventoryOrgName: "",
  1437. businessPersonal: "",
  1438. businessPersonalName: "",
  1439. deliveryDept: "",
  1440. deliveryDeptName: "",
  1441. currency: "",
  1442. currencyName: "",
  1443. rate: 1,
  1444. onRouteAffilliation: "",
  1445. oaId: '',
  1446. qty: "",
  1447. accountPath: "",
  1448. customer: "",
  1449. customerName: "",
  1450. deliveryWarehouse: "",
  1451. deliveryWarehouseCode: "",
  1452. deliveryWarehouseName: "",
  1453. storageWarehouse: "",
  1454. storageWarehouseName: "",
  1455. materialProject: "",
  1456. liacenter: "",
  1457. liacenterName: "",
  1458. sourceIdentification: "",
  1459. remark: "",
  1460. ncCode: "",
  1461. isSendWms: "",
  1462. status: "0",
  1463. tenantId: "",
  1464. revision: "",
  1465. createByName: "",
  1466. updateByName: "",
  1467. delFlag: "",
  1468. materialInfo: [],
  1469. },
  1470. referCondition: {
  1471. type: "",
  1472. isPage: true,
  1473. title: "",
  1474. // 仓库编码
  1475. stordocId: "",
  1476. orgCode: "",
  1477. materialCode: "",
  1478. unitCode: "",
  1479. warehouseCode: "",
  1480. },
  1481. options: [
  1482. {
  1483. value: "Y",
  1484. label: "是",
  1485. },
  1486. {
  1487. value: "N",
  1488. label: "否",
  1489. },
  1490. ],
  1491. tableIndex: null,
  1492. chuOrgOptions: [],
  1493. ruOrgOptions: [],
  1494. manOptions: [],
  1495. deptOptions: [],
  1496. currencyOptions: [],
  1497. customerOptions: [],
  1498. ruHouseOptions: [],
  1499. chuHouseOptions: [],
  1500. liacenterOptions: [],
  1501. basicRules: {
  1502. billType: [
  1503. { required: true, message: "订单类型不能为空", trigger: "blur" },
  1504. ],
  1505. deliveryWarehouse: [
  1506. { required: true, message: "调出仓库不能为空", trigger: "blur" },
  1507. ],
  1508. storageWarehouse:[
  1509. { required: true, message: "调入仓库不能为空", trigger: "blur" },
  1510. ],
  1511. deliveryInventoryOrg:[
  1512. { required: true, message: "调出库存组织不能为空", trigger: "blur" },
  1513. ],
  1514. storageInventoryOrg:[
  1515. { required: true, message: "调入库存组织不能为空", trigger: "blur" },
  1516. ],
  1517. deliveryDept:[
  1518. { required: true, message: "调出部门不能为空", trigger: "blur" },
  1519. ],
  1520. customer:[
  1521. { required: true, message: "客户不能为空", trigger: "blur" },
  1522. ],
  1523. },
  1524. // materialInfo: [],
  1525. receiveInfo: [],
  1526. priceList: [],
  1527. resultList: [],
  1528. pickerOptionsEnd: {
  1529. disabledDate: (time) => {
  1530. let beginDateVal = this.basicForm.billDate;
  1531. if (beginDateVal) {
  1532. return time.getTime() < new Date(beginDateVal).getTime() - 8.64e7;
  1533. }
  1534. },
  1535. },
  1536. isOrg: true,
  1537. isDRCk: true,
  1538. isDCCk: true,
  1539. dialog: {
  1540. config: false
  1541. },
  1542. };
  1543. },
  1544. created() {
  1545. if (this.pageStu == "check") {
  1546. console.log("数据", this.row);
  1547. this.getDetails(this.row);
  1548. } else if (this.pageStu == "edit") {
  1549. this.getDetails(this.row);
  1550. this.isDRCk = false;
  1551. this.isDCCk = false;
  1552. } else if (this.pageStu == "add") {
  1553. this.basicForm.rate = 1;
  1554. this.basicForm.billDate = new Date();
  1555. let currency = {
  1556. id: '1002Z0100000000001K1',
  1557. name: '人民币',
  1558. }
  1559. this.basicForm.currency = currency.id;
  1560. this.basicForm.currencyName = currency.name;
  1561. this.currencyOptions = [currency];
  1562. this.loading = false
  1563. }
  1564. },
  1565. methods: {
  1566. // 控制先选调出库存组织和调入库存组织再选调出部门和调入调出仓库
  1567. controlCk(val) {
  1568. if (val = '调出库存组织') {console.log("进了吗");}
  1569. if (
  1570. this.basicForm.deliveryInventoryOrg &&
  1571. this.basicForm.storageInventoryOrg
  1572. ) {
  1573. this.isOrg = false;
  1574. } else {
  1575. this.basicForm.deliveryDept = "";
  1576. this.basicForm.storageWarehouse = "";
  1577. this.basicForm.deliveryWarehouse = "";
  1578. this.isOrg = true;
  1579. // 选择调入库存组织时判断调拨方式
  1580. this.basicForm.allotType = "";
  1581. }
  1582. },
  1583. // 控制子表内货位是否可以填写,根据选择仓库内csFlag
  1584. controlDCHW() {
  1585. console.log("🚀 ~ file: add.vue:735 调出货位");
  1586. this.isDCCk = true;
  1587. this.basicForm.materialInfo.forEach((item) => {
  1588. item.deliveryAllocation = null;
  1589. item.deliveryAllocationName = null;
  1590. });
  1591. },
  1592. controlDRHW() {
  1593. console.log("🚀 ~ file: add.vue:735 调入货位");
  1594. this.isDRCk = true;
  1595. this.basicForm.materialInfo.forEach((item) => {
  1596. item.storageAllocation = null;
  1597. item.storageAllocationName = null;
  1598. });
  1599. },
  1600. // 输入数量或者主数量同步改变,计算基本信息总数量
  1601. getZSL(scope) {
  1602. scope.row.qty = scope.row.mainQty;
  1603. let sum = 0
  1604. this.basicForm.materialInfo.forEach(item => {
  1605. sum += Number(item.qty)
  1606. this.basicForm.qty = sum
  1607. })
  1608. },
  1609. getSL(scope) {
  1610. scope.row.mainQty = scope.row.qty;
  1611. let sum = 0
  1612. this.basicForm.materialInfo.forEach(item => {
  1613. sum += Number(item.qty)
  1614. this.basicForm.qty = sum
  1615. })
  1616. },
  1617. copy() {
  1618. // await this.getDetails(this.row)
  1619. this.$modal.notifySuccess("复制成功");
  1620. this.sonPageStu = "add";
  1621. this.sonDisable = false;
  1622. this.basicForm.id = "";
  1623. this.basicForm.code = "";
  1624. this.basicForm.status = "0";
  1625. this.basicForm.createByName = "";
  1626. this.basicForm.createBy = "";
  1627. this.basicForm.createTime = "";
  1628. this.basicForm.isSendWms = "";
  1629. this.basicForm.ncCode = "";
  1630. this.basicForm.oaId = "";
  1631. this.basicForm.updateBy = "";
  1632. this.basicForm.updateByName = "";
  1633. this.basicForm.updateTime = "";
  1634. this.basicForm.storageCode = "";
  1635. this.basicForm.deliveryCode = "";
  1636. this.basicForm.billDate = new Date();
  1637. // 复制新增把id,编码,创建人置为空,子表去掉id
  1638. if (this.basicForm.materialInfo.length !== 0) {
  1639. this.basicForm.materialInfo.forEach((item) => {
  1640. if (item.allotDate) {
  1641. item.allotDate = new Date();
  1642. }
  1643. if (item.deliveryCode) {
  1644. item.deliveryCode = "";
  1645. }
  1646. if (item.storageCode) {
  1647. item.storageCode = "";
  1648. }
  1649. if (item.demandCode) {
  1650. item.demandCode = "";
  1651. }
  1652. if (item.allotId) {
  1653. delete item.allotId;
  1654. }
  1655. if (item.id) {
  1656. delete item.id;
  1657. }
  1658. if (item.createBy) {
  1659. delete item.createBy;
  1660. delete item.createByName;
  1661. delete item.createTime;
  1662. }
  1663. if (item.updateBy) {
  1664. delete item.updateBy;
  1665. delete item.updateByName;
  1666. delete item.updateTime;
  1667. }
  1668. });
  1669. }
  1670. this.isDRCk = false;
  1671. this.isDCCk = false;
  1672. },
  1673. editPage() {
  1674. this.sonPageStu = 'edit'
  1675. this.sonDisable = false
  1676. },
  1677. toNC() {
  1678. againToNC(this.row)
  1679. .then((res) => {
  1680. this.getDetails(this.row);
  1681. })
  1682. .catch((err) => {
  1683. this.getDetails(this.row);
  1684. });
  1685. },
  1686. submit() {
  1687. this.$modal.loading("提交中...");
  1688. this.basicForm.stAllotMaterialList = this.basicForm.materialInfo;
  1689. this.basicForm.stAllotReceiveDeliverList = this.receiveInfo;
  1690. this.basicForm.stAllotReceiveExecuteList = this.priceList;
  1691. this.basicForm.stAllotReceiveExpenseList = this.resultList;
  1692. submitOrder(this.basicForm)
  1693. .then((res) => {
  1694. if (res.code === 200) {
  1695. this.$modal.closeLoading();
  1696. this.$modal.notifySuccess("提交成功");
  1697. this.back();
  1698. }
  1699. })
  1700. .catch((err) => {
  1701. this.$modal.closeLoading();
  1702. });
  1703. },
  1704. save() {
  1705. this.$refs["basic"].validate(async (valid, obj) => {
  1706. if (valid) {
  1707. if (this.basicForm.materialInfo.length !== 0) {
  1708. if (this.sonPageStu == "add") {
  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. addOrder(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. } else if (this.sonPageStu == "edit") {
  1726. this.basicForm.stAllotMaterialList = this.basicForm.materialInfo;
  1727. this.basicForm.stAllotReceiveDeliverList = this.receiveInfo;
  1728. this.basicForm.stAllotReceiveExecuteList = this.priceList;
  1729. this.basicForm.stAllotReceiveExpenseList = this.resultList;
  1730. this.$modal.loading("保存中...");
  1731. editOrder(this.basicForm)
  1732. .then((res) => {
  1733. if (res.code === 200) {
  1734. this.$modal.notifySuccess("编辑成功");
  1735. this.$modal.closeLoading();
  1736. this.back();
  1737. }
  1738. })
  1739. .catch((err) => {
  1740. this.$modal.closeLoading();
  1741. });
  1742. }
  1743. } else {
  1744. this.$modal.notifyWarning("明细行不能为空");
  1745. }
  1746. } else {
  1747. console.log("obj",obj);
  1748. const jiaoyan = []
  1749. for(let key in obj) {
  1750. jiaoyan.push(obj[key][0].message);
  1751. }
  1752. this.$modal.notifyWarning(jiaoyan + "!");
  1753. return false;
  1754. }
  1755. });
  1756. },
  1757. back() {
  1758. this.$emit("jugislist", true);
  1759. // let queryParams = {
  1760. // pageNum: 1,
  1761. // pageSize: 5
  1762. // }
  1763. this.$emit("refresh");
  1764. },
  1765. // 如果需要回显则调用详情接口
  1766. getDetails(row) {
  1767. getOrderDetail(row.id).then((res) => {
  1768. if (res.code === 200) {
  1769. this.basicForm = res.data;
  1770. this.basicForm.materialInfo = res.data.stAllotMaterialList;
  1771. this.receiveInfo = res.data.stAllotReceiveDeliverList;
  1772. this.priceList = res.data.stAllotReceiveExecuteList;
  1773. this.resultList = res.data.stAllotReceiveExpenseList;
  1774. if (this.basicForm.deliveryInventoryOrg) {
  1775. this.reBackRefer(
  1776. "ORG_PARAM",
  1777. this.basicForm.deliveryInventoryOrg,
  1778. "调出库存组织"
  1779. );
  1780. }
  1781. if (this.basicForm.storageInventoryOrg) {
  1782. this.reBackRefer(
  1783. "ORG_PARAM",
  1784. this.basicForm.storageInventoryOrg,
  1785. "调入库存组织"
  1786. );
  1787. }
  1788. if (this.basicForm.businessPersonal) {
  1789. this.reBackRefer("CONTACTS_PARAM", this.basicForm.businessPersonal);
  1790. }
  1791. if (this.basicForm.deliveryDept) {
  1792. this.reBackRefer("DEPT_PARAM", this.basicForm.deliveryDept);
  1793. }
  1794. if (this.basicForm.currency) {
  1795. this.reBackRefer("CURRENCY_PARAM", this.basicForm.currency);
  1796. }
  1797. // 客户
  1798. if (this.basicForm.customer) {
  1799. this.reBackRefer("CUSTOMER_PARAM", this.basicForm.customer);
  1800. }
  1801. if (this.basicForm.storageWarehouse) {
  1802. this.reBackRefer(
  1803. "WAREHOUSE_PARAM",
  1804. this.basicForm.storageWarehouse,
  1805. "调入仓库"
  1806. );
  1807. }
  1808. if (this.basicForm.deliveryWarehouse) {
  1809. this.reBackRefer(
  1810. "WAREHOUSE_PARAM",
  1811. this.basicForm.deliveryWarehouse,
  1812. "调出仓库"
  1813. );
  1814. }
  1815. if (this.basicForm.liacenter) {
  1816. this.reBackRefer("LIACENTER_PARAM", this.basicForm.liacenter);
  1817. }
  1818. // 控制先选调出库存组织和调入库存组织再选调出部门和调入调出仓库
  1819. this.controlCk();
  1820. }
  1821. }).then(() => {
  1822. this.loading = false
  1823. }).catch(err => {
  1824. this.loading = false
  1825. })
  1826. },
  1827. // 回显参照框
  1828. reBackRefer(type, id, title) {
  1829. getRefer({ type: type, id: id, title: title }).then((res) => {
  1830. if (type == "ORG_PARAM" && title == "调出库存组织") {
  1831. this.chuOrgOptions = res.rows;
  1832. }
  1833. if (type == "ORG_PARAM" && title == "调入库存组织") {
  1834. this.ruOrgOptions = res.rows;
  1835. }
  1836. if (type == "CONTACTS_PARAM") {
  1837. this.manOptions = res.rows;
  1838. }
  1839. if (type == "DEPT_PARAM") {
  1840. this.deptOptions = res.rows;
  1841. }
  1842. if (type == "CURRENCY_PARAM") {
  1843. this.currencyOptions = res.rows;
  1844. }
  1845. if (type == "LIACENTER_PARAM") {
  1846. this.liacenterOptions = res.rows;
  1847. }
  1848. if (type == "CUSTOMER_PARAM") {
  1849. this.customerOptions = res.rows;
  1850. }
  1851. if (type == "WAREHOUSE_PARAM" && title == "调入仓库") {
  1852. this.ruHouseOptions = res.rows;
  1853. }
  1854. if (type == "WAREHOUSE_PARAM" && title == "调出仓库") {
  1855. this.chuHouseOptions = res.rows;
  1856. }
  1857. if (type == "UNIT_PARAM") {
  1858. this.basicForm.materialInfo[this.tableIndex].unitCode = res.rows[0].code;
  1859. }
  1860. });
  1861. },
  1862. addLine() {
  1863. const newLine = {
  1864. rowno: null,
  1865. demandCode: null,
  1866. material: null,
  1867. materialCode: null,
  1868. materialName: null,
  1869. deliveryCode: null,
  1870. storageCode: null,
  1871. specification: null,
  1872. manufacturer: null,
  1873. originPlace: null,
  1874. originPlaceName: null,
  1875. model: null,
  1876. unit: null,
  1877. unitCode: null,
  1878. unitName: null,
  1879. deliveryWarehouseName: null,
  1880. qty: null,
  1881. mainUnit: null,
  1882. mainUnitName: null,
  1883. equation: "1/1",
  1884. mainQty: null,
  1885. rate: "0.00",
  1886. storageWarehouseName: null,
  1887. deliveryAllocationName: null,
  1888. deliveryAllocation: null,
  1889. storageDept: null,
  1890. storageDeptName: null,
  1891. storageAllocationName: null,
  1892. storageAllocation: null,
  1893. patchNo: null,
  1894. producBatch: null,
  1895. manufactureDate: null,
  1896. periodEndDate: null,
  1897. allotDate: new Date(),
  1898. ratifyCode: null,
  1899. registration: null,
  1900. productCode: null,
  1901. commonCode: null,
  1902. drug: null,
  1903. ruleDetail: null,
  1904. marketingApprovalPersonal: null,
  1905. production: null,
  1906. pi: null,
  1907. classify: null,
  1908. customerLogistic: null,
  1909. customerLogisticName: null,
  1910. delFlag: 0,
  1911. };
  1912. this.basicForm.materialInfo.push(newLine);
  1913. },
  1914. delLine(index,row) {
  1915. // this.basicForm.materialInfo = this.basicForm.materialInfo.map((item, index) => ({
  1916. // ...item,
  1917. // delFlag: index === $index ? "2" : item.delFlag,
  1918. // }));
  1919. if (row.id) {
  1920. this.basicForm.materialInfo.forEach(e => {
  1921. if(e.id == row.id){
  1922. e.delFlag = '2'
  1923. }
  1924. });
  1925. }else{
  1926. this.basicForm.materialInfo.splice(index, 1);
  1927. }
  1928. },
  1929. //
  1930. rowClassName(prop) {
  1931. const {
  1932. row: { delFlag },
  1933. } = prop;
  1934. if (delFlag === "2") {
  1935. return "is-hidden";
  1936. } else {
  1937. return "";
  1938. }
  1939. },
  1940. chooseRefer(type, isPage, title, pkOrg, isDirectStore, gubFlag,parame) {
  1941. this.referCondition.type = type;
  1942. this.referCondition.isPage = isPage;
  1943. this.referCondition.title = title;
  1944. this.referCondition.pkOrg = pkOrg;
  1945. this.referCondition.isDirectStore = isDirectStore;
  1946. this.referCondition.gubFlag = gubFlag;
  1947. this.referCondition.parame = parame;
  1948. this.$refs.refer.init(this.referCondition);
  1949. },
  1950. selectionsToInput(selection) {
  1951. if (this.referCondition.title == "调出库存组织") {
  1952. this.chuOrgOptions = selection;
  1953. this.basicForm.deliveryInventoryOrg = selection[0].id;
  1954. this.basicForm.deliveryInventoryOrgCode = selection[0].code;
  1955. this.basicForm.deliveryInventoryOrgName = selection[0].name;
  1956. this.clearDCZZ()
  1957. }
  1958. if (this.referCondition.title == "调入库存组织") {
  1959. this.ruOrgOptions = selection;
  1960. this.basicForm.storageInventoryOrg = selection[0].id;
  1961. this.basicForm.storageInventory = selection[0].code;
  1962. this.basicForm.storageInventoryOrgName = selection[0].name;
  1963. this.basicForm.onRouteAffilliation = selection[0].name;
  1964. this.clearDRZZ()
  1965. }
  1966. if (this.referCondition.title == "调出业务员") {
  1967. this.manOptions = selection;
  1968. this.basicForm.businessPersonal = selection[0].code;
  1969. this.basicForm.businessPersonalName = selection[0].name;
  1970. }
  1971. if (this.referCondition.title == "调出部门") {
  1972. this.deptOptions = selection;
  1973. this.basicForm.deliveryDept = selection[0].id;
  1974. this.basicForm.deliveryDeptName = selection[0].name;
  1975. }
  1976. if (this.referCondition.title == "币种") {
  1977. this.currencyOptions = selection;
  1978. this.basicForm.currency = selection[0].id;
  1979. this.basicForm.currencyName = selection[0].name;
  1980. }
  1981. if (this.referCondition.title == "客户") {
  1982. this.customerOptions = selection;
  1983. this.basicForm.customer = selection[0].id;
  1984. this.basicForm.customerName = selection[0].name;
  1985. }
  1986. if (this.referCondition.title == "调入仓库") {
  1987. this.ruHouseOptions = selection;
  1988. this.basicForm.storageWarehouse = selection[0].id;
  1989. this.basicForm.storageWarehouseName = selection[0].name;
  1990. console.log("1111", selection[0].csFlag);
  1991. // 清空调入货位
  1992. this.basicForm.materialInfo.forEach((item) => {
  1993. item.storageAllocation = null;
  1994. item.storageAllocationName = null;
  1995. });
  1996. if (selection[0].csFlag == "N") {
  1997. this.isDRCk = true;
  1998. } else {
  1999. this.isDRCk = false;
  2000. }
  2001. }
  2002. if (this.referCondition.title == "调出仓库") {
  2003. this.chuHouseOptions = selection;
  2004. this.basicForm.deliveryWarehouse = selection[0].id;
  2005. this.basicForm.deliveryWarehouseCode = selection[0].code;
  2006. this.basicForm.deliveryWarehouseName = selection[0].name;
  2007. console.log("2222", selection[0].csFlag);
  2008. // 清空调出货位
  2009. this.basicForm.materialInfo.forEach((item) => {
  2010. item.deliveryAllocation = null;
  2011. item.deliveryAllocationName = null;
  2012. });
  2013. if (selection[0].csFlag == "N") {
  2014. this.isDCCk = true;
  2015. } else {
  2016. this.isDCCk = false;
  2017. }
  2018. }
  2019. if (this.referCondition.title == "调出货位") {
  2020. this.basicForm.materialInfo[this.tableIndex].deliveryAllocationName =
  2021. selection[0].name;
  2022. this.basicForm.materialInfo[this.tableIndex].deliveryAllocation = selection[0].id;
  2023. }
  2024. if (this.referCondition.title == "调入货位") {
  2025. this.basicForm.materialInfo[this.tableIndex].storageAllocationName =
  2026. selection[0].name;
  2027. this.basicForm.materialInfo[this.tableIndex].storageAllocation = selection[0].id;
  2028. }
  2029. if (this.referCondition.title == "调入部门") {
  2030. this.basicForm.materialInfo[this.tableIndex].storageDeptName = selection[0].name;
  2031. this.basicForm.materialInfo[this.tableIndex].storageDept = selection[0].id;
  2032. }
  2033. // 控制先选调出库存组织和调入库存组织再选调出部门和调入调出仓库
  2034. this.controlCk();
  2035. },
  2036. // 必选标识
  2037. addRedStar(h, { column }) {
  2038. return [
  2039. h('span', { style: 'color: #F56C6C' }, '*'),
  2040. h('span', ' ' + column.label)
  2041. ];
  2042. },
  2043. // 调出库存组织清空相关数据
  2044. clearDCZZ() {
  2045. // 清空调出仓库,部门
  2046. this.basicForm.deliveryWarehouse = "";
  2047. this.basicForm.deliveryWarehouseCode = "";
  2048. this.basicForm.deliveryWarehouseName = "";
  2049. this.basicForm.deliveryDept = "";
  2050. this.basicForm.deliveryDeptName = "";
  2051. // 清空调出货位且禁用
  2052. this.basicForm.materialInfo.forEach((item) => {
  2053. item.deliveryAllocation = null;
  2054. item.deliveryAllocationName = null;
  2055. });
  2056. this.isDCCk = true;
  2057. // 选择调入库存组织时判断调拨方式
  2058. if (
  2059. this.basicForm.storageInventoryOrg ==
  2060. this.basicForm.deliveryInventoryOrg
  2061. ) {
  2062. this.basicForm.allotType = "4";
  2063. } else {
  2064. this.basicForm.allotType = "2";
  2065. }
  2066. },
  2067. // 调入库存组织清空相关数据
  2068. clearDRZZ() {
  2069. // 选择调入库存组织清空仓库
  2070. this.basicForm.storageWarehouse = "";
  2071. this.basicForm.storageWarehouseName = "";
  2072. // 清空调入部门
  2073. this.basicForm.materialInfo.forEach((item) => {
  2074. item.storageDept = null;
  2075. item.storageDeptName = null;
  2076. });
  2077. // 清空调入货位且禁用
  2078. this.basicForm.materialInfo.forEach((item) => {
  2079. item.storageAllocation = null;
  2080. item.storageAllocationName = null;
  2081. });
  2082. this.isDRCk = true
  2083. // 选择调入库存组织时判断调拨方式
  2084. if (
  2085. this.basicForm.storageInventoryOrg ==
  2086. this.basicForm.deliveryInventoryOrg
  2087. ) {
  2088. this.basicForm.allotType = "4";
  2089. } else {
  2090. this.basicForm.allotType = "2";
  2091. }
  2092. },
  2093. chooseTreeRefer(type, isPage, title) {
  2094. this.referCondition.type = type;
  2095. this.referCondition.isPage = isPage;
  2096. this.referCondition.title = title;
  2097. this.$refs.tree.init(this.referCondition);
  2098. },
  2099. selectionsToInput2(selection) {
  2100. console.log('selection',selection);
  2101. this.liacenterOptions.push(selection);
  2102. this.basicForm.liacenter = selection[0].id;
  2103. this.basicForm.liacenterName = selection[0].name;
  2104. },
  2105. // 明细行选择物料编码带出数据
  2106. chooseMaterial(index) {
  2107. console.log("🚀 ~ file: add.vue:790 ~ chooseMaterial ~ index:", index);
  2108. this.tableIndex = index;
  2109. this.$refs.materialRefer.init();
  2110. },
  2111. // 明细行数量失去焦点
  2112. changeQty(aa,bb){
  2113. console.log('aa',aa);
  2114. console.log('bb',bb);
  2115. },
  2116. selectMaterial(selection) {
  2117. console.log("选中的物料", selection);
  2118. // 先清空通用名,调入调出结算规则明细
  2119. this.basicForm.materialInfo[this.tableIndex].ruleDetail = ''
  2120. this.basicForm.materialInfo[this.tableIndex].commonCode = ''
  2121. this.basicForm.materialInfo[this.tableIndex].material = selection[0].id;
  2122. this.basicForm.materialInfo[this.tableIndex].materialCode = selection[0].code;
  2123. this.basicForm.materialInfo[this.tableIndex].materialName = selection[0].name;
  2124. this.basicForm.materialInfo[this.tableIndex].specification = selection[0].specification;
  2125. this.basicForm.materialInfo[this.tableIndex].model = selection[0].model;
  2126. this.basicForm.materialInfo[this.tableIndex].originPlace = selection[0].originPlace;
  2127. this.basicForm.materialInfo[this.tableIndex].originPlaceName = selection[0].originPlaceName;
  2128. this.basicForm.materialInfo[this.tableIndex].unit = selection[0].unitId;
  2129. this.basicForm.materialInfo[this.tableIndex].mainUnit = selection[0].unitId;
  2130. this.basicForm.materialInfo[this.tableIndex].unitName = selection[0].unitIdName;
  2131. this.basicForm.materialInfo[this.tableIndex].mainUnitName = selection[0].unitIdName;
  2132. this.basicForm.materialInfo[this.tableIndex].manufacturer = selection[0].manufacturerIdName;
  2133. this.basicForm.materialInfo[this.tableIndex].marketingApprovalPersonal = selection[0].registrant;
  2134. this.basicForm.materialInfo[this.tableIndex].production = selection[0].productionPermit;
  2135. // 根据物料单位id查询单位code
  2136. this.reBackRefer("UNIT_PARAM", selection[0].unitId);
  2137. },
  2138. // 明细行选择批次号
  2139. chooseBatch(index) {
  2140. this.tableIndex = index;
  2141. this.referCondition.orgId = this.basicForm.deliveryInventoryOrg;
  2142. this.referCondition.materialCode =
  2143. this.basicForm.materialInfo[this.tableIndex].materialCode;
  2144. this.referCondition.unitId = this.basicForm.materialInfo[this.tableIndex].unit;
  2145. this.referCondition.warehouseId = this.basicForm.deliveryWarehouse;
  2146. this.$refs.batchRefer.init(this.referCondition);
  2147. },
  2148. selectBatch(selection) {
  2149. console.log("选中的批次号", selection);
  2150. },
  2151. // 明细行选择货位
  2152. chooseMxHW(index, type, isPage, title, stordocId) {
  2153. this.tableIndex = index;
  2154. this.referCondition.type = type;
  2155. this.referCondition.isPage = isPage;
  2156. this.referCondition.title = title;
  2157. this.referCondition.pkOrg = "";
  2158. this.referCondition.stordocId = stordocId;
  2159. this.$refs.refer.init(this.referCondition);
  2160. },
  2161. // 明细行选择调入部门
  2162. chooseMxBM(index, type, isPage, title,parame) {
  2163. this.tableIndex = index;
  2164. this.referCondition.type = type;
  2165. this.referCondition.isPage = isPage;
  2166. this.referCondition.title = title;
  2167. this.referCondition.parame = parame;
  2168. this.$refs.refer.init(this.referCondition);
  2169. },
  2170. // 选择框彻底清空
  2171. clean(val) {
  2172. if (val == "调出库存组织") {
  2173. this.clearDCZZ()
  2174. }
  2175. if (val == "调入库存组织") {
  2176. this.clearDRZZ()
  2177. }
  2178. if (val == "调出业务员") {
  2179. this.basicForm.businessPersonal = "";
  2180. this.basicForm.businessPersonalName = "";
  2181. }
  2182. if (val == "调入仓库") {
  2183. this.basicForm.storageWarehouse = "";
  2184. this.basicForm.storageWarehouseName = "";
  2185. this.basicForm.materialInfo.forEach((item) => {
  2186. item.storageAllocation = null;
  2187. item.storageAllocationName = null;
  2188. });
  2189. this.isDRCk = true
  2190. }
  2191. if (val == "调出仓库") {
  2192. this.basicForm.deliveryWarehouse = "";
  2193. this.basicForm.deliveryWarehouseCode = "";
  2194. this.basicForm.deliveryWarehouseName = "";
  2195. }
  2196. if (val == "利润中心") {
  2197. this.basicForm.liacenter = "";
  2198. this.basicForm.liacenterName = "";
  2199. }
  2200. },
  2201. // 明细选择框清空
  2202. cleanMx(index, val) {
  2203. if (val == "物料编码") {
  2204. this.basicForm.materialInfo[index].material = "";
  2205. this.basicForm.materialInfo[index].materialCode = "";
  2206. this.basicForm.materialInfo[index].materialName = "";
  2207. this.basicForm.materialInfo[index].specification = "";
  2208. this.basicForm.materialInfo[index].model = "";
  2209. this.basicForm.materialInfo[index].originPlace = "";
  2210. this.basicForm.materialInfo[index].originPlaceName = "";
  2211. this.basicForm.materialInfo[index].unit = "";
  2212. this.basicForm.materialInfo[index].mainUnit = "";
  2213. this.basicForm.materialInfo[index].unitName = "";
  2214. this.basicForm.materialInfo[index].mainUnitName = "";
  2215. this.basicForm.materialInfo[index].manufacturer = "";
  2216. this.basicForm.materialInfo[index].ruleDetail = ''
  2217. this.basicForm.materialInfo[index].commonCode = ''
  2218. this.basicForm.materialInfo[index].marketingApprovalPersonal = "";
  2219. this.basicForm.materialInfo[index].production = "";
  2220. this.basicForm.materialInfo[index].unitCode = "";
  2221. }
  2222. if (val == "调出货位") {
  2223. this.basicForm.materialInfo[index].deliveryAllocationName = "";
  2224. this.basicForm.materialInfo[index].deliveryAllocation = "";
  2225. }
  2226. if (val == "调入部门") {
  2227. this.basicForm.materialInfo[index].storageDeptName = "";
  2228. this.basicForm.materialInfo[index].storageDept = "";
  2229. }
  2230. if (val == "调入货位") {
  2231. this.basicForm.materialInfo[index].storageAllocationName = "";
  2232. this.basicForm.materialInfo[index].storageAllocation = "";
  2233. }
  2234. },
  2235. jumpOA() {
  2236. toOA(this.$store.state.user.name, this.basicForm.oaId).then((res) => {
  2237. if (res.code === 200) {
  2238. window.open(res.oaUrl);
  2239. }
  2240. });
  2241. },
  2242. // 点击预留单展示
  2243. showReserved() {
  2244. this.dialog.config = true
  2245. },
  2246. // 修改是否让页面显示与隐藏的事件
  2247. updateReserved (val) {
  2248. this.dialog.config = val
  2249. },
  2250. },
  2251. };
  2252. </script>
  2253. <style lang="scss" scoped>
  2254. ::v-deep .el-table__row.is-hidden {
  2255. display: none;
  2256. }
  2257. .btn_group {
  2258. // width: 100%;
  2259. // margin: 20px 0;
  2260. display: flex;
  2261. // justify-content: center;
  2262. position: absolute;
  2263. top: 10px;
  2264. right: 20px;
  2265. }
  2266. .btn_grooup {
  2267. margin-bottom: 10px;
  2268. display: flex;
  2269. justify-content: flex-end;
  2270. }
  2271. .hang {
  2272. margin: auto;
  2273. }
  2274. .hang ::v-deep .el-form-item__content {
  2275. margin-left: 0px !important;
  2276. }
  2277. ::v-deep .el-table__row > td {
  2278. border-right: none;
  2279. }
  2280. </style>