add.vue 73 KB

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