warehouseManagementNoWeightOut.vue 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599
  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. {{ dataList.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. }
  483. },
  484. mounted() {},
  485. activated() {
  486. if (this.$route.query.allowEdit == 1) {
  487. this.allowEdit = false
  488. } else {
  489. this.allowEdit = true
  490. }
  491. this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
  492. this.deptBudgetList1.binNumber = this.$route.query.binNumber
  493. this.dataList.id = this.$route.query.id
  494. this.dataList.grossWeight = Math.round(this.$route.query.grossWeight * 1000)
  495. this.dataList.contractNo = this.$route.query.contractNo
  496. this.dataList.baseId = this.$route.query.baseId
  497. this.dataList.positionId = this.$route.query.positionId
  498. this.dataList.warehouseName = this.$route.query.warehouseName
  499. this.dataList.binNumber = this.$route.query.binNumber
  500. this.dataList.tare = Math.round(this.$route.query.tare * 1000)
  501. this.dataList.netWeight = Math.round(this.$route.query.netWeight * 1000)
  502. this.dataList.boxNo = this.$route.query.boxNo
  503. this.dataList.boxNoOther = this.$route.query.boxNoOther
  504. this.dataList.titleNo = this.$route.query.titleNo
  505. this.dataList.titleNoOther = this.$route.query.titleNoOther
  506. this.dataList.grade = this.$route.query.grade
  507. this.dataList.agent = this.$route.query.agent
  508. this.dataList.carNo = this.$route.query.carNo
  509. this.dataList.inOutDate = this.$route.query.inOutDate
  510. this.dataList.contractNo = this.$route.query.contractNo
  511. this.dataList.inOutType = this.$route.query.inOutType
  512. this.dataList.inOutTaskNo = this.$route.query.inOutTaskNo
  513. this.dataList.compId = this.$route.query.compId
  514. this.dataList.goodsName = this.$route.query.goodsName
  515. this.dataList.goodsNameKey = Number(this.$route.query.goodsNameKey)
  516. this.dataList.inOutFlag = this.$route.inOutFlag
  517. this.dataList.inOutTypeKey = Number(this.$route.query.inOutTypeKey)
  518. this.dataList.statusFlag = this.$route.statusFlag
  519. this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
  520. console.log(this.dataList)
  521. if (this.$route.query.automaticWeightAcquisition == '1') {
  522. this.isShowBalance = true
  523. }
  524. this.getList()
  525. },
  526. methods: {
  527. setVal(data) {
  528. if (this.information == '毛重检斤') {
  529. this.deptBudgetList.grossWeight = data
  530. } else {
  531. this.deptBudgetList.tare = data
  532. }
  533. },
  534. openPort() {
  535. this.$refs.weightChild.openPort()
  536. },
  537. pureweight(status) {
  538. console.log(this.deptBudgetList)
  539. if (
  540. this.deptBudgetList.netWeight &&
  541. this.deptBudgetList.tidalGrainWater &&
  542. this.deptBudgetList.solidGrainWater &&
  543. this.deptBudgetList.buckleWeightRatio
  544. ) {
  545. this.deptBudgetList.pureWeight =
  546. (this.deptBudgetList.netWeight *
  547. (100 -
  548. (this.deptBudgetList.tidalGrainWater -
  549. this.deptBudgetList.solidGrainWater) *
  550. this.deptBudgetList.buckleWeightRatio)) /
  551. 100
  552. }
  553. },
  554. uploadSuccessHandle1(res) {
  555. this.dataList.addressUrl = res.url
  556. },
  557. //返回按钮
  558. revert() {
  559. this.$router.go(-1)
  560. },
  561. dataFilter(val) {
  562. // console.log(val,"名")
  563. this.deptBudgetList.staffList = val
  564. if (val) {
  565. //val存在
  566. this.options = this.staffList.filter((item) => {
  567. if (
  568. !!~item.staffName.indexOf(val) ||
  569. !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
  570. ) {
  571. return true
  572. }
  573. })
  574. } else {
  575. //val为空时,还原数组
  576. this.options = this.staffList
  577. }
  578. },
  579. selectstaff(e) {
  580. for (var i = 0; i < this.staffList.length; i++) {
  581. if (this.staffList[i].staffName == e) {
  582. this.deptBudgetList.personChargeKey = this.staffList[i].staffId
  583. }
  584. }
  585. },
  586. carChange(e) {
  587. for (let i = 0; i < this.tranCarInfoList.length; i++) {
  588. if (this.tranCarInfoList[i].carNo == this.deptBudgetList.carNo) {
  589. this.deptBudgetList.tranCarNo = this.tranCarInfoList[i].tranCarNo
  590. this.deptBudgetList.carId = this.tranCarInfoList[i].id
  591. }
  592. }
  593. },
  594. //暂存按钮
  595. temporaryStorage() {
  596. this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
  597. cancelButtonText: '取消',
  598. confirmButtonText: '确定',
  599. type: 'warning',
  600. })
  601. .then(() => {
  602. this.$refs.dataList.validate((valid) => {
  603. if (valid) {
  604. this.dataList.compId = localStorage.getItem('ws-pf_compId')
  605. this.dataList.inOutFlag = 1
  606. this.dataList.statusFlag = 1
  607. addstorageputList(this.dataList)
  608. .toPromise()
  609. .then((response) => {
  610. this.$message.success('暂存成功')
  611. this.$router.push({
  612. path: 'warehouseManagementList',
  613. })
  614. })
  615. } else {
  616. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  617. return false
  618. }
  619. })
  620. })
  621. .catch(() => {
  622. return false
  623. })
  624. },
  625. contractNoChange(e) {
  626. for (let i = 0; i < this.deptBudgetList2.length; i++) {
  627. if (this.deptBudgetList2[i].inOutTaskNo == e) {
  628. var data = this.deptBudgetList2[i]
  629. if (this.deptBudgetList2[i].contractNo) {
  630. this.dataList.contractNo = this.deptBudgetList2[i].contractNo
  631. } else {
  632. this.dataList.contractNo = this.deptBudgetList2[i].moveTaskNo
  633. }
  634. }
  635. }
  636. for (var i = 0; i < this.outContractNo.length; i++) {
  637. if (this.outContractNo[i].contractNo == this.dataList.contractNo) {
  638. if (this.outContractNo[i].inOutType == '销售出库') {
  639. this.dataList.tips =
  640. '买方' +
  641. this.outContractNo[i].buyer +
  642. '( ' +
  643. this.outContractNo[i].unitContractPrice +
  644. '元/吨)'
  645. this.dataList.inOutTypeKey = 1
  646. } else if (this.outContractNo[i].inOutType == '移库出库') {
  647. if (this.outContractNo[i].unitContractPrice) {
  648. this.dataList.tips =
  649. '入货库' +
  650. data.receiveWarehouse +
  651. '( ' +
  652. this.outContractNo[i].unitContractPrice +
  653. '元/吨)'
  654. } else {
  655. this.dataList.tips = '入货库' + data.receiveWarehouse
  656. }
  657. this.dataList.inOutTypeKey = 3
  658. } else if (this.outContractNo[i].inOutType == '暂存入库') {
  659. this.dataList.inOutTypeKey = 4
  660. } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
  661. this.dataList.inOutTypeKey = 5
  662. } else if (this.outContractNo[i].inOutType == '采购出库') {
  663. this.dataList.inOutTypeKey = 6
  664. }
  665. this.dataList.goodsName = this.outContractNo[i].goodsName
  666. this.dataList.goodsNameKey = this.outContractNo[i].goodsNameKey
  667. if (this.outContractNo[i].deliverType == '1') {
  668. this.carstatus = true
  669. } else {
  670. this.carstatus = false
  671. }
  672. if (this.outContractNo[i].tranCarInfoList) {
  673. this.options2 = this.outContractNo[i].tranCarInfoList
  674. this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
  675. // this.carstatus = true
  676. }
  677. }
  678. }
  679. },
  680. contractNoChange1(e) {
  681. for (var i = 0; i < this.outContractNo.length; i++) {
  682. if (this.outContractNo[i].contractNo == e) {
  683. if (this.outContractNo[i].inOutType == '销售出库') {
  684. this.deptBudgetList.inOutTypeKey = 1
  685. } else if (this.outContractNo[i].inOutType == '移库出库') {
  686. this.deptBudgetList.inOutTypeKey = 3
  687. } else if (this.outContractNo[i].inOutType == '暂存入库') {
  688. this.deptBudgetList.inOutTypeKey = 4
  689. } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
  690. this.deptBudgetList.inOutTypeKey = 5
  691. } else if (this.detailData.inOutType == '采购出库') {
  692. this.deptBudgetList.inOutTypeKey = 6
  693. }
  694. this.dataList.goodsName = this.outContractNo[i].goodsName
  695. this.dataList.goodsNameKey = this.outContractNo[i].goodsNameKey
  696. if (this.outContractNo[i].deliverType == '1') {
  697. this.carstatus = true
  698. } else {
  699. this.carstatus = false
  700. }
  701. if (this.outContractNo[i].tranCarInfoList) {
  702. this.options2 = this.outContractNo[i].tranCarInfoList
  703. this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
  704. // this.carstatus = true
  705. }
  706. }
  707. }
  708. },
  709. typeChange(e) {},
  710. //提交按钮
  711. submit() {
  712. if (this.reader) {
  713. this.reader.cancel()
  714. }
  715. if (!this.dataList.goodsName) {
  716. this.$message({
  717. message: '货名不能为空',
  718. type: 'warning',
  719. })
  720. return
  721. }
  722. if (!this.dataList.grossWeight) {
  723. this.$message({
  724. message: '毛重不能为空',
  725. type: 'warning',
  726. })
  727. return
  728. }
  729. if (
  730. this.dataList.grossWeight <= 0 ||
  731. this.dataList.grossWeight > 200000 ||
  732. (String(this.dataList.grossWeight).indexOf('.') != -1 &&
  733. String(this.dataList.grossWeight).length -
  734. (String(this.dataList.grossWeight).indexOf('.') + 1) >
  735. 3)
  736. ) {
  737. this.$message({
  738. message: '毛重输入错误',
  739. type: 'warning',
  740. })
  741. return
  742. }
  743. if (
  744. this.dataList.tare < 0 ||
  745. this.dataList.tare > 200000 ||
  746. (String(this.dataList.tare).indexOf('.') != -1 &&
  747. String(this.dataList.tare).length -
  748. (String(this.dataList.tare).indexOf('.') + 1) >
  749. 3)
  750. ) {
  751. this.$message({
  752. message: '皮重输入错误',
  753. type: 'warning',
  754. })
  755. return
  756. }
  757. if (this.dataList.type == '潮粮' && !this.dataList.buckleWeightRatio) {
  758. this.$message({
  759. message: '扣重比不能为空',
  760. type: 'warning',
  761. })
  762. return
  763. }
  764. if (
  765. (this.dataList.type == '潮粮' && this.dataList.buckleWeightRatio < 0) ||
  766. (this.dataList.type == '潮粮' && this.dataList.buckleWeightRatio > 3) ||
  767. (this.dataList.type == '潮粮' &&
  768. String(this.dataList.buckleWeightRatio).indexOf('.') != -1 &&
  769. String(this.dataList.buckleWeightRatio).length -
  770. (String(this.dataList.buckleWeightRatio).indexOf('.') + 1) >
  771. 2)
  772. ) {
  773. this.$message({
  774. message: '扣重比输入错误',
  775. type: 'warning',
  776. })
  777. return
  778. }
  779. if (this.dataList.type == '潮粮' && !this.dataList.tidalGrainWater) {
  780. this.$message({
  781. message: '潮粮水分不能为空',
  782. type: 'warning',
  783. })
  784. return
  785. }
  786. if (
  787. (this.dataList.type == '潮粮' && this.dataList.tidalGrainWater < 1) ||
  788. (this.dataList.type == '潮粮' && this.dataList.tidalGrainWater > 40) ||
  789. (this.dataList.type == '潮粮' &&
  790. String(this.dataList.tidalGrainWater).indexOf('.') != -1 &&
  791. String(this.dataList.tidalGrainWater).length -
  792. (String(this.dataList.tidalGrainWater).indexOf('.') + 1) >
  793. 2)
  794. ) {
  795. this.$message({
  796. message: '潮粮水分输入错误',
  797. type: 'warning',
  798. })
  799. return
  800. }
  801. if (this.dataList.type == '潮粮' && !this.dataList.solidGrainWater) {
  802. this.$message({
  803. message: '干粮水分不能为空',
  804. type: 'warning',
  805. })
  806. return
  807. }
  808. if (
  809. (this.dataList.type == '潮粮' && this.dataList.solidGrainWater < 1) ||
  810. (this.dataList.type == '潮粮' && this.dataList.solidGrainWater > 40) ||
  811. (this.dataList.type == '潮粮' &&
  812. String(this.dataList.solidGrainWater).indexOf('.') != -1 &&
  813. String(this.dataList.solidGrainWater).length -
  814. (String(this.dataList.solidGrainWater).indexOf('.') + 1) >
  815. 1)
  816. ) {
  817. this.$message({
  818. message: '干粮水分输入错误',
  819. type: 'warning',
  820. })
  821. return
  822. }
  823. if (!this.dataList.agent) {
  824. this.$message({
  825. message: '经办人不能为空',
  826. type: 'warning',
  827. })
  828. return
  829. }
  830. if (this.dataList.agent.length < 2 || this.dataList.agent.length > 10) {
  831. this.$message({
  832. message: '经办人输入有误',
  833. type: 'warning',
  834. })
  835. return
  836. }
  837. if (!this.dataList.grade) {
  838. this.$message({
  839. message: '品级不能为空!',
  840. type: 'warning',
  841. })
  842. return
  843. }
  844. if (!this.dataList.inOutDate) {
  845. this.$message({
  846. message: '入库日期不能为空!',
  847. type: 'warning',
  848. })
  849. return
  850. }
  851. if (!this.dataList.inOutType) {
  852. this.$message({
  853. message: '出库类型不能为空!',
  854. type: 'warning',
  855. })
  856. return
  857. }
  858. // if (!this.dataList.carNo) {
  859. // this.$message({
  860. // message: '车牌号不能为空',
  861. // type: 'warning',
  862. // })
  863. // return
  864. // }
  865. // if (this.dataList.carNo.length > 7) {
  866. // this.$message({
  867. // message: '车牌号输入错误,请输入7个字符之内',
  868. // type: 'warning',
  869. // })
  870. // return
  871. // }
  872. if (this.dataList.boxNo && this.dataList.boxNo.length > 20) {
  873. this.$message({
  874. message: '箱号-1输入错误',
  875. type: 'warning',
  876. })
  877. return
  878. }
  879. if (this.dataList.boxNoOther && this.dataList.boxNoOther.length > 20) {
  880. this.$message({
  881. message: '箱号-2输入错误',
  882. type: 'warning',
  883. })
  884. return
  885. }
  886. if (this.dataList.titleNo && this.dataList.titleNo.length > 20) {
  887. this.$message({
  888. message: '封号-1输入错误',
  889. type: 'warning',
  890. })
  891. return
  892. }
  893. if (
  894. this.dataList.titleNoOther &&
  895. this.dataList.titleNoOther.length > 20
  896. ) {
  897. this.$message({
  898. message: '封号-2输入错误',
  899. type: 'warning',
  900. })
  901. return
  902. }
  903. if (!this.dataList.contractNo) {
  904. this.$message({
  905. message: '合同编号不能为空',
  906. type: 'warning',
  907. })
  908. return
  909. }
  910. // if (
  911. // this.dataList.contractNo.length < 6 ||
  912. // this.dataList.contractNo.length > 20
  913. // ) {
  914. // this.$message({
  915. // message: '合同编号长度不符合要求,请输入6-20个字符之内',
  916. // type: 'warning',
  917. // })
  918. // return
  919. // }
  920. if (this.dataList.netWeight > this.$route.query.capacity) {
  921. this.$message({
  922. message: '入库量大于该仓库容量!',
  923. type: 'warning',
  924. })
  925. return
  926. }
  927. //自检员
  928. if (this.dataList.warehouseInOutDetail.qualityInspector) {
  929. if (
  930. this.dataList.warehouseInOutDetail.qualityInspector.length < 2 ||
  931. this.dataList.warehouseInOutDetail.qualityInspector.length > 10
  932. ) {
  933. this.$message({
  934. message: '质检员姓名长度错误!',
  935. type: 'warning',
  936. })
  937. return
  938. }
  939. }
  940. if (this.dataList.warehouseInOutDetail.waterContent) {
  941. if (isNaN(this.dataList.warehouseInOutDetail.waterContent)) {
  942. this.$message({
  943. message: '水分(%)非数字!',
  944. type: 'warning',
  945. })
  946. return
  947. }
  948. if (
  949. this.dataList.warehouseInOutDetail.waterContent < 1 ||
  950. this.dataList.warehouseInOutDetail.waterContent > 40 ||
  951. (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
  952. '.'
  953. ) != -1 &&
  954. String(this.dataList.warehouseInOutDetail.waterContent).length -
  955. (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
  956. '.'
  957. ) +
  958. 1) >
  959. 2)
  960. ) {
  961. this.$message({
  962. message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
  963. type: 'warning',
  964. })
  965. return
  966. }
  967. }
  968. //杂质
  969. if (this.dataList.warehouseInOutDetail.impurity) {
  970. if (isNaN(this.dataList.warehouseInOutDetail.impurity)) {
  971. this.$message({
  972. message: '杂质(%)非数字!',
  973. type: 'warning',
  974. })
  975. return
  976. }
  977. if (
  978. this.dataList.warehouseInOutDetail.impurity < 1 ||
  979. this.dataList.warehouseInOutDetail.impurity > 40 ||
  980. (String(this.dataList.warehouseInOutDetail.impurity).indexOf('.') !=
  981. -1 &&
  982. String(this.dataList.warehouseInOutDetail.impurity).length -
  983. (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
  984. '.'
  985. ) +
  986. 1) >
  987. 2)
  988. ) {
  989. this.$message({
  990. message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
  991. type: 'warning',
  992. })
  993. return
  994. }
  995. }
  996. //霉变
  997. if (this.dataList.warehouseInOutDetail.mildewGrain) {
  998. if (isNaN(this.dataList.warehouseInOutDetail.mildewGrain)) {
  999. this.$message({
  1000. message: '霉变粒(%)非数字!',
  1001. type: 'warning',
  1002. })
  1003. return
  1004. }
  1005. if (
  1006. this.dataList.warehouseInOutDetail.mildewGrain < 1 ||
  1007. this.dataList.warehouseInOutDetail.mildewGrain > 40 ||
  1008. (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
  1009. '.'
  1010. ) != -1 &&
  1011. String(this.dataList.warehouseInOutDetail.mildewGrain).length -
  1012. (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
  1013. '.'
  1014. ) +
  1015. 1) >
  1016. 2)
  1017. ) {
  1018. this.$message({
  1019. message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1020. type: 'warning',
  1021. })
  1022. return
  1023. }
  1024. }
  1025. //热损伤
  1026. if (this.dataList.warehouseInOutDetail.jiaorenli) {
  1027. if (isNaN(this.dataList.warehouseInOutDetail.jiaorenli)) {
  1028. this.$message({
  1029. message: '热损伤(%)非数字!',
  1030. type: 'warning',
  1031. })
  1032. return
  1033. }
  1034. if (
  1035. this.dataList.warehouseInOutDetail.jiaorenli < 1 ||
  1036. this.dataList.warehouseInOutDetail.jiaorenli > 40 ||
  1037. (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf('.') !=
  1038. -1 &&
  1039. String(this.dataList.warehouseInOutDetail.jiaorenli).length -
  1040. (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
  1041. '.'
  1042. ) +
  1043. 1) >
  1044. 2)
  1045. ) {
  1046. this.$message({
  1047. message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1048. type: 'warning',
  1049. })
  1050. return
  1051. }
  1052. }
  1053. //不完善粒(%)
  1054. if (this.dataList.warehouseInOutDetail.imperfectGrain) {
  1055. if (isNaN(this.dataList.warehouseInOutDetail.imperfectGrain)) {
  1056. this.$message({
  1057. message: '不完善粒(%)非数字!',
  1058. type: 'warning',
  1059. })
  1060. return
  1061. }
  1062. if (
  1063. this.dataList.warehouseInOutDetail.imperfectGrain < 1 ||
  1064. this.dataList.warehouseInOutDetail.imperfectGrain > 40 ||
  1065. (String(this.dataList.warehouseInOutDetail.imperfectGrain).indexOf(
  1066. '.'
  1067. ) != -1 &&
  1068. String(this.dataList.warehouseInOutDetail.imperfectGrain).length -
  1069. (String(
  1070. this.dataList.warehouseInOutDetail.imperfectGrain
  1071. ).indexOf('.') +
  1072. 1) >
  1073. 2)
  1074. ) {
  1075. this.$message({
  1076. message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1077. type: 'warning',
  1078. })
  1079. return
  1080. }
  1081. }
  1082. //容重
  1083. if (this.dataList.warehouseInOutDetail.bulkDensity) {
  1084. if (isNaN(this.dataList.warehouseInOutDetail.bulkDensity)) {
  1085. this.$message({
  1086. message: '容重(克/升)非数字!',
  1087. type: 'warning',
  1088. })
  1089. return
  1090. }
  1091. if (
  1092. (this.dataList.warehouseInOutDetail.bulkDensity &&
  1093. String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
  1094. '.'
  1095. ) != -1 &&
  1096. String(this.dataList.warehouseInOutDetail.bulkDensity).length -
  1097. (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
  1098. '.'
  1099. ) +
  1100. 1) >
  1101. 2) ||
  1102. this.dataList.warehouseInOutDetail.bulkDensity > 1000 ||
  1103. this.dataList.warehouseInOutDetail.bulkDensity < 0
  1104. ) {
  1105. this.$message({
  1106. message: '容重输入错误',
  1107. type: 'warning',
  1108. })
  1109. return
  1110. }
  1111. }
  1112. this.$confirm(`确定提交毛重检斤`, {
  1113. cancelButtonText: '取消',
  1114. confirmButtonText: '确定',
  1115. type: 'warning',
  1116. })
  1117. .then(() => {
  1118. this.$refs.dataList.validate((valid) => {
  1119. if (valid) {
  1120. this.dataList.compId = localStorage.getItem('ws-pf_compId')
  1121. this.dataList.secretaryWeigher =
  1122. localStorage.getItem('ws-pf_staffName')
  1123. this.dataList.inOutFlag = 1
  1124. this.dataList.statusFlag = 3
  1125. this.dataList.grossWeight /= 1000
  1126. this.dataList.tare /= 1000
  1127. this.dataList.netWeight /= 1000
  1128. this.dataList.pureWeight /= 1000
  1129. this.dataList.deductionAmount *= 1000
  1130. this.dataList.deductionWeight /= 1000
  1131. addstorageputList(this.dataList)
  1132. .toPromise()
  1133. .then((response) => {
  1134. if (this.reader) {
  1135. this.reader.cancel()
  1136. }
  1137. this.$message.success('提交成功')
  1138. this.$confirm(`是否打印磅单`, {
  1139. cancelButtonText: '取消',
  1140. confirmButtonText: '确定',
  1141. type: 'warning',
  1142. })
  1143. .then(() => {
  1144. getPrintInfo({
  1145. id: this.dataList.id,
  1146. })
  1147. .toPromise()
  1148. .then((response) => {
  1149. window.open(
  1150. '../../../../static/weightCheckInOut.html?type=2&tableData=' +
  1151. JSON.stringify(response)
  1152. )
  1153. })
  1154. this.$router.push({
  1155. path: 'warehouseManagementList',
  1156. })
  1157. })
  1158. .catch(() => {
  1159. return false
  1160. })
  1161. })
  1162. .catch((response) => {
  1163. this.dataList.grossWeight = Math.round(
  1164. this.dataList.grossWeight * 1000
  1165. )
  1166. this.dataList.tare = Math.round(this.dataList.tare * 1000)
  1167. this.dataList.netWeight = Math.round(
  1168. this.dataList.netWeight * 1000
  1169. )
  1170. this.dataList.pureWeight = Math.round(
  1171. this.dataList.pureWeight * 1000
  1172. )
  1173. this.dataList.deductionAmount = Math.round(
  1174. this.dataList.deductionAmount / 1000
  1175. )
  1176. this.dataList.deductionWeight = Math.round(
  1177. this.dataList.deductionWeight * 1000
  1178. )
  1179. })
  1180. } else {
  1181. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1182. return false
  1183. }
  1184. })
  1185. })
  1186. .catch(() => {
  1187. return false
  1188. })
  1189. },
  1190. tarechange(e) {
  1191. if (this.dataList.grossWeight && this.dataList.tare) {
  1192. this.dataList.netWeight = Number(
  1193. this.dataList.grossWeight - this.dataList.tare
  1194. ).toFixed(2)
  1195. }
  1196. },
  1197. grossWeightchange(e) {
  1198. if (this.dataList.grossWeight && this.dataList.tare) {
  1199. this.dataList.netWeight = Number(
  1200. this.dataList.grossWeight - this.dataList.tare
  1201. ).toFixed(2)
  1202. }
  1203. },
  1204. selectgoodsName(e) {
  1205. for (var i = 0; i < this.goodnameList.length; i++) {
  1206. if (this.goodnameList[i].constValue == e) {
  1207. this.dataList.goodsNameKey = this.goodnameList[i].constKey
  1208. if (e == '玉米(潮粮)') {
  1209. this.dataList.type = '潮粮'
  1210. } else {
  1211. this.dataList.type = '干粮'
  1212. }
  1213. }
  1214. }
  1215. },
  1216. selectpackingMethod(e) {
  1217. for (var i = 0; i < this.packtypeList.length; i++) {
  1218. if (this.packtypeList[i].constValue == e) {
  1219. this.dataList.packingMethodKey = this.packtypeList[i].constKey
  1220. }
  1221. }
  1222. },
  1223. selectstorageType(e) {
  1224. for (var i = 0; i < this.deliveryType.length; i++) {
  1225. if (this.deliveryType[i].constValue == e) {
  1226. this.dataList.inOutTypeKey = this.deliveryType[i].constKey
  1227. }
  1228. }
  1229. },
  1230. handleClose() {
  1231. this.accessoryTFs = false
  1232. },
  1233. handleSizeChange(val) {
  1234. console.log(`每页 ${val} 条`)
  1235. this.pageSize = val
  1236. this.getList()
  1237. },
  1238. handleCurrentChange(val) {
  1239. this.currentPage = val
  1240. console.log(`当前页: ${val}`)
  1241. this.getList()
  1242. },
  1243. getList() {
  1244. // 货名
  1245. pullDown({
  1246. constId: 'CON2',
  1247. })
  1248. .toPromise()
  1249. .then((response) => {
  1250. this.goodnameList = response
  1251. })
  1252. getReceiptTaskNo({
  1253. flag: 1,
  1254. warehouseName: this.deptBudgetList.warehouseName,
  1255. agentKey: localStorage.getItem('ws-pf_userId'),
  1256. })
  1257. .toPromise()
  1258. .then((response) => {
  1259. this.deptBudgetList2 = response
  1260. })
  1261. // 品级
  1262. pullDown({
  1263. constId: 'CON3',
  1264. })
  1265. .toPromise()
  1266. .then((response) => {
  1267. this.gradeList = response
  1268. })
  1269. // 类型
  1270. if (this.$route.query.warehouseType == '1') {
  1271. pullDown({
  1272. constId: 'CON6',
  1273. })
  1274. .toPromise()
  1275. .then((response) => {
  1276. this.deliveryType = response
  1277. })
  1278. } else if (this.$route.query.warehouseType == '2') {
  1279. //临时仓库出库类型
  1280. pullDown({
  1281. constId: 'WARE2',
  1282. })
  1283. .toPromise()
  1284. .then((response) => {
  1285. this.deliveryType = response
  1286. })
  1287. }
  1288. //合同编号
  1289. xialaNo({
  1290. compId: localStorage.getItem('ws-pf_compId'),
  1291. flag: 5,
  1292. })
  1293. .toPromise()
  1294. .then((response) => {
  1295. this.outContractNo = response
  1296. this.contractNoChange(this.dataList.inOutTaskNo)
  1297. for (let i = 0; i < response.length; i++) {
  1298. if (this.dataList.contractNo == response[i].contractNo) {
  1299. if (response[i].deliverType == '1') {
  1300. this.carstatus = true
  1301. } else {
  1302. this.carstatus = false
  1303. }
  1304. }
  1305. }
  1306. })
  1307. //经办人
  1308. getstaff({
  1309. compId: localStorage.getItem('ws-pf_compId'),
  1310. warehouseId: this.dataList.baseId,
  1311. })
  1312. .toPromise()
  1313. .then((response) => {
  1314. this.options = response
  1315. this.qualityInspectorList = response
  1316. this.staffList = response
  1317. // this.agent = response
  1318. })
  1319. },
  1320. selecttaskType(e) {
  1321. for (var i = 0; i < this.taskTypeList.length; i++) {
  1322. if (this.taskTypeList[i].value == e) {
  1323. this.searchType = this.taskTypeList[i].type
  1324. }
  1325. }
  1326. },
  1327. fujian(row) {
  1328. if (
  1329. row.receiveAttachmentPath === null ||
  1330. row.receiveAttachmentPath === ''
  1331. ) {
  1332. EventBus.$emit(
  1333. 'warning',
  1334. this.$t('system.noticeCircular.NoInformation')
  1335. )
  1336. } else {
  1337. this.accessoryTFs = true
  1338. }
  1339. this.appendixIdss = row.receiveAttachmentPath
  1340. },
  1341. handleExamine(row) {
  1342. this.$router.push({
  1343. name: 'salesContractExamine',
  1344. query: {
  1345. id: row.id,
  1346. },
  1347. })
  1348. },
  1349. // 关闭 dialog时 处理文件url 初始化upload组件
  1350. handleCloe() {
  1351. this.dialogViewSpareMoney = false
  1352. },
  1353. history(row) {
  1354. console.log(row)
  1355. billoperatehis({
  1356. id: row.id,
  1357. })
  1358. .toPromise()
  1359. .then((response) => {
  1360. this.historyList = response
  1361. })
  1362. },
  1363. //删除
  1364. approve() {},
  1365. listQuery() {},
  1366. total() {},
  1367. clearfiltQuery() {},
  1368. selectCrtDuty() {},
  1369. },
  1370. }
  1371. </script>
  1372. <style lang="scss" scoped>
  1373. /deep/.basicInformation {
  1374. .ws-info-table {
  1375. border: none;
  1376. }
  1377. .left {
  1378. .el-form-item {
  1379. width: 50%;
  1380. // width: 33.3333%;
  1381. border: none;
  1382. .el-form-item__label {
  1383. background: transparent;
  1384. border: none;
  1385. }
  1386. .el-form-item__content {
  1387. border: none;
  1388. }
  1389. }
  1390. }
  1391. .right {
  1392. .el-form-item {
  1393. width: 100%;
  1394. // width: 33.3333%;
  1395. border: none;
  1396. .el-form-item__label {
  1397. background: transparent;
  1398. border: none;
  1399. }
  1400. .el-form-item__content {
  1401. border: none;
  1402. }
  1403. }
  1404. }
  1405. }
  1406. .title {
  1407. position: relative;
  1408. padding-left: 10px;
  1409. }
  1410. .title::before {
  1411. content: '';
  1412. display: inline-block;
  1413. width: 5px;
  1414. height: 30px;
  1415. background: #5473e8;
  1416. position: absolute;
  1417. left: 0;
  1418. }
  1419. .el-form {
  1420. padding: 0 10%;
  1421. }
  1422. .el-button--primary {
  1423. background-color: #5878e8;
  1424. border-color: #5878e8;
  1425. }
  1426. .el-col {
  1427. background: #f6f7fc;
  1428. }
  1429. .bg-right {
  1430. text-align: right;
  1431. padding: 16px 20px;
  1432. }
  1433. .center {
  1434. position: relative;
  1435. top: 50px;
  1436. width: 40%;
  1437. height: 2000px;
  1438. margin: 0 auto;
  1439. }
  1440. //选填
  1441. /deep/.el-form-item {
  1442. width: 50%;
  1443. }
  1444. .container {
  1445. overflow: scroll;
  1446. height: 120vh;
  1447. }
  1448. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1449. text-align: center;
  1450. }
  1451. .deliverydate {
  1452. display: inline-block;
  1453. width: 10%;
  1454. }
  1455. .center {
  1456. margin-top: -60px;
  1457. width: 80%;
  1458. }
  1459. //仓位
  1460. .position {
  1461. width: 52px;
  1462. height: 20px;
  1463. background: #afb5cb;
  1464. border-radius: 2px;
  1465. font-size: 12px;
  1466. font-family: PingFangSC-Medium, PingFang SC;
  1467. color: #ffffff;
  1468. line-height: 20px;
  1469. }
  1470. //表格文字
  1471. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1472. text-align: left;
  1473. font-size: 14px;
  1474. font-family: PingFangSC-Regular, PingFang SC;
  1475. font-weight: 400;
  1476. color: #8890b1;
  1477. line-height: 16px;
  1478. }
  1479. .inspector {
  1480. width: 50%;
  1481. }
  1482. //质检员
  1483. .inspector .el-form-item__content {
  1484. text-align: left;
  1485. margin-left: 0px;
  1486. }
  1487. /deep/[data-v-d228e17e] .el-form-item__label {
  1488. width: 60px;
  1489. }
  1490. .small-title {
  1491. position: relative;
  1492. padding: 10px;
  1493. font-weight: 600;
  1494. }
  1495. .small-title::before {
  1496. position: absolute;
  1497. content: '';
  1498. display: block;
  1499. background: #5473e8;
  1500. width: 4px;
  1501. height: 14px;
  1502. left: 0px;
  1503. top: 13px;
  1504. }
  1505. .top {
  1506. width: 100%;
  1507. background: black;
  1508. color: #2aff7c;
  1509. font-size: 32px;
  1510. text-align: right;
  1511. padding: 20px;
  1512. border-radius: 10px;
  1513. margin: 0 20px 0 20px;
  1514. .car-type {
  1515. text-align: left;
  1516. }
  1517. .kg-style {
  1518. font-size: 30px;
  1519. }
  1520. }
  1521. .weight {
  1522. font-size: 68px;
  1523. }
  1524. //下面列表
  1525. .neifor {
  1526. width: 80%;
  1527. background-color: #f6f7fc;
  1528. }
  1529. /deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
  1530. width: 35%;
  1531. text-align: center;
  1532. }
  1533. /deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
  1534. width: 60%;
  1535. background-color: #f6f7fc;
  1536. }
  1537. /deep/.neifor .el-input--small .el-input__inner {
  1538. width: 100%;
  1539. }
  1540. .el-input__inner {
  1541. width: 150px;
  1542. }
  1543. .balance-row {
  1544. display: flex;
  1545. margin: 20px 0;
  1546. .left {
  1547. width: 500px;
  1548. margin-bottom: 0;
  1549. }
  1550. }
  1551. </style>