warehouseManagementPerfectput.vue 52 KB

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