warehouseManagementPut.vue 66 KB

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