warehouseManagementPut.vue 78 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501
  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. >
  15. <img
  16. width="6"
  17. height="10"
  18. style="vertical-align: bottom; margin-right: 3px"
  19. src="../../../public/img/lujing.png"
  20. alt
  21. />返回
  22. </el-button>
  23. </el-col>
  24. </el-row>
  25. <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
  26. <div class="basicInformation">
  27. <h2>
  28. <img
  29. style="position: relative; top: 2px"
  30. width="19"
  31. height="19"
  32. src="../../../public/img/cangku.png"
  33. alt
  34. />
  35. {{ deptBudgetList.warehouseName }}
  36. <span class="position" v-show="this.$route.query.warehouseType == 1"
  37. >{{ deptBudgetList.binNumber }}仓位</span
  38. >
  39. <span v-show="this.$route.query.warehouseType == 2">(临)</span>
  40. </h2>
  41. <div class="flex">
  42. <div class="left" style='width:66.6666%;'>
  43. <ws-info-table>
  44. <!-- 任务编号 -->
  45. <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
  46. <el-select
  47. filterable
  48. clearable
  49. v-model="deptBudgetList.inOutTaskNo"
  50. placeholder="请选择任务编号"
  51. class="typeselect"
  52. @change="contractNoChange"
  53. >
  54. <el-option
  55. v-for="item in deptBudgetList1"
  56. :key="item.inOutTaskNo"
  57. :label="item.inOutTaskNo"
  58. :value="item.inOutTaskNo"
  59. />
  60. </el-select>
  61. </ws-form-item>
  62. <!--合同编号-->
  63. <ws-form-item label="合同编号" span="1" prop="contractNo">
  64. <el-select
  65. filterable clearable
  66. :filter-method="dataFilter1"
  67. v-model="deptBudgetList.contractNo"
  68. placeholder="请选择合同编号或移库任务编号"
  69. class="typeselect"
  70. @change="contractNoChange"
  71. disabled
  72. >
  73. <el-option
  74. v-for="item in options1"
  75. :key="item.constKey"
  76. :label="item.contractNo"
  77. :value="item.contractNo"
  78. />
  79. </el-select>
  80. </ws-form-item>
  81. <!--毛重(吨)-->
  82. <ws-form-item label="毛重(吨)" span="1" prop="grossWeight">
  83. <ws-input
  84. @input="grossWeightchange"
  85. v-model="deptBudgetList.grossWeight"
  86. placeholder="请输入毛重"
  87. maxlength="20"
  88. type="number"
  89. @mousewheel.native.prevent
  90. size="small"
  91. />
  92. </ws-form-item>
  93. <!-- 货名 -->
  94. <ws-form-item label="货名" span="1">
  95. <ws-select
  96. disabled
  97. v-model="deptBudgetList.goodsName"
  98. placeholder
  99. class="typeselect"
  100. @change="selectgoodsName"
  101. >
  102. <ws-option
  103. v-for="item in goodnameList"
  104. :key="item.constKey"
  105. :label="item.constValue"
  106. :value="item.constValue"
  107. />
  108. </ws-select>
  109. </ws-form-item>
  110. <!--皮重(吨)-->
  111. <ws-form-item
  112. label="皮重(吨)"
  113. span="1"
  114. prop="tare"
  115. class="readonly"
  116. >
  117. <ws-input
  118. @input="tarechange"
  119. v-model="deptBudgetList.tare"
  120. placeholder="请输入皮重"
  121. type="number"
  122. @mousewheel.native.prevent
  123. maxlength="100"
  124. size="small"
  125. />
  126. </ws-form-item>
  127. <ws-form-item label="提示" span="1" prop="tips">
  128. <ws-input onmouseover="this.title=this.value" v-model="deptBudgetList.tips"
  129. maxlength="20" size="small" />
  130. </ws-form-item>
  131. <ws-form-item
  132. label="扣重(吨)"
  133. span="1"
  134. prop="deductionWeight"
  135. class="readonly"
  136. >
  137. <ws-input
  138. @input="tarechange"
  139. v-model="deptBudgetList.deductionWeight"
  140. placeholder="请输入扣重"
  141. type="number"
  142. @mousewheel.native.prevent
  143. maxlength="100"
  144. size="small"
  145. />
  146. </ws-form-item>
  147. <ws-form-item label="类型" span="1" prop="type">
  148. <ws-select disabled v-model="deptBudgetList.type" @change="typeChange">
  149. <ws-option
  150. v-for="item in typeList"
  151. :key="item"
  152. :label="item"
  153. :value="item"
  154. />
  155. </ws-select>
  156. </ws-form-item>
  157. <!--净重(吨)-->
  158. <ws-form-item label="净重(吨)" span="1" prop="netWeight">
  159. <ws-input
  160. readonly="readonly"
  161. v-model="deptBudgetList.netWeight"
  162. placeholder="不可编辑,自动计算"
  163. maxlength="120"
  164. size="small"
  165. />
  166. </ws-form-item>
  167. <!-- <ws-form-item
  168. v-if="deptBudgetList.type == '潮粮'"
  169. label="扣重比"
  170. span="1"
  171. prop="buckleWeightRatio"
  172. class="readonly"
  173. >
  174. <ws-input
  175. @input="pureweight"
  176. v-model="deptBudgetList.buckleWeightRatio"
  177. placeholder="请输入扣重比"
  178. type="number"
  179. @mousewheel.native.prevent
  180. maxlength="100"
  181. size="small"
  182. />
  183. </ws-form-item>
  184. <ws-form-item
  185. v-if="deptBudgetList.type == '潮粮'"
  186. label="干粮水分占比"
  187. span="1"
  188. prop="solidGrainWater"
  189. class="readonly"
  190. >
  191. <ws-input
  192. @input="pureweight"
  193. v-model="deptBudgetList.solidGrainWater"
  194. placeholder="请输入干粮水分占比"
  195. maxlength="100"
  196. type="number"
  197. @mousewheel.native.prevent
  198. size="small"
  199. />
  200. </ws-form-item>
  201. <ws-form-item
  202. v-if="deptBudgetList.type == '潮粮'"
  203. label="潮粮水分占比"
  204. span="1"
  205. prop="tidalGrainWater"
  206. class="readonly"
  207. >
  208. <ws-input
  209. @input="pureweight(1)"
  210. v-model="deptBudgetList.tidalGrainWater"
  211. placeholder="请输入潮粮水分占比"
  212. maxlength="100"
  213. type="number"
  214. @mousewheel.native.prevent
  215. size="small"
  216. />
  217. </ws-form-item>
  218. <ws-form-item
  219. v-if="deptBudgetList.type == '潮粮'"
  220. label="纯重"
  221. span="1"
  222. prop="pureWeight"
  223. class="readonly"
  224. >
  225. <ws-input
  226. disabled
  227. v-model="deptBudgetList.pureWeight"
  228. placeholder="不可编辑,自动计算"
  229. maxlength="100"
  230. size="small"
  231. />
  232. </ws-form-item> -->
  233. <!-- 品级 -->
  234. <ws-form-item label="品级" span="1" class="readonly">
  235. <ws-select
  236. v-model="deptBudgetList.grade"
  237. placeholder
  238. class="typeselect"
  239. @change="selectpackingMethod"
  240. >
  241. <ws-option
  242. v-for="item in gradeList"
  243. :key="item.constKey"
  244. :label="item.constValue"
  245. :value="item.constValue"
  246. />
  247. </ws-select>
  248. </ws-form-item>
  249. <!--净重(吨)-->
  250. <ws-form-item label="扣款(元/吨)" span="1" prop="deductionAmount">
  251. <ws-input
  252. @input="kkInput(deptBudgetList.deductionAmount)"
  253. v-model="deptBudgetList.deductionAmount"
  254. placeholder="请输入扣款金额"
  255. maxlength="120"
  256. size="small"
  257. />
  258. </ws-form-item>
  259. <!--经办人-->
  260. <ws-form-item label="经办人" span="1" prop="agent">
  261. <el-select
  262. v-model="deptBudgetList.agent"
  263. placeholder="请选择经办人"
  264. filterable
  265. clearable
  266. @change="selectstaff"
  267. >
  268. <el-option
  269. v-for="item in options"
  270. :key="item.value"
  271. :label="item.staffName"
  272. :value="item.staffName"
  273. />
  274. </el-select>
  275. </ws-form-item>
  276. <ws-form-item
  277. label="入库日期"
  278. span="1"
  279. prop="inOutDate"
  280. class="deliverydate"
  281. >
  282. <el-date-picker
  283. v-model="deptBudgetList.inOutDate"
  284. placeholder="请选择入库日期"
  285. type="date"
  286. value-format="yyyy-MM-dd"
  287. ></el-date-picker>
  288. </ws-form-item>
  289. <!-- 入库类型 -->
  290. <ws-form-item label="入库类型" span="1">
  291. <ws-select
  292. v-model="deptBudgetList.inOutType"
  293. placeholder
  294. class="typeselect"
  295. @change="selectstorageType"
  296. :disabled="isSelectType"
  297. >
  298. <ws-option
  299. v-for="item in storageType"
  300. :key="item.constKey"
  301. :label="item.constValue"
  302. :value="item.constValue"
  303. />
  304. </ws-select>
  305. </ws-form-item>
  306. </ws-info-table>
  307. </div>
  308. <div class="right" style='width:33.3333%;'>
  309. <ws-info-table>
  310. <ws-form-item label="成本(元/吨)" span="1" prop="cost">
  311. <ws-input
  312. :disabled="disabled1"
  313. v-model="deptBudgetList.cost"
  314. placeholder="请输入成本"
  315. size="small"
  316. type="number"
  317. @mousewheel.native.prevent
  318. />
  319. <img
  320. width="17"
  321. height="18"
  322. style="vertical-align: text-top; position: relative; top: -1px"
  323. src="../../../public/img/edit.png"
  324. @click="editClick(1)"
  325. alt=""
  326. />
  327. </ws-form-item>
  328. <ws-form-item label="运费(元/吨)" span="1" prop="freight">
  329. <ws-input
  330. :disabled="disabled2"
  331. v-model="deptBudgetList.freight"
  332. placeholder="请输入运费"
  333. size="small"
  334. type="number"
  335. @mousewheel.native.prevent
  336. />
  337. <img
  338. width="17"
  339. height="18"
  340. style="vertical-align: text-top; position: relative; top: -1px"
  341. src="../../../public/img/edit.png"
  342. @click="editClick(2)"
  343. alt=""
  344. />
  345. </ws-form-item>
  346. <ws-form-item label="运输方式" span="1" prop="outType">
  347. <el-select
  348. v-model="deptBudgetList.outType"
  349. placeholder="请选择运输方式"
  350. >
  351. <el-option
  352. v-for="item in multiSelector"
  353. :key="item.value"
  354. :label="item.name"
  355. :value="item.name"
  356. />
  357. </el-select>
  358. </ws-form-item>
  359. <!-- <ws-form-item label="车牌号" span="1" prop="carNo">
  360. <ws-input
  361. v-if="!carstatus"
  362. v-model="deptBudgetList.carNo"
  363. placeholder="请输入车牌号"
  364. maxlength="7"
  365. size="small"
  366. />
  367. <el-select
  368. v-if="carstatus"
  369. filterable
  370. clearable
  371. :filter-method="dataFilter2"
  372. v-model="deptBudgetList.carNo"
  373. placeholder="请选择车牌号"
  374. class="typeselect"
  375. @change="carChange"
  376. >
  377. <el-option
  378. v-for="item in options2"
  379. :key="item.constKey"
  380. :label="item.carNo + '(' + item.tranCarNo + ')'"
  381. :value="item.carNo"
  382. />
  383. </el-select>
  384. </ws-form-item>
  385. <ws-form-item label="箱号-1" span="1" prop="boxNo">
  386. <ws-input v-model="deptBudgetList.boxNo" placeholder="请输入箱号" maxlength="20"
  387. size="small" />
  388. </ws-form-item>
  389. <ws-form-item label="箱号-2" span="1" prop="boxNoOther">
  390. <ws-input v-model="deptBudgetList.boxNoOther" placeholder="请输入箱号" maxlength="20"
  391. size="small" />
  392. </ws-form-item>
  393. <ws-form-item label="封号-1" span="1" prop="titleNo">
  394. <ws-input v-model="deptBudgetList.titleNo" placeholder="请输入封号" maxlength="20"
  395. size="small" />
  396. </ws-form-item>
  397. <ws-form-item label="封号-2" span="1" prop="titleNoOther">
  398. <ws-input v-model="deptBudgetList.titleNoOther" placeholder="请输入封号" maxlength="20"
  399. size="small" />
  400. </ws-form-item>
  401. <ws-form-item label="车厢号-1" span="1" prop="wingNumber">
  402. <ws-input v-model="deptBudgetList.wingNumber" placeholder="请输入车厢号" maxlength="20"
  403. size="small" />
  404. </ws-form-item>
  405. <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther">
  406. <ws-input v-model="deptBudgetList.wingNumberOther" placeholder="请输入车厢号" maxlength="20"
  407. size="small" />
  408. </ws-form-item> -->
  409. <!--车牌号 -->
  410. <ws-form-item
  411. label="车牌号"
  412. span="1"
  413. prop="carNo"
  414. v-if="
  415. deptBudgetList.outType == '汽运' ||
  416. deptBudgetList.outType == '集装箱船'
  417. "
  418. >
  419. <ws-input
  420. v-if="options2.length==0"
  421. v-model="deptBudgetList.carNo"
  422. placeholder="请输入车牌号"
  423. maxlength="7"
  424. size="small"
  425. />
  426. <el-select
  427. v-if='carstatus&&options2.length>0'
  428. filterable clearable
  429. :filter-method="dataFilter2"
  430. v-model="deptBudgetList.carNo"
  431. placeholder="请选择车牌号"
  432. class="typeselect"
  433. @change="carChange"
  434. >
  435. <el-option
  436. v-for="item in options2"
  437. :key="item.constKey"
  438. :label="item.carNo + '(' + item.tranCarNo + ')'"
  439. :value="item.carNo"
  440. />
  441. </el-select>
  442. <el-select
  443. v-if='!carstatus&&options2.length>0'
  444. filterable clearable
  445. :filter-method="dataFilter2"
  446. v-model="deptBudgetList.carNo"
  447. placeholder="请选择车牌号"
  448. class="typeselect"
  449. @change="carChange"
  450. >
  451. <el-option
  452. v-for="item in options2"
  453. :key="item.constKey"
  454. :label="item.carNo"
  455. :value="item.carNo"
  456. />
  457. </el-select>
  458. </ws-form-item>
  459. <!--船名 -->
  460. <ws-form-item
  461. label="船名"
  462. span="1"
  463. prop="carNo"
  464. v-if="deptBudgetList.outType == '散船'"
  465. >
  466. <ws-input
  467. v-model="deptBudgetList.carNo"
  468. placeholder="请输入船名"
  469. size="small"
  470. />
  471. </ws-form-item>
  472. <ws-form-item
  473. label="航次"
  474. span="1"
  475. prop="shipNumber"
  476. v-if="deptBudgetList.outType == '散船'"
  477. >
  478. <ws-input
  479. v-model="deptBudgetList.shipNumber"
  480. placeholder="请输入航次"
  481. maxlength="20"
  482. size="small"
  483. />
  484. </ws-form-item>
  485. <!--车号 -->
  486. <ws-form-item
  487. label="车号"
  488. span="1"
  489. prop="carNo"
  490. v-if="deptBudgetList.outType == '火运'"
  491. >
  492. <ws-input
  493. v-model="deptBudgetList.carNo"
  494. placeholder="请输入车号"
  495. size="small"
  496. />
  497. </ws-form-item>
  498. <ws-form-item
  499. label="箱号-1"
  500. span="1"
  501. prop="boxNo"
  502. v-if="
  503. deptBudgetList.outType == '汽运' ||
  504. deptBudgetList.outType == '集装箱船'
  505. "
  506. >
  507. <ws-input
  508. v-model="deptBudgetList.boxNo"
  509. placeholder="请输入箱号"
  510. maxlength="20"
  511. size="small"
  512. />
  513. </ws-form-item>
  514. <ws-form-item
  515. label="箱号-2"
  516. span="1"
  517. prop="boxNoOther"
  518. v-if="
  519. deptBudgetList.outType == '汽运' ||
  520. deptBudgetList.outType == '集装箱船'
  521. "
  522. >
  523. <ws-input
  524. v-model="deptBudgetList.boxNoOther"
  525. placeholder="请输入箱号"
  526. maxlength="20"
  527. size="small"
  528. />
  529. </ws-form-item>
  530. <ws-form-item
  531. label="封号-1"
  532. span="1"
  533. prop="titleNo"
  534. v-if="
  535. deptBudgetList.outType == '汽运' ||
  536. deptBudgetList.outType == '集装箱船'
  537. "
  538. >
  539. <ws-input
  540. v-model="deptBudgetList.titleNo"
  541. placeholder="请输入封号"
  542. maxlength="20"
  543. size="small"
  544. />
  545. </ws-form-item>
  546. <ws-form-item
  547. label="封号-2"
  548. span="1"
  549. prop="titleNoOther"
  550. v-if="
  551. deptBudgetList.outType == '汽运' ||
  552. deptBudgetList.outType == '集装箱船'
  553. "
  554. >
  555. <ws-input
  556. v-model="deptBudgetList.titleNoOther"
  557. placeholder="请输入封号"
  558. maxlength="20"
  559. size="small"
  560. />
  561. </ws-form-item>
  562. <ws-form-item
  563. label="车厢号-1"
  564. span="1"
  565. prop="wingNumber"
  566. v-if="deptBudgetList.outType == '火运'"
  567. >
  568. <ws-input
  569. v-model="deptBudgetList.wingNumber"
  570. placeholder="请输入车厢号"
  571. maxlength="20"
  572. size="small"
  573. />
  574. </ws-form-item>
  575. <ws-form-item
  576. label="车厢号-2"
  577. span="1"
  578. prop="wingNumberOther"
  579. v-if="deptBudgetList.outType == '火运'"
  580. >
  581. <ws-input
  582. v-model="deptBudgetList.wingNumberOther"
  583. placeholder="请输入车厢号"
  584. maxlength="20"
  585. size="small"
  586. />
  587. </ws-form-item>
  588. <!-- onkeyup="value=value.replace(/[^\A-\Z0-9\u4E00-\u9FA5\.]/g,'')" -->
  589. </ws-info-table>
  590. </div>
  591. </div>
  592. <div
  593. v-show="
  594. this.$route.query.warehouseType == 2 &&
  595. this.deptBudgetList.createType == 2
  596. "
  597. >
  598. <el-checkbox v-model="checked" checked>退库并出库</el-checkbox>
  599. <ws-info-table
  600. v-show="checked == true && this.deptBudgetList.createType == 2"
  601. >
  602. <!-- 出库类型 -->
  603. <ws-form-item label="出库类型" span="1" prop="temporaryOutType">
  604. <!-- v-model="deptBudgetList.deliveryType" -->
  605. <ws-select
  606. v-model="deptBudgetList.temporaryOutType"
  607. placeholder
  608. class="typeselect"
  609. >
  610. <ws-option
  611. v-for="item in deliveryType"
  612. :key="item.constKey"
  613. :label="item.constValue"
  614. :value="item.constValue"
  615. />
  616. </ws-select>
  617. </ws-form-item>
  618. <!-- 出库合同编号 -->
  619. <ws-form-item label="出库合同编号" span="1">
  620. <ws-select
  621. v-model="deptBudgetList.outContractNo"
  622. placeholder="请选择合同编号或移库任务编号"
  623. class="typeselect"
  624. >
  625. <ws-option
  626. v-for="item in outContractNo"
  627. :key="item.constKey"
  628. :label="item.contractNo"
  629. :value="item.contractNo"
  630. />
  631. </ws-select>
  632. </ws-form-item>
  633. </ws-info-table>
  634. </div>
  635. </div>
  636. <div class="small-title">上传磅单照片</div>
  637. <el-upload
  638. action="https://www.zthymaoyi.com/upload/admin"
  639. :show-file-list="false"
  640. :on-success="
  641. (res) => {
  642. uploadSuccessHandle1(res)
  643. }
  644. "
  645. class="avatar-uploader"
  646. accept=".jpg, .jpeg, .png, .gif"
  647. >
  648. <el-button size="small" type="primary">点击上传</el-button>
  649. </el-upload>
  650. <div @click='imgBig(deptBudgetList.addressUrl)' v-if='deptBudgetList.addressUrl!=""'>
  651. <img
  652. style="width: 100px; height: 100px"
  653. :src="deptBudgetList.addressUrl"
  654. alt=""
  655. />
  656. </div>
  657. <div class="small-title">化验数据(选填)</div>
  658. <div class="inspector">
  659. <!--自检员-->
  660. <!-- <ws-form-item label="质检员" span="1" prop="qualityInspector">
  661. <ws-input
  662. v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
  663. placeholder="请输入质检员姓名"
  664. maxlength="10"
  665. size="small"
  666. />
  667. </ws-form-item> -->
  668. <ws-form-item label="质检员" span="1" prop="qualityInspector">
  669. <el-select
  670. v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
  671. placeholder="请选择质检员"
  672. filterable
  673. clearable
  674. @change="qualityInspectorChange"
  675. >
  676. <el-option
  677. v-for="item in qualityInspectorList"
  678. :key="item.value"
  679. :label="item.staffName"
  680. :value="item.staffName"
  681. />
  682. </el-select>
  683. </ws-form-item>
  684. </div>
  685. <div class="neifor">
  686. <ws-info-table>
  687. <!--水分(%)<=-->
  688. <ws-form-item label="水分(%)" span="1" prop="waterContent">
  689. <ws-input
  690. v-model="deptBudgetList.warehouseInOutDetail.waterContent"
  691. type="number"
  692. @mousewheel.native.prevent
  693. placeholder="请输入水分占比"
  694. maxlength="40"
  695. size="small"
  696. />
  697. </ws-form-item>
  698. <!--杂质(%)<=-->
  699. <ws-form-item label="杂质(%)" span="1" prop="impurity">
  700. <ws-input
  701. v-model="deptBudgetList.warehouseInOutDetail.impurity"
  702. type="number"
  703. @mousewheel.native.prevent
  704. placeholder="请输入杂质占比"
  705. maxlength="40"
  706. size="small"
  707. />
  708. </ws-form-item>
  709. <!--容重(克/升)-->
  710. <ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
  711. <ws-input
  712. v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
  713. type="number"
  714. @mousewheel.native.prevent
  715. placeholder="请输入容重"
  716. maxlength="40"
  717. size="small"
  718. />
  719. </ws-form-item>
  720. <!--霉变粒(%)<=-->
  721. <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
  722. <ws-input
  723. v-model="deptBudgetList.warehouseInOutDetail.mildewGrain"
  724. type="number"
  725. @mousewheel.native.prevent
  726. placeholder="请输入霉变粒占比"
  727. maxlength="40"
  728. size="small"
  729. />
  730. </ws-form-item>
  731. <!--热损伤(%)<=-->
  732. <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
  733. <ws-input
  734. v-model="deptBudgetList.warehouseInOutDetail.jiaorenli"
  735. type="number"
  736. @mousewheel.native.prevent
  737. placeholder="请输入热损伤占比"
  738. maxlength="40"
  739. size="small"
  740. />
  741. </ws-form-item>
  742. <!--不完善粒(%)<=-->
  743. <ws-form-item label="不完善粒(%)" span="1" prop="imperfectGrain">
  744. <ws-input
  745. v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
  746. type="number"
  747. @mousewheel.native.prevent
  748. placeholder="请输入不完善粒占比"
  749. maxlength="40"
  750. size="small"
  751. />
  752. </ws-form-item>
  753. </ws-info-table>
  754. </div>
  755. <div style="text-align: right; padding: 10px">
  756. <el-button
  757. class="bg-bottom-up"
  758. type="primary"
  759. size="small"
  760. @click="temporaryStorage()"
  761. >暂存</el-button
  762. >
  763. <el-button
  764. class="bg-bottom-up"
  765. type="primary"
  766. size="small"
  767. @click="submit()"
  768. >提交</el-button
  769. >
  770. </div>
  771. </ws-form>
  772. <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'>
  773. <img style='position:absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);height:80%;' :src="img" alt="">
  774. </div>
  775. </div>
  776. </template>
  777. <script>
  778. import {
  779. pullDown,
  780. addstorageputList,
  781. xialaNo,
  782. getstaff,
  783. getReceiptTaskNo,
  784. } from '@/model/warehouse/index'
  785. import Pagination from '@/components/Pagination'
  786. import WsUpload from '@/components/WsUpload'
  787. // import { dayjs, fmoney, EventBus } from 'base-core-lib'
  788. import { dayjs, EventBus } from 'base-core-lib'
  789. export default {
  790. name: 'viewSpareMoney',
  791. components: {
  792. WsUpload,
  793. Pagination,
  794. },
  795. watch: {
  796. // vesselId(val) {
  797. // this.getList()
  798. // },
  799. isShow(val) {
  800. this.showType = val
  801. },
  802. },
  803. data() {
  804. return {
  805. qualityInspectorList:[],
  806. isGetCost:false,
  807. isSelectType:true,
  808. //弹出框
  809. dialogViewSpareMoney: false,
  810. dialogApproveFormVisible: false,
  811. // 船舶类型
  812. monetaryKey: null,
  813. // 表格显示数据
  814. tableDate: [],
  815. // 是否显示
  816. showType: true,
  817. typeList: ['干粮', '潮粮'],
  818. // 年
  819. year: '',
  820. carstatus: false,
  821. deptBudgetTotal: 0,
  822. currentPage: 1,
  823. pageSize: 10,
  824. searchType: 1,
  825. searchKeyWord: '',
  826. contractType: 2,
  827. startDate: null,
  828. endDate: null,
  829. goodnameList: {},
  830. checked: true,
  831. agent: [],
  832. staffList: [],
  833. options: [],
  834. options1: [],
  835. options2: [],
  836. multiSelector: [
  837. {
  838. name: '汽运',
  839. value: '0',
  840. },
  841. {
  842. name: '火运',
  843. value: '1',
  844. },
  845. {
  846. name: '集装箱船',
  847. value: '2',
  848. },
  849. {
  850. name: '散船',
  851. value: '3',
  852. },
  853. ],
  854. outContractNo1: [],
  855. outContractNo: [],
  856. // 提交类型
  857. submitType: true,
  858. storageType: [],
  859. deliveryType: [],
  860. readonly: true,
  861. appendixIdsAdd: '',
  862. uploadSuccess: {},
  863. onChange: {},
  864. img:'',
  865. imgshow:false,
  866. gradeList: [],
  867. rules: {
  868. netWeight: [
  869. {
  870. required: true,
  871. type: 'number',
  872. message: '请输入活动名称',
  873. trigger: 'blur',
  874. },
  875. ],
  876. },
  877. size: 10,
  878. disabled1: true,
  879. disabled2: true,
  880. tranCarInfoList: [],
  881. compId: localStorage.getItem('ws-pf_compId'),
  882. deptCircularPage: {},
  883. packtypeList: {},
  884. date: {
  885. year: dayjs().format('YYYY'),
  886. month: dayjs().format('MM'),
  887. },
  888. contractList: [],
  889. deptBudgetList: {
  890. type: '干粮',
  891. freight: 0,
  892. cost: '',
  893. addressUrl:'',
  894. warehouseInOutDetail: {},
  895. deductionAmount:0,
  896. },
  897. historyList: [],
  898. cost:'',
  899. pickerBeginDateBefore: {
  900. disabledDate: (time) => {
  901. return time.getTime() > Date.now()
  902. },
  903. },
  904. accessoryTFs: false,
  905. deptBudgetList1:[],
  906. }
  907. },
  908. mounted() {
  909. this.deptBudgetList.baseId = this.$route.query.baseId
  910. this.deptBudgetList.positionId = this.$route.query.positionId
  911. this.deptBudgetList.warehouseName = this.$route.query.warehouseName
  912. this.deptBudgetList.binNumber = this.$route.query.binNumber
  913. this.deptBudgetList.warehouseType = this.$route.query.warehouseType
  914. this.deptBudgetList.createType = this.$route.query.createType
  915. this.getList()
  916. this.deptBudgetList.grade = '一等品'
  917. this.deptBudgetList.gradeKey = '1'
  918. this.deptBudgetList.inOutTypeFlag=1
  919. if(this.deptBudgetList.cost){
  920. if(this.deptBudgetList.cost>this.deptBudgetList.deductionAmount){
  921. this.deptBudgetList.cost = this.cost - this.deptBudgetList.deductionAmount
  922. }
  923. else{
  924. }
  925. }
  926. // if (this.deptBudgetList.warehouseType == 1) {
  927. // // this.deptBudgetList.inOutType = '采购入库'
  928. // this.deptBudgetList.inOutTypeKey = '1'
  929. // } else {
  930. // // this.deptBudgetList.inOutType = '退库'
  931. // this.deptBudgetList.inOutTypeKey = '1'
  932. // }
  933. },
  934. methods: {
  935. imgBig(item){
  936. console.log(item)
  937. this.img=item
  938. this.imgshow=true
  939. },
  940. qualityInspectorChange(e){
  941. console.log(e)
  942. },
  943. kkInput(val){
  944. console.log(val)
  945. if(this.isGetCost){
  946. if(this.deptBudgetList.cost>val){
  947. this.deptBudgetList.cost = this.cost - this.deptBudgetList.deductionAmount
  948. }
  949. }
  950. },
  951. uploadSuccessHandle1(res) {
  952. this.deptBudgetList.addressUrl = res.url
  953. console.log(this.deptBudgetList.addressUrl)
  954. },
  955. dataFilter1(val) {
  956. console.log(val)
  957. this.deptBudgetList.contractNo = val
  958. if (val) {
  959. //val存在
  960. this.options1 = this.outContractNo1.filter((item) => {
  961. if (
  962. !!~item.contractNo.indexOf(val) ||
  963. !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())
  964. ) {
  965. return true
  966. }
  967. })
  968. } else {
  969. //val为空时,还原数组
  970. this.options1 = this.outContractNo
  971. }
  972. },
  973. dataFilter2(val) {
  974. this.deptBudgetList.carNo = val
  975. if (val) {
  976. //val存在
  977. this.options1 = this.outContractNo1.filter((item) => {
  978. if (
  979. !!~item.carNo.indexOf(val) ||
  980. !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())
  981. ) {
  982. return true
  983. }
  984. })
  985. } else {
  986. //val为空时,还原数组
  987. this.options2 = this.tranCarInfoList
  988. }
  989. },
  990. editClick(status) {
  991. this.isGetCost = false
  992. if (status == 1) {
  993. this.disabled1 = !this.disabled1
  994. } else {
  995. this.disabled2 = !this.disabled2
  996. }
  997. },
  998. //返回按钮
  999. revert() {
  1000. this.$router.go(-1)
  1001. },
  1002. carChange(e) {
  1003. for (let i = 0; i < this.tranCarInfoList.length; i++) {
  1004. if (this.tranCarInfoList[i].carNo == this.deptBudgetList.carNo) {
  1005. this.deptBudgetList.tranCarNo=this.tranCarInfoList[i].tranCarNo
  1006. this.deptBudgetList.freight = this.tranCarInfoList[i].tranPrice
  1007. }
  1008. if(this.deptBudgetList.inOutType=='移库入库'){
  1009. if(!this.deptBudgetList.cost){
  1010. this.deptBudgetList.cost=this.tranCarInfoList[i].cost
  1011. }
  1012. this.deptBudgetList.loadNetWeight=this.tranCarInfoList[i].loadNetWeight
  1013. }
  1014. }
  1015. },
  1016. dataFilter(val) {
  1017. // console.log(val,"名")
  1018. this.deptBudgetList.staffList = val
  1019. if (val) {
  1020. //val存在
  1021. this.options = this.staffList.filter((item) => {
  1022. if (
  1023. !!~item.staffName.indexOf(val) ||
  1024. !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
  1025. ) {
  1026. return true
  1027. }
  1028. })
  1029. } else {
  1030. //val为空时,还原数组
  1031. this.options = this.staffList
  1032. }
  1033. },
  1034. selectstaff(e) {
  1035. for (var i = 0; i < this.staffList.length; i++) {
  1036. if (this.staffList[i].staffName == e) {
  1037. this.deptBudgetList.personChargeKey = this.staffList[i].staffId
  1038. }
  1039. }
  1040. },
  1041. //提交按钮
  1042. submit() {
  1043. if (!this.deptBudgetList.goodsName) {
  1044. this.$message({
  1045. message: '货名不能为空',
  1046. type: 'warning',
  1047. })
  1048. return
  1049. }
  1050. if (!this.deptBudgetList.grossWeight) {
  1051. this.$message({
  1052. message: '毛重不能为空',
  1053. type: 'warning',
  1054. })
  1055. return
  1056. }
  1057. if (
  1058. this.deptBudgetList.grossWeight < 0 ||
  1059. this.deptBudgetList.grossWeight > 10000 ||
  1060. (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
  1061. String(this.deptBudgetList.grossWeight).length -
  1062. (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
  1063. 3)
  1064. ) {
  1065. this.$message({
  1066. message: '毛重输入错误',
  1067. type: 'warning',
  1068. })
  1069. return
  1070. }
  1071. if (!this.deptBudgetList.tare) {
  1072. this.$message({
  1073. message: '皮重不能为空',
  1074. type: 'warning',
  1075. })
  1076. return
  1077. }
  1078. if (
  1079. this.deptBudgetList.tare < 0 ||
  1080. this.deptBudgetList.tare > 10000 ||
  1081. (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
  1082. String(this.deptBudgetList.tare).length -
  1083. (String(this.deptBudgetList.tare).indexOf('.') + 1) >
  1084. 3)
  1085. ) {
  1086. this.$message({
  1087. message: '皮重输入错误',
  1088. type: 'warning',
  1089. })
  1090. return
  1091. }
  1092. if (!this.deptBudgetList.deductionWeight) {
  1093. this.$message({
  1094. message: '扣重不能为空',
  1095. type: 'warning',
  1096. })
  1097. return
  1098. }
  1099. if (
  1100. this.deptBudgetList.deductionWeight < 0 ||
  1101. this.deptBudgetList.deductionWeight > 10 ||
  1102. (String(this.deptBudgetList.deductionWeight).indexOf('.') != -1 &&
  1103. String(this.deptBudgetList.deductionWeight).length -
  1104. (String(this.deptBudgetList.deductionWeight).indexOf('.') + 1) >
  1105. 3)
  1106. ) {
  1107. this.$message({
  1108. message: '扣重输入错误',
  1109. type: 'warning',
  1110. })
  1111. return
  1112. }
  1113. if (
  1114. this.deptBudgetList.type == '潮粮' &&
  1115. !this.deptBudgetList.buckleWeightRatio
  1116. ) {
  1117. this.$message({
  1118. message: '扣重比不能为空',
  1119. type: 'warning',
  1120. })
  1121. return
  1122. }
  1123. if (
  1124. (this.deptBudgetList.type == '潮粮' &&
  1125. this.deptBudgetList.buckleWeightRatio < 0) ||
  1126. (this.deptBudgetList.type == '潮粮' &&
  1127. this.deptBudgetList.buckleWeightRatio > 3) ||
  1128. (this.deptBudgetList.type == '潮粮' &&
  1129. String(this.deptBudgetList.buckleWeightRatio).indexOf('.') != -1 &&
  1130. String(this.deptBudgetList.buckleWeightRatio).length -
  1131. (String(this.deptBudgetList.buckleWeightRatio).indexOf('.') + 1) >
  1132. 2)
  1133. ) {
  1134. this.$message({
  1135. message: '扣重比输入错误',
  1136. type: 'warning',
  1137. })
  1138. return
  1139. }
  1140. if (
  1141. this.deptBudgetList.type == '潮粮' &&
  1142. !this.deptBudgetList.tidalGrainWater
  1143. ) {
  1144. this.$message({
  1145. message: '潮粮水分不能为空',
  1146. type: 'warning',
  1147. })
  1148. return
  1149. }
  1150. if (
  1151. (this.deptBudgetList.type == '潮粮' &&
  1152. this.deptBudgetList.tidalGrainWater < 1) ||
  1153. (this.deptBudgetList.type == '潮粮' &&
  1154. this.deptBudgetList.tidalGrainWater > 40) ||
  1155. (this.deptBudgetList.type == '潮粮' &&
  1156. String(this.deptBudgetList.tidalGrainWater).indexOf('.') != -1 &&
  1157. String(this.deptBudgetList.tidalGrainWater).length -
  1158. (String(this.deptBudgetList.tidalGrainWater).indexOf('.') + 1) >
  1159. 2)
  1160. ) {
  1161. this.$message({
  1162. message: '潮粮水分输入错误',
  1163. type: 'warning',
  1164. })
  1165. return
  1166. }
  1167. if (
  1168. this.deptBudgetList.type == '潮粮' &&
  1169. !this.deptBudgetList.solidGrainWater
  1170. ) {
  1171. this.$message({
  1172. message: '干粮水分不能为空',
  1173. type: 'warning',
  1174. })
  1175. return
  1176. }
  1177. if (
  1178. (this.deptBudgetList.type == '潮粮' &&
  1179. this.deptBudgetList.solidGrainWater < 1) ||
  1180. (this.deptBudgetList.type == '潮粮' &&
  1181. this.deptBudgetList.solidGrainWater > 40) ||
  1182. (this.deptBudgetList.type == '潮粮' &&
  1183. String(this.deptBudgetList.solidGrainWater).indexOf('.') != -1 &&
  1184. String(this.deptBudgetList.solidGrainWater).length -
  1185. (String(this.deptBudgetList.solidGrainWater).indexOf('.') + 1) >
  1186. 1)
  1187. ) {
  1188. this.$message({
  1189. message: '干粮水分输入错误',
  1190. type: 'warning',
  1191. })
  1192. return
  1193. }
  1194. if (!String(this.deptBudgetList.deductionAmount)) {
  1195. this.$message({
  1196. message: '扣款不能为空',
  1197. type: 'warning',
  1198. })
  1199. return
  1200. }
  1201. if (
  1202. this.deptBudgetList.deductionAmount < 0 ||
  1203. this.deptBudgetList.deductionAmount > 10000 ||
  1204. (String(this.deptBudgetList.deductionAmount).indexOf('.') != -1 &&
  1205. String(this.deptBudgetList.deductionAmount).length -
  1206. (String(this.deptBudgetList.deductionAmount).indexOf('.') + 1) >
  1207. 2)
  1208. ) {
  1209. this.$message({
  1210. message: '扣款输入错误',
  1211. type: 'warning',
  1212. })
  1213. return
  1214. }
  1215. if (!this.deptBudgetList.cost) {
  1216. this.$message({
  1217. message: '未获取到成本,请编辑后提交',
  1218. type: 'warning',
  1219. })
  1220. return
  1221. }
  1222. if (
  1223. this.deptBudgetList.cost < 0 ||
  1224. this.deptBudgetList.cost > 20000 ||
  1225. (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
  1226. String(this.deptBudgetList.cost).length -
  1227. (String(this.deptBudgetList.cost).indexOf('.') + 1) >
  1228. 2)
  1229. ) {
  1230. this.$message({
  1231. message: '成本输入错误',
  1232. type: 'warning',
  1233. })
  1234. return
  1235. }
  1236. if (!String(this.deptBudgetList.freight)) {
  1237. this.$message({
  1238. message: '运费不能为空',
  1239. type: 'warning',
  1240. })
  1241. return
  1242. }
  1243. if (
  1244. this.deptBudgetList.freight < 0 ||
  1245. this.deptBudgetList.freight > 100000 ||
  1246. (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
  1247. String(this.deptBudgetList.freight).length -
  1248. (String(this.deptBudgetList.freight).indexOf('.') + 1) >
  1249. 2)
  1250. ) {
  1251. this.$message({
  1252. message: '运费输入错误',
  1253. type: 'warning',
  1254. })
  1255. return
  1256. }
  1257. if (!this.deptBudgetList.agent) {
  1258. this.$message({
  1259. message: '经办人不能为空',
  1260. type: 'warning',
  1261. })
  1262. return
  1263. }
  1264. if (
  1265. this.deptBudgetList.agent.length < 2 ||
  1266. this.deptBudgetList.agent.length > 10
  1267. ) {
  1268. this.$message({
  1269. message: '经办人输入有误',
  1270. type: 'warning',
  1271. })
  1272. return
  1273. }
  1274. if (!this.deptBudgetList.grade) {
  1275. this.$message({
  1276. message: '品级不能为空!',
  1277. type: 'warning',
  1278. })
  1279. return
  1280. }
  1281. if (!this.deptBudgetList.inOutDate) {
  1282. this.$message({
  1283. message: '入库日期不能为空!',
  1284. type: 'warning',
  1285. })
  1286. return
  1287. }
  1288. if (!this.deptBudgetList.inOutType) {
  1289. this.$message({
  1290. message: '入库类型不能为空!',
  1291. type: 'warning',
  1292. })
  1293. return
  1294. }
  1295. if (!this.deptBudgetList.carNo) {
  1296. this.$message({
  1297. message: '车牌号不能为空',
  1298. type: 'warning',
  1299. })
  1300. return
  1301. }
  1302. if (this.deptBudgetList.carNo.length > 7) {
  1303. this.$message({
  1304. message: '车牌号输入错误,请输入7个字符之内',
  1305. type: 'warning',
  1306. })
  1307. return
  1308. }
  1309. if (this.deptBudgetList.boxNo&&this.deptBudgetList.boxNo.length > 20) {
  1310. this.$message({
  1311. message: '箱号-1输入错误',
  1312. type: 'warning',
  1313. })
  1314. return
  1315. }
  1316. if (this.deptBudgetList.boxNoOther&&this.deptBudgetList.boxNoOther.length > 20) {
  1317. this.$message({
  1318. message: '箱号-2输入错误',
  1319. type: 'warning',
  1320. })
  1321. return
  1322. }
  1323. if (this.deptBudgetList.titleNo&&this.deptBudgetList.titleNo.length > 20) {
  1324. this.$message({
  1325. message: '封号-1输入错误',
  1326. type: 'warning',
  1327. })
  1328. return
  1329. }
  1330. if (this.deptBudgetList.titleNoOther&&this.deptBudgetList.titleNoOther.length > 20) {
  1331. this.$message({
  1332. message: '封号-2输入错误',
  1333. type: 'warning',
  1334. })
  1335. return
  1336. }
  1337. if (!this.deptBudgetList.contractNo) {
  1338. this.$message({
  1339. message: '合同编号不能为空',
  1340. type: 'warning',
  1341. })
  1342. return
  1343. }
  1344. // if (
  1345. // this.deptBudgetList.contractNo.length < 6 ||
  1346. // this.deptBudgetList.contractNo.length > 20
  1347. // ) {
  1348. // this.$message({
  1349. // message: '合同编号长度不符合要求,请输入6-20个字符之内',
  1350. // type: 'warning',
  1351. // })
  1352. // return
  1353. // }
  1354. if (!this.deptBudgetList.addressUrl) {
  1355. this.$message({
  1356. message: '附件不能为空',
  1357. type: 'warning',
  1358. })
  1359. return
  1360. }
  1361. //自检员
  1362. if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
  1363. if (
  1364. this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
  1365. 2 ||
  1366. this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
  1367. ) {
  1368. this.$message({
  1369. message: '质检员姓名长度错误!',
  1370. type: 'warning',
  1371. })
  1372. return
  1373. }
  1374. }
  1375. if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
  1376. if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
  1377. this.$message({
  1378. message: '水分(%)非数字!',
  1379. type: 'warning',
  1380. })
  1381. return
  1382. }
  1383. if (
  1384. this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
  1385. this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
  1386. (String(
  1387. this.deptBudgetList.warehouseInOutDetail.waterContent
  1388. ).indexOf('.') != -1 &&
  1389. String(this.deptBudgetList.warehouseInOutDetail.waterContent)
  1390. .length -
  1391. (String(
  1392. this.deptBudgetList.warehouseInOutDetail.waterContent
  1393. ).indexOf('.') +
  1394. 1) >
  1395. 2)
  1396. ) {
  1397. this.$message({
  1398. message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1399. type: 'warning',
  1400. })
  1401. return
  1402. }
  1403. }
  1404. //杂质
  1405. if (this.deptBudgetList.warehouseInOutDetail.impurity) {
  1406. if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
  1407. this.$message({
  1408. message: '杂质(%)非数字!',
  1409. type: 'warning',
  1410. })
  1411. return
  1412. }
  1413. if (
  1414. this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
  1415. this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
  1416. (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
  1417. '.'
  1418. ) != -1 &&
  1419. String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
  1420. (String(
  1421. this.deptBudgetList.warehouseInOutDetail.impurity
  1422. ).indexOf('.') +
  1423. 1) >
  1424. 2)
  1425. ) {
  1426. this.$message({
  1427. message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1428. type: 'warning',
  1429. })
  1430. return
  1431. }
  1432. }
  1433. //霉变
  1434. if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
  1435. if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
  1436. this.$message({
  1437. message: '霉变粒(%)非数字!',
  1438. type: 'warning',
  1439. })
  1440. return
  1441. }
  1442. if (
  1443. this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
  1444. this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
  1445. (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
  1446. '.'
  1447. ) != -1 &&
  1448. String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
  1449. .length -
  1450. (String(
  1451. this.deptBudgetList.warehouseInOutDetail.mildewGrain
  1452. ).indexOf('.') +
  1453. 1) >
  1454. 2)
  1455. ) {
  1456. this.$message({
  1457. message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1458. type: 'warning',
  1459. })
  1460. return
  1461. }
  1462. }
  1463. //热损伤
  1464. if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
  1465. if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
  1466. this.$message({
  1467. message: '热损伤(%)非数字!',
  1468. type: 'warning',
  1469. })
  1470. return
  1471. }
  1472. if (
  1473. this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
  1474. this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
  1475. (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
  1476. '.'
  1477. ) != -1 &&
  1478. String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
  1479. (String(
  1480. this.deptBudgetList.warehouseInOutDetail.jiaorenli
  1481. ).indexOf('.') +
  1482. 1) >
  1483. 2)
  1484. ) {
  1485. this.$message({
  1486. message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1487. type: 'warning',
  1488. })
  1489. return
  1490. }
  1491. }
  1492. //不完善粒(%)
  1493. if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
  1494. if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
  1495. this.$message({
  1496. message: '不完善粒(%)非数字!',
  1497. type: 'warning',
  1498. })
  1499. return
  1500. }
  1501. if (
  1502. this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
  1503. this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
  1504. (String(
  1505. this.deptBudgetList.warehouseInOutDetail.imperfectGrain
  1506. ).indexOf('.') != -1 &&
  1507. String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
  1508. .length -
  1509. (String(
  1510. this.deptBudgetList.warehouseInOutDetail.imperfectGrain
  1511. ).indexOf('.') +
  1512. 1) >
  1513. 2)
  1514. ) {
  1515. this.$message({
  1516. message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1517. type: 'warning',
  1518. })
  1519. return
  1520. }
  1521. }
  1522. //容重
  1523. if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
  1524. if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
  1525. this.$message({
  1526. message: '容重(克/升)非数字!',
  1527. type: 'warning',
  1528. })
  1529. return
  1530. }
  1531. if (
  1532. (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
  1533. String(
  1534. this.deptBudgetList.warehouseInOutDetail.bulkDensity
  1535. ).indexOf('.') != -1 &&
  1536. String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
  1537. .length -
  1538. (String(
  1539. this.deptBudgetList.warehouseInOutDetail.bulkDensity
  1540. ).indexOf('.') +
  1541. 1) >
  1542. 2) ||
  1543. this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 ||
  1544. this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
  1545. ) {
  1546. this.$message({
  1547. message: '容重输入错误',
  1548. type: 'warning',
  1549. })
  1550. return
  1551. }
  1552. }
  1553. console.log(this.deptBudgetList, '入库对象')
  1554. this.deptBudgetList.id = this.$route.query.id
  1555. this.$confirm(`确定提交入库信息`, {
  1556. cancelButtonText: '取消',
  1557. confirmButtonText: '确定',
  1558. type: 'warning',
  1559. })
  1560. .then(() => {
  1561. this.$refs.deptBudgetList.validate((valid) => {
  1562. if (valid) {
  1563. this.deptBudgetList.compId =
  1564. localStorage.getItem('ws-pf_compId')
  1565. this.deptBudgetList.inOutFlag = 2
  1566. this.deptBudgetList.pcFlag = 1
  1567. this.deptBudgetList.statusFlag = 3
  1568. addstorageputList(this.deptBudgetList)
  1569. .toPromise()
  1570. .then((response) => {
  1571. this.$message.success('添加成功')
  1572. this.$router.go(-1)
  1573. })
  1574. } else {
  1575. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1576. return false
  1577. }
  1578. })
  1579. })
  1580. .catch(() => {
  1581. return false
  1582. })
  1583. },
  1584. temporaryStorage() {
  1585. if (!this.deptBudgetList.goodsName) {
  1586. this.$message({
  1587. message: '货名不能为空',
  1588. type: 'warning',
  1589. })
  1590. return
  1591. }
  1592. if (!this.deptBudgetList.grossWeight) {
  1593. this.$message({
  1594. message: '毛重不能为空',
  1595. type: 'warning',
  1596. })
  1597. return
  1598. }
  1599. if (
  1600. this.deptBudgetList.grossWeight < 0 ||
  1601. this.deptBudgetList.grossWeight > 10000 ||
  1602. (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
  1603. String(this.deptBudgetList.grossWeight).length -
  1604. (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
  1605. 3)
  1606. ) {
  1607. this.$message({
  1608. message: '毛重输入错误',
  1609. type: 'warning',
  1610. })
  1611. return
  1612. }
  1613. if (!this.deptBudgetList.tare) {
  1614. this.$message({
  1615. message: '皮重不能为空',
  1616. type: 'warning',
  1617. })
  1618. return
  1619. }
  1620. if (
  1621. this.deptBudgetList.tare < 0 ||
  1622. this.deptBudgetList.tare > 10000 ||
  1623. (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
  1624. String(this.deptBudgetList.tare).length -
  1625. (String(this.deptBudgetList.tare).indexOf('.') + 1) >
  1626. 3)
  1627. ) {
  1628. this.$message({
  1629. message: '皮重输入错误',
  1630. type: 'warning',
  1631. })
  1632. return
  1633. }
  1634. if (!this.deptBudgetList.deductionWeight) {
  1635. this.$message({
  1636. message: '扣重不能为空',
  1637. type: 'warning',
  1638. })
  1639. return
  1640. }
  1641. if (
  1642. this.deptBudgetList.deductionWeight < 0 ||
  1643. this.deptBudgetList.deductionWeight > 10 ||
  1644. (String(this.deptBudgetList.deductionWeight).indexOf('.') != -1 &&
  1645. String(this.deptBudgetList.deductionWeight).length -
  1646. (String(this.deptBudgetList.deductionWeight).indexOf('.') + 1) >
  1647. 3)
  1648. ) {
  1649. this.$message({
  1650. message: '扣重输入错误',
  1651. type: 'warning',
  1652. })
  1653. return
  1654. }
  1655. if (
  1656. this.deptBudgetList.type == '潮粮' &&
  1657. !this.deptBudgetList.buckleWeightRatio
  1658. ) {
  1659. this.$message({
  1660. message: '扣重比不能为空',
  1661. type: 'warning',
  1662. })
  1663. return
  1664. }
  1665. if (
  1666. (this.deptBudgetList.type == '潮粮' &&
  1667. this.deptBudgetList.buckleWeightRatio < 0) ||
  1668. (this.deptBudgetList.type == '潮粮' &&
  1669. this.deptBudgetList.buckleWeightRatio > 3) ||
  1670. (this.deptBudgetList.type == '潮粮' &&
  1671. String(this.deptBudgetList.buckleWeightRatio).indexOf('.') != -1 &&
  1672. String(this.deptBudgetList.buckleWeightRatio).length -
  1673. (String(this.deptBudgetList.buckleWeightRatio).indexOf('.') + 1) >
  1674. 2)
  1675. ) {
  1676. this.$message({
  1677. message: '扣重比输入错误',
  1678. type: 'warning',
  1679. })
  1680. return
  1681. }
  1682. if (
  1683. this.deptBudgetList.type == '潮粮' &&
  1684. !this.deptBudgetList.tidalGrainWater
  1685. ) {
  1686. this.$message({
  1687. message: '潮粮水分不能为空',
  1688. type: 'warning',
  1689. })
  1690. return
  1691. }
  1692. if (
  1693. (this.deptBudgetList.type == '潮粮' &&
  1694. this.deptBudgetList.tidalGrainWater < 1) ||
  1695. (this.deptBudgetList.type == '潮粮' &&
  1696. this.deptBudgetList.tidalGrainWater > 40) ||
  1697. (this.deptBudgetList.type == '潮粮' &&
  1698. String(this.deptBudgetList.tidalGrainWater).indexOf('.') != -1 &&
  1699. String(this.deptBudgetList.tidalGrainWater).length -
  1700. (String(this.deptBudgetList.tidalGrainWater).indexOf('.') + 1) >
  1701. 2)
  1702. ) {
  1703. this.$message({
  1704. message: '潮粮水分输入错误',
  1705. type: 'warning',
  1706. })
  1707. return
  1708. }
  1709. if (
  1710. this.deptBudgetList.type == '潮粮' &&
  1711. !this.deptBudgetList.solidGrainWater
  1712. ) {
  1713. this.$message({
  1714. message: '干粮水分不能为空',
  1715. type: 'warning',
  1716. })
  1717. return
  1718. }
  1719. if (
  1720. (this.deptBudgetList.type == '潮粮' &&
  1721. this.deptBudgetList.solidGrainWater < 1) ||
  1722. (this.deptBudgetList.type == '潮粮' &&
  1723. this.deptBudgetList.solidGrainWater > 40) ||
  1724. (this.deptBudgetList.type == '潮粮' &&
  1725. String(this.deptBudgetList.solidGrainWater).indexOf('.') != -1 &&
  1726. String(this.deptBudgetList.solidGrainWater).length -
  1727. (String(this.deptBudgetList.solidGrainWater).indexOf('.') + 1) >
  1728. 1)
  1729. ) {
  1730. this.$message({
  1731. message: '干粮水分输入错误',
  1732. type: 'warning',
  1733. })
  1734. return
  1735. }
  1736. if (!this.deptBudgetList.deductionAmount) {
  1737. this.$message({
  1738. message: '扣款不能为空',
  1739. type: 'warning',
  1740. })
  1741. return
  1742. }
  1743. if (
  1744. this.deptBudgetList.deductionAmount < 0 ||
  1745. this.deptBudgetList.deductionAmount > 10000 ||
  1746. (String(this.deptBudgetList.deductionAmount).indexOf('.') != -1 &&
  1747. String(this.deptBudgetList.deductionAmount).length -
  1748. (String(this.deptBudgetList.deductionAmount).indexOf('.') + 1) >
  1749. 2)
  1750. ) {
  1751. this.$message({
  1752. message: '扣款输入错误',
  1753. type: 'warning',
  1754. })
  1755. return
  1756. }
  1757. if (!this.deptBudgetList.cost) {
  1758. this.$message({
  1759. message: '未获取到成本,请编辑后提交',
  1760. type: 'warning',
  1761. })
  1762. return
  1763. }
  1764. if (
  1765. this.deptBudgetList.cost < 0 ||
  1766. this.deptBudgetList.cost > 20000 ||
  1767. (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
  1768. String(this.deptBudgetList.cost).length -
  1769. (String(this.deptBudgetList.cost).indexOf('.') + 1) >
  1770. 2)
  1771. ) {
  1772. this.$message({
  1773. message: '成本输入错误',
  1774. type: 'warning',
  1775. })
  1776. return
  1777. }
  1778. if (!this.deptBudgetList.freight) {
  1779. this.$message({
  1780. message: '运费不能为空',
  1781. type: 'warning',
  1782. })
  1783. return
  1784. }
  1785. if (
  1786. this.deptBudgetList.freight < 0 ||
  1787. this.deptBudgetList.freight > 100000 ||
  1788. (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
  1789. String(this.deptBudgetList.freight).length -
  1790. (String(this.deptBudgetList.freight).indexOf('.') + 1) >
  1791. 2)
  1792. ) {
  1793. this.$message({
  1794. message: '运费输入错误',
  1795. type: 'warning',
  1796. })
  1797. return
  1798. }
  1799. if (!this.deptBudgetList.agent) {
  1800. this.$message({
  1801. message: '经办人不能为空',
  1802. type: 'warning',
  1803. })
  1804. return
  1805. }
  1806. if (
  1807. this.deptBudgetList.agent.length < 2 ||
  1808. this.deptBudgetList.agent.length > 10
  1809. ) {
  1810. this.$message({
  1811. message: '经办人输入有误',
  1812. type: 'warning',
  1813. })
  1814. return
  1815. }
  1816. // if (!this.deptBudgetList.carNo) {
  1817. // this.$message({
  1818. // message: '车牌号不能为空',
  1819. // type: 'warning'
  1820. // })
  1821. // return
  1822. // }
  1823. // if (this.deptBudgetList.carNo.length > 7) {
  1824. // this.$message({
  1825. // message: '车牌号输入错误,请输入7个字符之内',
  1826. // type: 'warning'
  1827. // })
  1828. // return
  1829. // }
  1830. if (!this.deptBudgetList.contractNo) {
  1831. this.$message({
  1832. message: '合同编号不能为空',
  1833. type: 'warning',
  1834. })
  1835. return
  1836. }
  1837. // if (
  1838. // this.deptBudgetList.contractNo.length < 6 ||
  1839. // this.deptBudgetList.contractNo.length > 20
  1840. // ) {
  1841. // this.$message({
  1842. // message: '合同编号长度不符合要求,请输入6-20个字符之内',
  1843. // type: 'warning',
  1844. // })
  1845. // return
  1846. // }
  1847. // if (this.deptBudgetList.netWeight > this.$route.query.capacity) {
  1848. // this.$message({
  1849. // message: '入库量大于该仓库容量!',
  1850. // type: 'warning',
  1851. // })
  1852. // return
  1853. // }
  1854. //自检员
  1855. if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
  1856. if (
  1857. this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
  1858. 2 ||
  1859. this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
  1860. ) {
  1861. this.$message({
  1862. message: '质检员姓名长度错误!',
  1863. type: 'warning',
  1864. })
  1865. return
  1866. }
  1867. }
  1868. if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
  1869. if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
  1870. this.$message({
  1871. message: '水分(%)非数字!',
  1872. type: 'warning',
  1873. })
  1874. return
  1875. }
  1876. if (
  1877. this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
  1878. this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
  1879. (String(
  1880. this.deptBudgetList.warehouseInOutDetail.waterContent
  1881. ).indexOf('.') != -1 &&
  1882. String(this.deptBudgetList.warehouseInOutDetail.waterContent)
  1883. .length -
  1884. (String(
  1885. this.deptBudgetList.warehouseInOutDetail.waterContent
  1886. ).indexOf('.') +
  1887. 1) >
  1888. 2)
  1889. ) {
  1890. this.$message({
  1891. message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1892. type: 'warning',
  1893. })
  1894. return
  1895. }
  1896. }
  1897. //杂质
  1898. if (this.deptBudgetList.warehouseInOutDetail.impurity) {
  1899. if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
  1900. this.$message({
  1901. message: '杂质(%)非数字!',
  1902. type: 'warning',
  1903. })
  1904. return
  1905. }
  1906. if (
  1907. this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
  1908. this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
  1909. (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
  1910. '.'
  1911. ) != -1 &&
  1912. String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
  1913. (String(
  1914. this.deptBudgetList.warehouseInOutDetail.impurity
  1915. ).indexOf('.') +
  1916. 1) >
  1917. 2)
  1918. ) {
  1919. this.$message({
  1920. message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1921. type: 'warning',
  1922. })
  1923. return
  1924. }
  1925. }
  1926. //霉变
  1927. if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
  1928. if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
  1929. this.$message({
  1930. message: '霉变粒(%)非数字!',
  1931. type: 'warning',
  1932. })
  1933. return
  1934. }
  1935. if (
  1936. this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
  1937. this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
  1938. (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
  1939. '.'
  1940. ) != -1 &&
  1941. String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
  1942. .length -
  1943. (String(
  1944. this.deptBudgetList.warehouseInOutDetail.mildewGrain
  1945. ).indexOf('.') +
  1946. 1) >
  1947. 2)
  1948. ) {
  1949. this.$message({
  1950. message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1951. type: 'warning',
  1952. })
  1953. return
  1954. }
  1955. }
  1956. //热损伤
  1957. if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
  1958. if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
  1959. this.$message({
  1960. message: '热损伤(%)非数字!',
  1961. type: 'warning',
  1962. })
  1963. return
  1964. }
  1965. if (
  1966. this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
  1967. this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
  1968. (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
  1969. '.'
  1970. ) != -1 &&
  1971. String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
  1972. (String(
  1973. this.deptBudgetList.warehouseInOutDetail.jiaorenli
  1974. ).indexOf('.') +
  1975. 1) >
  1976. 2)
  1977. ) {
  1978. this.$message({
  1979. message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1980. type: 'warning',
  1981. })
  1982. return
  1983. }
  1984. }
  1985. //不完善粒(%)
  1986. if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
  1987. if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
  1988. this.$message({
  1989. message: '不完善粒(%)非数字!',
  1990. type: 'warning',
  1991. })
  1992. return
  1993. }
  1994. if (
  1995. this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
  1996. this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
  1997. (String(
  1998. this.deptBudgetList.warehouseInOutDetail.imperfectGrain
  1999. ).indexOf('.') != -1 &&
  2000. String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
  2001. .length -
  2002. (String(
  2003. this.deptBudgetList.warehouseInOutDetail.imperfectGrain
  2004. ).indexOf('.') +
  2005. 1) >
  2006. 2)
  2007. ) {
  2008. this.$message({
  2009. message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  2010. type: 'warning',
  2011. })
  2012. return
  2013. }
  2014. }
  2015. //容重
  2016. if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
  2017. if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
  2018. this.$message({
  2019. message: '容重(克/升)非数字!',
  2020. type: 'warning',
  2021. })
  2022. return
  2023. }
  2024. if (
  2025. (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
  2026. String(
  2027. this.deptBudgetList.warehouseInOutDetail.bulkDensity
  2028. ).indexOf('.') != -1 &&
  2029. String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
  2030. .length -
  2031. (String(
  2032. this.deptBudgetList.warehouseInOutDetail.bulkDensity
  2033. ).indexOf('.') +
  2034. 1) >
  2035. 2) ||
  2036. this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 ||
  2037. this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
  2038. ) {
  2039. this.$message({
  2040. message: '容重输入错误',
  2041. type: 'warning',
  2042. })
  2043. return
  2044. }
  2045. }
  2046. this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
  2047. cancelButtonText: '取消',
  2048. confirmButtonText: '确定',
  2049. type: 'warning',
  2050. })
  2051. .then(() => {
  2052. this.$refs.deptBudgetList.validate((valid) => {
  2053. if (valid) {
  2054. this.deptBudgetList.compId =
  2055. localStorage.getItem('ws-pf_compId')
  2056. this.deptBudgetList.inOutFlag = 2
  2057. this.deptBudgetList.statusFlag = 1
  2058. let _data = JSON.parse(localStorage.getItem('winseaview-userInfo'))
  2059. this.deptBudgetList.backOffice = _data.content.showCompName+'-' +_data.content.staffName
  2060. addstorageputList(this.deptBudgetList)
  2061. .toPromise()
  2062. .then((response) => {
  2063. this.$message.success('暂存成功')
  2064. this.$router.go(-1)
  2065. })
  2066. } else {
  2067. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  2068. return false
  2069. }
  2070. })
  2071. })
  2072. .catch(() => {
  2073. return false
  2074. })
  2075. },
  2076. tarechange(e) {
  2077. if (
  2078. this.deptBudgetList.grossWeight &&
  2079. this.deptBudgetList.tare &&
  2080. this.deptBudgetList.deductionWeight
  2081. ) {
  2082. this.deptBudgetList.netWeight = Number(
  2083. this.deptBudgetList.grossWeight -
  2084. this.deptBudgetList.tare -
  2085. this.deptBudgetList.deductionWeight
  2086. ).toFixed(2)
  2087. }
  2088. },
  2089. grossWeightchange(e) {
  2090. if (
  2091. this.deptBudgetList.grossWeight &&
  2092. this.deptBudgetList.tare &&
  2093. this.deptBudgetList.deductionWeight
  2094. ) {
  2095. this.deptBudgetList.netWeight = Number(
  2096. this.deptBudgetList.grossWeight -
  2097. this.deptBudgetList.tare -
  2098. this.deptBudgetList.deductionWeight
  2099. ).toFixed(2)
  2100. }
  2101. },
  2102. contractNoChange(e) {
  2103. for (let i = 0; i < this.deptBudgetList1.length; i++) {
  2104. if (this.deptBudgetList1[i].inOutTaskNo == e) {
  2105. var data = this.deptBudgetList1[i]
  2106. if (this.deptBudgetList1[i].contractNo) {
  2107. this.deptBudgetList.contractNo = this.deptBudgetList1[i].contractNo
  2108. } else {
  2109. this.deptBudgetList.contractNo = this.deptBudgetList1[i].moveTaskNo
  2110. }
  2111. }
  2112. }
  2113. for (var i = 0; i < this.outContractNo.length; i++) {
  2114. if (this.outContractNo[i].contractNo == this.deptBudgetList.contractNo) {
  2115. if (this.outContractNo[i].inOutType == '采购入库') {
  2116. if(!this.outContractNo[i].unitContractPrice){
  2117. this.deptBudgetList.tips =
  2118. '卖方' +
  2119. this.outContractNo[i].seller
  2120. }else{
  2121. this.deptBudgetList.tips =
  2122. '卖方' +
  2123. this.outContractNo[i].seller +
  2124. '( ' +
  2125. this.outContractNo[i].unitContractPrice +
  2126. '元/吨)'
  2127. }
  2128. this.deptBudgetList.inOutTypeKey = 1
  2129. } else if (this.outContractNo[i].inOutType == '移库入库') {
  2130. if(this.outContractNo[i].unitContractPrice){
  2131. this.deptBudgetList.tips='出货库'+this.outContractNo[i].sendWarehouse+ ' ('+this.outContractNo[i].unitContractPrice+'元/吨)'
  2132. }else{
  2133. this.deptBudgetList.tips='出货库'+this.outContractNo[i].sendWarehouse
  2134. }
  2135. this.deptBudgetList.inOutTypeKey = 3
  2136. } else if (this.outContractNo[i].inOutType == '暂存入库') {
  2137. this.deptBudgetList.inOutTypeKey = 4
  2138. } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
  2139. this.deptBudgetList.inOutTypeKey = 5
  2140. } else if (this.detailData.inOutType == '退库') {
  2141. if(this.outContractNo[i].contractNo){
  2142. this.deptBudgetList.tips='买方'+this.outContractNo[i].buyer
  2143. }
  2144. else{
  2145. this.deptBudgetList.tips='出货库'+this.outContractNo[i].sendWarehouse
  2146. }
  2147. this.deptBudgetList.inOutTypeKey = 6
  2148. }
  2149. this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
  2150. this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
  2151. // this.deptBudgetList.cost = this.outContractNo[i].contractPrice
  2152. this.cost = this.outContractNo[i].contractPrice
  2153. if(this.cost){
  2154. this.isGetCost = true
  2155. this.deptBudgetList.cost = this.cost - this.deptBudgetList.deductionAmount
  2156. }else{
  2157. this.isGetCost = false
  2158. this.deptBudgetList.cost = this.deptBudgetList.cost
  2159. }
  2160. this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
  2161. if(this.outContractNo[i].inOutType=='移库入库'){
  2162. this.isSelectType = false
  2163. }else{
  2164. this.isSelectType = true
  2165. }
  2166. if (this.outContractNo[i].tranCarInfoList) {
  2167. this.options2 = this.outContractNo[i].tranCarInfoList
  2168. this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
  2169. this.carstatus = true
  2170. }
  2171. }
  2172. }
  2173. },
  2174. typeChange(e) {},
  2175. pureweight(status) {
  2176. console.log(this.deptBudgetList)
  2177. if (
  2178. this.deptBudgetList.netWeight &&
  2179. this.deptBudgetList.tidalGrainWater &&
  2180. this.deptBudgetList.solidGrainWater &&
  2181. this.deptBudgetList.buckleWeightRatio
  2182. ) {
  2183. this.deptBudgetList.pureWeight =
  2184. (this.deptBudgetList.netWeight *
  2185. (100 -
  2186. (this.deptBudgetList.tidalGrainWater -
  2187. this.deptBudgetList.solidGrainWater) *
  2188. this.deptBudgetList.buckleWeightRatio)) /
  2189. 100
  2190. }
  2191. },
  2192. selectgoodsName(e) {
  2193. for (var i = 0; i < this.goodnameList.length; i++) {
  2194. if (this.goodnameList[i].constValue == e) {
  2195. this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
  2196. if(e=='玉米(潮粮)'){
  2197. this.deptBudgetList.type='潮粮'
  2198. }else{
  2199. this.deptBudgetList.type='干粮'
  2200. }
  2201. }
  2202. }
  2203. },
  2204. selectpackingMethod(e) {
  2205. for (var i = 0; i < this.packtypeList.length; i++) {
  2206. if (this.packtypeList[i].constValue == e) {
  2207. this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
  2208. }
  2209. }
  2210. },
  2211. selectstorageType(e) {
  2212. for (var i = 0; i < this.storageType.length; i++) {
  2213. if (this.storageType[i].constValue == e) {
  2214. this.deptBudgetList.inOutTypeKey = this.storageType[i].constKey
  2215. }
  2216. }
  2217. },
  2218. handleClose() {
  2219. this.accessoryTFs = false
  2220. },
  2221. handleSizeChange(val) {
  2222. console.log(`每页 ${val} 条`)
  2223. this.pageSize = val
  2224. this.getList()
  2225. },
  2226. handleCurrentChange(val) {
  2227. this.currentPage = val
  2228. console.log(`当前页: ${val}`)
  2229. this.getList()
  2230. },
  2231. getList() {
  2232. // 货名
  2233. pullDown({ constId: 'CON2' })
  2234. .toPromise()
  2235. .then((response) => {
  2236. this.goodnameList = response
  2237. })
  2238. // 品级
  2239. pullDown({ constId: 'CON3' })
  2240. .toPromise()
  2241. .then((response) => {
  2242. this.gradeList = response
  2243. })
  2244. // 类型
  2245. if (this.deptBudgetList.warehouseType == '1') {
  2246. this.storageType = []
  2247. pullDown({ constId: 'CON5' })
  2248. .toPromise()
  2249. .then((response) => {
  2250. // this.storageType = response
  2251. for(let i = 0;i<response.length;i++){
  2252. if(response[i].constValue=='移库入库'||response[i].constValue=='退库'){
  2253. this.storageType.push(response[i])
  2254. }
  2255. }
  2256. })
  2257. } else if (this.deptBudgetList.warehouseType == '2') {
  2258. pullDown({ constId: 'WARE1' })
  2259. .toPromise()
  2260. .then((response) => {
  2261. this.storageType = response
  2262. })
  2263. pullDown({ constId: 'WARE2' })
  2264. .toPromise()
  2265. .then((response) => {
  2266. this.deliveryType = response
  2267. })
  2268. }
  2269. getReceiptTaskNo({
  2270. flag: 2,
  2271. warehouseName: this.deptBudgetList.warehouseName,
  2272. agentKey: localStorage.getItem('ws-pf_userId'),
  2273. })
  2274. .toPromise()
  2275. .then((response) => {
  2276. this.deptBudgetList1 = response
  2277. })
  2278. //合同编号
  2279. xialaNo({ compId: localStorage.getItem('ws-pf_compId'), flag: 6 })
  2280. .toPromise()
  2281. .then((response) => {
  2282. this.options1 = response
  2283. this.outContractNo = response
  2284. })
  2285. //合同编号2
  2286. xialaNo({ compId: localStorage.getItem('ws-pf_compId'), flag: 7 })
  2287. .toPromise()
  2288. .then((response) => {
  2289. this.outContractNo1 = response
  2290. })
  2291. //经办人
  2292. getstaff({
  2293. compId: localStorage.getItem('ws-pf_compId'),
  2294. warehouseId: this.deptBudgetList.baseId,
  2295. })
  2296. .toPromise()
  2297. .then((response) => {
  2298. this.options = response
  2299. this.qualityInspectorList = response
  2300. this.staffList = response
  2301. // this.agent = response
  2302. })
  2303. },
  2304. selecttaskType(e) {
  2305. for (var i = 0; i < this.taskTypeList.length; i++) {
  2306. if (this.taskTypeList[i].value == e) {
  2307. this.searchType = this.taskTypeList[i].type
  2308. }
  2309. }
  2310. },
  2311. fujian(row) {
  2312. if (
  2313. row.receiveAttachmentPath === null ||
  2314. row.receiveAttachmentPath === ''
  2315. ) {
  2316. EventBus.$emit(
  2317. 'warning',
  2318. this.$t('system.noticeCircular.NoInformation')
  2319. )
  2320. } else {
  2321. this.accessoryTFs = true
  2322. }
  2323. this.appendixIdss = row.receiveAttachmentPath
  2324. },
  2325. handleExamine(row) {
  2326. this.$router.push({
  2327. name: 'salesContractExamine',
  2328. query: { id: row.id },
  2329. })
  2330. },
  2331. },
  2332. }
  2333. </script>
  2334. <style lang="scss" scoped>
  2335. /deep/.basicInformation {
  2336. .ws-info-table {
  2337. border: none;
  2338. }
  2339. .left{
  2340. .el-form-item {
  2341. width: 50%;
  2342. // width: 33.3333%;
  2343. border: none;
  2344. .el-form-item__label {
  2345. background: transparent;
  2346. border: none;
  2347. }
  2348. .el-form-item__content {
  2349. border: none;
  2350. }
  2351. }
  2352. }
  2353. .right{
  2354. .el-form-item {
  2355. width: 100%;
  2356. // width: 33.3333%;
  2357. border: none;
  2358. .el-form-item__label {
  2359. background: transparent;
  2360. border: none;
  2361. }
  2362. .el-form-item__content {
  2363. border: none;
  2364. }
  2365. }
  2366. }
  2367. }
  2368. .title {
  2369. position: relative;
  2370. padding-left: 10px;
  2371. }
  2372. .title::before {
  2373. content: '';
  2374. display: inline-block;
  2375. width: 5px;
  2376. height: 30px;
  2377. background: #5473e8;
  2378. position: absolute;
  2379. left: 0;
  2380. }
  2381. .el-form {
  2382. padding: 0 10%;
  2383. }
  2384. .el-button--primary {
  2385. background-color: #5878e8;
  2386. border-color: #5878e8;
  2387. }
  2388. .el-col {
  2389. background: #f6f7fc;
  2390. }
  2391. .bg-right {
  2392. text-align: right;
  2393. padding: 16px 20px;
  2394. }
  2395. .center {
  2396. position: relative;
  2397. top: 50px;
  2398. width: 40%;
  2399. height: 2000px;
  2400. margin: 0 auto;
  2401. }
  2402. //选填
  2403. /deep/.el-form-item {
  2404. width: 50%;
  2405. }
  2406. .container {
  2407. overflow: scroll;
  2408. height: 120vh;
  2409. }
  2410. /deep/.ws-info-table .el-form-item .el-form-item__label {
  2411. text-align: center;
  2412. }
  2413. .deliverydate {
  2414. display: inline-block;
  2415. width: 10%;
  2416. }
  2417. .center {
  2418. margin-top: -60px;
  2419. width: 80%;
  2420. }
  2421. //仓位
  2422. .position {
  2423. background: #afb5cb;
  2424. border-radius: 2px;
  2425. font-size: 12px;
  2426. color: #ffffff;
  2427. line-height: 20px;
  2428. display: inline-grid;
  2429. padding: 2px 4px;
  2430. }
  2431. //表格文字
  2432. /deep/.ws-info-table .el-form-item .el-form-item__label {
  2433. text-align: left;
  2434. font-size: 14px;
  2435. font-family: PingFangSC-Regular, PingFang SC;
  2436. font-weight: 400;
  2437. color: #8890b1;
  2438. line-height: 16px;
  2439. }
  2440. .inspector {
  2441. width: 50%;
  2442. }
  2443. //质检员
  2444. .inspector .el-form-item__content {
  2445. text-align: left;
  2446. margin-left: 0px;
  2447. }
  2448. .small-title {
  2449. position: relative;
  2450. padding: 10px;
  2451. font-weight: 600;
  2452. }
  2453. .small-title::before {
  2454. position: absolute;
  2455. content: '';
  2456. display: block;
  2457. background: #5473e8;
  2458. width: 4px;
  2459. height: 14px;
  2460. left: 0px;
  2461. top: 13px;
  2462. padding: 4px 2px;
  2463. }
  2464. //下面列表
  2465. .neifor {
  2466. width: 80%;
  2467. background-color: #f6f7fc;
  2468. }
  2469. /deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
  2470. width: 35%;
  2471. text-align: center;
  2472. }
  2473. /deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
  2474. width: 60%;
  2475. background-color: #f6f7fc;
  2476. }
  2477. /deep/.neifor .el-input--small .el-input__inner {
  2478. width: 100%;
  2479. }
  2480. </style>