tranManagementWarehouseInOutTaskAdd.vue 64 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056
  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. if(this.dataList.taskTypeKey == 1||this.dataList.taskTypeKey == 3||this.dataList.taskTypeKey == 4||this.dataList1.taskTypeKey == 2&&this.dataList1.inOutType){
  1494. this.$message({
  1495. message: '请选择货源!',
  1496. type: 'warning'
  1497. })
  1498. return
  1499. }
  1500. }
  1501. var supplygoods=data
  1502. this.dataList.sourceId=this.goods
  1503. this.dataList1.sourceId=this.goods
  1504. if (this.dataList.taskTypeKey == 1) {
  1505. this.dataList.inOutTaskNo = this.inOutTaskNo
  1506. this.dataList.sourceRelationInfoList=supplygoods
  1507. this.requestadd(this.dataList)
  1508. } else if (this.dataList1.taskTypeKey == 2) {
  1509. this.dataList1.inOutTaskNo = this.inOutTaskNo1
  1510. this.dataList1.sourceRelationInfoList=supplygoods
  1511. this.requestadd(this.dataList1)
  1512. } else if (
  1513. this.dataList.taskTypeKey == 3 ||
  1514. this.dataList.taskTypeKey == 4
  1515. ) {
  1516. this.dataList.inOutTaskNo = this.inOutTaskNo
  1517. this.dataList.relevanceId = this.GetRandomNum(100000, 999999)
  1518. this.dataList.sourceRelationInfoList=supplygoods
  1519. this.dataList1.sourceRelationInfoList=supplygoods
  1520. if (this.dataList.taskTypeKey == 3) {
  1521. this.dataList.sendWarehouse=this.dataList.warehouseName
  1522. this.dataList.receiveWarehouse=this.dataList1.warehouseName
  1523. this.dataList1.sendWarehouse=this.dataList.warehouseName
  1524. this.dataList1.receiveWarehouse=this.dataList1.warehouseName
  1525. this.dataList.businessDescribe = this.dataList1.businessDescribe
  1526. } else {
  1527. this.dataList1.businessDescribe = this.dataList.businessDescribe
  1528. }
  1529. this.requestadd(this.dataList, 'repetition')
  1530. this.dataList1.inOutTaskNo = this.inOutTaskNo1
  1531. this.dataList1.relevanceId = this.dataList.relevanceId
  1532. this.dataList1.goodsName = this.dataList.goodsName
  1533. this.requestadd(this.dataList1, 'repetition')
  1534. }
  1535. },
  1536. tarechange(e) {
  1537. if (this.dataList.grossWeight && this.dataList.tare) {
  1538. this.dataList.netWeight = Number(
  1539. this.dataList.grossWeight - this.dataList.tare
  1540. )
  1541. }
  1542. },
  1543. grossWeightchange(e) {
  1544. if (this.dataList.grossWeight && this.dataList.tare) {
  1545. this.dataList.netWeight = Number(
  1546. this.dataList.grossWeight - this.dataList.tare
  1547. )
  1548. }
  1549. },
  1550. selectgoodsName(e) {
  1551. for (var i = 0; i < this.goodnameList.length; i++) {
  1552. if (this.goodnameList[i].constValue == e) {
  1553. this.dataList.goodsNameKey = this.goodnameList[i].constKey
  1554. }
  1555. }
  1556. },
  1557. selectgoodsName1(e) {
  1558. for (var i = 0; i < this.goodnameList.length; i++) {
  1559. if (this.goodnameList[i].constValue == e) {
  1560. this.dataList1.goodsNameKey = this.goodnameList[i].constKey
  1561. }
  1562. }
  1563. },
  1564. selectpackingMethod(e) {
  1565. for (var i = 0; i < this.gradeList.length; i++) {
  1566. if (this.gradeList[i].constValue == e) {
  1567. this.dataList.gradeKey = this.gradeList[i].constKey
  1568. if (this.dataList.taskTypeKey == 3) {
  1569. this.$set(this.dataList1, 'grade', e)
  1570. this.$set(this.dataList1, 'gradeKey', this.gradeList[i].constKey)
  1571. }
  1572. }
  1573. }
  1574. },
  1575. selectpackingMethod1(e) {
  1576. for (var i = 0; i < this.gradeList.length; i++) {
  1577. if (this.gradeList[i].constValue == e) {
  1578. this.dataList1.packingMethodKey = this.gradeList[i].constKey
  1579. if (this.dataList1.taskTypeKey == 4) {
  1580. this.$set(this.dataList, 'grade', e)
  1581. this.$set(this.dataList, 'gradeKey', this.gradeList[i].constKey)
  1582. }
  1583. }
  1584. }
  1585. },
  1586. selectstorageType(e) {
  1587. switch (e) {
  1588. case '采购出库':
  1589. this.flag = 0
  1590. break
  1591. case '销售出库':
  1592. this.flag = 1
  1593. break
  1594. }
  1595. for (var i = 0; i < this.storageType.length; i++) {
  1596. if (this.storageType[i].constValue == e) {
  1597. this.dataList.inOutTypeKey = this.storageType[i].constKey
  1598. }
  1599. }
  1600. },
  1601. selectstorageType1(e) {
  1602. switch (e) {
  1603. case '采购入库':
  1604. this.flag = 0
  1605. break
  1606. case '暂存入库':
  1607. this.flag = 0
  1608. break
  1609. case '贸易服务入库':
  1610. this.flag = 0
  1611. break
  1612. case '退库':
  1613. this.flag = 2
  1614. break
  1615. }
  1616. for (var i = 0; i < this.storageType1.length; i++) {
  1617. if (this.storageType1[i].constValue == e) {
  1618. this.dataList1.inOutTypeKey = this.storageType1[i].constKey
  1619. }
  1620. }
  1621. },
  1622. handleClose() {
  1623. this.accessoryTFs = false
  1624. },
  1625. handleSizeChange(val) {
  1626. console.log(`每页 ${val} 条`)
  1627. this.pageSize = val
  1628. this.getList()
  1629. },
  1630. businessDescriptionchange(e) {
  1631. console.log(e)
  1632. },
  1633. handleCurrentChange(val) {
  1634. this.currentPage = val
  1635. console.log(`当前页: ${val}`)
  1636. this.getList()
  1637. },
  1638. tasknumber() {
  1639. if (this.dataList.taskTypeKey == 1) {
  1640. this.inOutTaskNo = 'CK' + this.getdate() + this.MathRand()
  1641. } else if (this.dataList.taskTypeKey == 2) {
  1642. this.inOutTaskNo1 = 'RK' + this.getdate() + this.MathRand()
  1643. } else if (this.dataList.taskTypeKey == 3) {
  1644. var random = this.getdate() + this.MathRand()
  1645. this.inOutTaskNo = 'YKC' + random
  1646. this.inOutTaskNo1 = 'YKR' + random
  1647. // this.dataList.moveTaskNo = 'YKRW' + random
  1648. // this.dataList1.moveTaskNo = 'YKRW' + random
  1649. } else if (this.dataList.taskTypeKey == 4) {
  1650. var random = this.getdate() + this.MathRand()
  1651. this.inOutTaskNo = 'TCC' + random
  1652. this.inOutTaskNo1 = 'TCR' + random
  1653. }
  1654. },
  1655. tasktypechange(e) {
  1656. if (!this.$route.query.relevanceId) {
  1657. this.tasknumber()
  1658. }
  1659. this.dataList1.taskTypeKey = e
  1660. if (this.dataList.taskTypeKey == 1) {
  1661. this.dataList.inOutType = '销售出库'
  1662. this.dataList.inOutTypeKey = '1'
  1663. this.flag = 1
  1664. }
  1665. if (this.dataList1.taskTypeKey == 2) {
  1666. this.dataList1.inOutType = '采购入库'
  1667. this.dataList1.inOutTypeKey = '1'
  1668. this.flag = 8
  1669. } else if (this.dataList1.taskTypeKey == 3) {
  1670. this.disabled = true
  1671. this.gradestatus=false
  1672. this.dataList1.inOutType = '移库入库'
  1673. this.dataList1.inOutTypeKey = '3'
  1674. this.dataList.inOutType = '移库出库'
  1675. this.dataList.inOutTypeKey = '3'
  1676. } else if (this.dataList1.taskTypeKey == 4) {
  1677. this.disabled = true
  1678. this.dataList1.inOutType = '退库'
  1679. this.dataList1.inOutTypeKey = '6'
  1680. this.dataList.inOutType = '销售出库'
  1681. this.flag = 2
  1682. this.dataList.inOutTypeKey = '1'
  1683. }
  1684. },
  1685. GetRandomNum(Min, Max) {
  1686. var Range = Max - Min
  1687. var Rand = Math.random()
  1688. return Min + Math.round(Rand * Range)
  1689. },
  1690. getList() {
  1691. this.tasknumber()
  1692. if(localStorage.getItem("taskTypeKey")){
  1693. if(localStorage.getItem("taskTypeKey") == 1){
  1694. this.$set(this.dataList, 'inOutType', '销售出库')
  1695. this.$set(this.dataList, 'inOutTypeKey', '1')
  1696. this.$set(this.dataList, 'goodsName', '玉米')
  1697. this.$set(this.dataList, 'goodsNameKey', '1')
  1698. this.$set(this.dataList1, 'goodsName', '玉米')
  1699. this.$set(this.dataList1, 'goodsNameKey', '1')
  1700. }else if(localStorage.getItem("taskTypeKey") == 2){
  1701. this.$set(this.dataList1, 'inOutType', '采购入库')
  1702. this.$set(this.dataList1, 'inOutTypeKey', '2')
  1703. }else if(localStorage.getItem("taskTypeKey") == 3){
  1704. this.$set(this.dataList, 'inOutType', '移库出库')
  1705. this.$set(this.dataList, 'inOutTypeKey', '3')
  1706. this.$set(this.dataList1, 'inOutType', '移库入库')
  1707. this.$set(this.dataList1, 'inOutTypeKey', '3')
  1708. }else if(localStorage.getItem("taskTypeKey") == 4){
  1709. this.$set(this.dataList, 'inOutType', '销售出库')
  1710. this.$set(this.dataList, 'inOutTypeKey', '4')
  1711. this.$set(this.dataList1, 'inOutType', '退库')
  1712. this.$set(this.dataList1, 'inOutTypeKey', '4')
  1713. }
  1714. this.$set(this.dataList, 'grade', '一等品')
  1715. this.$set(this.dataList, 'gradeKey', '1')
  1716. this.$set(this.dataList1, 'grade', '一等品')
  1717. this.$set(this.dataList1, 'gradeKey', '1')
  1718. }else{
  1719. this.$set(this.dataList, 'inOutType', '销售出库')
  1720. this.$set(this.dataList, 'inOutTypeKey', '1')
  1721. this.$set(this.dataList, 'goodsName', '玉米')
  1722. this.$set(this.dataList, 'goodsNameKey', '1')
  1723. this.$set(this.dataList, 'grade', '一等品')
  1724. this.$set(this.dataList, 'gradeKey', '1')
  1725. this.$set(this.dataList1, 'goodsName', '玉米')
  1726. this.$set(this.dataList1, 'goodsNameKey', '1')
  1727. this.$set(this.dataList1, 'grade', '一等品')
  1728. this.$set(this.dataList1, 'gradeKey', '1')
  1729. }
  1730. // 货名
  1731. pullDown({
  1732. constId: 'CON2'
  1733. })
  1734. .toPromise()
  1735. .then(response => {
  1736. this.goodnameList = response
  1737. })
  1738. // 品级
  1739. pullDown({
  1740. constId: 'CON3'
  1741. })
  1742. .toPromise()
  1743. .then(response => {
  1744. this.gradeList = response
  1745. })
  1746. pullDown({
  1747. constId: 'CON6'
  1748. })
  1749. .toPromise()
  1750. .then(response => {
  1751. this.storageType = response
  1752. })
  1753. pullDown({
  1754. constId: 'CON5'
  1755. })
  1756. .toPromise()
  1757. .then(response => {
  1758. this.storageType1 = response
  1759. })
  1760. xialaNo({
  1761. compId: this.compId,
  1762. flag: this.flag
  1763. })
  1764. .toPromise()
  1765. .then(response => {
  1766. this.contractNoList = response
  1767. // this.contractNoList1 = response
  1768. })
  1769. // //临时仓库入库类型
  1770. // pullDown({ constId: 'WARE1' })
  1771. // .toPromise()
  1772. // .then((response) => {
  1773. // this.storageType = respons
  1774. // })
  1775. // //临时仓库出库类型
  1776. // pullDown({ constId: 'WARE2' })
  1777. // .toPromise()
  1778. // .then((response) => {
  1779. // this.deliveryType = response
  1780. // })
  1781. //仓库名
  1782. getwarehousename({
  1783. compId: this.compId,
  1784. warehouseType: 1
  1785. })
  1786. .toPromise()
  1787. .then(response => {
  1788. this.warehouseNameList = response
  1789. getwarehousename({
  1790. compId: this.compId,
  1791. warehouseType: 2
  1792. })
  1793. .toPromise()
  1794. .then(response => {
  1795. console.log('查仓库sss',response)
  1796. for (var i = 0; i < response.length; i++) {
  1797. this.warehouseNameList.push(response[i])
  1798. }
  1799. })
  1800. })
  1801. },
  1802. selecttaskType(e) {
  1803. for (var i = 0; i < this.taskTypeList.length; i++) {
  1804. if (this.taskTypeList[i].value == e) {
  1805. this.searchType = this.taskTypeList[i].type
  1806. }
  1807. }
  1808. },
  1809. fujian(row) {
  1810. if (
  1811. row.receiveAttachmentPath === null ||
  1812. row.receiveAttachmentPath === ''
  1813. ) {
  1814. EventBus.$emit(
  1815. 'warning',
  1816. this.$t('system.noticeCircular.NoInformation')
  1817. )
  1818. } else {
  1819. this.accessoryTFs = true
  1820. }
  1821. this.appendixIdss = row.receiveAttachmentPath
  1822. },
  1823. handleExamine(row) {
  1824. this.$router.push({
  1825. name: 'salesContractExamine',
  1826. query: {
  1827. id: row.id
  1828. }
  1829. })
  1830. },
  1831. // 关闭 dialog时 处理文件url 初始化upload组件
  1832. handleCloe() {
  1833. this.dialogViewSpareMoney = false
  1834. },
  1835. history(row) {
  1836. console.log(row)
  1837. billoperatehis({
  1838. id: row.id
  1839. })
  1840. .toPromise()
  1841. .then(response => {
  1842. this.historyList = response
  1843. })
  1844. }
  1845. }
  1846. }
  1847. </script>
  1848. <style lang="scss" scoped>
  1849. /deep/.basicInformation {
  1850. .el-info-table {
  1851. border: none;
  1852. position: relative;
  1853. }
  1854. .el-form-item {
  1855. width: 33.3333%;
  1856. border: none;
  1857. margin: 0;
  1858. .el-form-item__label {
  1859. text-align: left;
  1860. font-size: 14px;
  1861. font-family: PingFangSC-Regular, PingFang SC;
  1862. font-weight: 400;
  1863. color: #8890b1;
  1864. }
  1865. .el-form-item__content {
  1866. padding-left: 0px;
  1867. padding-right: 10px;
  1868. // background: #fff;
  1869. white-space: nowrap;
  1870. height: 40px;
  1871. display: flex;
  1872. -webkit-box-align: center;
  1873. align-items: center;
  1874. text-align: left;
  1875. overflow: hidden;
  1876. }
  1877. }
  1878. }
  1879. /deep/.el-radio {
  1880. color: #606266;
  1881. font-weight: 500;
  1882. line-height: 1;
  1883. cursor: pointer;
  1884. white-space: nowrap;
  1885. outline: 0;
  1886. margin-right: 30px;
  1887. margin-top: 15px;
  1888. }
  1889. /deep/.el-radio__inner {
  1890. border: 1px solid #dcdfe6;
  1891. border-radius: 100%;
  1892. width: 14px;
  1893. height: 14px;
  1894. background-color: #fff;
  1895. cursor: pointer;
  1896. -webkit-box-sizing: border-box;
  1897. box-sizing: border-box;
  1898. margin-left: 100px;
  1899. }
  1900. /deep/.el-radio__input {
  1901. white-space: nowrap;
  1902. cursor: pointer;
  1903. outline: 0;
  1904. line-height: 1;
  1905. vertical-align: middle;
  1906. margin-top: -1px;
  1907. }
  1908. .title {
  1909. position: relative;
  1910. padding-left: 10px;
  1911. }
  1912. .title::before {
  1913. content: '';
  1914. display: inline-block;
  1915. width: 5px;
  1916. height: 30px;
  1917. background: #5473e8;
  1918. position: absolute;
  1919. left: 0;
  1920. }
  1921. .el-button--primary {
  1922. background-color: #5878e8;
  1923. border-color: #5878e8;
  1924. }
  1925. .el-col {
  1926. background: #f6f7fc;
  1927. }
  1928. .bg-right {
  1929. text-align: right;
  1930. padding: 16px 20px;
  1931. }
  1932. .center {
  1933. position: relative;
  1934. top: 50px;
  1935. width: 40%;
  1936. margin: 0 auto;
  1937. margin-right: 180px;
  1938. }
  1939. /deep/.el-form-item__label {
  1940. width: 160px;
  1941. }
  1942. .inspector {
  1943. width: 50%;
  1944. }
  1945. /deep/.el-form-item--small .el-form-item__label,
  1946. .el-form-item--small .el-form-item__content {
  1947. text-align: left;
  1948. }
  1949. /deep/.el-input--small {
  1950. font-size: 13px;
  1951. position: relative;
  1952. display: inline-block;
  1953. }
  1954. .center1 .small-title {
  1955. margin-left: 323px;
  1956. }
  1957. .center1 {
  1958. width: 90%;
  1959. margin: 0 auto;
  1960. margin-left: 10px;
  1961. margin-top: 25px;
  1962. }
  1963. /deep/.el-input--small .el-input__inner {
  1964. height: 32px;
  1965. line-height: 32px;
  1966. }
  1967. /deep/.el-select {
  1968. display: inline-block;
  1969. position: relative;
  1970. width: 100%;
  1971. }
  1972. .annu {
  1973. height: 81px;
  1974. background: #ffffff;
  1975. border-radius: 4px;
  1976. }
  1977. .basicInformation .el-form-item {
  1978. width: 50.3333%;
  1979. border: none;
  1980. margin: 0;
  1981. }
  1982. .huom {
  1983. width: 100%;
  1984. }
  1985. .a {
  1986. margin-left: -32px;
  1987. }
  1988. .ding {
  1989. height: 23px;
  1990. background: #e8ecf6;
  1991. box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
  1992. }
  1993. .el-radio-group {
  1994. font-size: 0;
  1995. margin-top: 20px;
  1996. margin-left: 251px;
  1997. }
  1998. /deep/.el-form {
  1999. padding: 0 15%;
  2000. display: -webkit-box;
  2001. display: -ms-flexbox;
  2002. display: flex;
  2003. -ms-flex-wrap: wrap;
  2004. flex-wrap: wrap;
  2005. margin-left: 130px;
  2006. margin-top: 15px;
  2007. width: 100%;
  2008. font-size: 14px;
  2009. font-family: PingFangSC-Regular, PingFang SC;
  2010. font-weight: 400;
  2011. color: #8890b1;
  2012. line-height: 16px;
  2013. }
  2014. </style>