tranManagementWarehouseInOutTaskAdd.vue 55 KB

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