warehouseManagementPerfectput.vue 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921
  1. // 完善入库信息
  2. <template>
  3. <div class="container">
  4. <el-row>
  5. <el-col :span="20">
  6. <h2 class="bg-left title">完善入库登记</h2>
  7. </el-col>
  8. <el-col :span="4" class="bg-right">
  9. <el-button
  10. class="bg-bottom"
  11. type="primary"
  12. size="small"
  13. @click="revert()"
  14. ><img
  15. width="6"
  16. height="10"
  17. style="vertical-align: bottom; margin-right: 3px"
  18. src="../../../public/img/lujing.png"
  19. alt=""
  20. />返回</el-button
  21. >
  22. </el-col>
  23. </el-row>
  24. <ws-form ref="dataList" :model="dataList" :rules="rules">
  25. <div class="basicInformation">
  26. <h2>
  27. {{ deptBudgetList1.warehouseName }}
  28. <span class="position" v-show="this.$route.query.warehouseType == 1">
  29. {{ deptBudgetList1.binNumber }}仓位
  30. </span>
  31. <span v-show="this.$route.query.warehouseType == 2">(临)</span>
  32. </h2>
  33. <div class="small-title">基本信息</div>
  34. <div class="flex">
  35. <div class="left" style='width:66.6666%;'>
  36. <ws-info-table>
  37. <ws-form-item label="合同编号" span="1" prop="contractNo">
  38. <el-select
  39. filterable
  40. :filter-method="dataFilter1"
  41. v-model="dataList.contractNo"
  42. placeholder="请选择合同编号或移库任务编号"
  43. class="typeselect"
  44. @change='contractNoChange'
  45. >
  46. <el-option
  47. v-for="item in options1"
  48. :key="item.constKey"
  49. :label="item.contractNo"
  50. :value="item.contractNo"
  51. />
  52. </el-select>
  53. </ws-form-item>
  54. <!--毛重(吨)-->
  55. <ws-form-item label="毛重(吨)" span="1" prop="grossWeight">
  56. <ws-input
  57. @input="grossWeightchange"
  58. v-model="dataList.grossWeight"
  59. placeholder="请输入毛重"
  60. maxlength="20"
  61. size="small"
  62. />
  63. </ws-form-item>
  64. <!-- 货名 -->
  65. <ws-form-item label="货名" span="1">
  66. <ws-select
  67. disabled
  68. v-model="dataList.goodsName"
  69. placeholder
  70. class="typeselect"
  71. @change="selectgoodsName"
  72. >
  73. <ws-option
  74. v-for="item in goodnameList"
  75. :key="item.constKey"
  76. :label="item.constValue"
  77. :value="item.constValue"
  78. />
  79. </ws-select>
  80. </ws-form-item>
  81. <!--皮重(吨)-->
  82. <ws-form-item label="皮重(吨)" span="1" prop="tare" class="readonly">
  83. <ws-input
  84. @input="tarechange"
  85. v-model="dataList.tare"
  86. placeholder="请输入皮重"
  87. maxlength="100"
  88. size="small"
  89. />
  90. </ws-form-item>
  91. <ws-form-item label="类型" span="1" prop="type">
  92. <ws-select disabled v-model="dataList.type" @change="typeChange">
  93. <ws-option v-for="item in typeList" :key="item" :label="item" :value="item" />
  94. </ws-select>
  95. </ws-form-item>
  96. <ws-form-item label="扣重(吨)" span="1" prop="deductionWeight" class="readonly">
  97. <ws-input
  98. @input="tarechange"
  99. v-model="dataList.deductionWeight"
  100. placeholder="请输入扣重"
  101. maxlength="100"
  102. size="small"
  103. />
  104. </ws-form-item>
  105. <ws-form-item label="扣款(元/吨)" span="1" prop="deductionAmount">
  106. <ws-input
  107. @input="kkInput(dataList.deductionAmount)"
  108. v-model="dataList.deductionAmount"
  109. placeholder="请输入扣款金额"
  110. maxlength="120"
  111. size="small"
  112. />
  113. </ws-form-item>
  114. <!--净重(吨)-->
  115. <ws-form-item label="净重(吨)" span="1" prop="netWeight">
  116. <ws-input
  117. readonly="readonly"
  118. v-model="dataList.netWeight"
  119. placeholder="不可编辑,自动计算"
  120. maxlength="120"
  121. size="small"
  122. />
  123. </ws-form-item>
  124. <!-- <ws-form-item v-if='dataList.type=="潮粮"' label="扣重比" span="1" prop="buckleWeightRatio" class="readonly">
  125. <ws-input
  126. @input='pureweight'
  127. v-model="dataList.buckleWeightRatio"
  128. placeholder="请输入扣重比"
  129. maxlength="100"
  130. size="small"
  131. />
  132. </ws-form-item>
  133. <ws-form-item v-if='dataList.type=="潮粮"' label="干粮水分占比" span="1" prop="solidGrainWater" class="readonly">
  134. <ws-input
  135. @input='pureweight'
  136. v-model="dataList.solidGrainWater"
  137. placeholder="请输入干粮水分占比"
  138. maxlength="100"
  139. size="small"
  140. />
  141. </ws-form-item>
  142. <ws-form-item v-if='dataList.type=="潮粮"' label="潮粮水分占比" span="1" prop="tidalGrainWater" class="readonly">
  143. <ws-input
  144. @input='pureweight'
  145. v-model="dataList.tidalGrainWater"
  146. placeholder="请输入潮粮水分占比"
  147. maxlength="100"
  148. size="small"
  149. />
  150. </ws-form-item>
  151. <ws-form-item v-if='dataList.type=="潮粮"' label="纯重" span="1" prop="pureWeight" class="readonly">
  152. <ws-input
  153. disabled
  154. v-model="dataList.pureWeight"
  155. placeholder="不可编辑,自动计算"
  156. maxlength="100"
  157. size="small"
  158. />
  159. </ws-form-item> -->
  160. <!--净重(吨)-->
  161. <!-- 品级 -->
  162. <ws-form-item label="品级" span="1" class="readonly">
  163. <ws-select
  164. v-model="dataList.grade"
  165. placeholder
  166. class="typeselect"
  167. @change="selectpackingMethod"
  168. >
  169. <ws-option
  170. v-for="item in gradeList"
  171. :key="item.constKey"
  172. :label="item.constValue"
  173. :value="item.constValue"
  174. />
  175. </ws-select>
  176. </ws-form-item>
  177. <!--经办人-->
  178. <ws-form-item label="经办人" span="1" prop="agent">
  179. <el-select
  180. v-model="dataList.agent"
  181. placeholder="请选择经办人"
  182. filterable
  183. clearable
  184. @change="selectstaff"
  185. >
  186. <el-option
  187. v-for="item in options"
  188. :key="item.value"
  189. :label="item.staffName"
  190. :value="item.staffName"
  191. />
  192. </el-select>
  193. </ws-form-item>
  194. <!--出库日期-->
  195. <ws-form-item label="入库日期" span="1" prop="inOutDate" class="deliverydate">
  196. <el-date-picker
  197. v-model="dataList.inOutDate"
  198. placeholder="请选择入库日期"
  199. type="date"
  200. value-format="yyyy-MM-dd"
  201. ></el-date-picker>
  202. </ws-form-item>
  203. <!-- 入库类型 -->
  204. <ws-form-item label="入库类型" span="1">
  205. <ws-select
  206. v-model="dataList.inOutType"
  207. placeholder
  208. class="typeselect"
  209. @change="selectstorageType"
  210. :disabled="isSelectType"
  211. >
  212. <ws-option
  213. v-for="item in storageType"
  214. :key="item.constKey"
  215. :label="item.constValue"
  216. :value="item.constValue"
  217. />
  218. </ws-select>
  219. </ws-form-item>
  220. </ws-info-table>
  221. <div v-show="this.$route.query.warehouseType == 2 && this.$route.query.createType == 2">
  222. <el-checkbox v-model="checked" checked>退库并出库</el-checkbox>
  223. <ws-info-table v-show="checked == true">
  224. <!-- 出库类型 -->
  225. <ws-form-item label="出库类型" span="1">
  226. <ws-select
  227. v-model="dataList.temporaryOutType"
  228. placeholder=""
  229. class="typeselect"
  230. >
  231. <ws-option
  232. v-for="item in deliveryType"
  233. :key="item.constKey"
  234. :label="item.constValue"
  235. :value="item.constValue"
  236. />
  237. </ws-select>
  238. </ws-form-item>
  239. <!-- 出库合同编号 -->
  240. <ws-form-item label="出库合同编号" span="1">
  241. <ws-select
  242. v-model="dataList.contractNo"
  243. placeholder="请选择合同编号或移库任务编号"
  244. class="typeselect"
  245. >
  246. <ws-option
  247. v-for="item in outContractNo"
  248. :key="item.constKey"
  249. :label="item.contractNo"
  250. :value="item.contractNo"
  251. />
  252. </ws-select>
  253. </ws-form-item>
  254. </ws-info-table>
  255. </div>
  256. </div>
  257. <div class="right" style='width:33.3333%;'>
  258. <ws-info-table>
  259. <ws-form-item label="成本" span="1" prop="cost">
  260. <ws-input
  261. :disabled="disabled1"
  262. v-model="dataList.cost"
  263. placeholder="请输入成本"
  264. size="small"
  265. type="number"
  266. @mousewheel.native.prevent
  267. />
  268. <img
  269. width="17"
  270. height="18"
  271. style="vertical-align: text-top; position: relative; top: -1px"
  272. src="../../../public/img/edit.png"
  273. @click="editClick(1)"
  274. alt=""
  275. />
  276. </ws-form-item>
  277. <ws-form-item label="运费" span="1" prop="freight">
  278. <ws-input
  279. :disabled="disabled2"
  280. v-model="dataList.freight"
  281. placeholder="请输入运费"
  282. size="small"
  283. type="number"
  284. @mousewheel.native.prevent
  285. />
  286. <img
  287. width="17"
  288. height="18"
  289. style="vertical-align: text-top; position: relative; top: -1px"
  290. src="../../../public/img/edit.png"
  291. @click="editClick(2)"
  292. alt=""
  293. />
  294. </ws-form-item>
  295. <ws-form-item label="运输方式" span="1" prop="outType">
  296. <el-select
  297. v-model="dataList.outType"
  298. placeholder="请选择运输方式"
  299. >
  300. <el-option
  301. v-for="item in multiSelector"
  302. :key="item.value"
  303. :label="item.name"
  304. :value="item.name"
  305. />
  306. </el-select>
  307. </ws-form-item>
  308. <!-- <ws-form-item label="车牌号" span="1" prop="carNo">
  309. <ws-input
  310. v-if="!carstatus"
  311. v-model="deptBudgetList.carNo"
  312. placeholder="请输入车牌号"
  313. maxlength="7"
  314. size="small"
  315. />
  316. <el-select
  317. v-if="carstatus"
  318. filterable
  319. clearable
  320. :filter-method="dataFilter2"
  321. v-model="deptBudgetList.carNo"
  322. placeholder="请选择车牌号"
  323. class="typeselect"
  324. @change="carChange"
  325. >
  326. <el-option
  327. v-for="item in options2"
  328. :key="item.constKey"
  329. :label="item.carNo + '(' + item.tranCarNo + ')'"
  330. :value="item.carNo"
  331. />
  332. </el-select>
  333. </ws-form-item>
  334. <ws-form-item label="箱号-1" span="1" prop="boxNo">
  335. <ws-input v-model="deptBudgetList.boxNo" placeholder="请输入箱号" maxlength="20"
  336. size="small" />
  337. </ws-form-item>
  338. <ws-form-item label="箱号-2" span="1" prop="boxNoOther">
  339. <ws-input v-model="deptBudgetList.boxNoOther" placeholder="请输入箱号" maxlength="20"
  340. size="small" />
  341. </ws-form-item>
  342. <ws-form-item label="封号-1" span="1" prop="titleNo">
  343. <ws-input v-model="deptBudgetList.titleNo" placeholder="请输入封号" maxlength="20"
  344. size="small" />
  345. </ws-form-item>
  346. <ws-form-item label="封号-2" span="1" prop="titleNoOther">
  347. <ws-input v-model="deptBudgetList.titleNoOther" placeholder="请输入封号" maxlength="20"
  348. size="small" />
  349. </ws-form-item>
  350. <ws-form-item label="车厢号-1" span="1" prop="wingNumber">
  351. <ws-input v-model="deptBudgetList.wingNumber" placeholder="请输入车厢号" maxlength="20"
  352. size="small" />
  353. </ws-form-item>
  354. <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther">
  355. <ws-input v-model="deptBudgetList.wingNumberOther" placeholder="请输入车厢号" maxlength="20"
  356. size="small" />
  357. </ws-form-item> -->
  358. <!--车牌号 -->
  359. <ws-form-item
  360. label="车牌号"
  361. span="1"
  362. prop="carNo"
  363. v-if="
  364. dataList.outType == '汽运' ||
  365. dataList.outType == '集装箱船'
  366. "
  367. >
  368. <ws-input
  369. v-if="options2.length==0"
  370. v-model="dataList.carNo"
  371. placeholder="请输入车牌号"
  372. maxlength="7"
  373. size="small"
  374. />
  375. <el-select
  376. v-if='carstatus&&options2.length>0'
  377. filterable
  378. :filter-method="dataFilter2"
  379. v-model="dataList.carNo"
  380. placeholder="请选择车牌号"
  381. class="typeselect"
  382. @change="carChange"
  383. >
  384. <el-option
  385. v-for="item in options2"
  386. :key="item.constKey"
  387. :label="item.carNo + '(' + item.tranCarNo + ')'"
  388. :value="item.carNo"
  389. />
  390. </el-select>
  391. <el-select
  392. v-if='!carstatus&&options2.length>0'
  393. filterable
  394. :filter-method="dataFilter2"
  395. v-model="dataList.carNo"
  396. placeholder="请选择车牌号"
  397. class="typeselect"
  398. @change="carChange"
  399. >
  400. <el-option
  401. v-for="item in options2"
  402. :key="item.constKey"
  403. :label="item.carNo"
  404. :value="item.carNo"
  405. />
  406. </el-select>
  407. </ws-form-item>
  408. <!--船名 -->
  409. <ws-form-item
  410. label="船名"
  411. span="1"
  412. prop="carNo"
  413. v-if="dataList.outType == '散船'"
  414. >
  415. <ws-input
  416. v-model="dataList.carNo"
  417. placeholder="请输入船名"
  418. size="small"
  419. />
  420. </ws-form-item>
  421. <ws-form-item
  422. label="航次"
  423. span="1"
  424. prop="shipNumber"
  425. v-if="dataList.outType == '散船'"
  426. >
  427. <ws-input
  428. v-model="dataList.shipNumber"
  429. placeholder="请输入航次"
  430. maxlength="20"
  431. size="small"
  432. />
  433. </ws-form-item>
  434. <!--车号 -->
  435. <ws-form-item
  436. label="车号"
  437. span="1"
  438. prop="carNo"
  439. v-if="dataList.outType == '火运'"
  440. >
  441. <ws-input
  442. v-model="dataList.carNo"
  443. placeholder="请输入车号"
  444. size="small"
  445. />
  446. </ws-form-item>
  447. <ws-form-item
  448. label="箱号-1"
  449. span="1"
  450. prop="boxNo"
  451. v-if="
  452. dataList.outType == '汽运' ||
  453. dataList.outType == '集装箱船'
  454. "
  455. >
  456. <ws-input
  457. v-model="dataList.boxNo"
  458. placeholder="请输入箱号"
  459. maxlength="20"
  460. size="small"
  461. />
  462. </ws-form-item>
  463. <ws-form-item
  464. label="箱号-2"
  465. span="1"
  466. prop="boxNoOther"
  467. v-if="
  468. dataList.outType == '汽运' ||
  469. dataList.outType == '集装箱船'
  470. "
  471. >
  472. <ws-input
  473. v-model="dataList.boxNoOther"
  474. placeholder="请输入箱号"
  475. maxlength="20"
  476. size="small"
  477. />
  478. </ws-form-item>
  479. <ws-form-item
  480. label="封号-1"
  481. span="1"
  482. prop="titleNo"
  483. v-if="
  484. dataList.outType == '汽运' ||
  485. dataList.outType == '集装箱船'
  486. "
  487. >
  488. <ws-input
  489. v-model="dataList.titleNo"
  490. placeholder="请输入封号"
  491. maxlength="20"
  492. size="small"
  493. />
  494. </ws-form-item>
  495. <ws-form-item
  496. label="封号-2"
  497. span="1"
  498. prop="titleNoOther"
  499. v-if="
  500. dataList.outType == '汽运' ||
  501. dataList.outType == '集装箱船'
  502. "
  503. >
  504. <ws-input
  505. v-model="dataList.titleNoOther"
  506. placeholder="请输入封号"
  507. maxlength="20"
  508. size="small"
  509. />
  510. </ws-form-item>
  511. <ws-form-item
  512. label="车厢号-1"
  513. span="1"
  514. prop="wingNumber"
  515. v-if="dataList.outType == '火运'"
  516. >
  517. <ws-input
  518. v-model="dataList.wingNumber"
  519. placeholder="请输入车厢号"
  520. maxlength="20"
  521. size="small"
  522. />
  523. </ws-form-item>
  524. <ws-form-item
  525. label="车厢号-2"
  526. span="1"
  527. prop="wingNumberOther"
  528. v-if="dataList.outType == '火运'"
  529. >
  530. <ws-input
  531. v-model="dataList.wingNumberOther"
  532. placeholder="请输入车厢号"
  533. maxlength="20"
  534. size="small"
  535. />
  536. </ws-form-item>
  537. </ws-info-table>
  538. </div>
  539. </div>
  540. </div>
  541. <div class="small-title">上传磅单照片</div>
  542. <el-upload
  543. action="https://www.zthymaoyi.com/upload/admin"
  544. :show-file-list="false"
  545. :on-success="
  546. (res) => {
  547. uploadSuccessHandle1(res)
  548. }
  549. "
  550. class="avatar-uploader"
  551. accept=".jpg, .jpeg, .png, .gif"
  552. ><el-button size="small" type="primary">点击上传</el-button>
  553. </el-upload>
  554. <div @click='imgBig(dataList.addressUrl)'>
  555. <img v-if='dataList.addressUrl' style='width:100px;height:100px;' :src="dataList.addressUrl" alt="">
  556. </div>
  557. <div class="small-title">化验数据(选填)</div>
  558. <div class="inspector">
  559. <!--质检员-->
  560. <!-- <ws-form-item label="质检员" span="1" prop="qualityInspector">
  561. <ws-input
  562. v-model="dataList.warehouseInOutDetail.qualityInspector"
  563. placeholder="请输入质检员姓名"
  564. maxlength="120"
  565. size="small"
  566. />
  567. </ws-form-item> -->
  568. <ws-form-item label="质检员" span="1" prop="qualityInspector">
  569. <el-select
  570. v-model="dataList.warehouseInOutDetail.qualityInspector"
  571. placeholder="请选择质检员"
  572. filterable
  573. clearable
  574. @change="qualityInspectorChange"
  575. >
  576. <el-option
  577. v-for="item in qualityInspectorList"
  578. :key="item.value"
  579. :label="item.staffName"
  580. :value="item.staffName"
  581. />
  582. </el-select>
  583. </ws-form-item>
  584. </div>
  585. <div class="neifor">
  586. <ws-info-table>
  587. <!--水分(%)<=-->
  588. <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
  589. <ws-input
  590. v-model="dataList.warehouseInOutDetail.waterContent"
  591. placeholder="请输入水分占比"
  592. maxlength="120"
  593. size="small"
  594. />
  595. </ws-form-item>
  596. <!--杂质(%)<=-->
  597. <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
  598. <ws-input
  599. v-model="dataList.warehouseInOutDetail.impurity"
  600. placeholder="请输入杂质占比"
  601. maxlength="120"
  602. size="small"
  603. />
  604. </ws-form-item>
  605. <!--容重(克/升)>=-->
  606. <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
  607. <ws-input
  608. v-model="dataList.warehouseInOutDetail.bulkDensity"
  609. placeholder="请输入容重"
  610. maxlength="120"
  611. size="small"
  612. />
  613. </ws-form-item>
  614. <!--霉变粒(%)<=-->
  615. <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
  616. <ws-input
  617. v-model="dataList.warehouseInOutDetail.mildewGrain"
  618. placeholder="请输入霉变粒占比"
  619. maxlength="120"
  620. size="small"
  621. />
  622. </ws-form-item>
  623. <!--热损伤(%)<=-->
  624. <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
  625. <ws-input
  626. v-model="dataList.warehouseInOutDetail.jiaorenli"
  627. placeholder="请输入热损伤占比"
  628. maxlength="120"
  629. size="small"
  630. />
  631. </ws-form-item>
  632. <!--不完善粒(%)<=-->
  633. <ws-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain">
  634. <ws-input
  635. v-model="dataList.warehouseInOutDetail.imperfectGrain"
  636. placeholder="请输入不完善粒占比"
  637. maxlength="120"
  638. size="small"
  639. />
  640. </ws-form-item>
  641. </ws-info-table>
  642. </div>
  643. <div style="text-align: right; padding: 10px">
  644. <el-button
  645. class="bg-bottom-up"
  646. type="primary"
  647. size="small"
  648. @click="temporaryStorage()"
  649. >暂存</el-button
  650. >
  651. <el-button
  652. class="bg-bottom-up"
  653. type="primary"
  654. size="small"
  655. @click="submit()"
  656. >提交</el-button
  657. >
  658. </div>
  659. </ws-form>
  660. <div @click='imgshow=false' style='overflow:scroll;position:fixed;left:0;top:0;background:rgba(0,0,0,0.1);width:100%;height:100%;z-index:1030;' v-if='imgshow'>
  661. <img style='position:absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);height:80%;' :src="img" alt="">
  662. </div>
  663. </div>
  664. </template>
  665. <script>
  666. import {
  667. pullDown,
  668. addstorageputList,
  669. xialaNo,
  670. getstaff,
  671. } from '@/model/warehouse/index'
  672. import { downloadFile } from '@/utils/batchDown'
  673. import Pagination from '@/components/Pagination'
  674. import { mapActions, mapGetters, mapState } from 'vuex'
  675. import WsUpload from '@/components/WsUpload'
  676. // import { dayjs, fmoney, EventBus } from 'base-core-lib'
  677. import { dayjs, EventBus } from 'base-core-lib'
  678. export default {
  679. name: 'viewSpareMoney',
  680. components: {
  681. WsUpload,
  682. Pagination,
  683. },
  684. watch: {
  685. // vesselId(val) {
  686. // this.getList()
  687. // },
  688. isShow(val) {
  689. this.showType = val
  690. },
  691. },
  692. computed: {
  693. ...mapGetters(['dataList']),
  694. },
  695. data() {
  696. return {
  697. isSelectType:true,
  698. isGetCost:false,
  699. qualityInspectorList:[],
  700. //弹出框
  701. dialogViewSpareMoney: false,
  702. dialogApproveFormVisible: false,
  703. // 船舶类型
  704. monetaryKey: null,
  705. // 表格显示数据
  706. tableDate: [],
  707. // 是否显示
  708. showType: true,
  709. // 年
  710. year: '',
  711. deptBudgetTotal: 0,
  712. readonly: true,
  713. currentPage: 1,
  714. pageSize: 10,
  715. searchType: 1,
  716. searchKeyWord: '',
  717. contractType: 2,
  718. startDate: null,
  719. endDate: null,
  720. goodnameList: {},
  721. checked: true,
  722. disabled1:true,
  723. disabled2:true,
  724. staffList: [],
  725. options: [],
  726. storageType: [],
  727. deliveryType: [],
  728. outContractNo: [],
  729. outContractNo1: [],
  730. // 提交类型
  731. submitType: true,
  732. typeList:['干粮','潮粮'],
  733. appendixIdsAdd: '',
  734. uploadSuccess: {},
  735. warehouseInOutDetail: {},
  736. onChange: {},
  737. deptBudgetList1: [],
  738. gradeList: [],
  739. rules: {
  740. netWeight: [
  741. {
  742. required: true,
  743. type: 'number',
  744. message: '请输入活动名称',
  745. trigger: 'blur',
  746. },
  747. ],
  748. },
  749. size: 10,
  750. compId: localStorage.getItem('ws-pf_compId'),
  751. deptCircularPage: {},
  752. packtypeList: {},
  753. date: {
  754. year: dayjs().format('YYYY'),
  755. month: dayjs().format('MM'),
  756. },
  757. options1: [],
  758. options2: [],
  759. carstatus:false,
  760. contractList: [],
  761. img:'',
  762. imgshow:false,
  763. dataList: {
  764. id: '',
  765. grossWeight: '',
  766. contractNo: '',
  767. tare: '',
  768. netWeight: '',
  769. grade: '',
  770. agent: '',
  771. carNo: '',
  772. inOutDate: '',
  773. inOutType: '',
  774. goodsName: '',
  775. warehouseInOutDetail: {},
  776. cost:'',
  777. freight:0,
  778. type:'',
  779. buckleWeightRatio:'',
  780. tidalGrainWater:'',
  781. solidGrainWater:'',
  782. pureWeight:'',
  783. deductionAmount:'',
  784. deductionWeigh:'',
  785. },
  786. multiSelector: [
  787. {
  788. name: '汽运',
  789. value: '0',
  790. },
  791. {
  792. name: '火运',
  793. value: '1',
  794. },
  795. {
  796. name: '集装箱船',
  797. value: '2',
  798. },
  799. {
  800. name: '散船',
  801. value: '3',
  802. },
  803. ],
  804. historyList: [],
  805. pickerBeginDateBefore: {
  806. disabledDate: (time) => {
  807. return time.getTime() > Date.now()
  808. },
  809. },
  810. accessoryTFs: false,
  811. }
  812. },
  813. activated() {
  814. this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
  815. this.deptBudgetList1.binNumber = this.$route.query.binNumber
  816. this.getList()
  817. this.dataList.id = this.$route.query.id
  818. this.dataList.grossWeight = this.$route.query.grossWeight
  819. this.dataList.contractNo = this.$route.query.contractNo
  820. this.dataList.baseId = this.$route.query.baseId
  821. this.dataList.positionId = this.$route.query.positionId
  822. this.dataList.warehouseName = this.$route.query.warehouseName
  823. this.dataList.binNumber = this.$route.query.binNumber
  824. this.dataList.tare = this.$route.query.tare
  825. this.dataList.netWeight = this.$route.query.netWeight
  826. this.dataList.grade = this.$route.query.grade
  827. if(this.$route.query.addressUrl.indexOf(',')!=-1){
  828. this.dataList.addressUrl=this.$route.query.addressUrl.split(',')
  829. }else{
  830. this.dataList.addressUrl=this.$route.query.addressUrl
  831. }
  832. this.dataList.agent = this.$route.query.agent
  833. this.dataList.carNo = this.$route.query.carNo
  834. this.dataList.outType = this.$route.query.outType
  835. this.dataList.inOutDate = this.$route.query.inOutDate
  836. this.dataList.contractNo = this.$route.query.contractNo
  837. this.dataList.inOutType = this.$route.query.inOutType
  838. this.dataList.compId = this.$route.query.compId
  839. this.dataList.goodsName = this.$route.query.goodsName
  840. this.dataList.goodsNameKey = Number(this.$route.query.goodsNameKey)
  841. this.dataList.inOutFlag = this.$route.inOutFlag
  842. this.dataList.inOutTypeKey = Number(this.$route.query.inOutTypeKey)
  843. this.dataList.statusFlag = this.$route.statusFlag
  844. this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
  845. this.dataList.warehouseType = this.$route.query.warehouseType
  846. this.dataList.createType = this.$route.query.createType
  847. this.dataList.temporaryOutType = this.$route.query.temporaryOutType
  848. this.dataList.cost=this.$route.query.cost
  849. this.dataList.freight=this.$route.query.freight
  850. this.dataList.type=this.$route.query.type
  851. this.dataList.buckleWeightRatio=this.$route.query.buckleWeightRatio
  852. this.dataList.tidalGrainWater=this.$route.query.tidalGrainWater
  853. this.dataList.solidGrainWater=this.$route.query.solidGrainWater
  854. this.dataList.pureWeight=this.$route.query.pureWeight
  855. this.dataList.deductionAmount=this.$route.query.deductionAmount
  856. this.dataList.deductionWeight=this.$route.query.deductionWeight
  857. this.dataList.inOutTypeFlag=1
  858. if(this.dataList.cost){
  859. this.isGetCost = true
  860. this.cost = this.dataList.cost
  861. }
  862. },
  863. methods: {
  864. imgBig(item){
  865. console.log(item)
  866. this.img=item
  867. this.imgshow=true
  868. },
  869. kkInput(val){
  870. console.log(val)
  871. if(this.isGetCost){
  872. if(this.dataList.cost>val){
  873. this.dataList.cost = this.cost - this.dataList.deductionAmount
  874. }
  875. }
  876. },
  877. qualityInspectorChange(e){
  878. console.log(e)
  879. },
  880. uploadSuccessHandle1(res){
  881. this.dataList.addressUrl=res.url
  882. },
  883. pureweight(status){
  884. console.log(this.dataList)
  885. if(this.dataList.netWeight&&this.dataList.tidalGrainWater&&this.dataList.solidGrainWater&&this.dataList.buckleWeightRatio){
  886. this.dataList.pureWeight=(this.dataList.netWeight*(100-(this.dataList.tidalGrainWater-this.dataList.solidGrainWater)*this.dataList.buckleWeightRatio))/100
  887. }
  888. },
  889. //返回按钮
  890. revert() {
  891. this.$router.go(-1)
  892. },
  893. carChange(e){
  894. for (let i = 0; i < this.tranCarInfoList.length; i++) {
  895. if(this.tranCarInfoList[i].carNo==this.dataList.carNo){
  896. this.dataList.tranCarNo=this.tranCarInfoList[i].tranCarNo
  897. this.dataList.freight=this.tranCarInfoList[i].tranPrice
  898. }
  899. }
  900. },
  901. typeChange(e){
  902. },
  903. contractNoChange(e){
  904. for (var i = 0; i < this.outContractNo.length; i++) {
  905. if (this.outContractNo[i].contractNo == e) {
  906. if (this.outContractNo[i].inOutType == '采购入库') {
  907. this.dataList.inOutTypeKey = 1
  908. } else if (this.outContractNo[i].inOutType == '移库入库') {
  909. this.dataList.inOutTypeKey = 3
  910. } else if (this.outContractNo[i].inOutType == '暂存入库') {
  911. this.dataList.inOutTypeKey = 4
  912. } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
  913. this.dataList.inOutTypeKey = 5
  914. } else if (this.detailData.inOutType == '退库') {
  915. this.dataList.inOutTypeKey = 6
  916. }
  917. this.dataList.goodsName = this.outContractNo[i].goodsName
  918. this.dataList.goodsNameKey = this.outContractNo[i].goodsNameKey
  919. this.cost = this.outContractNo[i].contractPrice
  920. if(this.cost){
  921. this.isGetCost = true
  922. this.dataList.cost = this.cost - this.dataList.deductionAmount
  923. }else{
  924. this.isGetCost = false
  925. this.dataList.cost = this.dataList.cost
  926. }
  927. this.dataList.inOutType = this.outContractNo[i].inOutType
  928. if(this.outContractNo[i].inOutType=='移库入库'){
  929. this.isSelectType = false
  930. }else{
  931. this.isSelectType = true
  932. }
  933. if(this.outContractNo[i].priceType=='随行就市'){
  934. this.disabled1 = !this.disabled1
  935. }
  936. if(this.outContractNo[i].tranCarInfoList){
  937. this.options2=this.outContractNo[i].tranCarInfoList
  938. this.tranCarInfoList=this.outContractNo[i].tranCarInfoList
  939. this.carstatus=true
  940. }
  941. }
  942. }
  943. },
  944. dataFilter1(val) {
  945. console.log(val)
  946. this.dataList.contractNo = val;
  947. if (val) { //val存在
  948. this.options1 = this.outContractNo1.filter((item) => {
  949. if (!!~item.contractNo.indexOf(val) || !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())) {
  950. return true
  951. }
  952. })
  953. } else { //val为空时,还原数组
  954. this.options1 = this.outContractNo;
  955. }
  956. },
  957. dataFilter2(val) {
  958. this.dataList.carNo = val;
  959. if (val) { //val存在
  960. this.options1 = this.outContractNo1.filter((item) => {
  961. if (!!~item.carNo.indexOf(val) || !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())) {
  962. return true
  963. }
  964. })
  965. } else { //val为空时,还原数组
  966. this.options2 = this.tranCarInfoList;
  967. }
  968. },
  969. dataFilter(val) {
  970. // console.log(val,"名")
  971. this.dataList.staffList = val
  972. if (val) {
  973. //val存在
  974. this.options = this.staffList.filter((item) => {
  975. if (
  976. !!~item.staffName.indexOf(val) ||
  977. !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
  978. ) {
  979. return true
  980. }
  981. })
  982. } else {
  983. //val为空时,还原数组
  984. this.options = this.staffList
  985. }
  986. },
  987. editClick(status){
  988. this.isGetCost = false
  989. if(status==1){
  990. this.disabled1=!this.disabled1
  991. }else{
  992. this.disabled2=!this.disabled2
  993. }
  994. },
  995. selectstaff(e) {
  996. for (var i = 0; i < this.staffList.length; i++) {
  997. if (this.staffList[i].staffName == e) {
  998. this.dataList.personChargeKey = this.staffList[i].staffId
  999. }
  1000. }
  1001. },
  1002. //暂存按钮
  1003. temporaryStorage() {
  1004. this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
  1005. cancelButtonText: '取消',
  1006. confirmButtonText: '确定',
  1007. type: 'warning',
  1008. })
  1009. .then(() => {
  1010. this.$refs.dataList.validate((valid) => {
  1011. if (valid) {
  1012. this.dataList.compId = localStorage.getItem('ws-pf_compId')
  1013. this.dataList.inOutFlag = 2
  1014. this.dataList.statusFlag = 1
  1015. let _data = JSON.parse(localStorage.getItem('winseaview-userInfo'))
  1016. this.dataList.backOffice = _data.content.showCompName+'-' +_data.content.staffName
  1017. addstorageputList(this.dataList)
  1018. .toPromise()
  1019. .then((response) => {
  1020. this.$message.success('暂存成功')
  1021. this.$router.push({ path: 'warehouseManagementList' })
  1022. })
  1023. } else {
  1024. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1025. return false
  1026. }
  1027. })
  1028. })
  1029. .catch(() => {
  1030. return false
  1031. })
  1032. },
  1033. //提交按钮
  1034. submit() {
  1035. if (!this.dataList.goodsName) {
  1036. this.$message({
  1037. message: '货名不能为空',
  1038. type: 'warning',
  1039. })
  1040. return
  1041. }
  1042. if (!this.dataList.grossWeight) {
  1043. this.$message({
  1044. message: '毛重不能为空',
  1045. type: 'warning',
  1046. })
  1047. return
  1048. }
  1049. if (
  1050. this.dataList.grossWeight <= 0 ||
  1051. this.dataList.grossWeight > 10000 ||
  1052. (String(this.dataList.grossWeight).indexOf('.') != -1 &&
  1053. String(this.dataList.grossWeight).length -
  1054. (String(this.dataList.grossWeight).indexOf('.') + 1) >
  1055. 3)
  1056. ) {
  1057. this.$message({
  1058. message: '毛重输入错误',
  1059. type: 'warning',
  1060. })
  1061. return
  1062. }
  1063. if (
  1064. this.dataList.tare < 0 ||
  1065. this.dataList.tare > 10000 ||
  1066. (String(this.dataList.tare).indexOf('.') != -1 &&
  1067. String(this.dataList.tare).length -
  1068. (String(this.dataList.tare).indexOf('.') + 1) >
  1069. 3)
  1070. ) {
  1071. this.$message({
  1072. message: '皮重输入错误',
  1073. type: 'warning',
  1074. })
  1075. return
  1076. }
  1077. if (!this.dataList.deductionWeight) {
  1078. this.$message({
  1079. message: '扣重不能为空',
  1080. type: 'warning'
  1081. })
  1082. return
  1083. }
  1084. if (
  1085. this.dataList.deductionWeight < 0 ||
  1086. this.dataList.deductionWeight > 10 ||
  1087. (String(this.dataList.deductionWeight).indexOf('.') != -1 &&
  1088. String(this.dataList.deductionWeight).length -
  1089. (String(this.dataList.deductionWeight).indexOf('.') + 1) >
  1090. 3)
  1091. ) {
  1092. this.$message({
  1093. message: '扣重输入错误',
  1094. type: 'warning'
  1095. })
  1096. return
  1097. }
  1098. if (this.dataList.type=='潮粮'&&!this.dataList.buckleWeightRatio) {
  1099. this.$message({
  1100. message: '扣重比不能为空',
  1101. type: 'warning'
  1102. })
  1103. return
  1104. }
  1105. if (
  1106. this.dataList.type=='潮粮'&&this.dataList.buckleWeightRatio < 0 ||
  1107. this.dataList.type=='潮粮'&&this.dataList.buckleWeightRatio > 3 ||
  1108. (this.dataList.type=='潮粮'&&String(this.dataList.buckleWeightRatio).indexOf('.') != -1 &&
  1109. String(this.dataList.buckleWeightRatio).length -
  1110. (String(this.dataList.buckleWeightRatio).indexOf('.') + 1) >
  1111. 2)
  1112. ) {
  1113. this.$message({
  1114. message: '扣重比输入错误',
  1115. type: 'warning'
  1116. })
  1117. return
  1118. }
  1119. if (this.dataList.type=='潮粮'&&!this.dataList.tidalGrainWater) {
  1120. this.$message({
  1121. message: '潮粮水分不能为空',
  1122. type: 'warning'
  1123. })
  1124. return
  1125. }
  1126. if (
  1127. this.dataList.type=='潮粮'&&this.dataList.tidalGrainWater < 1 ||
  1128. this.dataList.type=='潮粮'&&this.dataList.tidalGrainWater > 40 ||
  1129. (this.dataList.type=='潮粮'&&String(this.dataList.tidalGrainWater).indexOf('.') != -1 &&
  1130. String(this.dataList.tidalGrainWater).length -
  1131. (String(this.dataList.tidalGrainWater).indexOf('.') + 1) >
  1132. 2)
  1133. ) {
  1134. this.$message({
  1135. message: '潮粮水分输入错误',
  1136. type: 'warning'
  1137. })
  1138. return
  1139. }
  1140. if (this.dataList.type=='潮粮'&&!this.dataList.solidGrainWater) {
  1141. this.$message({
  1142. message: '干粮水分不能为空',
  1143. type: 'warning'
  1144. })
  1145. return
  1146. }
  1147. if (
  1148. this.dataList.type=='潮粮'&&this.dataList.solidGrainWater < 1 ||
  1149. this.dataList.type=='潮粮'&&this.dataList.solidGrainWater > 40 ||
  1150. (this.dataList.type=='潮粮'&&String(this.dataList.solidGrainWater).indexOf('.') != -1 &&
  1151. String(this.dataList.solidGrainWater).length -
  1152. (String(this.dataList.solidGrainWater).indexOf('.') + 1) >
  1153. 1)
  1154. ) {
  1155. this.$message({
  1156. message: '干粮水分输入错误',
  1157. type: 'warning'
  1158. })
  1159. return
  1160. }
  1161. if (!this.dataList.deductionAmount) {
  1162. this.$message({
  1163. message: '扣款不能为空',
  1164. type: 'warning'
  1165. })
  1166. return
  1167. }
  1168. if (
  1169. this.dataList.deductionAmount < 0 ||
  1170. this.dataList.deductionAmount > 10000 ||
  1171. (String(this.dataList.deductionAmount).indexOf('.') != -1 &&
  1172. String(this.dataList.deductionAmount).length -
  1173. (String(this.dataList.deductionAmount).indexOf('.') + 1) >
  1174. 2)
  1175. ) {
  1176. this.$message({
  1177. message: '扣款输入错误',
  1178. type: 'warning'
  1179. })
  1180. return
  1181. }
  1182. if (!this.dataList.cost) {
  1183. this.$message({
  1184. message: '未获取到成本,请编辑后提交',
  1185. type: 'warning'
  1186. })
  1187. return
  1188. }
  1189. if (
  1190. this.dataList.cost < 0 ||
  1191. this.dataList.cost > 20000 ||
  1192. (String(this.dataList.cost).indexOf('.') != -1 &&
  1193. String(this.dataList.cost).length -
  1194. (String(this.dataList.cost).indexOf('.') + 1) >
  1195. 2)
  1196. ) {
  1197. this.$message({
  1198. message: '成本输入错误',
  1199. type: 'warning'
  1200. })
  1201. return
  1202. }
  1203. if (!this.dataList.freight&&this.dataList.freight!=0) {
  1204. this.$message({
  1205. message: '运费不能为空',
  1206. type: 'warning'
  1207. })
  1208. return
  1209. }
  1210. if (
  1211. this.dataList.freight < 0 ||
  1212. this.dataList.freight > 100000 ||
  1213. (String(this.dataList.freight).indexOf('.') != -1 &&
  1214. String(this.dataList.freight).length -
  1215. (String(this.dataList.freight).indexOf('.') + 1) >
  1216. 2)
  1217. ) {
  1218. this.$message({
  1219. message: '运费输入错误',
  1220. type: 'warning'
  1221. })
  1222. return
  1223. }
  1224. if (!this.dataList.agent) {
  1225. this.$message({
  1226. message: '经办人不能为空',
  1227. type: 'warning',
  1228. })
  1229. return
  1230. }
  1231. if (this.dataList.agent.length < 2 || this.dataList.agent.length > 10) {
  1232. this.$message({
  1233. message: '经办人输入有误',
  1234. type: 'warning',
  1235. })
  1236. return
  1237. }
  1238. if (!this.dataList.grade) {
  1239. this.$message({
  1240. message: '品级不能为空!',
  1241. type: 'warning',
  1242. })
  1243. return
  1244. }
  1245. if (!this.dataList.inOutDate) {
  1246. this.$message({
  1247. message: '入库日期不能为空!',
  1248. type: 'warning',
  1249. })
  1250. return
  1251. }
  1252. if (!this.dataList.inOutType) {
  1253. this.$message({
  1254. message: '入库类型不能为空!',
  1255. type: 'warning',
  1256. })
  1257. return
  1258. }
  1259. if (!this.dataList.carNo) {
  1260. this.$message({
  1261. message: '车牌号不能为空',
  1262. type: 'warning',
  1263. })
  1264. return
  1265. }
  1266. if (this.dataList.carNo.length > 7) {
  1267. this.$message({
  1268. message: '车牌号输入错误,请输入7个字符之内',
  1269. type: 'warning',
  1270. })
  1271. return
  1272. }
  1273. if (this.dataList.boxNo&&this.dataList.boxNo.length > 20) {
  1274. this.$message({
  1275. message: '箱号-1输入错误',
  1276. type: 'warning',
  1277. })
  1278. return
  1279. }
  1280. if (this.dataList.boxNoOther&&this.dataList.boxNoOther.length > 20) {
  1281. this.$message({
  1282. message: '箱号-2输入错误',
  1283. type: 'warning',
  1284. })
  1285. return
  1286. }
  1287. if (this.dataList.titleNo&&this.dataList.titleNo.length > 20) {
  1288. this.$message({
  1289. message: '封号-1输入错误',
  1290. type: 'warning',
  1291. })
  1292. return
  1293. }
  1294. if (this.dataList.titleNoOther&&this.dataList.titleNoOther.length > 20) {
  1295. this.$message({
  1296. message: '封号-2输入错误',
  1297. type: 'warning',
  1298. })
  1299. return
  1300. }
  1301. if (!this.dataList.contractNo) {
  1302. this.$message({
  1303. message: '合同编号不能为空',
  1304. type: 'warning',
  1305. })
  1306. return
  1307. }
  1308. // if (
  1309. // this.dataList.contractNo.length < 6 ||
  1310. // this.dataList.contractNo.length > 20
  1311. // ) {
  1312. // this.$message({
  1313. // message: '合同编号长度不符合要求,请输入6-20个字符之内',
  1314. // type: 'warning',
  1315. // })
  1316. // return
  1317. // }
  1318. if (this.dataList.netWeight > this.$route.query.capacity) {
  1319. this.$message({
  1320. message: '入库量大于该仓库容量!',
  1321. type: 'warning',
  1322. })
  1323. return
  1324. }
  1325. //自检员
  1326. if (this.dataList.warehouseInOutDetail.qualityInspector) {
  1327. if (
  1328. this.dataList.warehouseInOutDetail.qualityInspector.length < 2 ||
  1329. this.dataList.warehouseInOutDetail.qualityInspector.length > 10
  1330. ) {
  1331. this.$message({
  1332. message: '质检员姓名长度错误!',
  1333. type: 'warning',
  1334. })
  1335. return
  1336. }
  1337. }
  1338. if (this.dataList.warehouseInOutDetail.waterContent) {
  1339. if (isNaN(this.dataList.warehouseInOutDetail.waterContent)) {
  1340. this.$message({
  1341. message: '水分(%)非数字!',
  1342. type: 'warning',
  1343. })
  1344. return
  1345. }
  1346. if (
  1347. this.dataList.warehouseInOutDetail.waterContent < 1 ||
  1348. this.dataList.warehouseInOutDetail.waterContent > 40 ||
  1349. (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
  1350. '.'
  1351. ) != -1 &&
  1352. String(this.dataList.warehouseInOutDetail.waterContent).length -
  1353. (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
  1354. '.'
  1355. ) +
  1356. 1) >
  1357. 2)
  1358. ) {
  1359. this.$message({
  1360. message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1361. type: 'warning',
  1362. })
  1363. return
  1364. }
  1365. }
  1366. //杂质
  1367. if (this.dataList.warehouseInOutDetail.impurity) {
  1368. if (isNaN(this.dataList.warehouseInOutDetail.impurity)) {
  1369. this.$message({
  1370. message: '杂质(%)非数字!',
  1371. type: 'warning',
  1372. })
  1373. return
  1374. }
  1375. if (
  1376. this.dataList.warehouseInOutDetail.impurity < 1 ||
  1377. this.dataList.warehouseInOutDetail.impurity > 40 ||
  1378. (String(this.dataList.warehouseInOutDetail.impurity).indexOf('.') !=
  1379. -1 &&
  1380. String(this.dataList.warehouseInOutDetail.impurity).length -
  1381. (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
  1382. '.'
  1383. ) +
  1384. 1) >
  1385. 2)
  1386. ) {
  1387. this.$message({
  1388. message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1389. type: 'warning',
  1390. })
  1391. return
  1392. }
  1393. }
  1394. //霉变
  1395. if (this.dataList.warehouseInOutDetail.mildewGrain) {
  1396. if (isNaN(this.dataList.warehouseInOutDetail.mildewGrain)) {
  1397. this.$message({
  1398. message: '霉变粒(%)非数字!',
  1399. type: 'warning',
  1400. })
  1401. return
  1402. }
  1403. if (
  1404. this.dataList.warehouseInOutDetail.mildewGrain < 1 ||
  1405. this.dataList.warehouseInOutDetail.mildewGrain > 40 ||
  1406. (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
  1407. '.'
  1408. ) != -1 &&
  1409. String(this.dataList.warehouseInOutDetail.mildewGrain).length -
  1410. (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
  1411. '.'
  1412. ) +
  1413. 1) >
  1414. 2)
  1415. ) {
  1416. this.$message({
  1417. message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1418. type: 'warning',
  1419. })
  1420. return
  1421. }
  1422. }
  1423. //热损伤
  1424. if (this.dataList.warehouseInOutDetail.jiaorenli) {
  1425. if (isNaN(this.dataList.warehouseInOutDetail.jiaorenli)) {
  1426. this.$message({
  1427. message: '热损伤(%)非数字!',
  1428. type: 'warning',
  1429. })
  1430. return
  1431. }
  1432. if (
  1433. this.dataList.warehouseInOutDetail.jiaorenli < 1 ||
  1434. this.dataList.warehouseInOutDetail.jiaorenli > 40 ||
  1435. (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf('.') !=
  1436. -1 &&
  1437. String(this.dataList.warehouseInOutDetail.jiaorenli).length -
  1438. (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
  1439. '.'
  1440. ) +
  1441. 1) >
  1442. 2)
  1443. ) {
  1444. this.$message({
  1445. message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1446. type: 'warning',
  1447. })
  1448. return
  1449. }
  1450. }
  1451. //不完善粒(%)
  1452. if (this.dataList.warehouseInOutDetail.imperfectGrain) {
  1453. if (isNaN(this.dataList.warehouseInOutDetail.imperfectGrain)) {
  1454. this.$message({
  1455. message: '不完善粒(%)非数字!',
  1456. type: 'warning',
  1457. })
  1458. return
  1459. }
  1460. if (
  1461. this.dataList.warehouseInOutDetail.imperfectGrain < 1 ||
  1462. this.dataList.warehouseInOutDetail.imperfectGrain > 40 ||
  1463. (String(this.dataList.warehouseInOutDetail.imperfectGrain).indexOf(
  1464. '.'
  1465. ) != -1 &&
  1466. String(this.dataList.warehouseInOutDetail.imperfectGrain).length -
  1467. (String(
  1468. this.dataList.warehouseInOutDetail.imperfectGrain
  1469. ).indexOf('.') +
  1470. 1) >
  1471. 2)
  1472. ) {
  1473. this.$message({
  1474. message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1475. type: 'warning',
  1476. })
  1477. return
  1478. }
  1479. }
  1480. //容重
  1481. if (this.dataList.warehouseInOutDetail.bulkDensity) {
  1482. if (isNaN(this.dataList.warehouseInOutDetail.bulkDensity)) {
  1483. this.$message({
  1484. message: '容重(克/升)非数字!',
  1485. type: 'warning',
  1486. })
  1487. return
  1488. }
  1489. if (
  1490. this.dataList.warehouseInOutDetail.bulkDensity > 1000 ||
  1491. this.dataList.warehouseInOutDetail.bulkDensity < 0||
  1492. (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
  1493. '.'
  1494. ) != -1 &&
  1495. String(this.dataList.warehouseInOutDetail.bulkDensity).length -
  1496. (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
  1497. '.'
  1498. ) +
  1499. 1) >
  1500. 0)
  1501. ) {
  1502. this.$message({
  1503. message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
  1504. type: 'warning',
  1505. })
  1506. return
  1507. }
  1508. }
  1509. this.$confirm(`确定提交入库信息`, {
  1510. cancelButtonText: '取消',
  1511. confirmButtonText: '确定',
  1512. type: 'warning',
  1513. })
  1514. .then(() => {
  1515. this.$refs.dataList.validate((valid) => {
  1516. if (valid) {
  1517. this.dataList.compId = localStorage.getItem('ws-pf_compId')
  1518. this.dataList.inOutFlag = 2
  1519. this.dataList.statusFlag = 3
  1520. addstorageputList(this.dataList)
  1521. .toPromise()
  1522. .then((response) => {
  1523. this.$message.success('添加成功')
  1524. this.$router.push({ path: 'warehouseManagementList' })
  1525. })
  1526. } else {
  1527. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1528. return false
  1529. }
  1530. })
  1531. })
  1532. .catch(() => {
  1533. return false
  1534. })
  1535. },
  1536. //暂存按钮
  1537. returnWarehouse() {
  1538. this.$refs.dataList.validate((valid) => {
  1539. if (valid) {
  1540. this.dataList.compId = localStorage.getItem('ws-pf_compId')
  1541. this.dataList.statusFlag = 1
  1542. addstorageputList(this.dataList)
  1543. .toPromise()
  1544. .then((response) => {
  1545. this.$message.success('添加成功')
  1546. this.$router.push({ path: 'warehouseManagementList' })
  1547. })
  1548. } else {
  1549. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1550. return false
  1551. }
  1552. })
  1553. },
  1554. tarechange(e) {
  1555. if (this.dataList.grossWeight && this.dataList.tare) {
  1556. this.dataList.netWeight = Number(
  1557. this.dataList.grossWeight - this.dataList.tare
  1558. ).toFixed(2)
  1559. }
  1560. },
  1561. grossWeightchange(e) {
  1562. if (this.dataList.grossWeight && this.dataList.tare) {
  1563. this.dataList.netWeight = Number(
  1564. this.dataList.grossWeight - this.dataList.tare
  1565. ).toFixed(2)
  1566. }
  1567. },
  1568. selectgoodsName(e) {
  1569. for (var i = 0; i < this.goodnameList.length; i++) {
  1570. if (this.goodnameList[i].constValue == e) {
  1571. this.dataList.goodsNameKey = this.goodnameList[i].constKey
  1572. if(e=='玉米(潮粮)'){
  1573. this.dataList.type='潮粮'
  1574. }else{
  1575. this.dataList.type='干粮'
  1576. }
  1577. }
  1578. }
  1579. },
  1580. selectpackingMethod(e) {
  1581. for (var i = 0; i < this.packtypeList.length; i++) {
  1582. if (this.packtypeList[i].constValue == e) {
  1583. this.dataList.packingMethodKey = this.packtypeList[i].constKey
  1584. }
  1585. }
  1586. },
  1587. selectstorageType(e) {
  1588. for (var i = 0; i < this.storageType.length; i++) {
  1589. if (this.storageType[i].constValue == e) {
  1590. this.dataList.inOutTypeKey = this.storageType[i].constKey
  1591. }
  1592. }
  1593. },
  1594. handleClose() {
  1595. this.accessoryTFs = false
  1596. },
  1597. handleSizeChange(val) {
  1598. console.log(`每页 ${val} 条`)
  1599. this.pageSize = val
  1600. this.getList()
  1601. },
  1602. handleCurrentChange(val) {
  1603. this.currentPage = val
  1604. console.log(`当前页: ${val}`)
  1605. this.getList()
  1606. },
  1607. getList() {
  1608. // 货名
  1609. pullDown({ constId: 'CON2' })
  1610. .toPromise()
  1611. .then((response) => {
  1612. this.goodnameList = response
  1613. })
  1614. // 品级
  1615. pullDown({ constId: 'CON3' })
  1616. .toPromise()
  1617. .then((response) => {
  1618. this.gradeList = response
  1619. })
  1620. // 类型
  1621. if (this.$route.query.warehouseType == '1') {
  1622. this.storageType = []
  1623. pullDown({ constId: 'CON5' })
  1624. .toPromise()
  1625. .then((response) => {
  1626. // this.storageType = response
  1627. for(let i = 0;i<response.length;i++){
  1628. if(response[i].constValue=='移库入库'||response[i].constValue=='退库'){
  1629. this.storageType.push(response[i])
  1630. }
  1631. }
  1632. })
  1633. } else if (this.$route.query.warehouseType == '2') {
  1634. //临时仓库入库类型
  1635. pullDown({ constId: 'WARE1' })
  1636. .toPromise()
  1637. .then((response) => {
  1638. this.storageType = response
  1639. })
  1640. //临时仓库出库类型
  1641. pullDown({ constId: 'WARE2' })
  1642. .toPromise()
  1643. .then((response) => {
  1644. this.deliveryType = response
  1645. })
  1646. }
  1647. //合同编号
  1648. xialaNo({ compId: localStorage.getItem('ws-pf_compId'), flag: 6 })
  1649. .toPromise()
  1650. .then((response) => {
  1651. this.options1 = response
  1652. this.outContractNo = response
  1653. })
  1654. //合同编号2
  1655. xialaNo({ compId: localStorage.getItem('ws-pf_compId'), flag: 7 })
  1656. .toPromise()
  1657. .then((response) => {
  1658. this.outContractNo1 = response
  1659. })
  1660. //经办人
  1661. getstaff({ compId: localStorage.getItem('ws-pf_compId'),warehouseId:this.dataList.id })
  1662. .toPromise()
  1663. .then((response) => {
  1664. this.options = response
  1665. this.qualityInspectorList = response
  1666. this.staffList = response
  1667. // this.agent = response
  1668. })
  1669. },
  1670. selecttaskType(e) {
  1671. for (var i = 0; i < this.taskTypeList.length; i++) {
  1672. if (this.taskTypeList[i].value == e) {
  1673. this.searchType = this.taskTypeList[i].type
  1674. }
  1675. }
  1676. },
  1677. fujian(row) {
  1678. if (
  1679. row.receiveAttachmentPath === null ||
  1680. row.receiveAttachmentPath === ''
  1681. ) {
  1682. EventBus.$emit(
  1683. 'warning',
  1684. this.$t('system.noticeCircular.NoInformation')
  1685. )
  1686. } else {
  1687. this.accessoryTFs = true
  1688. }
  1689. this.appendixIdss = row.receiveAttachmentPath
  1690. },
  1691. handleExamine(row) {
  1692. this.$router.push({
  1693. name: 'salesContractExamine',
  1694. query: { id: row.id },
  1695. })
  1696. },
  1697. // 关闭 dialog时 处理文件url 初始化upload组件
  1698. handleCloe() {
  1699. this.dialogViewSpareMoney = false
  1700. },
  1701. history(row) {
  1702. console.log(row)
  1703. billoperatehis({ id: row.id })
  1704. .toPromise()
  1705. .then((response) => {
  1706. this.historyList = response
  1707. })
  1708. },
  1709. async exportlist() {
  1710. const { data } = await export1(
  1711. {
  1712. compId: localStorage.getItem('ws-pf_compId'),
  1713. contractType: this.contractType,
  1714. currentPage: this.currentPage,
  1715. pageSize: this.pageSize,
  1716. searchType: this.searchType,
  1717. searchKeyWord: this.searchKeyWord,
  1718. startDate: this.startDate,
  1719. endDate: this.endDate,
  1720. },
  1721. {},
  1722. { responseType: 'blob' }
  1723. ).toPromise()
  1724. downloadFile({
  1725. res: data,
  1726. fileName: `${
  1727. this.date.year + (this.date.month ? `-${this.date.month}` : '')
  1728. }_采购合同`,
  1729. type: 'xls',
  1730. })
  1731. },
  1732. // deletecontract(){},
  1733. //删除
  1734. approve() {},
  1735. listQuery() {},
  1736. total() {},
  1737. clearfiltQuery() {},
  1738. selectCrtDuty() {},
  1739. },
  1740. }
  1741. </script>
  1742. <style lang="scss" scoped>
  1743. /deep/.basicInformation {
  1744. .ws-info-table {
  1745. border: none;
  1746. }
  1747. .left{
  1748. .el-form-item {
  1749. width: 50%;
  1750. // width: 33.3333%;
  1751. border: none;
  1752. .el-form-item__label {
  1753. background: transparent;
  1754. border: none;
  1755. }
  1756. .el-form-item__content {
  1757. border: none;
  1758. }
  1759. }
  1760. }
  1761. .right{
  1762. .el-form-item {
  1763. width: 100%;
  1764. // width: 33.3333%;
  1765. border: none;
  1766. .el-form-item__label {
  1767. background: transparent;
  1768. border: none;
  1769. }
  1770. .el-form-item__content {
  1771. border: none;
  1772. }
  1773. }
  1774. }
  1775. }
  1776. .title {
  1777. position: relative;
  1778. padding-left: 10px;
  1779. }
  1780. .title::before {
  1781. content: '';
  1782. display: inline-block;
  1783. width: 5px;
  1784. height: 30px;
  1785. background: #5473e8;
  1786. position: absolute;
  1787. left: 0;
  1788. }
  1789. .el-form {
  1790. padding: 0 10%;
  1791. }
  1792. .el-button--primary {
  1793. background-color: #5878e8;
  1794. border-color: #5878e8;
  1795. }
  1796. .el-col {
  1797. background: #f6f7fc;
  1798. }
  1799. .bg-right {
  1800. text-align: right;
  1801. padding: 16px 20px;
  1802. }
  1803. .center {
  1804. position: relative;
  1805. top: 50px;
  1806. width: 40%;
  1807. height: 2000px;
  1808. margin: 0 auto;
  1809. }
  1810. /deep/.el-form-item__label {
  1811. width: 160px;
  1812. }
  1813. .inspector {
  1814. width: 50%;
  1815. }
  1816. //质检员
  1817. /deep/[data-v-58803672] .el-form-item__label {
  1818. width: 60px;
  1819. }
  1820. [data-v-58803672] .el-form-item__label {
  1821. width: 60px;
  1822. }
  1823. //选填
  1824. /deep/.el-form-item {
  1825. width: 50%;
  1826. }
  1827. .container {
  1828. overflow: scroll;
  1829. height: 120vh;
  1830. }
  1831. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1832. text-align: center;
  1833. }
  1834. .deliverydate {
  1835. display: inline-block;
  1836. width: 10%;
  1837. }
  1838. .center {
  1839. margin-top: -60px;
  1840. width: 80%;
  1841. }
  1842. //仓位
  1843. .position {
  1844. width: 52px;
  1845. height: 20px;
  1846. background: #afb5cb;
  1847. border-radius: 2px;
  1848. font-size: 12px;
  1849. font-family: PingFangSC-Medium, PingFang SC;
  1850. color: #ffffff;
  1851. line-height: 20px;
  1852. }
  1853. //表格文字
  1854. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1855. text-align: left;
  1856. font-size: 14px;
  1857. font-family: PingFangSC-Regular, PingFang SC;
  1858. font-weight: 400;
  1859. color: #8890b1;
  1860. line-height: 16px;
  1861. }
  1862. //质检员
  1863. .inspector .el-form-item__content {
  1864. text-align: left;
  1865. margin-left: 0px;
  1866. }
  1867. .small-title {
  1868. position: relative;
  1869. padding: 10px;
  1870. font-weight: 600;
  1871. }
  1872. .small-title::before {
  1873. position: absolute;
  1874. content: '';
  1875. display: block;
  1876. background: #5473e8;
  1877. width: 4px;
  1878. height: 14px;
  1879. left: 0px;
  1880. top: 13px;
  1881. }
  1882. //下面列表
  1883. .neifor {
  1884. width: 80%;
  1885. background-color: #f6f7fc;
  1886. }
  1887. /deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
  1888. width: 35%;
  1889. text-align: center;
  1890. }
  1891. /deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
  1892. width: 60%;
  1893. background-color: #f6f7fc;
  1894. }
  1895. /deep/.neifor .el-input--small .el-input__inner {
  1896. width: 100%;
  1897. }
  1898. .el-input__inner {
  1899. width: 150px;
  1900. }
  1901. </style>