tranManagementWarehouseInOutTaskAdd.vue 64 KB

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