warehouseManagementNoWeightOut.vue 56 KB

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