warehouseManagementPerfectput.vue 49 KB

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