tranManagementWarehouseInOutTaskAdd.vue 64 KB

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