add.vue 76 KB

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