add.vue 71 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126
  1. <template>
  2. <div class="ele-body">
  3. <el-card shadow="never">
  4. <header-title title="基本信息"></header-title>
  5. <el-form
  6. :model="formData"
  7. ref="formName"
  8. label-width="110px"
  9. :rules="rules"
  10. >
  11. <el-row :gutter="20">
  12. <!-- <el-col :span="8">
  13. <el-form-item label="入库单号" prop="bizNum">
  14. <el-input :value="formData.bizNum" disabled /></el-form-item
  15. ></el-col> -->
  16. <!-- <el-col :span="8">
  17. <el-form-item label="仓库" prop="warehouseId">
  18. <el-select
  19. filterable
  20. v-model="formData.warehouseId"
  21. clearable
  22. :disabled="
  23. !!(warehousingMaterialList && warehousingMaterialList.length)
  24. "
  25. >
  26. <el-option
  27. v-for="(item, index) in warehouseList"
  28. :key="index"
  29. :label="item.name"
  30. :value="item.id"
  31. @click.native="warehouse = item"
  32. ></el-option>
  33. </el-select>
  34. </el-form-item>
  35. </el-col> -->
  36. <el-col :span="8">
  37. <el-form-item label="物品类型" prop="extInfo.assetType">
  38. <!-- <DictSelection
  39. dictName="类型用途"
  40. :disabled="
  41. !!(warehousingMaterialList && warehousingMaterialList.length)
  42. "
  43. clearable
  44. v-model="formData.extInfo.assetType"
  45. @itemChange="handleChange"
  46. /> -->
  47. <!-- <el-select
  48. :disabled="
  49. !!(warehousingMaterialList && warehousingMaterialList.length)
  50. "
  51. clearable
  52. v-model="formData.extInfo.assetType"
  53. @change="handleChanges"
  54. >
  55. <el-option
  56. v-for="(item, index) in codeList"
  57. :key="index"
  58. :label="item.dictValue"
  59. :value="item.dictCode"
  60. ></el-option>
  61. </el-select> -->
  62. <selectTree
  63. ref="tree"
  64. class="form-ipt"
  65. size="medium"
  66. style="width: 100%"
  67. clearable
  68. :options="codeList"
  69. :props="{
  70. value: 'id',
  71. label: 'name',
  72. children: 'children'
  73. }"
  74. @getValue="codeListValue"
  75. :isAll="false"
  76. />
  77. </el-form-item>
  78. </el-col>
  79. <el-col :span="8">
  80. <el-form-item label="入库类型" prop="bizType">
  81. <el-select
  82. @change="onClear"
  83. filterable
  84. placeholder="请选择"
  85. v-model="formData.bizType"
  86. clearable
  87. :disabled="
  88. !!(warehousingMaterialList && warehousingMaterialList.length)
  89. "
  90. >
  91. <el-option
  92. v-for="item in sceneState"
  93. :key="item.code"
  94. :value="item.code + ''"
  95. :label="item.label"
  96. ></el-option>
  97. </el-select> </el-form-item
  98. ></el-col>
  99. <el-col :span="8">
  100. <el-form-item
  101. v-if="formData.bizType == 2"
  102. label="采购订单"
  103. prop="documentSource"
  104. >
  105. <el-input
  106. placeholder="请输入"
  107. v-model="formData.extInfo.documentSource"
  108. @click.native="handlePicker()"
  109. >
  110. <el-button
  111. slot="append"
  112. icon="el-icon-circle-close"
  113. @click.stop="onClear"
  114. ></el-button>
  115. </el-input>
  116. </el-form-item>
  117. <el-form-item
  118. v-if="formData.bizType == 1"
  119. label="生产订单"
  120. prop="documentSource"
  121. >
  122. <el-input
  123. placeholder="请输入"
  124. clearable
  125. v-model="formData.extInfo.documentSource"
  126. /></el-form-item>
  127. <el-form-item
  128. v-if="formData.bizType != 1 && formData.bizType != 2"
  129. label="销售订单"
  130. prop="documentSource"
  131. >
  132. <el-input
  133. placeholder="请输入"
  134. clearable
  135. v-model="formData.extInfo.documentSource"
  136. /></el-form-item>
  137. </el-col>
  138. <el-col :span="8">
  139. <el-form-item label="权属部门" prop="deptName">
  140. <el-input
  141. placeholder="权属部门"
  142. disabled
  143. v-model="formData.extInfo.deptName"
  144. clearable
  145. />
  146. </el-form-item>
  147. </el-col>
  148. <el-col :span="8">
  149. <el-form-item label="入库登记人">
  150. <el-input
  151. placeholder="登记人"
  152. disabled
  153. v-model="formData.extInfo.createUserName"
  154. clearable /></el-form-item
  155. ></el-col>
  156. <!-- <el-col :span="8">
  157. <el-form-item label="入库时间" prop="outInTime">
  158. <el-date-picker
  159. v-model="formData.outInTime"
  160. clearable
  161. type="datetime"
  162. value-format="yyyy-MM-dd HH:mm:ss"
  163. placeholder="选择日期"
  164. >
  165. </el-date-picker></el-form-item
  166. ></el-col> -->
  167. <el-col :span="8" v-if="formData.bizType == 2">
  168. <el-form-item label="供应商" prop="supplierName">
  169. <!-- <DictSelection
  170. dictName="经销商列表"
  171. clearable
  172. v-model="formData.extInfo.supplierId"
  173. @itemChange="ChangeSupplier"
  174. /> -->
  175. <el-input
  176. placeholder="请输入"
  177. clearable
  178. v-model="formData.extInfo.supplierName"
  179. />
  180. </el-form-item>
  181. </el-col>
  182. <!-- <el-col :span="8" v-if="formData.bizType == 2">
  183. <el-form-item label="物料代号" prop="supplierCode">
  184. <el-input
  185. placeholder="请输入"
  186. v-model="formData.supplierCode"
  187. clearable /></el-form-item
  188. ></el-col> -->
  189. <!-- <el-col :span="8" v-if="formData.bizType == 2">
  190. <el-form-item label="客户" prop="clientName">
  191. <el-input
  192. placeholder="请输入"
  193. clearable
  194. v-model="formData.clientName"
  195. />
  196. </el-form-item>
  197. </el-col> -->
  198. <!-- <el-col :span="8" v-if="formData.bizType == 2">
  199. <el-form-item label="客户代号" prop="clientCode">
  200. <el-input
  201. placeholder="请输入"
  202. v-model="formData.clientCode"
  203. clearable /></el-form-item
  204. ></el-col> -->
  205. <!-- <el-col :span="8">
  206. <el-form-item label="送货人" prop="fromUser">
  207. <el-input
  208. placeholder="请输入"
  209. v-model="formData.fromUser"
  210. clearable /></el-form-item
  211. ></el-col> -->
  212. <el-col :span="8">
  213. <el-form-item label="送货人" prop="fromUser">
  214. <el-input
  215. placeholder="请输入"
  216. v-model="formData.fromUser"
  217. clearable
  218. />
  219. <!-- <el-select
  220. v-model="formData.fromUser"
  221. filterable
  222. placeholder="请选择送货人"
  223. >
  224. <el-option
  225. v-for="item in contactList"
  226. :key="item.id"
  227. :label="item.linkName"
  228. :value="item.id"
  229. @click.native="
  230. () => (formData.extInfo.deliveryPhone = item.mobilePhone)
  231. "
  232. >
  233. </el-option>
  234. </el-select> -->
  235. </el-form-item></el-col
  236. >
  237. <el-col :span="8">
  238. <el-form-item label="送货人联系方式" prop="deliveryPhone">
  239. <el-input
  240. placeholder="请输入"
  241. v-model="formData.extInfo.deliveryPhone"
  242. clearable /></el-form-item
  243. ></el-col>
  244. <!-- <el-col :span="8">
  245. <el-form-item label="紧急状态" prop="urgent">
  246. <el-select
  247. filterable
  248. placeholder="请选择"
  249. v-model="formData.extInfo.urgent"
  250. clearable
  251. >
  252. <el-option
  253. v-for="item in emergencyState"
  254. :key="item.code"
  255. :value="item.code"
  256. :label="item.label"
  257. ></el-option>
  258. </el-select> </el-form-item
  259. ></el-col> -->
  260. <!-- <el-col :span="8">
  261. <el-form-item label="审核人部门" prop="verifyDeptName">
  262. <selectTree
  263. ref="tree"
  264. class="form-ipt"
  265. size="medium"
  266. style="width: 100%"
  267. clearable
  268. :options="treeList"
  269. :props="{
  270. value: 'code',
  271. label: 'name',
  272. children: 'children'
  273. }"
  274. @getValue="auditorDeptClick"
  275. />
  276. </el-form-item>
  277. </el-col>
  278. <el-col :span="8">
  279. <el-form-item label="审核人" prop="verifyId">
  280. <el-select
  281. filterable
  282. class="form-ipt"
  283. style="width: 100%"
  284. v-model="formData.verifyId"
  285. placeholder="请选择"
  286. >
  287. <el-option
  288. v-for="item in staffList"
  289. :key="item.id"
  290. :label="item.name"
  291. :value="item.id"
  292. @click.native="changeVerfy(item)"
  293. >
  294. </el-option>
  295. </el-select>
  296. </el-form-item>
  297. </el-col> -->
  298. <!-- <el-col :span="24">
  299. <el-form-item label="附件" prop="contentImage">
  300. <selectUpload @getImgs="upload" :initData="uploadList" />
  301. </el-form-item>
  302. </el-col> -->
  303. <el-col :span="24">
  304. <el-form-item label="备注" prop="remark">
  305. <el-input
  306. v-model="formData.remark"
  307. clearable
  308. type="textarea"
  309. placeholder="请详细说明"
  310. :rows="4"
  311. ></el-input>
  312. </el-form-item>
  313. </el-col>
  314. </el-row>
  315. </el-form>
  316. <div class="material">
  317. <header-title title="产品信息">
  318. <el-button type="primary" @click="addStock">添加</el-button>
  319. </header-title>
  320. <div class="mt10 form-table">
  321. <el-form
  322. ref="warehousingMaterialListRef"
  323. :model="{ warehousingMaterialList: warehousingMaterialList }"
  324. :show-message="false"
  325. >
  326. <el-button
  327. v-if="warehousingMaterialList.length != 0"
  328. type="success"
  329. plain
  330. style="margin-bottom: 20px; float: right; margin-right: 20px"
  331. size="mini"
  332. @click="listSaveArrs"
  333. >批量保存</el-button
  334. >
  335. <el-table
  336. :header-cell-style="rowClass"
  337. ref="multipleTable"
  338. :key="formData.extInfo.assetType"
  339. :data="warehousingMaterialList"
  340. tooltip-effect="dark"
  341. style="width: 100%"
  342. stripe
  343. >
  344. <el-table-column
  345. label="序号"
  346. type="index"
  347. width="50"
  348. align="center"
  349. >
  350. </el-table-column>
  351. <el-table-column
  352. label="编码"
  353. prop="assetCode"
  354. align="center"
  355. width="130"
  356. ></el-table-column>
  357. <el-table-column
  358. label="名称"
  359. align="center"
  360. width="200"
  361. prop="assetName"
  362. ></el-table-column>
  363. <!-- <el-table-column
  364. label="客户编码"
  365. align="center"
  366. width="150"
  367. prop="customCode"
  368. v-if="formData.bizType == 1"
  369. >
  370. <template slot-scope="{ row, $index }">
  371. <template v-if="row.isSave">
  372. {{ row.customCode }}
  373. </template>
  374. <el-form-item
  375. v-else
  376. :prop="`warehousingMaterialList.${$index}.customCode`"
  377. required
  378. >
  379. <el-input v-model="row.customCode"> </el-input>
  380. </el-form-item>
  381. </template>
  382. </el-table-column>
  383. <el-table-column
  384. label="供应商编码"
  385. align="center"
  386. width="150"
  387. prop="customCode"
  388. v-if="formData.bizType == 2"
  389. >
  390. <template slot-scope="{ row, $index }">
  391. <template v-if="row.isSave">
  392. {{ row.supplierCode }}
  393. </template>
  394. <el-form-item
  395. v-else
  396. :prop="`warehousingMaterialList.${$index}.supplierCode`"
  397. required
  398. >
  399. <el-input v-model="row.supplierCode"> </el-input>
  400. </el-form-item>
  401. </template>
  402. </el-table-column> -->
  403. <el-table-column
  404. v-for="(item, index) in tableHeader"
  405. :key="index"
  406. align="center"
  407. :label="item.label"
  408. width="150"
  409. :prop="item.prop"
  410. >
  411. <template slot-scope="{ row }">
  412. <template v-if="item.formatter">{{
  413. item.formatter(row)
  414. }}</template>
  415. <template v-else>{{ row[item.prop] }}</template>
  416. </template>
  417. </el-table-column>
  418. <el-table-column
  419. label="批次号"
  420. prop="batchNo"
  421. width="70"
  422. align="center"
  423. >
  424. <template slot-scope="{ row, $index }">
  425. <template v-if="row.isSave">
  426. {{ row.batchNo }}
  427. </template>
  428. <el-form-item
  429. v-else
  430. :prop="`warehousingMaterialList.${$index}.batchNo`"
  431. required
  432. >
  433. <!-- <el-input v-model="row.batchNo"></el-input> -->
  434. {{ row.batchNo }}
  435. </el-form-item>
  436. </template>
  437. </el-table-column>
  438. <el-table-column
  439. label="最小包装单元"
  440. align="center"
  441. prop="minPackingCount"
  442. width="100"
  443. >
  444. <el-table-column label="" prop="minPackingCount" width="100">
  445. <template slot-scope="{ row, $index }">
  446. <template v-if="row.isSave">
  447. {{ row.minPackingCount }}
  448. </template>
  449. <el-form-item
  450. v-else
  451. :prop="`warehousingMaterialList.${$index}.minPackingCount`"
  452. required
  453. >
  454. <el-input
  455. v-model="row.minPackingCount"
  456. @input="
  457. (value) =>
  458. (row.minPackingCount = value.replace(
  459. /^(0+)|[^\d]+/g,
  460. ''
  461. ))
  462. "
  463. >
  464. </el-input>
  465. </el-form-item>
  466. </template>
  467. </el-table-column>
  468. <el-table-column label="" prop="minPackingCount">
  469. <template slot-scope="{ row, $index }">
  470. {{ handleRowUnit(row) }} /{{ row.minPackUnit }}
  471. </template>
  472. </el-table-column>
  473. </el-table-column>
  474. <el-table-column
  475. label="包装数量"
  476. prop="outInNum"
  477. width="150"
  478. align="center"
  479. >
  480. <template slot-scope="{ row, $index }">
  481. <template v-if="row.isSave || formData.bizType == 5">
  482. {{ row.outInNum }} {{ row.minPackUnit }}
  483. </template>
  484. <el-form-item
  485. v-else
  486. :prop="`warehousingMaterialList.${$index}.outInNum`"
  487. required
  488. >
  489. <el-input
  490. v-model="row.outInNum"
  491. @input="packNum(row, $event)"
  492. >
  493. <template slot="append">
  494. {{ row.minPackUnit ? row.minPackUnit : '/' }}
  495. </template>
  496. </el-input>
  497. </el-form-item>
  498. </template>
  499. </el-table-column>
  500. <el-table-column label="计量数量" prop="counts">
  501. <template slot-scope="{ row, $index }">
  502. {{ row.minPackingCount * row.outInNum }}
  503. </template>
  504. </el-table-column>
  505. <el-table-column
  506. label="计量单位"
  507. prop="batchNo"
  508. width="100"
  509. align="center"
  510. >
  511. <!-- v-if="formData.extInfo.assetType == 1" -->
  512. <template slot-scope="{ row, $index }">
  513. <template>
  514. {{ row.measuringUnit }}
  515. </template>
  516. </template>
  517. </el-table-column>
  518. <!-- <el-table-column
  519. label="计量单位"
  520. prop="batchNo"
  521. width="100"
  522. align="center"
  523. v-if="formData.extInfo.assetType == 4"
  524. >
  525. <template slot-scope="{ row, $index }">
  526. <template>
  527. {{ row.measuringUnit }}
  528. </template>
  529. </template>
  530. </el-table-column> -->
  531. <!-- <el-table-column
  532. label="数量"
  533. prop="batchNo"
  534. width="150"
  535. align="center"
  536. v-if="formData.extInfo.assetType == 1"
  537. >
  538. <template slot-scope="{ row, $index }">
  539. <template> {{ row.outInNum }} </template>
  540. </template>
  541. </el-table-column>
  542. <el-table-column
  543. label="数量"
  544. prop="batchNo"
  545. width="150"
  546. align="center"
  547. v-if="formData.extInfo.assetType == 4"
  548. >
  549. <template slot-scope="{ row, $index }">
  550. <template>
  551. {{ row.minPackingCount * row.outInNum }}
  552. </template>
  553. </template>
  554. </el-table-column> -->
  555. <el-table-column
  556. label="重量"
  557. align="center"
  558. prop="contentImage"
  559. :show-overflow-tooltip="true"
  560. >
  561. <!-- v-if="formData.extInfo.assetType == 1" -->
  562. <template slot-scope="{ row, $index }">
  563. {{ row.weight }}
  564. <template slot="append">
  565. {{ handleRowUnit(row) }}
  566. <!-- {{
  567. { yuan: '元', wanyuan: '万元' }[row.univalenceUnit]
  568. }} -->
  569. </template>
  570. </template>
  571. </el-table-column>
  572. <!-- <el-table-column
  573. label="重量"
  574. align="center"
  575. prop="contentImage"
  576. :show-overflow-tooltip="true"
  577. v-if="formData.extInfo.assetType == 4"
  578. >
  579. <template slot-scope="{ row, $index }">
  580. {{
  581. deviceWeight(
  582. row.roughWeight,
  583. row.minPackingCount * row.outInNum
  584. )
  585. }}
  586. <template slot="append"> -->
  587. <!-- {{ handleRowUnit(row) }} -->
  588. <!-- {{
  589. { yuan: '元', wanyuan: '万元' }[row.univalenceUnit]
  590. }} -->
  591. <!-- </template>
  592. </template>
  593. </el-table-column> -->
  594. <el-table-column
  595. label="重量单位"
  596. align="center"
  597. prop="contentImage"
  598. :show-overflow-tooltip="true"
  599. >
  600. <template slot-scope="{ row, $index }">
  601. {{ row.weightUnit }}
  602. <template slot="append"> </template>
  603. </template>
  604. </el-table-column>
  605. <el-table-column
  606. label="单价"
  607. prop="univalence"
  608. width="150"
  609. align="center"
  610. >
  611. <template slot-scope="{ row, $index }">
  612. <!-- <template v-if="row.isSave || formData.bizType == 5">
  613. <template v-if="row.univalence || row.univalence === 0">
  614. {{ row.univalence
  615. }}{{
  616. { yuan: '元', wanyuan: '万元' }[row.univalenceUnit]
  617. }}
  618. </template>
  619. </template> -->
  620. <!-- v-else -->
  621. <el-form-item
  622. :prop="`warehousingMaterialList.${$index}.univalence`"
  623. >
  624. <el-input
  625. v-model="row.univalence"
  626. placeholder="非必填"
  627. @input="
  628. (value) =>
  629. (row.univalence = value.replace(/[^0-9.]+/g, ''))
  630. "
  631. >
  632. <template slot="append">
  633. 元/{{ handleRowUnit(row) }}
  634. <!-- {{
  635. { yuan: '元', wanyuan: '万元' }[row.univalenceUnit]
  636. }} -->
  637. </template>
  638. </el-input>
  639. </el-form-item>
  640. </template>
  641. </el-table-column>
  642. <el-table-column
  643. label="金额"
  644. align="center"
  645. prop="contentImage"
  646. :show-overflow-tooltip="true"
  647. >
  648. <template slot-scope="{ row, $index }">
  649. {{
  650. calcSumTotal(
  651. row.outInNum,
  652. row.minPackingCount,
  653. row.univalence,
  654. row
  655. )
  656. }}
  657. </template>
  658. </el-table-column>
  659. <el-table-column
  660. label="货位"
  661. prop="warehouseName"
  662. :show-overflow-tooltip="true"
  663. width="250"
  664. required
  665. >
  666. <template slot-scope="{ row, $index }">
  667. <el-form-item
  668. :prop="`warehousingMaterialList.${$index}.houseList`"
  669. :required="true"
  670. >
  671. <div @click="handleWareHouse(row, $index)">
  672. <div
  673. style="color: #ff4949"
  674. v-if="row.houseList.length == 0"
  675. >
  676. ---(必填)
  677. </div>
  678. <div v-else>
  679. <div
  680. v-for="(item, index) in row.houseList"
  681. :key="index"
  682. >
  683. {{ item.warehouseName }}- {{ item.areaName }}-
  684. {{ item.shelfCode }}- {{ item.cargoSpaceCode
  685. }}<span style="color: #ff4949" v-if="item.num">
  686. - {{ item.num }}(数)</span
  687. >
  688. <br />
  689. </div>
  690. </div>
  691. </div>
  692. </el-form-item>
  693. </template>
  694. </el-table-column>
  695. <el-table-column
  696. label="质检单"
  697. v-if="formData.extInfo.assetType === 3"
  698. prop="contentImage"
  699. :show-overflow-tooltip="true"
  700. >
  701. <template slot-scope="{ row, $index }">
  702. <upload @on-success="(data) => (row.contentImage = [data])"
  703. ><template slot="placeholder">上传</template></upload
  704. >
  705. </template>
  706. </el-table-column>
  707. <el-table-column
  708. label="操作"
  709. width="200"
  710. fixed="right"
  711. align="center"
  712. >
  713. <template slot="header" slot-scope="scope"> 操作 </template>
  714. <template slot-scope="{ row, $index }">
  715. <el-button
  716. type="text"
  717. v-show="!row.isSave"
  718. @click="listSave(row, $index)"
  719. >保存</el-button
  720. >
  721. <el-button
  722. type="text"
  723. v-show="row.isSave"
  724. @click="listEdit(row, $index)"
  725. >编辑</el-button
  726. >
  727. <el-button
  728. type="text"
  729. v-if="formData.bizType == 5"
  730. v-show="!row.isSave"
  731. @click="chooseAssets(row, $index)"
  732. >选择资产编号</el-button
  733. >
  734. <el-button type="text" @click="listDel(row, $index)"
  735. >删除</el-button
  736. >
  737. </template>
  738. </el-table-column>
  739. </el-table>
  740. </el-form>
  741. </div>
  742. <div class="mt20">
  743. <header-title :title="`包装明细`">
  744. <div class="switch_right">
  745. <span v-if="materialCodeReqList.length != 0">
  746. 分拆<el-switch
  747. v-model="isDetail"
  748. active-color="#13ce66"
  749. inactive-color="#ff4949"
  750. @change="handleIsDetail"
  751. style="margin-left: 10px"
  752. >
  753. </el-switch>
  754. </span>
  755. <el-button
  756. style="margin-left: 20px"
  757. type="text"
  758. @click="dateSetting"
  759. v-if="formData.bizType != 5"
  760. >批量设置{{
  761. curDateType === 'manufactureTime' ? '生产日期' : '采购日期'
  762. }}</el-button
  763. >
  764. </div>
  765. </header-title>
  766. <el-table
  767. ref="multipleTable"
  768. :data="materialCodeReqList"
  769. tooltip-effect="dark"
  770. :key="formData.bizType"
  771. :header-cell-style="rowClass"
  772. style="width: 100%"
  773. stripe
  774. height="300px"
  775. @selection-change="handleSelectionChange"
  776. >
  777. <el-table-column
  778. label=""
  779. type="selection"
  780. align="center"
  781. width="50"
  782. v-if="formData.bizType != 5"
  783. >
  784. </el-table-column>
  785. <el-table-column label="序号" type="index" width="50">
  786. </el-table-column>
  787. <el-table-column
  788. label="编码"
  789. prop="assetCode"
  790. width="130"
  791. ></el-table-column>
  792. <el-table-column
  793. label="名称"
  794. prop="assetName"
  795. width="150"
  796. ></el-table-column>
  797. <el-table-column
  798. label="批次号"
  799. prop="batchNo"
  800. width="70"
  801. ></el-table-column>
  802. <el-table-column
  803. :label="`包装编码`"
  804. prop="onlyCode"
  805. width="130"
  806. ></el-table-column>
  807. <el-table-column
  808. label="包装数量"
  809. prop="packingCount"
  810. width="80"
  811. ></el-table-column>
  812. <el-table-column
  813. label="包装单位"
  814. prop="packingUnit"
  815. ></el-table-column>
  816. <el-table-column
  817. label="计量数量"
  818. prop="minPackingCount"
  819. ></el-table-column>
  820. <el-table-column
  821. label="计量单位"
  822. prop="measuringUnit"
  823. ></el-table-column>
  824. <el-table-column
  825. v-if="formData.bizType == 2 || formData.bizType == 1"
  826. label="物料代号"
  827. prop="materielCode"
  828. >
  829. <template slot-scope="{ row }">
  830. <el-input
  831. v-if="!row.isPack"
  832. v-model="row.materielCode"
  833. ></el-input>
  834. <span v-else>{{ row.materielCode }}</span>
  835. </template>
  836. </el-table-column>
  837. <el-table-column
  838. v-if="formData.bizType == 2 || formData.bizType == 1"
  839. label="客户代号"
  840. prop="clientCode"
  841. >
  842. <template slot-scope="{ row }">
  843. <el-input
  844. v-if="!row.isPack"
  845. v-model="row.clientCode"
  846. ></el-input>
  847. <span v-else> {{ row.clientCode }}</span>
  848. </template>
  849. </el-table-column>
  850. <el-table-column
  851. v-if="formData.bizType == 1"
  852. label="刻码"
  853. prop="engrave"
  854. >
  855. <template slot-scope="{ row }">
  856. <el-input v-if="!row.isPack" v-model="row.engrave"></el-input>
  857. <span v-else>{{ row.engrave }}</span>
  858. </template>
  859. </el-table-column>
  860. <el-table-column
  861. v-if="formData.bizType == 2 || formData.bizType == 1"
  862. label="重量1"
  863. prop="weight"
  864. width="100"
  865. >
  866. <template slot-scope="{ row }">
  867. <el-input
  868. v-if="!row.isPack"
  869. v-model.number="row.weight"
  870. @input="
  871. (value) => {
  872. const newValue = value.replace(/^(0+)|[^\d]+/g, '');
  873. row.weight = parseInt(newValue, 10); // 转换为数字类型
  874. }
  875. "
  876. ></el-input>
  877. <span v-else>{{ row.weight }}</span>
  878. </template>
  879. </el-table-column>
  880. <el-table-column
  881. v-if="formData.bizType == 2 || formData.bizType == 1"
  882. label="重量单位"
  883. prop="weightUtil"
  884. >
  885. <template slot-scope="{ row }">
  886. {{ row.weightUtil }}
  887. </template>
  888. </el-table-column>
  889. <el-table-column
  890. v-if="formData.bizType != 5"
  891. label="生产日期"
  892. prop=""
  893. width="220"
  894. >
  895. <template slot="header" slot-scope="scope">
  896. <el-select filterable v-model="curDateType">
  897. <el-option
  898. value="manufactureTime"
  899. label="生产日期"
  900. ></el-option>
  901. <el-option
  902. value="procurementTime"
  903. label="采购日期"
  904. ></el-option>
  905. </el-select>
  906. </template>
  907. <template slot-scope="{ row }">
  908. <template v-if="formData.bizType == 5">
  909. {{ row[curDateType] }}
  910. </template>
  911. <el-date-picker
  912. v-else
  913. :disabled="row.ispack"
  914. size="small"
  915. v-model="row[curDateType]"
  916. type="datetime"
  917. value-format="yyyy-MM-dd HH:mm:ss"
  918. placeholder="选择日期"
  919. >
  920. </el-date-picker>
  921. </template>
  922. </el-table-column>
  923. <template v-else>
  924. <el-table-column
  925. label="生产日期"
  926. prop="manufactureTime"
  927. width="200"
  928. ></el-table-column>
  929. <el-table-column
  930. label="采购日期"
  931. prop="procurementTime"
  932. width="200"
  933. ></el-table-column>
  934. </template>
  935. <el-table-column label="操作" width="80">
  936. <template slot-scope="{ row }">
  937. <el-button type="text" @click="packCout(row)">
  938. {{ !row.isPack ? '保存' : '编辑' }}
  939. </el-button>
  940. </template>
  941. </el-table-column>
  942. </el-table>
  943. <!-- </el-tab-pane>
  944. </el-tabs> -->
  945. </div>
  946. <div class="mt20" v-if="isDetail">
  947. <header-title :title="`物料明细`"> </header-title>
  948. <el-table
  949. ref="multipleTable"
  950. :data="resultArray"
  951. tooltip-effect="dark"
  952. :key="formData.bizType"
  953. :header-cell-style="rowClass"
  954. style="width: 100%"
  955. stripe
  956. height="300px"
  957. @selection-change="handleSelectionChange"
  958. >
  959. <el-table-column label="序号" type="index" width="50">
  960. </el-table-column>
  961. <el-table-column label="编码" prop="assetCode"></el-table-column>
  962. <el-table-column
  963. label="名称"
  964. prop="assetName"
  965. width="200"
  966. ></el-table-column>
  967. <el-table-column
  968. label="批次号"
  969. prop="batchNo"
  970. width="80"
  971. ></el-table-column>
  972. <el-table-column
  973. label="物料编码"
  974. prop="no"
  975. width="200"
  976. ></el-table-column>
  977. <el-table-column
  978. label="计量数量"
  979. prop="minPackingCount"
  980. width="90"
  981. ></el-table-column>
  982. <el-table-column
  983. width="80"
  984. label="计量单位"
  985. prop="measuringUnit"
  986. ></el-table-column>
  987. <el-table-column
  988. v-if="formData.bizType == 2"
  989. label="物料代号"
  990. prop="materielCode"
  991. >
  992. <template slot-scope="{ row }">
  993. <el-input v-model="row.materielCode"></el-input>
  994. </template>
  995. </el-table-column>
  996. <el-table-column
  997. v-if="formData.bizType == 2 || formData.bizType == 1"
  998. label="客户代号"
  999. prop="clientCode"
  1000. >
  1001. <template slot-scope="{ row }">
  1002. <el-input v-model="row.clientCode"></el-input>
  1003. </template>
  1004. </el-table-column>
  1005. <el-table-column
  1006. v-if="formData.bizType == 1"
  1007. label="刻码"
  1008. prop="engrave"
  1009. >
  1010. <template slot-scope="{ row }">
  1011. <el-input v-model="row.engrave"></el-input>
  1012. </template>
  1013. </el-table-column>
  1014. <el-table-column
  1015. width="100"
  1016. v-if="formData.bizType == 2 || formData.bizType == 1"
  1017. label="重量"
  1018. prop="weight"
  1019. >
  1020. <template slot-scope="{ row }">
  1021. <el-input v-model="row.weight"></el-input>
  1022. </template>
  1023. </el-table-column>
  1024. <el-table-column
  1025. v-if="formData.bizType == 2 || formData.bizType == 1"
  1026. label="重量单位"
  1027. prop="weightUnit"
  1028. >
  1029. <template slot-scope="{ row }">
  1030. {{ row.weightUnit }}
  1031. </template>
  1032. </el-table-column>
  1033. </el-table>
  1034. </div>
  1035. </div>
  1036. <div class="center mt20">
  1037. <el-button type="primary" @click="handleSave" :loading="saveLoading"
  1038. >保存</el-button
  1039. >
  1040. <el-button @click="$router.go(-1)">返回</el-button>
  1041. </div>
  1042. </el-card>
  1043. <selectType
  1044. :visibleDialog.sync="visibleDialog"
  1045. :title="title"
  1046. :tableHeader="tableHeader"
  1047. :bizScene="formData.bizType"
  1048. :type="[selectEquiType]"
  1049. :loadTree.sync="loadTree"
  1050. @selectTableData="onSelectTableData"
  1051. />
  1052. <WareHouseDailog
  1053. ref="wareHouseDailogRef"
  1054. @houseData="houseData"
  1055. ></WareHouseDailog>
  1056. <ReturnSelect
  1057. ref="returnSelectRef"
  1058. :tableHeader="tableHeader"
  1059. :curDateType="curDateType"
  1060. ></ReturnSelect>
  1061. <el-dialog :visible.sync="dateVisible" title="选择日期" width="400px">
  1062. <el-date-picker
  1063. size="small"
  1064. v-model="batchTime"
  1065. type="datetime"
  1066. style="width: 320px"
  1067. value-format="yyyy-MM-dd HH:mm:ss"
  1068. placeholder="选择日期"
  1069. >
  1070. </el-date-picker>
  1071. <div style="text-align: right; margin-top: 20px">
  1072. <el-button @click="dateVisible = false">取消</el-button>
  1073. <el-button type="primary" @click="dateConfirm" :disabled="!batchTime"
  1074. >确认</el-button
  1075. >
  1076. </div>
  1077. </el-dialog>
  1078. <!-- 销售订单 -->
  1079. <picker ref="pickerRef" @success="pickerSuccess" />
  1080. </div>
  1081. </template>
  1082. <script>
  1083. import picker from './components/picker.vue';
  1084. import outin from '@/api/warehouseManagement/outin';
  1085. import { getTreeByPid, getTreeByGroup } from '@/api/classifyManage';
  1086. import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
  1087. import selectUpload from '@/components/selectUpload';
  1088. import upload from '@/components/uploadImg';
  1089. import {
  1090. warehousingType,
  1091. sceneState,
  1092. emergencyState,
  1093. materialType
  1094. } from '@/utils/dict/index';
  1095. // import { getInfo, warehousingAdd, getAssetNum } from '@/api/stockManagement';
  1096. import selectTree from '@/components/selectTree';
  1097. import selectType from '../components/selectType.vue';
  1098. import WareHouseDailog from '../components/WareHouseDailog.vue';
  1099. import ReturnSelect from './components/ReturnSelect.vue';
  1100. // import supplier from '@/api/main/supplier';
  1101. // import org from '@/api/main/org';
  1102. // import user from '@/api/main/user';
  1103. import { tableHeader } from '../common';
  1104. import { getCode } from '@/api/codeManagement/index.js';
  1105. import { number } from 'echarts/core';
  1106. import { purchaseorderGetById, contactlink } from '@/api/mes';
  1107. export default {
  1108. components: {
  1109. selectUpload,
  1110. selectTree,
  1111. selectType,
  1112. WareHouseDailog,
  1113. upload,
  1114. ReturnSelect,
  1115. picker
  1116. },
  1117. data() {
  1118. return {
  1119. resultArray: [],
  1120. isDetail: false,
  1121. contactList: [],
  1122. pickerRow: {},
  1123. fromUserList: [],
  1124. codeList: [],
  1125. materialType,
  1126. warehousingType,
  1127. sceneState,
  1128. emergencyState,
  1129. saveLoading: false,
  1130. visibleDialog: false,
  1131. curDateType: 'manufactureTime',
  1132. materialCodeReqListSelected: [],
  1133. // warehouseList: [], //仓库数组
  1134. // warehouse: {},
  1135. title: '',
  1136. tableData2: [],
  1137. uploadList: [],
  1138. supplierList: [],
  1139. warehousingMaterialList: [],
  1140. activeName: 'a',
  1141. loadTree: true,
  1142. selectEquiType: '',
  1143. batchTime: '',
  1144. dateVisible: false,
  1145. treeList: [],
  1146. staffList: [],
  1147. formData: {
  1148. extInfo: {
  1149. assetType: '', //物品类型
  1150. deptCode: '', //部门code
  1151. deptName: '', //部门名称
  1152. verifyDeptCode: '', //审核部门编码
  1153. verifyDeptName: '', //审核部门名称
  1154. deliveryName: '', //送货人名称
  1155. deliveryPhone: '', //送货人电话
  1156. documentSource: '', //销售订单
  1157. urgent: '', //紧急状态
  1158. supplierId: '', //供应商ID
  1159. supplierName: '', //供应商名称
  1160. createUserName: '', //创建人名字
  1161. contentImage: [] //图片数组
  1162. },
  1163. fromUser: '', //送货人
  1164. bizType: '', //物品类型
  1165. verifyId: '', //审核人Id
  1166. verifyName: '', //审核人名称
  1167. createUserId: '',
  1168. remark: ''
  1169. },
  1170. rules: {
  1171. 'extInfo.assetType': {
  1172. required: true,
  1173. message: '请选择物品类型',
  1174. trigger: 'change'
  1175. },
  1176. bizType: {
  1177. required: true,
  1178. message: '请选择入库场景',
  1179. trigger: 'change'
  1180. }
  1181. }
  1182. };
  1183. },
  1184. computed: {
  1185. // 条码信息
  1186. materialCodeReqList() {
  1187. return this.warehousingMaterialList
  1188. .map((i) => i.warehouseLedgerDetails || [])
  1189. .flat();
  1190. },
  1191. tableHeader() {
  1192. return tableHeader(this.selectEquiType);
  1193. }
  1194. },
  1195. created() {
  1196. if (this.$route.query.id) {
  1197. // this._getInfo()
  1198. } else {
  1199. let obj = localStorage.getItem('orgInfo')
  1200. ? JSON.parse(localStorage.getItem('orgInfo'))
  1201. : {};
  1202. this.formData.createUserName = obj.name;
  1203. this.formData.extInfo.deptName = obj.dept?.name;
  1204. this.formData.deptCode = obj.dept?.code;
  1205. }
  1206. this.initData();
  1207. },
  1208. methods: {
  1209. handleIsDetail(event) {
  1210. if (event) {
  1211. const list = this.materialCodeReqList;
  1212. console.log(list);
  1213. let resultArray = [];
  1214. list.forEach((item) => {
  1215. for (let i = 1; i <= Number(item.minPackingCount); i++) {
  1216. resultArray.push({
  1217. onlyCode: item.onlyCode,
  1218. no: item.onlyCode + i.toString().padStart(4, '0'),
  1219. assetCode: item.assetCode,
  1220. assetName: item.assetName,
  1221. batchNo: item.batchNo,
  1222. minPackingCount: 1,
  1223. measuringUnit: item.measuringUnit,
  1224. materielCode: item.materielCode,
  1225. clientCode: item.clientCode,
  1226. weight: item.netWeight,
  1227. weightUnit: item.weightUnit
  1228. });
  1229. }
  1230. });
  1231. this.resultArray = resultArray;
  1232. } else {
  1233. this.resultArray = [];
  1234. }
  1235. },
  1236. //包装明细保存
  1237. packCout(row) {
  1238. //true保存==》反之
  1239. if (!row.isPack) {
  1240. row.isPack = true;
  1241. const code = row.assetCode;
  1242. const batchNo = row.batchNo;
  1243. const count = this.materialCodeReqList.reduce(
  1244. (acc, curr) => acc + curr.weight,
  1245. 0
  1246. );
  1247. this.warehousingMaterialList.forEach((item) => {
  1248. if (item.assetCode == code && item.batchNo == batchNo) {
  1249. item.weight = count;
  1250. }
  1251. });
  1252. console.log(',,,,', this.warehousingMaterialList);
  1253. } else {
  1254. row.isPack = false;
  1255. }
  1256. },
  1257. packNum(row, value) {
  1258. const total = {
  1259. packingCount: Number(row.minPackingCount),
  1260. outInNum: Number(row.outInNum)
  1261. };
  1262. if (row.measuringUnit == row.weightUnit) {
  1263. row.weight = total.packingCount * 1 * total.outInNum.toFixed(2);
  1264. } else {
  1265. const totals = total.packingCount * total.outInNum;
  1266. row.weight = totals * row.netWeight.toFixed(2);
  1267. }
  1268. return (row.outInNum = value.replace(/^(0+)|[^\d]+/g, ''));
  1269. },
  1270. async searchContact(id) {
  1271. const data = await contactlink({ contactId: id });
  1272. this.contactList = data.data;
  1273. },
  1274. async pickerSuccess(row) {
  1275. this.pickerRow = row;
  1276. this.formData.extInfo.documentSource = row.orderNo;
  1277. this.formData.clientName = row.partaName;
  1278. this.formData.clientCode = row.partaId;
  1279. this.formData.extInfo.supplierName = row.partbName;
  1280. this.formData.extInfo.supplierId = row.partbId;
  1281. await this.searchContact(row.partbId);
  1282. const data = await purchaseorderGetById(row.id);
  1283. if (this.warehousingMaterialList.length == 0) {
  1284. let list = data.data.productList.map((item) => {
  1285. return {
  1286. ...item,
  1287. assetName: item.productName,
  1288. assetCode: item.productCode,
  1289. categoryId: item.productCategoryId
  1290. };
  1291. });
  1292. this.onSelectTableData(list);
  1293. }
  1294. },
  1295. onClear() {
  1296. this.formData.extInfo.documentSource = '';
  1297. this.pickerRow = {};
  1298. this.formData.clientName = '';
  1299. this.formData.clientCode = '';
  1300. this.formData.extInfo.supplierName = '';
  1301. this.formData.extInfo.supplierId = '';
  1302. this.$forceUpdate();
  1303. },
  1304. handlePicker() {
  1305. this.$refs.pickerRef.open();
  1306. },
  1307. codeListValue(val) {
  1308. this.formData.extInfo.assetType = val.id;
  1309. this.$forceUpdate();
  1310. this.title = val?.name;
  1311. this.selectEquiType = val?.id;
  1312. },
  1313. //计算生产设备重量
  1314. deviceWeight(row, num) {
  1315. if (row) {
  1316. return Number(row * num);
  1317. } else {
  1318. return row;
  1319. }
  1320. },
  1321. //计算金额
  1322. calcSumTotal(PackingCount, outInNum, univalence) {
  1323. //最小包装单元,包装数量,单价
  1324. const total = {
  1325. PackingCount: Number(PackingCount),
  1326. outInNum: Number(outInNum),
  1327. univalence: Number(univalence == undefined ? 0 : univalence)
  1328. };
  1329. console.log(PackingCount);
  1330. console.log(outInNum);
  1331. console.log(univalence);
  1332. return total.PackingCount * total.outInNum * total.univalence;
  1333. },
  1334. handleRowUnit(row) {
  1335. return row.measuringUnit;
  1336. // if (this.formData.extInfo.assetType == 1) {
  1337. // return row.weightUnit;
  1338. // } else if (this.formData.extInfo.assetType == 4) {
  1339. // return row.measuringUnit;
  1340. // } else {
  1341. // return row.measuringUnit;
  1342. // }
  1343. },
  1344. changeVerfy(it) {
  1345. this.formData.verifyName = it.name;
  1346. },
  1347. //选择供应啥的操作
  1348. ChangeSupplier(data) {
  1349. this.formData.extInfo.supplierName = data.dictValue;
  1350. },
  1351. ChangeSuppliers(data) {
  1352. this.formData.clientName = data.dictValue;
  1353. },
  1354. rowClass({ row, column, rowIndex, columnIndex }) {
  1355. if (rowIndex === 1) {
  1356. return {
  1357. display: 'none',
  1358. background: '#EEEEEE',
  1359. border: 'none'
  1360. };
  1361. }
  1362. return { background: '#EEEEEE', border: 'none' };
  1363. },
  1364. calcSum(a, b, c, row) {
  1365. if (
  1366. (Number.isNaN(+a) && a !== '') ||
  1367. (Number.isNaN(+b) && b !== '') ||
  1368. (Number.isNaN(+c) && c !== '')
  1369. ) {
  1370. return '';
  1371. }
  1372. return a * b * c + { yuan: '元', wanyuan: '万元' }[row.univalenceUnit];
  1373. // return a * b * c;
  1374. },
  1375. // 部门 点击事件
  1376. async auditorDeptClick(data) {
  1377. this.formData.extInfo.verifyDeptCode = data?.id;
  1378. this.formData.extInfo.verifyDeptName = data?.name;
  1379. this.formData.verifyId = '';
  1380. this.formData.verifyName = '';
  1381. this.$refs.formName.validateField('verifyDeptName');
  1382. if (data) {
  1383. this.getStaffList(data);
  1384. }
  1385. },
  1386. async getStaffList(data) {
  1387. let res = await warehouseDefinition.getUserPage({
  1388. groupId: data.id,
  1389. size: 9999,
  1390. page: 1
  1391. });
  1392. this.staffList = res.list;
  1393. },
  1394. // 详情接口
  1395. // async _getInfo () {
  1396. // const res = await getInfo({ id: this.$route.query.id })
  1397. // if (res?.success) {
  1398. // this.warehousingMaterialList = res.data.warehouseLedgerInfos.map(i => {
  1399. // i.isSave = true
  1400. // return i
  1401. // })
  1402. // this.formData = res.data.outInWarehouse
  1403. // this.uploadList = this.formData.contentImage
  1404. // }
  1405. // },
  1406. chooseAssets(row, index) {
  1407. this.$refs.returnSelectRef.open(row, (res) => {
  1408. row.outInNum = res.length;
  1409. this.$set(
  1410. row,
  1411. 'selfWarehouseLedgerDetails',
  1412. res.map((i) => {
  1413. delete i.updateTime;
  1414. delete i.createTime;
  1415. return i;
  1416. })
  1417. );
  1418. });
  1419. },
  1420. // 仓库编辑
  1421. handleWareHouse(row, idx) {
  1422. this.$refs.wareHouseDailogRef.open(row, idx);
  1423. },
  1424. // 入库操作
  1425. listEdit(row) {
  1426. this.$set(row, 'isSave', false);
  1427. row.selfWarehouseLedgerDetails = row.warehouseLedgerDetails;
  1428. row.warehouseLedgerDetails = [];
  1429. },
  1430. listSave(row, index) {
  1431. const fileds = [
  1432. // `warehousingMaterialList.${index}.cargoSpaceCode`,
  1433. `warehousingMaterialList.${index}.batchNo`,
  1434. `warehousingMaterialList.${index}.houseList`
  1435. ];
  1436. if (this.formData.bizType == 1) {
  1437. // fileds.push(...[`warehousingMaterialList.${index}.customCode`]);
  1438. } else if (this.formData.bizType == 2) {
  1439. // fileds.push(...[`warehousingMaterialList.${index}.supplierCode`]);
  1440. }
  1441. if (this.formData.bizType != 5) {
  1442. fileds.push(
  1443. ...[
  1444. `warehousingMaterialList.${index}.outInNum`,
  1445. `warehousingMaterialList.${index}.minPackingCount`
  1446. ]
  1447. );
  1448. } else if (
  1449. this.warehousingMaterialList.some(
  1450. (i) => !i.selfWarehouseLedgerDetails?.length
  1451. )
  1452. ) {
  1453. this.$message.error('请选择资产编号!');
  1454. return;
  1455. }
  1456. Promise.all(
  1457. fileds.map(
  1458. (item) =>
  1459. new Promise(async (resolve, rej) => {
  1460. this.$refs.warehousingMaterialListRef.validateField(
  1461. item,
  1462. (err) => {
  1463. if (err) {
  1464. rej(err);
  1465. } else {
  1466. resolve();
  1467. }
  1468. }
  1469. );
  1470. })
  1471. )
  1472. )
  1473. .then((res) => {
  1474. this.$set(row, 'isSave', true);
  1475. if (this.formData.bizType != 5) {
  1476. this.createMaterialCode(row);
  1477. } else {
  1478. // 退还
  1479. this.createMaterialCodeReturn(row);
  1480. }
  1481. })
  1482. .catch((err) => {
  1483. this.$message.error('请填入必填项!');
  1484. });
  1485. },
  1486. listSaveArrs() {
  1487. const rows = this.warehousingMaterialList;
  1488. const indexes = Array.from(
  1489. { length: this.warehousingMaterialList.length },
  1490. (_, index) => index
  1491. );
  1492. rows.forEach((row, i) => {
  1493. const index = indexes[i];
  1494. console.log('rowroworoworworworworworworoworworoworoworw', row);
  1495. console.log('indexindexindexirnjkdfnjfndjkfn', index);
  1496. const fileds = [
  1497. // `warehousingMaterialList.${index}.cargoSpaceCode`,
  1498. `warehousingMaterialList.${index}.batchNo`,
  1499. `warehousingMaterialList.${index}.houseList`
  1500. ];
  1501. if (this.formData.bizType == 1) {
  1502. // fileds.push(...[`warehousingMaterialList.${index}.customCode`]);
  1503. } else if (this.formData.bizType == 2) {
  1504. // fileds.push(...[`warehousingMaterialList.${index}.supplierCode`]);
  1505. }
  1506. if (this.formData.bizType != 5) {
  1507. fileds.push(
  1508. ...[
  1509. `warehousingMaterialList.${index}.outInNum`,
  1510. `warehousingMaterialList.${index}.minPackingCount`
  1511. ]
  1512. );
  1513. } else if (
  1514. this.warehousingMaterialList.some(
  1515. (i) => !i.selfWarehouseLedgerDetails?.length
  1516. )
  1517. ) {
  1518. this.$message.error('请选择资产编号!');
  1519. return;
  1520. }
  1521. Promise.all(
  1522. fileds.map(
  1523. (item) =>
  1524. new Promise(async (resolve, rej) => {
  1525. this.$refs.warehousingMaterialListRef.validateField(
  1526. item,
  1527. (err) => {
  1528. if (err) {
  1529. rej(err);
  1530. } else {
  1531. resolve();
  1532. }
  1533. }
  1534. );
  1535. })
  1536. )
  1537. )
  1538. .then((res) => {
  1539. this.$set(row, 'isSave', true);
  1540. if (this.formData.bizType != 5) {
  1541. this.createMaterialCode(row);
  1542. } else {
  1543. // 退还
  1544. this.createMaterialCodeReturn(row);
  1545. }
  1546. })
  1547. .catch((err) => {
  1548. // this.$message.error('请填入必填项!');
  1549. });
  1550. });
  1551. },
  1552. // listSaveArrs() {
  1553. // console.log(this.warehousingMaterialList);
  1554. // },
  1555. // 批量设置生产日期
  1556. handleSelectionChange(val) {
  1557. this.materialCodeReqListSelected = val;
  1558. },
  1559. dateSetting() {
  1560. if (!this.materialCodeReqListSelected.length) {
  1561. return this.$message.error(`请选择${this.title}明细!`);
  1562. }
  1563. this.dateVisible = true;
  1564. },
  1565. dateConfirm() {
  1566. this.materialCodeReqListSelected.forEach((item) => {
  1567. this.$set(item, this.curDateType, this.batchTime);
  1568. });
  1569. this.dateVisible = false;
  1570. },
  1571. //入库明细删除
  1572. listDel(row, index) {
  1573. this.warehousingMaterialList.splice(index, 1);
  1574. this.resultArray = [];
  1575. this.isDetail = false;
  1576. },
  1577. // 入库明细生成条码信息
  1578. async createMaterialCode(row) {
  1579. console.log('====', row);
  1580. // 添加相同物品、批次号重新更新明细 原料编码
  1581. const list = this.warehousingMaterialList.filter(
  1582. (i) =>
  1583. i.assetCode === row.assetCode &&
  1584. i.batchNo === row.batchNo &&
  1585. i.isSave
  1586. );
  1587. const num = list.reduce((num, pre) => {
  1588. num += row.isUnpack
  1589. ? pre.outInNum * pre.minPackingCount
  1590. : pre.outInNum - 0;
  1591. return num;
  1592. }, 0);
  1593. const nums = list.reduce((num, pre) => {
  1594. num += pre.outInNum * pre.minPackingCount;
  1595. return num;
  1596. }, 0);
  1597. const res = await outin.getAssetNum({
  1598. assetCode: row.assetCode,
  1599. batchNum: row.batchNo,
  1600. num: num
  1601. });
  1602. // row.measuringUnit == 'PCS' ? nums :
  1603. list.forEach((item) => {
  1604. if (item.warehouseLedgerDetails?.length) {
  1605. item.warehouseLedgerDetails.forEach((i) => {
  1606. i.onlyCode = res.shift().onlyCode;
  1607. });
  1608. } else {
  1609. console.log(' item.isUnpack', item.isUnpack);
  1610. console.log('1', +item.outInNum);
  1611. console.log('2', item);
  1612. console.log(
  1613. '3',
  1614. item.isUnpack
  1615. ? item.outInNum * item.minPackingCount
  1616. : +item.minPackingCount
  1617. );
  1618. this.$set(
  1619. item,
  1620. 'warehouseLedgerDetails',
  1621. Array.from(
  1622. new Array(
  1623. item.isUnpack
  1624. ? item.outInNum * item.minPackingCount
  1625. : // : item.measuringUnit == 'PCS'
  1626. // ? +item.outInNum * parseInt(item.minPackingCount)
  1627. +item.outInNum
  1628. ),
  1629. (val, idx) => {
  1630. return {
  1631. ...item,
  1632. onlyCode: res.shift().onlyCode,
  1633. bizStatus: 1,
  1634. contentImage: []
  1635. };
  1636. }
  1637. )
  1638. );
  1639. }
  1640. });
  1641. // 添加相同物品,重复批次号 重新更新明细 包装编码
  1642. const batchList = this.warehousingMaterialList.filter(
  1643. (i) => i.batchNo === row.batchNo && i.isSave
  1644. );
  1645. if (batchList.length) {
  1646. const num = batchList.reduce((num, pre) => {
  1647. num += +pre.outInNum;
  1648. return num;
  1649. }, 0);
  1650. const res1 = await outin.getAssetNum({
  1651. batchNum: row.batchNo,
  1652. num
  1653. });
  1654. if (res1) {
  1655. batchList.forEach((item) => {
  1656. let num = res1.shift()?.num;
  1657. let minPackingCount = item.minPackingCount;
  1658. console.log('item', item);
  1659. if (item.warehouseLedgerDetails?.length) {
  1660. item.warehouseLedgerDetails.forEach((i, index) => {
  1661. this.$set(i, 'num', num);
  1662. if (item.measuringUnit == item.weightUnit) {
  1663. this.$set(i, 'weight', item.minPackingCount);
  1664. } else {
  1665. this.$set(
  1666. i,
  1667. 'weight',
  1668. 1 * item.minPackingCount * item.netWeight
  1669. );
  1670. }
  1671. this.$set(i, 'weightUtil', item.weightUnit);
  1672. this.$set(i, 'packingCount', 1);
  1673. this.$set(i, 'packingUnit ', item.packingUnit);
  1674. this.$set(i, 'minPackingCount ', item.minPackingCount);
  1675. this.$set(i, 'measuringUnit', item.measuringUnit);
  1676. this.$set(i, 'isPack', false);
  1677. if (!item.isUnpack) {
  1678. if (index < item.warehouseLedgerDetails.length - 1) {
  1679. num = res1.shift()?.num;
  1680. }
  1681. } else {
  1682. // 拆包的包装编码一致
  1683. minPackingCount--;
  1684. if (
  1685. minPackingCount === 0 &&
  1686. index < item.warehouseLedgerDetails.length - 1
  1687. ) {
  1688. minPackingCount = item.minPackingCount;
  1689. num = res1.shift()?.num;
  1690. }
  1691. }
  1692. });
  1693. }
  1694. });
  1695. }
  1696. }
  1697. },
  1698. // 入库明细生成条码信息 退还
  1699. async createMaterialCodeReturn(row) {
  1700. // 添加相同物品重新更新明细 原料编码
  1701. const list = this.warehousingMaterialList.filter(
  1702. (i) => i.batchNo === row.batchNo && i.isSave
  1703. );
  1704. // 退还
  1705. const res = await getAssetNum({
  1706. batchNo: row.batchNo,
  1707. num: list.reduce((num, pre) => {
  1708. num += pre.selfWarehouseLedgerDetails.length;
  1709. return num;
  1710. }, 0)
  1711. });
  1712. if (res?.success) {
  1713. list.forEach((item) => {
  1714. let num = res.data.shift().num;
  1715. let minPackingCount = item.minPackingCount;
  1716. if (item.warehouseLedgerDetails?.length) {
  1717. item.warehouseLedgerDetails.forEach((i, index) => {
  1718. Object.assign(i, {
  1719. num,
  1720. batchNo: item.batchNo,
  1721. cargoSpaceCode: item.cargoSpaceCode, //货位编码
  1722. cargoSpaceId: item.cargoSpaceId, //货位id
  1723. shelfId: item.shelfId, //货架id
  1724. shelfCode: item.shelfCode, //货架名称
  1725. areaId: item.areaId, //库区id
  1726. areaName: item.areaName, //库区名称
  1727. warehouseId: item.warehouseId, //仓库id
  1728. warehouseName: item.warehouseName //仓库名称
  1729. });
  1730. if (!item.isUnpack) {
  1731. // 拆包的包装编码一致
  1732. if (index < item.warehouseLedgerDetails.length - 1) {
  1733. num = res.data.shift()?.num;
  1734. }
  1735. } else {
  1736. minPackingCount--;
  1737. if (
  1738. minPackingCount === 0 &&
  1739. index < item.warehouseLedgerDetails.length - 1
  1740. ) {
  1741. minPackingCount = item.minPackingCount;
  1742. num = res1.data.shift()?.num;
  1743. }
  1744. }
  1745. });
  1746. } else {
  1747. this.$set(
  1748. item,
  1749. 'warehouseLedgerDetails',
  1750. item.selfWarehouseLedgerDetails.map((val, idx) => {
  1751. let obj = {
  1752. ...val,
  1753. bizStatus: 1,
  1754. minPackingCount: item.minPackingCount,
  1755. batchNo: item.batchNo,
  1756. cargoSpaceCode: item.cargoSpaceCode, //货位编码
  1757. cargoSpaceId: item.cargoSpaceId, //货位id
  1758. shelfId: item.shelfId, //货架id
  1759. shelfCode: item.shelfCode, //货架名称
  1760. areaId: item.areaId, //库区id
  1761. areaName: item.areaName, //库区名称
  1762. warehouseId: item.warehouseId, //仓库id
  1763. warehouseName: item.warehouseName, //仓库名称
  1764. materialId: item.materialId,
  1765. num
  1766. };
  1767. if (!item.isUnpack) {
  1768. // 拆包的包装编码一致
  1769. if (idx < item.warehouseLedgerDetails.length - 1) {
  1770. num = res.data.shift()?.num;
  1771. }
  1772. } else {
  1773. minPackingCount--;
  1774. if (
  1775. minPackingCount === 0 &&
  1776. idx < item.warehouseLedgerDetails.length - 1
  1777. ) {
  1778. minPackingCount = item.minPackingCount;
  1779. num = res1.data.shift()?.num;
  1780. }
  1781. }
  1782. return obj;
  1783. })
  1784. );
  1785. }
  1786. });
  1787. }
  1788. },
  1789. handleSave() {
  1790. this.$refs.formName.validate(async (valid) => {
  1791. if (valid) {
  1792. if (!this.warehousingMaterialList?.length) {
  1793. return this.$message.error('请添加入库明细!');
  1794. } else if (
  1795. this.warehousingMaterialList.some((item) => !item.isSave)
  1796. ) {
  1797. return this.$message.error('请保存入库明细!');
  1798. }
  1799. const params = {
  1800. outInWarehouse: { ...this.formData, type: 1 },
  1801. warehouseLedgerInfos: this.warehousingMaterialList
  1802. };
  1803. for (let key in this.warehousingMaterialList) {
  1804. for (let k in this.warehousingMaterialList[key].houseList) {
  1805. this.warehousingMaterialList[key].warehouseName =
  1806. this.warehousingMaterialList[key].houseList[k].warehouseName;
  1807. this.warehousingMaterialList[key].areaName =
  1808. this.warehousingMaterialList[key].houseList[k].areaName;
  1809. this.warehousingMaterialList[key].shelfCode =
  1810. this.warehousingMaterialList[key].houseList[k].shelfCode;
  1811. this.warehousingMaterialList[key].cargoSpaceCode =
  1812. this.warehousingMaterialList[key].houseList[k].cargoSpaceCode;
  1813. this.warehousingMaterialList[key].warehouseId =
  1814. this.warehousingMaterialList[key].houseList[k].warehouseId;
  1815. this.warehousingMaterialList[key].areaId =
  1816. this.warehousingMaterialList[key].houseList[k].areaId;
  1817. this.warehousingMaterialList[key].shelfId =
  1818. this.warehousingMaterialList[key].houseList[k].shelfId;
  1819. this.warehousingMaterialList[key].cargoSpaceId =
  1820. this.warehousingMaterialList[key].houseList[k].cargoSpaceId;
  1821. this.warehousingMaterialList[key].num =
  1822. this.warehousingMaterialList[key].houseList[k].num;
  1823. }
  1824. }
  1825. console.log('===123', this.warehousingMaterialList);
  1826. let arr = this.warehousingMaterialList.map((item) => {
  1827. return {
  1828. num: item.num,
  1829. batchNo: item.batchNo,
  1830. categoryId:
  1831. this.formData.bizType == 2
  1832. ? item.categoryId
  1833. ? item.categoryId
  1834. : item.id
  1835. : item.id,
  1836. count: parseInt(item.outInNum) * parseInt(item.minPackingCount),
  1837. minPackingCount: item.minPackingCount,
  1838. packingCount: item.outInNum,
  1839. price: item.univalence,
  1840. outInDetailRecordAddPOList: item.warehouseLedgerDetails,
  1841. position: `${item.warehouseName}-${item.areaName}-${item.shelfCode}-${item.cargoSpaceCode}`,
  1842. // pathIds: item.categoryLevelPathId.toString(),
  1843. remark: '',
  1844. pathIds: `${item.warehouseId},${item.areaId},${item.shelfId},${item.cargoSpaceId}`,
  1845. pathName: `${item.warehouseName},${item.areaName},${item.shelfCode},${item.cargoSpaceCode}`,
  1846. totalMoney:
  1847. item.outInNum * item.minPackingCount * item.univalence,
  1848. weightUnit: item.weightUnit,
  1849. customCode: item.customCode,
  1850. supplierCode: item.supplierCode,
  1851. weight: item.weight
  1852. };
  1853. });
  1854. arr.forEach((item) => {
  1855. if (item.outInDetailRecordAddPOList.length > 0) {
  1856. let list = item.outInDetailRecordAddPOList.map((it) => {
  1857. return {
  1858. code: it.onlyCode,
  1859. dateType: this.curDateType === 'manufactureTime' ? 2 : 1,
  1860. dateValue: it[this.curDateType],
  1861. minUnit: it.minPackingCount,
  1862. minPositionId: it.cargoSpaceId,
  1863. name: it.assetName,
  1864. pathIds: item.pathIds,
  1865. unit: it.unit,
  1866. packageNo: it.num,
  1867. clientCode: it.clientCode,
  1868. materielCode: it.materielCode,
  1869. weight: it.weight,
  1870. weightUtil: it.weightUtil,
  1871. engrave: it.engrave,
  1872. materialDetails: this.materialDetails(it.onlyCode),
  1873. packingCount: it.packingCount
  1874. };
  1875. });
  1876. item.outInDetailRecordAddPOList = list;
  1877. }
  1878. });
  1879. let obj = { ...this.formData, type: 1 };
  1880. obj.outInDetailAddPOList = arr;
  1881. console.log('====>>', obj);
  1882. this.saveLoading = true;
  1883. try {
  1884. const res = await outin.save(obj);
  1885. if (res.code == 0) {
  1886. this.$message.success('保存成功!');
  1887. }
  1888. } catch (error) {}
  1889. this.saveLoading = false;
  1890. this.$router.push('/warehouseManagement/stockManagement');
  1891. }
  1892. });
  1893. },
  1894. materialDetails(onlyCode) {
  1895. return this.resultArray.filter((item) => item.onlyCode === onlyCode);
  1896. },
  1897. async getOrderCode() {
  1898. const data = await getCode('in_warehouse');
  1899. return data;
  1900. },
  1901. //添加明细
  1902. async onSelectTableData(val) {
  1903. const res = await getCode('lot_number_code');
  1904. this.warehousingMaterialList.push(
  1905. ...val.map((next) => {
  1906. next.batchNo = res;
  1907. let cur = {};
  1908. next.realInventoryAmount = next.realInventoryAmount || 0;
  1909. cur = {
  1910. ...next,
  1911. cargoSpaceCode: '', //货位编码
  1912. cargoSpaceId: '', //货位id
  1913. shelfId: '', //货架id
  1914. shelfCode: '', //货架名称
  1915. areaId: '', //库区id
  1916. areaName: '', //库区名称
  1917. warehouseId: '', //仓库id
  1918. warehouseName: '', //仓库名称
  1919. assetType: this.formData.extInfo.assetType,
  1920. expirationDate: '',
  1921. outInNum: '',
  1922. minPackingCount: '',
  1923. bizStatus: 1,
  1924. contentImage: [],
  1925. warehouseLedgerDetails: [],
  1926. houseList: []
  1927. };
  1928. return cur;
  1929. })
  1930. );
  1931. },
  1932. async initData() {
  1933. const { data } = await getTreeByGroup({ type: 1 });
  1934. this.codeList = data;
  1935. // .map((item) => {
  1936. // return { dictCode: item.id, dictValue: item.name };
  1937. // });
  1938. const res = await warehouseDefinition.tree();
  1939. this.treeList = this.$util.toTreeData({
  1940. data: res,
  1941. idField: 'id',
  1942. parentIdField: 'parentId'
  1943. });
  1944. // const res111 = await warehouseDefinition.list();
  1945. // this.warehouseList = res111.list;
  1946. let res22 = await warehouseDefinition.getUserPage({
  1947. size: -1,
  1948. page: 1
  1949. });
  1950. this.fromUserList = res22.list;
  1951. const info = JSON.parse(localStorage.getItem('info'));
  1952. let obj = res.find(
  1953. (item) => item.id === info.deptId[info.deptId.length - 1]
  1954. );
  1955. if (!obj) return;
  1956. this.formData.extInfo.deptCode = obj.id;
  1957. this.formData.extInfo.deptName = obj.name;
  1958. this.formData.extInfo.createUserName = info.name;
  1959. this.formData.createUserId = info.id;
  1960. // this.treeList = res;
  1961. // this.formData.extInfo.deptCode =
  1962. // this.getTreeList().then((res) => {
  1963. // if (res?.success) {
  1964. // this.treeList = res.data;
  1965. // }
  1966. // });
  1967. // this.getSupplier().then((res) => {
  1968. // if (res?.success) {
  1969. // this.supplierList = res.data.items;
  1970. // }
  1971. // });
  1972. // this.getStaffList();
  1973. },
  1974. addStock() {
  1975. // this.$refs.wareHouseDailogRef.open({});
  1976. // return;
  1977. if (!this.title) return this.$message.error('请选择入库产品类型');
  1978. if (!this.formData.bizType)
  1979. return this.$message.error('请选择入库场景');
  1980. this.visibleDialog = true;
  1981. },
  1982. handleChange(data) {
  1983. this.title = data?.dictValue;
  1984. this.selectEquiType = data?.dictCode;
  1985. },
  1986. handleChanges(code) {
  1987. const data = this.codeList.find((item) => item.dictCode == code);
  1988. this.title = data?.dictValue;
  1989. this.selectEquiType = data?.dictCode;
  1990. },
  1991. getSupplier() {
  1992. return new Promise((resolve, reject) => {
  1993. supplier.list({ page: 1, size: 999 }).then((res) => {
  1994. if (res.success) {
  1995. resolve(res);
  1996. }
  1997. });
  1998. });
  1999. },
  2000. getTreeList() {
  2001. return new Promise((resolve, reject) => {
  2002. org.tree().then((res) => {
  2003. if (res.success) {
  2004. resolve(res);
  2005. }
  2006. });
  2007. });
  2008. },
  2009. upload(data) {
  2010. this.formData.contentImage = data;
  2011. this.$refs.formName.validateField('contentImage');
  2012. },
  2013. houseData(argum, idx) {
  2014. this.$set(this.warehousingMaterialList[idx], 'houseList', argum);
  2015. }
  2016. }
  2017. };
  2018. </script>
  2019. <style lang="scss" scoped>
  2020. ::v-deep.form-table {
  2021. .el-form-item {
  2022. margin-bottom: 0;
  2023. }
  2024. .el-input__inner {
  2025. padding: 0 10px;
  2026. }
  2027. ::-webkit-scrollbar {
  2028. width: 8px;
  2029. height: 8px;
  2030. background-color: transparent;
  2031. }
  2032. }
  2033. .p20 {
  2034. padding: 20px;
  2035. }
  2036. .el-select,
  2037. .el-date-editor {
  2038. width: 100%;
  2039. }
  2040. .el-form-item {
  2041. margin-bottom: 22px;
  2042. }
  2043. .material {
  2044. margin-top: 20px;
  2045. .flex {
  2046. display: flex;
  2047. justify-content: space-between;
  2048. font-size: 14px;
  2049. align-items: center;
  2050. .red {
  2051. color: #ff4949;
  2052. }
  2053. }
  2054. }
  2055. .mt10 {
  2056. margin-top: 10px;
  2057. }
  2058. .mt20 {
  2059. margin-top: 20px;
  2060. }
  2061. .center {
  2062. text-align: center;
  2063. }
  2064. .switch_left li {
  2065. border-right: 1px solid rgba(222, 222, 222, 1);
  2066. border-left: 1px solid rgba(222, 222, 222, 1);
  2067. }
  2068. </style>