warehouseManagementNoWeightOut.vue 54 KB

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