warehouseManagementPut.vue 67 KB

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