warehouseManagementPerfectput.vue 60 KB

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