warehouseManagementNoWeightOut.vue 56 KB

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