tranManagementWarehouseInOutTaskAdd.vue 65 KB

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