warehouseManagementNoWeightOut.vue 55 KB

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