tranManagementWarehouseInOutTaskAdd.vue 56 KB

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