warehouseManagementNoWeightOut.vue 53 KB

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