tranManagementWarehouseInOutTaskEdit.vue 58 KB

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