warehouseManagementDelivery.vue 61 KB

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