tranManagementWarehouseInOutTaskAdd.vue 61 KB

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