tranManagementWarehouseInOutTaskEdit.vue 57 KB

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