tranManagementWarehouseInOutTaskEdit.vue 58 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901
  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-input
  116. disabled
  117. v-model="dataList.moveTaskNo"
  118. placeholder="请输入移库任务编号"
  119. size="small"
  120. />
  121. </el-form-item>
  122. <!-- 货名 -->
  123. <el-form-item label="货名" class="huom">
  124. <el-select
  125. :disabled="dataList.taskTypeKey != 3"
  126. v-model="dataList.goodsName"
  127. placeholder="货名"
  128. class="huom"
  129. @change="selectgoodsName"
  130. >
  131. <el-option
  132. v-for="item in goodnameList"
  133. :key="item.constKey"
  134. :label="item.constValue"
  135. :value="item.constValue"
  136. ></el-option>
  137. </el-select>
  138. </el-form-item>
  139. <!--重量(吨)-->
  140. <el-form-item label="重量(吨)" span="1" style=" margin-left: 350px; margin-top: -40px">
  141. <el-input
  142. v-model="dataList.weight"
  143. placeholder="请输入重量(吨)"
  144. maxlength="120"
  145. size="small"
  146. class="huom"
  147. />
  148. </el-form-item>
  149. <!-- 品级 -->
  150. <el-form-item label="品级">
  151. <el-select
  152. v-model="dataList.grade"
  153. placeholder
  154. class="typeselect"
  155. @change="selectpackingMethod"
  156. >
  157. <el-option
  158. v-for="item in gradeList"
  159. :key="item.constKey"
  160. :label="item.constValue"
  161. :value="item.constValue"
  162. />
  163. </el-select>
  164. </el-form-item>
  165. <!--容重(克/升)>=-->
  166. <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="容重(克/升)>=">
  167. <el-input
  168. @input="bulkDensitychange"
  169. v-model="dataList.bulkDensity"
  170. placeholder="请输入容重"
  171. maxlength="120"
  172. size="small"
  173. class="huom"
  174. />
  175. </el-form-item>
  176. <!--水分(%)<=-->
  177. <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="水分(%)<=" span="1" style=" margin-left: 350px; margin-top: -40px">
  178. <el-input
  179. @input="waterContentchange"
  180. v-model="dataList.waterContent"
  181. placeholder="请输入水分占比"
  182. maxlength="120"
  183. size="small"
  184. class="huom"
  185. />
  186. </el-form-item>
  187. <!--单价(元/吨)-->
  188. <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="单价(元/吨)" span="1" style=" margin-left: 650px; margin-top: -40px" v-show="Pricetype">
  189. <el-input
  190. @input="unitPricechange"
  191. v-model="dataList.unitPrice"
  192. placeholder="请输入单价"
  193. maxlength="120"
  194. size="small"
  195. class="huom"
  196. />
  197. </el-form-item>
  198. <!--预计出库日期-->
  199. <el-form-item label="预计出库日期" span="1" prop="predictDate" class="deliverydate">
  200. <el-date-picker
  201. v-model="dataList.predictDate"
  202. type="date"
  203. placeholder="请选择预计出库日期"
  204. value-format="yyyy-MM-dd"
  205. />
  206. </el-form-item>
  207. <!--预估运费(元/吨)-->
  208. <el-form-item label="预估运费(元/吨)" span="1" >
  209. <el-input v-model="dataList.estimatedFreight" placeholder="请输入预估运费"
  210. maxlength="20" size="small" />
  211. </el-form-item>
  212. <!--发货人-->
  213. <el-form-item label="发货人">
  214. <el-select
  215. v-model="dataList.agent"
  216. placeholder="请选择发货人"
  217. filterable
  218. @change="selectstaff"
  219. >
  220. <el-option
  221. v-for="item in options"
  222. :key="item.value"
  223. :label="item.staffName"
  224. :value="item.staffName"
  225. />
  226. </el-select>
  227. </el-form-item>
  228. <!--业务描述=-->
  229. <el-form-item v-if="dataList.taskTypeKey != 3" label="业务描述" span="1">
  230. <el-input
  231. v-model="dataList.businessDescribe"
  232. placeholder="请输入业务描述,不超过150字"
  233. maxlength="150"
  234. size="large"
  235. class="yewu"
  236. />
  237. </el-form-item>
  238. </el-form>
  239. </div>
  240. <div
  241. v-show="dataList.taskTypeKey == 2||dataList.taskTypeKey == 4||(dataList.taskTypeKey == 3&&inOutFlag == 2)"
  242. class="center1"
  243. >
  244. <img
  245. style="position: relative; top: 40px; left: 300px;"
  246. width="19"
  247. height="19"
  248. src="../../../public/img/cangku.png"
  249. alt
  250. />
  251. <div class="small-title">
  252. <h3>
  253. 入库任务({{ dataList1.inOutTaskNo }})
  254. <span v-if="deletetask" style="color:red;">已删除</span>
  255. </h3>
  256. </div>
  257. <el-form v-if="!deletetask" ref="form" :model="form" label-width="140px">
  258. <!-- 仓库名 -->
  259. <el-form-item label="仓库名">
  260. <el-select v-model="dataList1.warehouseName" placeholder="请选择仓库名" class="typeselect">
  261. <el-option
  262. v-for="item in warehouseNameList"
  263. :key="item.constKey"
  264. :label="item.warehouseName"
  265. :value="item.warehouseName"
  266. />
  267. </el-select>
  268. </el-form-item>
  269. <!-- 入库类型 -->
  270. <el-form-item label="入库类型">
  271. <el-select
  272. :disabled="dataList.taskTypeKey == 3||dataList.taskTypeKey == 4"
  273. v-model="dataList1.inOutType"
  274. placeholder="请选择入库类型"
  275. class="typeselect"
  276. @change="selectstorageType1"
  277. >
  278. <el-option
  279. v-for="item in storageType1"
  280. :key="item.constKey"
  281. v-if="
  282. (dataList1.taskTypeKey == 2 &&
  283. item.constValue != '移库入库') ||
  284. (dataList1.taskTypeKey == 3 &&
  285. item.constValue == '移库入库') ||
  286. (dataList1.taskTypeKey == 4 && item.constValue == '退库')
  287. "
  288. :label="item.constValue"
  289. :value="item.constValue"
  290. />
  291. </el-select>
  292. </el-form-item>
  293. <!-- 合同编号 -->
  294. <el-form-item v-if="dataList1.taskTypeKey != 3" label="合同编号">
  295. <el-select
  296. @change="changecontract1"
  297. v-model="dataList1.contractNo"
  298. placeholder="请输入合同编号"
  299. class="typeselect"
  300. >
  301. <el-option
  302. v-for="item in contractNoList"
  303. :key="item.constKey"
  304. :label="item.contractNo"
  305. :value="item.contractNo"
  306. ></el-option>
  307. </el-select>
  308. </el-form-item>
  309. <el-form-item v-if="dataList1.taskTypeKey == 3" label="移库任务编号">
  310. <el-input
  311. disabled
  312. v-model="dataList.moveTaskNo"
  313. placeholder="请输入移库任务编号"
  314. size="small"
  315. />
  316. </el-form-item>
  317. <!-- 货名 -->
  318. <el-form-item label="货名" class="huom">
  319. <el-select
  320. :disabled="dataList.taskTypeKey != 3"
  321. v-model="dataList1.goodsName"
  322. placeholder="货名"
  323. class="huom"
  324. @change="selectgoodsName1"
  325. >
  326. <el-option
  327. v-for="item in goodnameList"
  328. :key="item.constKey"
  329. :label="item.constValue"
  330. :value="item.constValue"
  331. ></el-option>
  332. </el-select>
  333. </el-form-item>
  334. <!--重量(吨)-->
  335. <el-form-item label="重量(吨)" span="1" style=" margin-left: 350px; margin-top: -40px">
  336. <el-input
  337. @input="weightchange"
  338. v-model="dataList1.weight"
  339. placeholder="请输入重量(吨)"
  340. maxlength="120"
  341. size="small"
  342. class="huom"
  343. />
  344. </el-form-item>
  345. <!-- 品级 -->
  346. <el-form-item label="品级">
  347. <el-select
  348. :disabled="dataList.taskTypeKey == 3"
  349. v-model="dataList1.grade"
  350. placeholder
  351. class="typeselect"
  352. @change="selectpackingMethod1"
  353. >
  354. <el-option
  355. v-for="item in gradeList"
  356. :key="item.constKey"
  357. :label="item.constValue"
  358. :value="item.constValue"
  359. />
  360. </el-select>
  361. </el-form-item>
  362. <!--容重(克/升)>=-->
  363. <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="容重(克/升)>=">
  364. <el-input
  365. @input="bulkDensitychange"
  366. :disabled="dataList.taskTypeKey == 3"
  367. v-model="dataList1.bulkDensity"
  368. placeholder="请输入容重"
  369. maxlength="120"
  370. size="small"
  371. class="huom"
  372. />
  373. </el-form-item>
  374. <!--水分(%)<=-->
  375. <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="水分(%)<=" span="1" style=" margin-left: 350px; margin-top: -40px">
  376. <el-input
  377. @input="waterContentchange"
  378. :disabled="dataList.taskTypeKey == 3"
  379. v-model="dataList1.waterContent"
  380. placeholder="请输入水分占比"
  381. maxlength="120"
  382. size="small"
  383. class="huom"
  384. />
  385. </el-form-item>
  386. <!--单价(元/吨)-->
  387. <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="单价(元/吨)" span="1" style=" margin-left: 650px; margin-top: -40px">
  388. <el-input
  389. @input="unitPricechange"
  390. :disabled="dataList.taskTypeKey == 3"
  391. v-model="dataList1.unitPrice"
  392. placeholder="请输入单价"
  393. maxlength="120"
  394. size="small"
  395. class="huom"
  396. />
  397. </el-form-item>
  398. <!--预计出库日期-->
  399. <el-form-item label="预计入库日期" span="1" prop="predictDate" class="deliverydate">
  400. <el-date-picker
  401. v-model="dataList1.predictDate"
  402. type="date"
  403. placeholder="请选择预计入库日期"
  404. value-format="yyyy-MM-dd"
  405. />
  406. </el-form-item>
  407. <!--预估运费(元/吨)-->
  408. <el-form-item label="预估运费(元/吨)" span="1" >
  409. <el-input v-model="dataList1.estimatedFreight" placeholder="请输入预估运费"
  410. maxlength="20" size="small" />
  411. </el-form-item>
  412. <!-- 经办人-->
  413. <el-form-item label="收货人">
  414. <el-select
  415. v-model="dataList1.agent"
  416. placeholder="请选择收货人"
  417. filterable
  418. @change="selectstaff1"
  419. >
  420. <el-option
  421. v-for="item in options"
  422. :key="item.value"
  423. :label="item.staffName"
  424. :value="item.staffName"
  425. />
  426. </el-select>
  427. </el-form-item>
  428. <!--业务描述=-->
  429. <el-form-item v-if="dataList.taskTypeKey != 4" label="业务描述">
  430. <el-input
  431. v-model="dataList1.businessDescribe"
  432. placeholder="请输入业务描述,不超过150字"
  433. maxlength="150"
  434. size="large"
  435. />
  436. </el-form-item>
  437. </el-form>
  438. </div>
  439. <div v-if="dataList.taskTypeKey == 4" class="center1">
  440. <!--出库=-->
  441. <div class="small-title">
  442. <img
  443. style="position: relative; top: 40px; left: -22px;"
  444. width="19"
  445. height="19"
  446. src="../../../public/img/cangku.png"
  447. alt
  448. />
  449. <h3>出库任务({{ inOutTaskNo }})</h3>
  450. </div>
  451. <el-form ref="dataList" :model="dataList" label-width="140px">
  452. <!-- 仓库名 -->
  453. <el-form-item label="仓库名">
  454. <el-select
  455. v-model="dataList.warehouseName"
  456. placeholder="请选择仓库名"
  457. class="typeselect"
  458. @change="selectwarehouseName"
  459. >
  460. <el-option
  461. v-for="item in warehouseNameList"
  462. :key="item.constKey"
  463. :label="item.warehouseName"
  464. :value="item.id"
  465. />
  466. </el-select>
  467. </el-form-item>
  468. <!-- 出库类型 -->
  469. <el-form-item label="出库类型">
  470. <el-select
  471. :disabled="dataList.taskTypeKey == 3||dataList.taskTypeKey == 4"
  472. v-model="dataList.inOutType"
  473. placeholder="请选择出库类型"
  474. class="typeselect"
  475. @change="selectstorageType"
  476. >
  477. <el-option
  478. v-for="item in storageType"
  479. :key="item.constKey"
  480. v-if="
  481. (dataList.taskTypeKey == 1 &&
  482. item.constValue != '移库出库') ||
  483. (dataList.taskTypeKey == 3 &&
  484. item.constValue == '移库出库') ||
  485. (dataList.taskTypeKey == 4 && item.constValue == '销售出库')
  486. "
  487. :label="item.constValue"
  488. :value="item.constValue"
  489. />
  490. </el-select>
  491. </el-form-item>
  492. <!-- 合同编号 -->
  493. <el-form-item v-if="dataList.taskTypeKey != 3" label="合同编号">
  494. <el-select
  495. @change="changecontract"
  496. v-model="dataList.contractNo"
  497. placeholder="请输入合同编号"
  498. class="typeselect"
  499. >
  500. <el-option
  501. v-for="item in contractNoList"
  502. :key="item.constKey"
  503. :label="item.contractNo"
  504. :value="item.contractNo"
  505. ></el-option>
  506. </el-select>
  507. </el-form-item>
  508. <el-form-item v-if="dataList.taskTypeKey == 3" label="移库任务编号">
  509. <el-input
  510. disabled
  511. v-model="dataList.moveTaskNo"
  512. placeholder="请输入移库任务编号"
  513. size="small"
  514. />
  515. </el-form-item>
  516. <!-- 货名 -->
  517. <el-form-item label="货名" class="huom">
  518. <el-select
  519. :disabled="dataList.taskTypeKey != 3"
  520. v-model="dataList.goodsName"
  521. placeholder="货名"
  522. class="huom"
  523. @change="selectgoodsName"
  524. >
  525. <el-option
  526. v-for="item in goodnameList"
  527. :key="item.constKey"
  528. :label="item.constValue"
  529. :value="item.constValue"
  530. ></el-option>
  531. </el-select>
  532. </el-form-item>
  533. <!--重量(吨)-->
  534. <el-form-item label="重量(吨)" span="1" style=" margin-left: 350px; margin-top: -40px">
  535. <el-input
  536. :disabled="dataList.taskTypeKey == 4"
  537. v-model="dataList.weight"
  538. placeholder="请输入重量(吨)"
  539. maxlength="120"
  540. size="small"
  541. class="huom"
  542. />
  543. </el-form-item>
  544. <!-- 品级 -->
  545. <el-form-item label="品级">
  546. <el-select
  547. :disabled="dataList.taskTypeKey == 3||dataList.taskTypeKey == 4"
  548. v-model="dataList.grade"
  549. placeholder
  550. class="typeselect"
  551. @change="selectpackingMethod"
  552. >
  553. <el-option
  554. v-for="item in gradeList"
  555. :key="item.constKey"
  556. :label="item.constValue"
  557. :value="item.constValue"
  558. />
  559. </el-select>
  560. </el-form-item>
  561. <!--容重(克/升)>=-->
  562. <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="容重(克/升)>=">
  563. <el-input
  564. :disabled="dataList.taskTypeKey == 3||dataList.taskTypeKey == 4"
  565. v-model="dataList.bulkDensity"
  566. placeholder="请输入容重"
  567. maxlength="120"
  568. size="small"
  569. class="huom"
  570. />
  571. </el-form-item>
  572. <!--水分(%)<=-->
  573. <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="水分(%)<=" span="1" style=" margin-left: 350px; margin-top: -40px">
  574. <el-input
  575. :disabled="dataList.taskTypeKey == 3||dataList.taskTypeKey == 4"
  576. v-model="dataList.waterContent"
  577. placeholder="请输入水分占比"
  578. maxlength="120"
  579. size="small"
  580. class="huom"
  581. />
  582. </el-form-item>
  583. <!--单价(元/吨)-->
  584. <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="单价(元/吨)" span="1" style=" margin-left: 650px; margin-top: -40px" v-show="Pricetype">
  585. <el-input
  586. :disabled="dataList.taskTypeKey == 3||dataList.taskTypeKey == 4"
  587. v-model="dataList.unitPrice"
  588. placeholder="请输入单价"
  589. maxlength="120"
  590. size="small"
  591. class="huom"
  592. />
  593. </el-form-item>
  594. <!--预计出库日期-->
  595. <el-form-item label="预计出库日期" span="1" prop="predictDate" class="deliverydate">
  596. <el-date-picker
  597. v-model="dataList.predictDate"
  598. type="date"
  599. placeholder="请选择预计出库日期"
  600. value-format="yyyy-MM-dd"
  601. />
  602. </el-form-item>
  603. <!--预估运费(元/吨)-->
  604. <el-form-item label="预估运费(元/吨)" span="1" >
  605. <el-input v-model="dataList.estimatedFreight" placeholder="请输入预估运费"
  606. maxlength="20" size="small" />
  607. </el-form-item>
  608. <!--发货人-->
  609. <el-form-item label="出库发货人">
  610. <el-select
  611. v-model="dataList.agent"
  612. placeholder="请选择发货人"
  613. filterable
  614. @change="selectstaff"
  615. >
  616. <el-option
  617. v-for="item in options"
  618. :key="item.value"
  619. :label="item.staffName"
  620. :value="item.staffName"
  621. />
  622. </el-select>
  623. </el-form-item>
  624. <!--业务描述=-->
  625. <el-form-item label="业务描述">
  626. <el-input
  627. v-model="dataList.businessDescribe"
  628. placeholder="请输入业务描述,不超过150字"
  629. maxlength="150"
  630. size="large"
  631. />
  632. </el-form-item>
  633. </el-form>
  634. </div>
  635. </div>
  636. <!-- 提交 -->
  637. <div style="text-align: right; padding: 10px" class="center">
  638. <el-button class="bg-bottom" type="primary" size="small" @click="submit()">提交</el-button>
  639. </div>
  640. </div>
  641. </template>
  642. <script>
  643. import {
  644. getwarehousename,
  645. xialaNo,
  646. addoreditoutput,
  647. outexamine,
  648. getGoodsName
  649. } from '@/model/tasksport/index'
  650. import { pullDown, getstaff } from '@/model/warehouse/index'
  651. import { downloadFile } from '@/utils/batchDown'
  652. import Pagination from '@/components/Pagination'
  653. import { mapGetters } from 'vuex'
  654. import WsUpload from '@/components/WsUpload'
  655. // import { dayjs, fmoney, EventBus } from 'base-core-lib'
  656. import { dayjs, EventBus } from 'base-core-lib'
  657. export default {
  658. name: 'viewSpareMoney',
  659. components: {
  660. WsUpload,
  661. Pagination
  662. },
  663. watch: {
  664. // vesselId(val) {
  665. // this.getList()
  666. // },
  667. isShow(val) {
  668. this.showType = val
  669. }
  670. },
  671. computed: {
  672. ...mapGetters(['deptBudgetList'])
  673. },
  674. data() {
  675. return {
  676. //弹出框
  677. dialogViewSpareMoney: false,
  678. dialogApproveFormVisible: false,
  679. // 船舶类型
  680. monetaryKey: null,
  681. // 表格显示数据
  682. tableDate: [],
  683. // 是否显示
  684. showType: true,
  685. disabled: false,
  686. // 年
  687. year: '',
  688. contractNoList: [],
  689. deptBudgetTotal: 0,
  690. readonly: true,
  691. currentPage: 1,
  692. pageSize: 10,
  693. searchType: 1,
  694. searchKeyWord: '',
  695. radio: '1',
  696. contractType: 2,
  697. startDate: null,
  698. endDate: null,
  699. goodnameList: [],
  700. checked: true,
  701. form: {},
  702. staffList: [],
  703. options: [],
  704. storageType: [],
  705. storageType1: [],
  706. outContractNo: [],
  707. // 提交类型
  708. submitType: true,
  709. status: [],
  710. warehouseNameList: [],
  711. warehouseNameList1: [],
  712. appendixIdsAdd: '',
  713. uploadSuccess: {},
  714. warehouseInOutDetail: {},
  715. onChange: {},
  716. deptBudgetList1: [],
  717. gradeList: [],
  718. deletetask: false,
  719. rules: {
  720. netWeight: [
  721. {
  722. required: true,
  723. type: 'number',
  724. message: '请输入活动名称',
  725. trigger: 'blur'
  726. }
  727. ]
  728. },
  729. size: 10,
  730. compId: sessionStorage.getItem('ws-pf_compId'),
  731. deptCircularPage: {},
  732. packtypeList: {},
  733. date: {
  734. year: dayjs().format('YYYY'),
  735. month: dayjs().format('MM')
  736. },
  737. contractList: [],
  738. inOutTaskNo: '',
  739. inOutTaskNo1: '',
  740. dataList: { taskTypeKey: '1' },
  741. dataList1: { taskTypeKey: '1' },
  742. historyList: [],
  743. pickerBeginDateBefore: {
  744. disabledDate: time => {
  745. return time.getTime() > Date.now()
  746. }
  747. },
  748. accessoryTFs: false,
  749. inOutFlag: 1,
  750. Pricetype :true
  751. }
  752. },
  753. activated() {
  754. this.getList()
  755. },
  756. methods: {
  757. //返回按钮
  758. revert() {
  759. this.$router.go(-1)
  760. },
  761. returnsales() {
  762. this.$router.go(-1)
  763. this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
  764. },
  765. // 获取当前年月日
  766. getdate() {
  767. var date = new Date()
  768. var year = date.getFullYear() //获取完整的年份(4位)
  769. var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
  770. var datetime = date.getDate() //获取当前日(1-31)
  771. if (mouth < 10) {
  772. mouth = '0' + mouth
  773. }
  774. if (datetime < 10) {
  775. datetime = '0' + datetime
  776. }
  777. return year + '' + mouth + datetime
  778. },
  779. // 随机验证码
  780. verifyinit() {
  781. var arr = []
  782. for (var i = 48; i < 123; i++) {
  783. if (i > 57 && i < 65) continue
  784. if (i > 90) continue
  785. arr.push(String.fromCharCode(i))
  786. }
  787. arr.sort(function() {
  788. return Math.random() - 0.5
  789. })
  790. arr.length = 4
  791. return arr.join('')
  792. },
  793. selectTaskNo(e) {
  794. if (this.dataList.taskTypeKey == 3) {
  795. this.dataList1.moveTaskNo = e
  796. }
  797. },
  798. dataFilter(val) {
  799. // console.log(val,"名")
  800. this.deptBudgetList.staffList = val
  801. if (val) {
  802. //val存在
  803. this.options = this.staffList.filter(item => {
  804. if (
  805. !!~item.staffName.indexOf(val) ||
  806. !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
  807. ) {
  808. return true
  809. }
  810. })
  811. } else {
  812. //val为空时,还原数组
  813. this.options = this.staffList
  814. }
  815. },
  816. weightchange(e) {
  817. if (this.dataList.taskTypeKey == 4) {
  818. this.$set(this.dataList, 'weight', e)
  819. }
  820. },
  821. bulkDensitychange(e) {
  822. if (this.dataList.taskTypeKey == 4) {
  823. this.$set(this.dataList, 'bulkDensity', e)
  824. } else if (this.dataList1.taskTypeKey == 3) {
  825. this.$set(this.dataList1, 'bulkDensity', e)
  826. }
  827. },
  828. waterContentchange(e) {
  829. if (this.dataList.taskTypeKey == 4) {
  830. this.$set(this.dataList, 'waterContent', e)
  831. } else if (this.dataList1.taskTypeKey == 3) {
  832. this.$set(this.dataList1, 'waterContent', e)
  833. }
  834. },
  835. unitPricechange(e) {
  836. if (this.dataList.taskTypeKey == 4) {
  837. this.$set(this.dataList, 'unitPrice', e)
  838. } else if (this.dataList1.taskTypeKey == 3) {
  839. this.$set(this.dataList1, 'unitPrice', e)
  840. }
  841. },
  842. changecontract(e) {
  843. if (this.dataList.taskTypeKey != 3) {
  844. for (let i = 0; i < this.contractNoList.length; i++) {
  845. if (this.contractNoList[i].contractNo == e) {
  846. if(this.contractNoList[i].priceType == "随行就市"){
  847. this.Pricetype = false
  848. }else{
  849. this.Pricetype = true
  850. }
  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 < 0 ||
  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 < 0 ||
  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.dataList.taskTypeKey != 3||this.dataList1.taskTypeKey != 3){
  1255. if (!this.dataList1.bulkDensity) {
  1256. this.$message({
  1257. message: '容重不能为空!',
  1258. type: 'warning'
  1259. })
  1260. return
  1261. }
  1262. if (
  1263. this.dataList1.bulkDensity < 0 ||
  1264. this.dataList1.bulkDensity > 1000
  1265. ) {
  1266. this.$message({
  1267. message: '容重输入错误',
  1268. type: 'warning'
  1269. })
  1270. return
  1271. }
  1272. if (
  1273. String(this.dataList1.bulkDensity).indexOf('.') != -1 &&
  1274. String(this.dataList1.bulkDensity).length -
  1275. (String(this.dataList1.bulkDensity).indexOf('.') + 1) >
  1276. 0
  1277. ) {
  1278. this.$message({
  1279. message: '容重需输入整数',
  1280. type: 'warning'
  1281. })
  1282. return
  1283. }
  1284. if (!this.dataList1.waterContent) {
  1285. this.$message({
  1286. message: '水分不能为空!',
  1287. type: 'warning'
  1288. })
  1289. return
  1290. }
  1291. if (
  1292. this.dataList1.waterContent < 0 ||
  1293. this.dataList1.waterContent > 40
  1294. ) {
  1295. this.$message({
  1296. message: '水分输入错误',
  1297. type: 'warning'
  1298. })
  1299. return
  1300. }
  1301. if (
  1302. String(this.dataList1.waterContent).indexOf('.') != -1 &&
  1303. String(this.dataList1.waterContent).length -
  1304. (String(this.dataList1.waterContent).indexOf('.') + 1) >
  1305. 1
  1306. ) {
  1307. this.$message({
  1308. message: '水分输入错误',
  1309. type: 'warning'
  1310. })
  1311. return
  1312. }
  1313. if (!this.dataList1.unitPrice) {
  1314. this.$message({
  1315. message: '单价不能为空!',
  1316. type: 'warning'
  1317. })
  1318. return
  1319. }
  1320. if (
  1321. (this.dataList1.unitPrice &&
  1322. String(this.dataList1.unitPrice).indexOf('.') != -1 &&
  1323. String(this.dataList1.unitPrice).length -
  1324. (String(this.dataList1.unitPrice).indexOf('.') + 1) >
  1325. 2) ||
  1326. this.dataList1.unitPrice > 100000 ||
  1327. this.dataList1.unitPrice < 1
  1328. ) {
  1329. this.$message({
  1330. message: '单价输入错误',
  1331. type: 'warning'
  1332. })
  1333. return
  1334. }
  1335. }
  1336. if (!this.dataList.predictDate) {
  1337. this.$message({
  1338. message: '预计出库日期不能为空!',
  1339. type: 'warning'
  1340. })
  1341. return
  1342. }
  1343. if (!this.dataList1.predictDate) {
  1344. this.$message({
  1345. message: '预计入库日期不能为空!',
  1346. type: 'warning'
  1347. })
  1348. return
  1349. }
  1350. // if (!this.dataList.agent) {
  1351. // this.$message({
  1352. // message: '出库经办人不能为空!',
  1353. // type: 'warning'
  1354. // })
  1355. // return
  1356. // }
  1357. // if (!this.dataList1.agent) {
  1358. // this.$message({
  1359. // message: '入库经办人不能为空!',
  1360. // type: 'warning'
  1361. // })
  1362. // return
  1363. // }
  1364. if (!this.dataList1.businessDescribe) {
  1365. this.$message({
  1366. message: '业务描述不能为空!',
  1367. type: 'warning'
  1368. })
  1369. return
  1370. }
  1371. this.dataList.relevanceId = this.GetRandomNum(100000, 999999)
  1372. if (this.dataList.taskTypeKey == 3) {
  1373. this.dataList.businessDescribe = this.dataList1.businessDescribe
  1374. } else {
  1375. this.dataList1.businessDescribe = this.dataList.businessDescribe
  1376. }
  1377. this.requestadd(this.dataList, 'repetition')
  1378. this.dataList1.relevanceId = this.dataList.relevanceId
  1379. if (!this.deletetask) {
  1380. this.requestadd(this.dataList1, 'repetition')
  1381. }
  1382. }
  1383. },
  1384. selectwarehouseName(e) {
  1385. //经办人
  1386. getstaff({
  1387. compId: sessionStorage.getItem('ws-pf_compId'),
  1388. warehouseId: e
  1389. })
  1390. .toPromise()
  1391. .then(response => {
  1392. this.options = response
  1393. this.staffList = response
  1394. // this.agent = response
  1395. })
  1396. },
  1397. tarechange(e) {
  1398. if (this.dataList.grossWeight && this.dataList.tare) {
  1399. this.dataList.netWeight = Number(
  1400. this.dataList.grossWeight - this.dataList.tare
  1401. )
  1402. }
  1403. },
  1404. grossWeightchange(e) {
  1405. if (this.dataList.grossWeight && this.dataList.tare) {
  1406. this.dataList.netWeight = Number(
  1407. this.dataList.grossWeight - this.dataList.tare
  1408. )
  1409. }
  1410. },
  1411. selectgoodsName(e) {
  1412. for (var i = 0; i < this.goodnameList.length; i++) {
  1413. if (this.goodnameList[i].constValue == e) {
  1414. this.dataList.goodsNameKey = this.goodnameList[i].constKey
  1415. }
  1416. }
  1417. },
  1418. selectgoodsName1(e) {
  1419. for (var i = 0; i < this.goodnameList.length; i++) {
  1420. if (this.goodnameList[i].constValue == e) {
  1421. this.dataList1.goodsNameKey = this.goodnameList[i].constKey
  1422. }
  1423. }
  1424. },
  1425. selectpackingMethod(e) {
  1426. for (var i = 0; i < this.gradeList.length; i++) {
  1427. if (this.gradeList[i].constValue == e) {
  1428. this.dataList.gradeKey = this.gradeList[i].constKey
  1429. if (this.dataList.taskTypeKey == 3) {
  1430. this.$set(this.dataList1, 'grade', e)
  1431. this.$set(this.dataList1, 'gradeKey', this.gradeList[i].constKey)
  1432. }
  1433. }
  1434. }
  1435. },
  1436. selectpackingMethod1(e) {
  1437. for (var i = 0; i < this.gradeList.length; i++) {
  1438. if (this.gradeList[i].constValue == e) {
  1439. this.dataList1.packingMethodKey = this.gradeList[i].constKey
  1440. if (this.dataList1.taskTypeKey == 4) {
  1441. this.$set(this.dataList, 'grade', e)
  1442. this.$set(this.dataList, 'gradeKey', this.gradeList[i].constKey)
  1443. }
  1444. }
  1445. }
  1446. },
  1447. selectstorageType(e) {
  1448. for (var i = 0; i < this.storageType.length; i++) {
  1449. if (this.storageType[i].constValue == e) {
  1450. this.dataList.inOutTypeKey = this.storageType[i].constKey
  1451. }
  1452. }
  1453. },
  1454. selectstorageType1(e) {
  1455. for (var i = 0; i < this.storageType1.length; i++) {
  1456. if (this.storageType1[i].constValue == e) {
  1457. this.dataList1.inOutTypeKey = this.storageType1[i].constKey
  1458. }
  1459. }
  1460. },
  1461. handleClose() {
  1462. this.accessoryTFs = false
  1463. },
  1464. handleSizeChange(val) {
  1465. console.log(`每页 ${val} 条`)
  1466. this.pageSize = val
  1467. this.getList()
  1468. },
  1469. businessDescriptionchange(e) {
  1470. console.log(e)
  1471. },
  1472. handleCurrentChange(val) {
  1473. this.currentPage = val
  1474. console.log(`当前页: ${val}`)
  1475. this.getList()
  1476. },
  1477. tasknumber() {
  1478. if (this.dataList.taskTypeKey == 1) {
  1479. this.inOutTaskNo = 'CK' + this.getdate() + this.verifyinit()
  1480. } else if (this.dataList.taskTypeKey == 2) {
  1481. this.inOutTaskNo1 = 'RK' + this.getdate() + this.verifyinit()
  1482. } else if (this.dataList.taskTypeKey == 3) {
  1483. var random = this.getdate() + this.verifyinit()
  1484. this.inOutTaskNo = 'YKC' + random
  1485. this.inOutTaskNo1 = 'YKR' + random
  1486. } else if (this.dataList.taskTypeKey == 4) {
  1487. var random = this.getdate() + this.verifyinit()
  1488. this.inOutTaskNo = 'TCC' + random
  1489. this.inOutTaskNo1 = 'TCR' + random
  1490. }
  1491. },
  1492. tasktypechange(e) {
  1493. if (!this.$route.query.relevanceId) {
  1494. this.tasknumber()
  1495. }
  1496. this.dataList1.taskTypeKey = e
  1497. if (this.dataList.taskTypeKey == 1) {
  1498. this.dataList.inOutType = '销售出库'
  1499. this.dataList.inOutTypeKey = '1'
  1500. }
  1501. if (this.dataList1.taskTypeKey == 2) {
  1502. this.dataList1.inOutType = '采购入库'
  1503. this.dataList1.inOutTypeKey = '1'
  1504. } else if (this.dataList1.taskTypeKey == 3) {
  1505. this.disabled = true
  1506. this.dataList1.inOutType = '移库入库'
  1507. this.dataList1.inOutTypeKey = '3'
  1508. this.dataList.inOutType = '移库出库'
  1509. this.dataList.inOutTypeKey = '3'
  1510. } else if (this.dataList1.taskTypeKey == 4) {
  1511. this.disabled = true
  1512. this.dataList1.inOutType = '退库'
  1513. this.dataList1.inOutTypeKey = '6'
  1514. this.dataList.inOutType = '销售出库'
  1515. this.dataList.inOutTypeKey = '1'
  1516. }
  1517. },
  1518. GetRandomNum(Min, Max) {
  1519. var Range = Max - Min
  1520. var Rand = Math.random()
  1521. return Min + Math.round(Rand * Range)
  1522. },
  1523. getList() {
  1524. this.inOutFlag = this.$route.query.inOutFlag
  1525. if (this.$route.query.relevanceId) {
  1526. outexamine({ relevanceId: this.$route.query.relevanceId })
  1527. .toPromise()
  1528. .then(response => {
  1529. if (response.length > 1) {
  1530. this.dataList = response[0]
  1531. this.dataList1 = response[1]
  1532. console.log(this.dataList1.inOutTaskNo, '入库任务')
  1533. } else {
  1534. if (response[0].taskTypeKey == 3) {
  1535. this.deletetask = true
  1536. this.dataList1.inOutTaskNo =
  1537. 'YKR' +
  1538. response[0].inOutTaskNo.substr(
  1539. response[0].inOutTaskNo.indexOf('C') + 1,
  1540. response[0].inOutTaskNo.length
  1541. )
  1542. }
  1543. this.dataList = response[0]
  1544. if (response[0].taskTypeKey == 2) {
  1545. this.dataList1 = response[0]
  1546. } else {
  1547. // this.dataList = response[0]
  1548. }
  1549. }
  1550. })
  1551. } else {
  1552. this.tasknumber()
  1553. this.$set(this.dataList, 'inOutType', '销售出库')
  1554. this.$set(this.dataList, 'inOutTypeKey', '1')
  1555. this.$set(this.dataList, 'goodsName', '玉米')
  1556. this.$set(this.dataList, 'goodsNameKey', '1')
  1557. this.$set(this.dataList, 'grade', '一等品')
  1558. this.$set(this.dataList, 'gradeKey', '1')
  1559. this.$set(this.dataList1, 'goodsName', '玉米')
  1560. this.$set(this.dataList1, 'goodsNameKey', '1')
  1561. this.$set(this.dataList1, 'grade', '一等品')
  1562. this.$set(this.dataList1, 'gradeKey', '1')
  1563. }
  1564. // 货名
  1565. pullDown({ constId: 'CON2' })
  1566. .toPromise()
  1567. .then(response => {
  1568. this.goodnameList = response
  1569. })
  1570. // 品级
  1571. pullDown({ constId: 'CON3' })
  1572. .toPromise()
  1573. .then(response => {
  1574. this.gradeList = response
  1575. })
  1576. pullDown({ constId: 'CON6' })
  1577. .toPromise()
  1578. .then(response => {
  1579. this.storageType = response
  1580. })
  1581. pullDown({ constId: 'CON5' })
  1582. .toPromise()
  1583. .then(response => {
  1584. this.storageType1 = response
  1585. })
  1586. xialaNo({
  1587. compId: this.compId
  1588. })
  1589. .toPromise()
  1590. .then(response => {
  1591. this.contractNoList = response
  1592. })
  1593. // //临时仓库入库类型
  1594. // pullDown({ constId: 'WARE1' })
  1595. // .toPromise()
  1596. // .then((response) => {
  1597. // this.storageType = respons
  1598. // })
  1599. // //临时仓库出库类型
  1600. // pullDown({ constId: 'WARE2' })
  1601. // .toPromise()
  1602. // .then((response) => {
  1603. // this.deliveryType = response
  1604. // })
  1605. //仓库名
  1606. getwarehousename({
  1607. compId: this.compId,
  1608. warehouseType: 1
  1609. })
  1610. .toPromise()
  1611. .then(response => {
  1612. this.warehouseNameList = response
  1613. })
  1614. getwarehousename({
  1615. compId: this.compId,
  1616. warehouseType: 2
  1617. })
  1618. .toPromise()
  1619. .then(response => {
  1620. this.warehouseNameList1 = response
  1621. })
  1622. },
  1623. selecttaskType(e) {
  1624. for (var i = 0; i < this.taskTypeList.length; i++) {
  1625. if (this.taskTypeList[i].value == e) {
  1626. this.searchType = this.taskTypeList[i].type
  1627. }
  1628. }
  1629. },
  1630. fujian(row) {
  1631. if (
  1632. row.receiveAttachmentPath === null ||
  1633. row.receiveAttachmentPath === ''
  1634. ) {
  1635. EventBus.$emit(
  1636. 'warning',
  1637. this.$t('system.noticeCircular.NoInformation')
  1638. )
  1639. } else {
  1640. this.accessoryTFs = true
  1641. }
  1642. this.appendixIdss = row.receiveAttachmentPath
  1643. },
  1644. handleExamine(row) {
  1645. this.$router.push({
  1646. name: 'salesContractExamine',
  1647. query: { id: row.id }
  1648. })
  1649. },
  1650. // 关闭 dialog时 处理文件url 初始化upload组件
  1651. handleCloe() {
  1652. this.dialogViewSpareMoney = false
  1653. },
  1654. history(row) {
  1655. billoperatehis({ id: row.id })
  1656. .toPromise()
  1657. .then(response => {
  1658. this.historyList = response
  1659. })
  1660. },
  1661. async exportlist() {
  1662. const { data } = await export1(
  1663. {
  1664. compId: sessionStorage.getItem('ws-pf_compId'),
  1665. contractType: this.contractType,
  1666. currentPage: this.currentPage,
  1667. pageSize: this.pageSize,
  1668. searchType: this.searchType,
  1669. searchKeyWord: this.searchKeyWord,
  1670. startDate: this.startDate,
  1671. endDate: this.endDate
  1672. },
  1673. {},
  1674. { responseType: 'blob' }
  1675. ).toPromise()
  1676. downloadFile({
  1677. res: data,
  1678. fileName: `${this.date.year +
  1679. (this.date.month ? `-${this.date.month}` : '')}_采购合同`,
  1680. type: 'xls'
  1681. })
  1682. },
  1683. // deletecontract(){},
  1684. //删除
  1685. approve() {},
  1686. listQuery() {},
  1687. total() {},
  1688. clearfiltQuery() {},
  1689. selectCrtDuty() {}
  1690. }
  1691. }
  1692. </script>
  1693. <style lang="scss" scoped>
  1694. /deep/.basicInformation {
  1695. .el-info-table {
  1696. border: none;
  1697. position: relative;
  1698. }
  1699. .el-form-item {
  1700. width: 33.3333%;
  1701. border: none;
  1702. margin: 0;
  1703. .el-form-item__label {
  1704. text-align: left;
  1705. font-size: 14px;
  1706. font-family: PingFangSC-Regular, PingFang SC;
  1707. font-weight: 400;
  1708. color: #8890b1;
  1709. }
  1710. .el-form-item__content {
  1711. padding-left: 0px;
  1712. padding-right: 10px;
  1713. // background: #fff;
  1714. white-space: nowrap;
  1715. height: 40px;
  1716. display: flex;
  1717. -webkit-box-align: center;
  1718. align-items: center;
  1719. text-align: left;
  1720. overflow: hidden;
  1721. }
  1722. }
  1723. }
  1724. /deep/.el-radio {
  1725. color: #606266;
  1726. font-weight: 500;
  1727. line-height: 1;
  1728. cursor: pointer;
  1729. white-space: nowrap;
  1730. outline: 0;
  1731. margin-right: 30px;
  1732. margin-top: 15px;
  1733. }
  1734. /deep/.el-radio__inner {
  1735. border: 1px solid #dcdfe6;
  1736. border-radius: 100%;
  1737. width: 14px;
  1738. height: 14px;
  1739. background-color: #fff;
  1740. cursor: pointer;
  1741. -webkit-box-sizing: border-box;
  1742. box-sizing: border-box;
  1743. margin-left: 100px;
  1744. }
  1745. /deep/.el-radio__input {
  1746. white-space: nowrap;
  1747. cursor: pointer;
  1748. outline: 0;
  1749. line-height: 1;
  1750. vertical-align: middle;
  1751. margin-top: -1px;
  1752. }
  1753. .title {
  1754. position: relative;
  1755. padding-left: 10px;
  1756. }
  1757. .title::before {
  1758. content: '';
  1759. display: inline-block;
  1760. width: 5px;
  1761. height: 30px;
  1762. background: #5473e8;
  1763. position: absolute;
  1764. left: 0;
  1765. }
  1766. .el-form {
  1767. padding: 0 15%;
  1768. display: flex;
  1769. flex-wrap: wrap;
  1770. margin-left: -50px;
  1771. margin-top: 15px;
  1772. width: 110%;
  1773. }
  1774. .el-button--primary {
  1775. background-color: #5878e8;
  1776. border-color: #5878e8;
  1777. }
  1778. .el-col {
  1779. background: #f6f7fc;
  1780. }
  1781. .bg-right {
  1782. text-align: right;
  1783. padding: 16px 20px;
  1784. }
  1785. .center {
  1786. position: relative;
  1787. top: 50px;
  1788. width: 40%;
  1789. height: 2000px;
  1790. margin: 0 auto;
  1791. margin-right: 180px;
  1792. }
  1793. /deep/.el-form-item__label {
  1794. width: 160px;
  1795. }
  1796. .inspector {
  1797. width: 50%;
  1798. }
  1799. /deep/.el-form-item--small .el-form-item__label,
  1800. .el-form-item--small .el-form-item__content {
  1801. text-align: left;
  1802. }
  1803. /deep/.el-input--small {
  1804. font-size: 13px;
  1805. position: relative;
  1806. display: inline-block;
  1807. }
  1808. .center1 .small-title {
  1809. margin-left: 323px;
  1810. }
  1811. .center1 {
  1812. width: 90%;
  1813. margin: 0 auto;
  1814. margin-left: 10px;
  1815. margin-top: 25px;
  1816. }
  1817. /deep/.el-input--small .el-input__inner {
  1818. height: 32px;
  1819. line-height: 32px;
  1820. }
  1821. /deep/.el-select {
  1822. display: inline-block;
  1823. position: relative;
  1824. width: 100%;
  1825. }
  1826. .annu {
  1827. height: 81px;
  1828. background: #ffffff;
  1829. border-radius: 4px;
  1830. }
  1831. .basicInformation .el-form-item {
  1832. width: 50.3333%;
  1833. border: none;
  1834. margin: 0;
  1835. }
  1836. .huom {
  1837. width: 100px;
  1838. }
  1839. .el-form {
  1840. font-size: 14px;
  1841. font-family: PingFangSC-Regular, PingFang SC;
  1842. font-weight: 400;
  1843. color: #8890b1;
  1844. line-height: 16px;
  1845. margin-left: 130px;
  1846. }
  1847. .a {
  1848. margin-left: -32px;
  1849. }
  1850. .el-radio-group {
  1851. margin-left: 80px;
  1852. }
  1853. .ding {
  1854. height: 23px;
  1855. background: #e8ecf6;
  1856. box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
  1857. }
  1858. .ziti {
  1859. width: 72px;
  1860. height: 20px;
  1861. font-size: 14px;
  1862. font-family: PingFangSC-Regular, PingFang SC;
  1863. font-weight: 400;
  1864. color: #8890b1;
  1865. line-height: 20px;
  1866. margin-left: 310px;
  1867. /* margin-top: 112px; */
  1868. }
  1869. .ziti1 {
  1870. width: 100px;
  1871. font-size: 16px;
  1872. font-family: PingFangSC-Medium, PingFang SC;
  1873. font-weight: 500;
  1874. color: #262626;
  1875. line-height: 22px;
  1876. margin-left: 381px;
  1877. margin-top: -21px;
  1878. }
  1879. .winseaview-view {
  1880. padding: 0 0 20px;
  1881. }
  1882. .container {
  1883. overflow: scroll;
  1884. height: 93vh;
  1885. }
  1886. .nav {
  1887. width: 380px;
  1888. height: 20px;
  1889. }
  1890. </style>