warehouseManagementNoWeightOut.vue 54 KB

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