add.vue 74 KB

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