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