tranManagementWarehouseInOutTaskAdd.vue 66 KB

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