tranManagementWarehouseInOutTaskEdit.vue 58 KB

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