warehouseManagementPerfectput.vue 60 KB

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