warehouseManagementPerfectput.vue 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929
  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. if(this.outContractNo[i].shipInfoList){
  948. this.shipInfoList = this.outContractNo[i].shipInfoList
  949. }
  950. }
  951. }
  952. },
  953. dataFilter1(val) {
  954. console.log(val)
  955. this.dataList.contractNo = val;
  956. if (val) { //val存在
  957. this.options1 = this.outContractNo1.filter((item) => {
  958. if (!!~item.contractNo.indexOf(val) || !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())) {
  959. return true
  960. }
  961. })
  962. } else { //val为空时,还原数组
  963. this.options1 = this.outContractNo;
  964. }
  965. },
  966. dataFilter2(val) {
  967. this.dataList.carNo = val;
  968. if (val) { //val存在
  969. this.options1 = this.outContractNo1.filter((item) => {
  970. if (!!~item.carNo.indexOf(val) || !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())) {
  971. return true
  972. }
  973. })
  974. } else { //val为空时,还原数组
  975. this.options2 = this.tranCarInfoList;
  976. }
  977. },
  978. dataFilter(val) {
  979. // console.log(val,"名")
  980. this.dataList.staffList = val
  981. if (val) {
  982. //val存在
  983. this.options = this.staffList.filter((item) => {
  984. if (
  985. !!~item.staffName.indexOf(val) ||
  986. !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
  987. ) {
  988. return true
  989. }
  990. })
  991. } else {
  992. //val为空时,还原数组
  993. this.options = this.staffList
  994. }
  995. },
  996. editClick(status){
  997. this.isGetCost = false
  998. if(status==1){
  999. this.disabled1=!this.disabled1
  1000. }else{
  1001. this.disabled2=!this.disabled2
  1002. }
  1003. },
  1004. selectstaff(e) {
  1005. for (var i = 0; i < this.staffList.length; i++) {
  1006. if (this.staffList[i].staffName == e) {
  1007. this.dataList.personChargeKey = this.staffList[i].staffId
  1008. }
  1009. }
  1010. },
  1011. //暂存按钮
  1012. temporaryStorage() {
  1013. this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
  1014. cancelButtonText: '取消',
  1015. confirmButtonText: '确定',
  1016. type: 'warning',
  1017. })
  1018. .then(() => {
  1019. this.$refs.dataList.validate((valid) => {
  1020. if (valid) {
  1021. this.dataList.compId = localStorage.getItem('ws-pf_compId')
  1022. this.dataList.inOutFlag = 2
  1023. this.dataList.statusFlag = 1
  1024. let _data = JSON.parse(localStorage.getItem('winseaview-userInfo'))
  1025. this.dataList.backOffice = _data.content.showCompName+'-' +_data.content.staffName
  1026. addstorageputList(this.dataList)
  1027. .toPromise()
  1028. .then((response) => {
  1029. this.$message.success('暂存成功')
  1030. this.$router.push({ path: 'warehouseManagementList' })
  1031. })
  1032. } else {
  1033. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1034. return false
  1035. }
  1036. })
  1037. })
  1038. .catch(() => {
  1039. return false
  1040. })
  1041. },
  1042. //提交按钮
  1043. submit() {
  1044. if (!this.dataList.goodsName) {
  1045. this.$message({
  1046. message: '货名不能为空',
  1047. type: 'warning',
  1048. })
  1049. return
  1050. }
  1051. if (!this.dataList.grossWeight) {
  1052. this.$message({
  1053. message: '毛重不能为空',
  1054. type: 'warning',
  1055. })
  1056. return
  1057. }
  1058. if (
  1059. this.dataList.grossWeight <= 0 ||
  1060. this.dataList.grossWeight > 10000 ||
  1061. (String(this.dataList.grossWeight).indexOf('.') != -1 &&
  1062. String(this.dataList.grossWeight).length -
  1063. (String(this.dataList.grossWeight).indexOf('.') + 1) >
  1064. 3)
  1065. ) {
  1066. this.$message({
  1067. message: '毛重输入错误',
  1068. type: 'warning',
  1069. })
  1070. return
  1071. }
  1072. if (
  1073. this.dataList.tare <= 0 ||
  1074. this.dataList.tare > 10000 ||
  1075. (String(this.dataList.tare).indexOf('.') != -1 &&
  1076. String(this.dataList.tare).length -
  1077. (String(this.dataList.tare).indexOf('.') + 1) >
  1078. 3)
  1079. ) {
  1080. this.$message({
  1081. message: '皮重输入错误',
  1082. type: 'warning',
  1083. })
  1084. return
  1085. }
  1086. if (!this.dataList.deductionWeight) {
  1087. this.$message({
  1088. message: '扣重不能为空',
  1089. type: 'warning'
  1090. })
  1091. return
  1092. }
  1093. if (
  1094. this.dataList.deductionWeight < 0 ||
  1095. this.dataList.deductionWeight > 10 ||
  1096. (String(this.dataList.deductionWeight).indexOf('.') != -1 &&
  1097. String(this.dataList.deductionWeight).length -
  1098. (String(this.dataList.deductionWeight).indexOf('.') + 1) >
  1099. 3)
  1100. ) {
  1101. this.$message({
  1102. message: '扣重输入错误',
  1103. type: 'warning'
  1104. })
  1105. return
  1106. }
  1107. if (this.dataList.type=='潮粮'&&!this.dataList.buckleWeightRatio) {
  1108. this.$message({
  1109. message: '扣重比不能为空',
  1110. type: 'warning'
  1111. })
  1112. return
  1113. }
  1114. if (
  1115. this.dataList.type=='潮粮'&&this.dataList.buckleWeightRatio < 0 ||
  1116. this.dataList.type=='潮粮'&&this.dataList.buckleWeightRatio > 3 ||
  1117. (this.dataList.type=='潮粮'&&String(this.dataList.buckleWeightRatio).indexOf('.') != -1 &&
  1118. String(this.dataList.buckleWeightRatio).length -
  1119. (String(this.dataList.buckleWeightRatio).indexOf('.') + 1) >
  1120. 2)
  1121. ) {
  1122. this.$message({
  1123. message: '扣重比输入错误',
  1124. type: 'warning'
  1125. })
  1126. return
  1127. }
  1128. if (this.dataList.type=='潮粮'&&!this.dataList.tidalGrainWater) {
  1129. this.$message({
  1130. message: '潮粮水分不能为空',
  1131. type: 'warning'
  1132. })
  1133. return
  1134. }
  1135. if (
  1136. this.dataList.type=='潮粮'&&this.dataList.tidalGrainWater < 1 ||
  1137. this.dataList.type=='潮粮'&&this.dataList.tidalGrainWater > 40 ||
  1138. (this.dataList.type=='潮粮'&&String(this.dataList.tidalGrainWater).indexOf('.') != -1 &&
  1139. String(this.dataList.tidalGrainWater).length -
  1140. (String(this.dataList.tidalGrainWater).indexOf('.') + 1) >
  1141. 2)
  1142. ) {
  1143. this.$message({
  1144. message: '潮粮水分输入错误',
  1145. type: 'warning'
  1146. })
  1147. return
  1148. }
  1149. if (this.dataList.type=='潮粮'&&!this.dataList.solidGrainWater) {
  1150. this.$message({
  1151. message: '干粮水分不能为空',
  1152. type: 'warning'
  1153. })
  1154. return
  1155. }
  1156. if (
  1157. this.dataList.type=='潮粮'&&this.dataList.solidGrainWater < 1 ||
  1158. this.dataList.type=='潮粮'&&this.dataList.solidGrainWater > 40 ||
  1159. (this.dataList.type=='潮粮'&&String(this.dataList.solidGrainWater).indexOf('.') != -1 &&
  1160. String(this.dataList.solidGrainWater).length -
  1161. (String(this.dataList.solidGrainWater).indexOf('.') + 1) >
  1162. 1)
  1163. ) {
  1164. this.$message({
  1165. message: '干粮水分输入错误',
  1166. type: 'warning'
  1167. })
  1168. return
  1169. }
  1170. if (!this.dataList.deductionAmount) {
  1171. this.$message({
  1172. message: '扣款不能为空',
  1173. type: 'warning'
  1174. })
  1175. return
  1176. }
  1177. if (
  1178. this.dataList.deductionAmount < 0 ||
  1179. this.dataList.deductionAmount > 10000 ||
  1180. (String(this.dataList.deductionAmount).indexOf('.') != -1 &&
  1181. String(this.dataList.deductionAmount).length -
  1182. (String(this.dataList.deductionAmount).indexOf('.') + 1) >
  1183. 2)
  1184. ) {
  1185. this.$message({
  1186. message: '扣款输入错误',
  1187. type: 'warning'
  1188. })
  1189. return
  1190. }
  1191. if (!this.dataList.cost) {
  1192. this.$message({
  1193. message: '未获取到成本,请编辑后提交',
  1194. type: 'warning'
  1195. })
  1196. return
  1197. }
  1198. if (
  1199. this.dataList.cost < 0 ||
  1200. this.dataList.cost > 20000 ||
  1201. (String(this.dataList.cost).indexOf('.') != -1 &&
  1202. String(this.dataList.cost).length -
  1203. (String(this.dataList.cost).indexOf('.') + 1) >
  1204. 2)
  1205. ) {
  1206. this.$message({
  1207. message: '成本输入错误',
  1208. type: 'warning'
  1209. })
  1210. return
  1211. }
  1212. if (!this.dataList.freight&&this.dataList.freight!=0) {
  1213. this.$message({
  1214. message: '运费不能为空',
  1215. type: 'warning'
  1216. })
  1217. return
  1218. }
  1219. if (
  1220. this.dataList.freight < 0 ||
  1221. this.dataList.freight > 100000 ||
  1222. (String(this.dataList.freight).indexOf('.') != -1 &&
  1223. String(this.dataList.freight).length -
  1224. (String(this.dataList.freight).indexOf('.') + 1) >
  1225. 2)
  1226. ) {
  1227. this.$message({
  1228. message: '运费输入错误',
  1229. type: 'warning'
  1230. })
  1231. return
  1232. }
  1233. if (!this.dataList.agent) {
  1234. this.$message({
  1235. message: '经办人不能为空',
  1236. type: 'warning',
  1237. })
  1238. return
  1239. }
  1240. if (this.dataList.agent.length < 2 || this.dataList.agent.length > 10) {
  1241. this.$message({
  1242. message: '经办人输入有误',
  1243. type: 'warning',
  1244. })
  1245. return
  1246. }
  1247. if (!this.dataList.grade) {
  1248. this.$message({
  1249. message: '品级不能为空!',
  1250. type: 'warning',
  1251. })
  1252. return
  1253. }
  1254. if (!this.dataList.inOutDate) {
  1255. this.$message({
  1256. message: '入库日期不能为空!',
  1257. type: 'warning',
  1258. })
  1259. return
  1260. }
  1261. if (!this.dataList.inOutType) {
  1262. this.$message({
  1263. message: '入库类型不能为空!',
  1264. type: 'warning',
  1265. })
  1266. return
  1267. }
  1268. if (!this.dataList.carNo) {
  1269. this.$message({
  1270. message: '车牌号不能为空',
  1271. type: 'warning',
  1272. })
  1273. return
  1274. }
  1275. if (this.dataList.carNo.length > 7) {
  1276. this.$message({
  1277. message: '车牌号输入错误,请输入7个字符之内',
  1278. type: 'warning',
  1279. })
  1280. return
  1281. }
  1282. if (this.dataList.boxNo&&this.dataList.boxNo.length > 20) {
  1283. this.$message({
  1284. message: '箱号-1输入错误',
  1285. type: 'warning',
  1286. })
  1287. return
  1288. }
  1289. if (this.dataList.boxNoOther&&this.dataList.boxNoOther.length > 20) {
  1290. this.$message({
  1291. message: '箱号-2输入错误',
  1292. type: 'warning',
  1293. })
  1294. return
  1295. }
  1296. if (this.dataList.titleNo&&this.dataList.titleNo.length > 20) {
  1297. this.$message({
  1298. message: '封号-1输入错误',
  1299. type: 'warning',
  1300. })
  1301. return
  1302. }
  1303. if (this.dataList.titleNoOther&&this.dataList.titleNoOther.length > 20) {
  1304. this.$message({
  1305. message: '封号-2输入错误',
  1306. type: 'warning',
  1307. })
  1308. return
  1309. }
  1310. if (!this.dataList.contractNo) {
  1311. this.$message({
  1312. message: '合同编号不能为空',
  1313. type: 'warning',
  1314. })
  1315. return
  1316. }
  1317. // if (
  1318. // this.dataList.contractNo.length < 6 ||
  1319. // this.dataList.contractNo.length > 20
  1320. // ) {
  1321. // this.$message({
  1322. // message: '合同编号长度不符合要求,请输入6-20个字符之内',
  1323. // type: 'warning',
  1324. // })
  1325. // return
  1326. // }
  1327. if (this.dataList.netWeight > this.$route.query.capacity) {
  1328. this.$message({
  1329. message: '入库量大于该仓库容量!',
  1330. type: 'warning',
  1331. })
  1332. return
  1333. }
  1334. //自检员
  1335. if (this.dataList.warehouseInOutDetail.qualityInspector) {
  1336. if (
  1337. this.dataList.warehouseInOutDetail.qualityInspector.length < 2 ||
  1338. this.dataList.warehouseInOutDetail.qualityInspector.length > 10
  1339. ) {
  1340. this.$message({
  1341. message: '质检员姓名长度错误!',
  1342. type: 'warning',
  1343. })
  1344. return
  1345. }
  1346. }
  1347. if (this.dataList.warehouseInOutDetail.waterContent) {
  1348. if (isNaN(this.dataList.warehouseInOutDetail.waterContent)) {
  1349. this.$message({
  1350. message: '水分(%)非数字!',
  1351. type: 'warning',
  1352. })
  1353. return
  1354. }
  1355. if (
  1356. this.dataList.warehouseInOutDetail.waterContent < 1 ||
  1357. this.dataList.warehouseInOutDetail.waterContent > 40 ||
  1358. (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
  1359. '.'
  1360. ) != -1 &&
  1361. String(this.dataList.warehouseInOutDetail.waterContent).length -
  1362. (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
  1363. '.'
  1364. ) +
  1365. 1) >
  1366. 2)
  1367. ) {
  1368. this.$message({
  1369. message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1370. type: 'warning',
  1371. })
  1372. return
  1373. }
  1374. }
  1375. //杂质
  1376. if (this.dataList.warehouseInOutDetail.impurity) {
  1377. if (isNaN(this.dataList.warehouseInOutDetail.impurity)) {
  1378. this.$message({
  1379. message: '杂质(%)非数字!',
  1380. type: 'warning',
  1381. })
  1382. return
  1383. }
  1384. if (
  1385. this.dataList.warehouseInOutDetail.impurity < 1 ||
  1386. this.dataList.warehouseInOutDetail.impurity > 40 ||
  1387. (String(this.dataList.warehouseInOutDetail.impurity).indexOf('.') !=
  1388. -1 &&
  1389. String(this.dataList.warehouseInOutDetail.impurity).length -
  1390. (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
  1391. '.'
  1392. ) +
  1393. 1) >
  1394. 2)
  1395. ) {
  1396. this.$message({
  1397. message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1398. type: 'warning',
  1399. })
  1400. return
  1401. }
  1402. }
  1403. //霉变
  1404. if (this.dataList.warehouseInOutDetail.mildewGrain) {
  1405. if (isNaN(this.dataList.warehouseInOutDetail.mildewGrain)) {
  1406. this.$message({
  1407. message: '霉变粒(%)非数字!',
  1408. type: 'warning',
  1409. })
  1410. return
  1411. }
  1412. if (
  1413. this.dataList.warehouseInOutDetail.mildewGrain < 1 ||
  1414. this.dataList.warehouseInOutDetail.mildewGrain > 40 ||
  1415. (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
  1416. '.'
  1417. ) != -1 &&
  1418. String(this.dataList.warehouseInOutDetail.mildewGrain).length -
  1419. (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
  1420. '.'
  1421. ) +
  1422. 1) >
  1423. 2)
  1424. ) {
  1425. this.$message({
  1426. message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1427. type: 'warning',
  1428. })
  1429. return
  1430. }
  1431. }
  1432. //热损伤
  1433. if (this.dataList.warehouseInOutDetail.jiaorenli) {
  1434. if (isNaN(this.dataList.warehouseInOutDetail.jiaorenli)) {
  1435. this.$message({
  1436. message: '热损伤(%)非数字!',
  1437. type: 'warning',
  1438. })
  1439. return
  1440. }
  1441. if (
  1442. this.dataList.warehouseInOutDetail.jiaorenli < 1 ||
  1443. this.dataList.warehouseInOutDetail.jiaorenli > 40 ||
  1444. (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf('.') !=
  1445. -1 &&
  1446. String(this.dataList.warehouseInOutDetail.jiaorenli).length -
  1447. (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
  1448. '.'
  1449. ) +
  1450. 1) >
  1451. 2)
  1452. ) {
  1453. this.$message({
  1454. message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1455. type: 'warning',
  1456. })
  1457. return
  1458. }
  1459. }
  1460. //不完善粒(%)
  1461. if (this.dataList.warehouseInOutDetail.imperfectGrain) {
  1462. if (isNaN(this.dataList.warehouseInOutDetail.imperfectGrain)) {
  1463. this.$message({
  1464. message: '不完善粒(%)非数字!',
  1465. type: 'warning',
  1466. })
  1467. return
  1468. }
  1469. if (
  1470. this.dataList.warehouseInOutDetail.imperfectGrain < 1 ||
  1471. this.dataList.warehouseInOutDetail.imperfectGrain > 40 ||
  1472. (String(this.dataList.warehouseInOutDetail.imperfectGrain).indexOf(
  1473. '.'
  1474. ) != -1 &&
  1475. String(this.dataList.warehouseInOutDetail.imperfectGrain).length -
  1476. (String(
  1477. this.dataList.warehouseInOutDetail.imperfectGrain
  1478. ).indexOf('.') +
  1479. 1) >
  1480. 2)
  1481. ) {
  1482. this.$message({
  1483. message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1484. type: 'warning',
  1485. })
  1486. return
  1487. }
  1488. }
  1489. //容重
  1490. if (this.dataList.warehouseInOutDetail.bulkDensity) {
  1491. if (isNaN(this.dataList.warehouseInOutDetail.bulkDensity)) {
  1492. this.$message({
  1493. message: '容重(克/升)非数字!',
  1494. type: 'warning',
  1495. })
  1496. return
  1497. }
  1498. if (
  1499. this.dataList.warehouseInOutDetail.bulkDensity > 1000 ||
  1500. this.dataList.warehouseInOutDetail.bulkDensity < 0||
  1501. (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
  1502. '.'
  1503. ) != -1 &&
  1504. String(this.dataList.warehouseInOutDetail.bulkDensity).length -
  1505. (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
  1506. '.'
  1507. ) +
  1508. 1) >
  1509. 0)
  1510. ) {
  1511. this.$message({
  1512. message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
  1513. type: 'warning',
  1514. })
  1515. return
  1516. }
  1517. }
  1518. this.$confirm(`确定提交入库信息`, {
  1519. cancelButtonText: '取消',
  1520. confirmButtonText: '确定',
  1521. type: 'warning',
  1522. })
  1523. .then(() => {
  1524. this.$refs.dataList.validate((valid) => {
  1525. if (valid) {
  1526. this.dataList.compId = localStorage.getItem('ws-pf_compId')
  1527. this.dataList.inOutFlag = 2
  1528. this.dataList.statusFlag = 3
  1529. addstorageputList(this.dataList)
  1530. .toPromise()
  1531. .then((response) => {
  1532. this.$message.success('添加成功')
  1533. this.$router.push({ path: 'warehouseManagementList' })
  1534. })
  1535. } else {
  1536. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1537. return false
  1538. }
  1539. })
  1540. })
  1541. .catch(() => {
  1542. return false
  1543. })
  1544. },
  1545. //暂存按钮
  1546. returnWarehouse() {
  1547. this.$refs.dataList.validate((valid) => {
  1548. if (valid) {
  1549. this.dataList.compId = localStorage.getItem('ws-pf_compId')
  1550. this.dataList.statusFlag = 1
  1551. addstorageputList(this.dataList)
  1552. .toPromise()
  1553. .then((response) => {
  1554. this.$message.success('添加成功')
  1555. this.$router.push({ path: 'warehouseManagementList' })
  1556. })
  1557. } else {
  1558. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1559. return false
  1560. }
  1561. })
  1562. },
  1563. tarechange(e) {
  1564. if (this.dataList.grossWeight && this.dataList.tare) {
  1565. this.dataList.netWeight = Number(
  1566. this.dataList.grossWeight - this.dataList.tare
  1567. ).toFixed(2)
  1568. }
  1569. },
  1570. grossWeightchange(e) {
  1571. if (this.dataList.grossWeight && this.dataList.tare) {
  1572. this.dataList.netWeight = Number(
  1573. this.dataList.grossWeight - this.dataList.tare
  1574. ).toFixed(2)
  1575. }
  1576. },
  1577. selectgoodsName(e) {
  1578. for (var i = 0; i < this.goodnameList.length; i++) {
  1579. if (this.goodnameList[i].constValue == e) {
  1580. this.dataList.goodsNameKey = this.goodnameList[i].constKey
  1581. if(e=='玉米(潮粮)'){
  1582. this.dataList.type='潮粮'
  1583. }else{
  1584. this.dataList.type='干粮'
  1585. }
  1586. }
  1587. }
  1588. },
  1589. selectpackingMethod(e) {
  1590. for (var i = 0; i < this.packtypeList.length; i++) {
  1591. if (this.packtypeList[i].constValue == e) {
  1592. this.dataList.packingMethodKey = this.packtypeList[i].constKey
  1593. }
  1594. }
  1595. },
  1596. selectstorageType(e) {
  1597. for (var i = 0; i < this.storageType.length; i++) {
  1598. if (this.storageType[i].constValue == e) {
  1599. this.dataList.inOutTypeKey = this.storageType[i].constKey
  1600. }
  1601. }
  1602. },
  1603. handleClose() {
  1604. this.accessoryTFs = false
  1605. },
  1606. handleSizeChange(val) {
  1607. console.log(`每页 ${val} 条`)
  1608. this.pageSize = val
  1609. this.getList()
  1610. },
  1611. handleCurrentChange(val) {
  1612. this.currentPage = val
  1613. console.log(`当前页: ${val}`)
  1614. this.getList()
  1615. },
  1616. getList() {
  1617. // 货名
  1618. pullDown({ constId: 'CON2' })
  1619. .toPromise()
  1620. .then((response) => {
  1621. this.goodnameList = response
  1622. })
  1623. // 品级
  1624. pullDown({ constId: 'CON3' })
  1625. .toPromise()
  1626. .then((response) => {
  1627. this.gradeList = response
  1628. })
  1629. // 类型
  1630. if (this.$route.query.warehouseType == '1') {
  1631. this.storageType = []
  1632. pullDown({ constId: 'CON5' })
  1633. .toPromise()
  1634. .then((response) => {
  1635. // this.storageType = response
  1636. for(let i = 0;i<response.length;i++){
  1637. if(response[i].constValue=='移库入库'||response[i].constValue=='退库'){
  1638. this.storageType.push(response[i])
  1639. }
  1640. }
  1641. })
  1642. } else if (this.$route.query.warehouseType == '2') {
  1643. //临时仓库入库类型
  1644. pullDown({ constId: 'WARE1' })
  1645. .toPromise()
  1646. .then((response) => {
  1647. this.storageType = response
  1648. })
  1649. //临时仓库出库类型
  1650. pullDown({ constId: 'WARE2' })
  1651. .toPromise()
  1652. .then((response) => {
  1653. this.deliveryType = response
  1654. })
  1655. }
  1656. //合同编号
  1657. xialaNo({ compId: localStorage.getItem('ws-pf_compId'), flag: 6 })
  1658. .toPromise()
  1659. .then((response) => {
  1660. this.options1 = response
  1661. this.outContractNo = response
  1662. })
  1663. //合同编号2
  1664. xialaNo({ compId: localStorage.getItem('ws-pf_compId'), flag: 7 })
  1665. .toPromise()
  1666. .then((response) => {
  1667. this.outContractNo1 = response
  1668. })
  1669. //经办人
  1670. getstaff({ compId: localStorage.getItem('ws-pf_compId'),warehouseId:this.dataList.id })
  1671. .toPromise()
  1672. .then((response) => {
  1673. this.options = response
  1674. this.qualityInspectorList = response
  1675. this.staffList = response
  1676. // this.agent = response
  1677. })
  1678. },
  1679. selecttaskType(e) {
  1680. for (var i = 0; i < this.taskTypeList.length; i++) {
  1681. if (this.taskTypeList[i].value == e) {
  1682. this.searchType = this.taskTypeList[i].type
  1683. }
  1684. }
  1685. },
  1686. fujian(row) {
  1687. if (
  1688. row.receiveAttachmentPath === null ||
  1689. row.receiveAttachmentPath === ''
  1690. ) {
  1691. EventBus.$emit(
  1692. 'warning',
  1693. this.$t('system.noticeCircular.NoInformation')
  1694. )
  1695. } else {
  1696. this.accessoryTFs = true
  1697. }
  1698. this.appendixIdss = row.receiveAttachmentPath
  1699. },
  1700. handleExamine(row) {
  1701. this.$router.push({
  1702. name: 'salesContractExamine',
  1703. query: { id: row.id },
  1704. })
  1705. },
  1706. // 关闭 dialog时 处理文件url 初始化upload组件
  1707. handleCloe() {
  1708. this.dialogViewSpareMoney = false
  1709. },
  1710. history(row) {
  1711. console.log(row)
  1712. billoperatehis({ id: row.id })
  1713. .toPromise()
  1714. .then((response) => {
  1715. this.historyList = response
  1716. })
  1717. },
  1718. async exportlist() {
  1719. const { data } = await export1(
  1720. {
  1721. compId: localStorage.getItem('ws-pf_compId'),
  1722. contractType: this.contractType,
  1723. currentPage: this.currentPage,
  1724. pageSize: this.pageSize,
  1725. searchType: this.searchType,
  1726. searchKeyWord: this.searchKeyWord,
  1727. startDate: this.startDate,
  1728. endDate: this.endDate,
  1729. },
  1730. {},
  1731. { responseType: 'blob' }
  1732. ).toPromise()
  1733. downloadFile({
  1734. res: data,
  1735. fileName: `${
  1736. this.date.year + (this.date.month ? `-${this.date.month}` : '')
  1737. }_采购合同`,
  1738. type: 'xls',
  1739. })
  1740. },
  1741. // deletecontract(){},
  1742. //删除
  1743. approve() {},
  1744. listQuery() {},
  1745. total() {},
  1746. clearfiltQuery() {},
  1747. selectCrtDuty() {},
  1748. },
  1749. }
  1750. </script>
  1751. <style lang="scss" scoped>
  1752. /deep/.basicInformation {
  1753. .ws-info-table {
  1754. border: none;
  1755. }
  1756. .left{
  1757. .el-form-item {
  1758. width: 50%;
  1759. // width: 33.3333%;
  1760. border: none;
  1761. .el-form-item__label {
  1762. background: transparent;
  1763. border: none;
  1764. }
  1765. .el-form-item__content {
  1766. border: none;
  1767. }
  1768. }
  1769. }
  1770. .right{
  1771. .el-form-item {
  1772. width: 100%;
  1773. // width: 33.3333%;
  1774. border: none;
  1775. .el-form-item__label {
  1776. background: transparent;
  1777. border: none;
  1778. }
  1779. .el-form-item__content {
  1780. border: none;
  1781. }
  1782. }
  1783. }
  1784. }
  1785. .title {
  1786. position: relative;
  1787. padding-left: 10px;
  1788. }
  1789. .title::before {
  1790. content: '';
  1791. display: inline-block;
  1792. width: 5px;
  1793. height: 30px;
  1794. background: #5473e8;
  1795. position: absolute;
  1796. left: 0;
  1797. }
  1798. .el-form {
  1799. padding: 0 10%;
  1800. }
  1801. .el-button--primary {
  1802. background-color: #5878e8;
  1803. border-color: #5878e8;
  1804. }
  1805. .el-col {
  1806. background: #f6f7fc;
  1807. }
  1808. .bg-right {
  1809. text-align: right;
  1810. padding: 16px 20px;
  1811. }
  1812. .center {
  1813. position: relative;
  1814. top: 50px;
  1815. width: 40%;
  1816. height: 2000px;
  1817. margin: 0 auto;
  1818. }
  1819. /deep/.el-form-item__label {
  1820. width: 160px;
  1821. }
  1822. .inspector {
  1823. width: 50%;
  1824. }
  1825. //质检员
  1826. /deep/[data-v-58803672] .el-form-item__label {
  1827. width: 60px;
  1828. }
  1829. [data-v-58803672] .el-form-item__label {
  1830. width: 60px;
  1831. }
  1832. //选填
  1833. /deep/.el-form-item {
  1834. width: 50%;
  1835. }
  1836. .container {
  1837. overflow: scroll;
  1838. height: 120vh;
  1839. }
  1840. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1841. text-align: center;
  1842. }
  1843. .deliverydate {
  1844. display: inline-block;
  1845. width: 10%;
  1846. }
  1847. .center {
  1848. margin-top: -60px;
  1849. width: 80%;
  1850. }
  1851. //仓位
  1852. .position {
  1853. width: 52px;
  1854. height: 20px;
  1855. background: #afb5cb;
  1856. border-radius: 2px;
  1857. font-size: 12px;
  1858. font-family: PingFangSC-Medium, PingFang SC;
  1859. color: #ffffff;
  1860. line-height: 20px;
  1861. }
  1862. //表格文字
  1863. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1864. text-align: left;
  1865. font-size: 14px;
  1866. font-family: PingFangSC-Regular, PingFang SC;
  1867. font-weight: 400;
  1868. color: #8890b1;
  1869. line-height: 16px;
  1870. }
  1871. //质检员
  1872. .inspector .el-form-item__content {
  1873. text-align: left;
  1874. margin-left: 0px;
  1875. }
  1876. .small-title {
  1877. position: relative;
  1878. padding: 10px;
  1879. font-weight: 600;
  1880. }
  1881. .small-title::before {
  1882. position: absolute;
  1883. content: '';
  1884. display: block;
  1885. background: #5473e8;
  1886. width: 4px;
  1887. height: 14px;
  1888. left: 0px;
  1889. top: 13px;
  1890. }
  1891. //下面列表
  1892. .neifor {
  1893. width: 80%;
  1894. background-color: #f6f7fc;
  1895. }
  1896. /deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
  1897. width: 35%;
  1898. text-align: center;
  1899. }
  1900. /deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
  1901. width: 60%;
  1902. background-color: #f6f7fc;
  1903. }
  1904. /deep/.neifor .el-input--small .el-input__inner {
  1905. width: 100%;
  1906. }
  1907. .el-input__inner {
  1908. width: 150px;
  1909. }
  1910. </style>