tranManagementWarehouseInOutTaskAdd.vue 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042
  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 v-if="dataList.taskTypeKey != 2" class="center1">
  35. <img
  36. style="position: relative; top: 40px; left: 128px;"
  37. width="19"
  38. height="19"
  39. src="../../../public/img/cangku.png"
  40. alt=""
  41. />
  42. <!--出库=-->
  43. <div class="small-title">
  44. <h3>出库任务({{ inOutTaskNo }})</h3>
  45. </div>
  46. <el-form ref="dataList" :model="dataList" label-width="140px">
  47. <!-- 仓库名 -->
  48. <el-form-item label="仓库名">
  49. <el-select
  50. v-model="dataList.warehouseName"
  51. placeholder="请选择仓库名"
  52. class="typeselect"
  53. @change="selectwarehouseName"
  54. >
  55. <el-option
  56. v-for="item in warehouseNameList"
  57. :key="item.constKey"
  58. :label="item.warehouseName"
  59. :value="item.warehouseName"
  60. />
  61. </el-select>
  62. </el-form-item>
  63. <!-- 出库类型 -->
  64. <el-form-item label="出库类型">
  65. <el-select
  66. v-model="dataList.inOutType"
  67. placeholder="请选择出库类型"
  68. class="typeselect"
  69. @change="selectstorageType"
  70. >
  71. <el-option
  72. v-for="item in storageType"
  73. :key="item.constKey"
  74. v-if="
  75. (dataList.taskTypeKey == 1 &&
  76. item.constValue != '移库出库') ||
  77. (dataList.taskTypeKey == 3 &&
  78. item.constValue == '移库出库') ||
  79. (dataList.taskTypeKey == 4 && item.constValue == '销售出库')
  80. "
  81. :label="item.constValue"
  82. :value="item.constValue"
  83. />
  84. </el-select>
  85. </el-form-item>
  86. <!-- 合同编号 -->
  87. <el-form-item label="合同编号">
  88. <el-select
  89. v-model="dataList.contractNo"
  90. placeholder="请输入合同编号"
  91. class="typeselect"
  92. >
  93. <el-option
  94. v-for="item in contractNoList"
  95. :key="item.constKey"
  96. :label="item.contractNo"
  97. :value="item.contractNo"
  98. ></el-option>
  99. </el-select>
  100. </el-form-item>
  101. <!-- 货名 -->
  102. <el-form-item label="货名" class="huom">
  103. <el-select
  104. v-model="dataList.goodsName"
  105. placeholder="货名"
  106. class="huom"
  107. @change="selectgoodsName"
  108. >
  109. <el-option
  110. v-for="item in goodnameList"
  111. :key="item.constKey"
  112. :label="item.constValue"
  113. :value="item.constValue"
  114. ></el-option>
  115. </el-select>
  116. </el-form-item>
  117. <!--重量(吨)-->
  118. <el-form-item label="重量(吨)" span="1" style=" margin-left: 350px; margin-top: -40px" >
  119. <el-input
  120. v-model="dataList.weight"
  121. placeholder="请输入重量"
  122. maxlength="120"
  123. size="small"
  124. class="huom"
  125. />
  126. </el-form-item>
  127. <!-- 品级 -->
  128. <el-form-item label="品级">
  129. <el-select
  130. v-model="dataList.grade"
  131. placeholder=""
  132. class="typeselect"
  133. @change="selectpackingMethod"
  134. >
  135. <el-option
  136. v-for="item in gradeList"
  137. :key="item.constKey"
  138. :label="item.constValue"
  139. :value="item.constValue"
  140. />
  141. </el-select>
  142. </el-form-item>
  143. <!--容重(克/升)>=-->
  144. <el-form-item label="容重(克/升)>=">
  145. <el-input
  146. v-model="dataList.bulkDensity"
  147. placeholder="请输入容重"
  148. maxlength="120"
  149. size="small"
  150. class="huom"
  151. />
  152. </el-form-item>
  153. <!--水分(%)<=-->
  154. <el-form-item label="水分(%)<=" span="1" style=" margin-left: 350px; margin-top: -40px" >
  155. <el-input
  156. v-model="dataList.waterContent"
  157. placeholder="请输入水分占比"
  158. maxlength="120"
  159. size="small"
  160. class="huom"
  161. />
  162. </el-form-item>
  163. <!--单价(元/吨)-->
  164. <el-form-item label="单价(元/吨)" span="1" style=" margin-left: 650px; margin-top: -40px" >
  165. <el-input
  166. v-model="dataList.unitPrice"
  167. placeholder="请输入单价"
  168. maxlength="120"
  169. size="small"
  170. class="huom"
  171. />
  172. </el-form-item>
  173. <!--预计出库日期-->
  174. <el-form-item
  175. label="预计出库日期"
  176. span="1"
  177. prop="predictDate"
  178. class="deliverydate"
  179. >
  180. <el-date-picker
  181. v-model="dataList.predictDate"
  182. type="date"
  183. placeholder="请选择预计出库日期"
  184. value-format="yyyy-MM-dd"
  185. />
  186. </el-form-item>
  187. <!--经办人-->
  188. <el-form-item label="出库经办人">
  189. <el-select
  190. v-model="dataList.agent"
  191. placeholder="请选择经办人"
  192. filterable
  193. :filter-method="dataFilter"
  194. @change="selectstaff"
  195. >
  196. <el-option
  197. v-for="item in options"
  198. :key="item.value"
  199. :label="item.staffName"
  200. :value="item.staffName"
  201. />
  202. </el-select>
  203. </el-form-item>
  204. <!--业务描述=-->
  205. <el-form-item label="业务描述" span="1">
  206. <el-input
  207. v-model="dataList.businessDescribe"
  208. placeholder="请输入业务描述,不超过150字"
  209. maxlength="150"
  210. size="small"
  211. class="yewu"
  212. />
  213. </el-form-item>
  214. </el-form>
  215. </div>
  216. <div v-if="dataList.taskTypeKey != 1" class="center1">
  217. <img
  218. style="position: relative; top: 40px; left: 128px;"
  219. width="19"
  220. height="19"
  221. src="../../../public/img/cangku.png"
  222. alt=""
  223. />
  224. <div class="small-title">
  225. <h3>入库任务({{ inOutTaskNo1 }} )</h3>
  226. </div>
  227. <el-form ref="form" :model="form" label-width="140px">
  228. <!-- 仓库名 -->
  229. <el-form-item label="仓库名">
  230. <el-select
  231. v-model="dataList1.warehouseName"
  232. placeholder="请选择仓库名"
  233. class="typeselect"
  234. >
  235. <el-option
  236. v-for="item in warehouseNameList"
  237. :key="item.constKey"
  238. :label="item.warehouseName"
  239. :value="item.warehouseName"
  240. />
  241. </el-select>
  242. </el-form-item>
  243. <!-- 出库类型 -->
  244. <el-form-item label="入库类型">
  245. <el-select
  246. v-model="dataList1.inOutType"
  247. placeholder="请选择入库类型"
  248. class="typeselect"
  249. @change="selectstorageType1"
  250. >
  251. <el-option
  252. v-for="item in storageType1"
  253. :key="item.constKey"
  254. v-if="
  255. (dataList1.taskTypeKey == 2 &&
  256. item.constValue != '移库入库') ||
  257. (dataList1.taskTypeKey == 3 &&
  258. item.constValue == '移库入库') ||
  259. (dataList1.taskTypeKey == 4 && item.constValue == '退库')
  260. "
  261. :label="item.constValue"
  262. :value="item.constValue"
  263. />
  264. </el-select>
  265. </el-form-item>
  266. <!-- 合同编号 -->
  267. <el-form-item label="合同编号">
  268. <el-select
  269. v-model="dataList1.contractNo"
  270. placeholder="请输入合同编号"
  271. class="typeselect"
  272. >
  273. <el-option
  274. v-for="item in contractNoList"
  275. :key="item.constKey"
  276. :label="item.contractNo"
  277. :value="item.contractNo"
  278. ></el-option>
  279. </el-select>
  280. </el-form-item>
  281. <!-- 货名 -->
  282. <el-form-item label="货名" class="huom">
  283. <el-select
  284. v-model="dataList1.goodsName"
  285. placeholder="货名"
  286. class="huom"
  287. @change="selectgoodsName1"
  288. >
  289. <el-option
  290. v-for="item in goodnameList"
  291. :key="item.constKey"
  292. :label="item.constValue"
  293. :value="item.constValue"
  294. ></el-option>
  295. </el-select>
  296. </el-form-item>
  297. <!--重量(吨)-->
  298. <el-form-item label="重量(吨)" span="1" style=" margin-left: 350px; margin-top: -40px" >
  299. <el-input
  300. v-model="dataList1.weight"
  301. placeholder="请输入重量"
  302. maxlength="120"
  303. size="small"
  304. class="huom"
  305. />
  306. </el-form-item>
  307. <!-- 品级 -->
  308. <el-form-item label="品级">
  309. <el-select
  310. v-model="dataList1.grade"
  311. placeholder=""
  312. class="typeselect"
  313. @change="selectpackingMethod1"
  314. >
  315. <el-option
  316. v-for="item in gradeList"
  317. :key="item.constKey"
  318. :label="item.constValue"
  319. :value="item.constValue"
  320. />
  321. </el-select>
  322. </el-form-item>
  323. <!--容重(克/升)>=-->
  324. <el-form-item label="容重(克/升)>=">
  325. <el-input
  326. v-model="dataList1.bulkDensity"
  327. placeholder="请输入容重"
  328. maxlength="120"
  329. size="small"
  330. class="huom"
  331. />
  332. </el-form-item>
  333. <!--水分(%)<=-->
  334. <el-form-item label="水分(%)<=" span="1" style=" margin-left: 350px; margin-top: -40px">
  335. <el-input
  336. v-model="dataList1.waterContent"
  337. placeholder="请输入水分占比"
  338. maxlength="120"
  339. size="small"
  340. class="huom"
  341. />
  342. </el-form-item>
  343. <!--单价(元/吨)-->
  344. <el-form-item label="单价(元/吨)" span="1" style=" margin-left: 650px; margin-top: -40px">
  345. <el-input
  346. v-model="dataList1.unitPrice"
  347. placeholder="请输入单价"
  348. maxlength="120"
  349. size="small"
  350. class="huom"
  351. />
  352. </el-form-item>
  353. <!--预计出库日期-->
  354. <el-form-item
  355. label="预计入库日期"
  356. span="1"
  357. prop="predictDate"
  358. class="deliverydate"
  359. >
  360. <el-date-picker
  361. v-model="dataList1.predictDate"
  362. type="date"
  363. placeholder="请选择预计入库日期"
  364. value-format="yyyy-MM-dd"
  365. />
  366. </el-form-item>
  367. <!--经办人-->
  368. <el-form-item label="入库经办人">
  369. <el-select
  370. v-model="dataList1.agent"
  371. placeholder="请选择经办人"
  372. filterable
  373. :filter-method="dataFilter"
  374. @change="selectstaff1"
  375. >
  376. <el-option
  377. v-for="item in options"
  378. :key="item.value"
  379. :label="item.staffName"
  380. :value="item.staffName"
  381. />
  382. </el-select>
  383. </el-form-item>
  384. <!--业务描述=-->
  385. <el-form-item label="业务描述">
  386. <el-input
  387. v-model="dataList1.businessDescribe"
  388. placeholder="请输入业务描述,不超过150字"
  389. maxlength="150"
  390. size="small"
  391. />
  392. </el-form-item>
  393. </el-form>
  394. </div>
  395. </div>
  396. <!-- 提交 -->
  397. <div style="text-align: right; padding: 10px" class="center">
  398. <el-button class="bg-bottom" type="primary" size="small" @click="submit()"
  399. >提交</el-button
  400. >
  401. </div>
  402. </div>
  403. </template>
  404. <script>
  405. import {
  406. getwarehousename,
  407. xialaNo,
  408. addoreditoutput,
  409. outexamine,
  410. } from '@/model/tasksport/index'
  411. import { packList } from '@/model/contarct/index'
  412. import { pullDown, getstaff } from '@/model/warehouse/index'
  413. import { downloadFile } from '@/utils/batchDown'
  414. import Pagination from '@/components/Pagination'
  415. import { mapActions, mapGetters, mapState } from 'vuex'
  416. import WsUpload from '@/components/WsUpload'
  417. // import { dayjs, fmoney, EventBus } from 'base-core-lib'
  418. import { dayjs, EventBus } from 'base-core-lib'
  419. export default {
  420. name: 'viewSpareMoney',
  421. components: {
  422. WsUpload,
  423. Pagination,
  424. },
  425. watch: {
  426. // vesselId(val) {
  427. // this.getList()
  428. // },
  429. isShow(val) {
  430. this.showType = val
  431. },
  432. },
  433. computed: {
  434. ...mapGetters(['deptBudgetList']),
  435. },
  436. data() {
  437. return {
  438. //弹出框
  439. dialogViewSpareMoney: false,
  440. dialogApproveFormVisible: false,
  441. // 船舶类型
  442. monetaryKey: null,
  443. // 表格显示数据
  444. tableDate: [],
  445. // 是否显示
  446. showType: true,
  447. // 年
  448. year: '',
  449. contractNoList: [],
  450. deptBudgetTotal: 0,
  451. readonly: true,
  452. currentPage: 1,
  453. pageSize: 10,
  454. searchType: 1,
  455. searchKeyWord: '',
  456. radio: '1',
  457. contractType: 2,
  458. startDate: null,
  459. endDate: null,
  460. goodnameList: [],
  461. checked: true,
  462. form: {},
  463. staffList: [],
  464. options: [],
  465. storageType: [],
  466. storageType1: [],
  467. outContractNo: [],
  468. // 提交类型
  469. submitType: true,
  470. status: [],
  471. unitPricechange: [],
  472. warehouseNameList: [],
  473. warehouseNameList1: [],
  474. waterContentchange: [],
  475. appendixIdsAdd: '',
  476. uploadSuccess: {},
  477. warehouseInOutDetail: {},
  478. onChange: {},
  479. deptBudgetList1: [],
  480. gradeList: [],
  481. rules: {
  482. netWeight: [
  483. {
  484. required: true,
  485. type: 'number',
  486. message: '请输入活动名称',
  487. trigger: 'blur',
  488. },
  489. ],
  490. },
  491. size: 10,
  492. compId: sessionStorage.getItem('ws-pf_compId'),
  493. deptCircularPage: {},
  494. packtypeList: {},
  495. date: {
  496. year: dayjs().format('YYYY'),
  497. month: dayjs().format('MM'),
  498. },
  499. contractList: [],
  500. inOutTaskNo: '',
  501. inOutTaskNo1: '',
  502. dataList: { taskTypeKey: '1' },
  503. dataList1: { taskTypeKey: '1' },
  504. historyList: [],
  505. pickerBeginDateBefore: {
  506. disabledDate: (time) => {
  507. return time.getTime() > Date.now()
  508. },
  509. },
  510. accessoryTFs: false,
  511. }
  512. },
  513. activated() {
  514. this.getList()
  515. },
  516. methods: {
  517. //返回按钮
  518. revert() {
  519. this.$router.go(-1)
  520. },
  521. returnsales() {
  522. this.$router.push({ path: 'tranManagementWarehouseInOutTask' })
  523. },
  524. // 获取当前年月日
  525. getdate() {
  526. var date = new Date()
  527. var year = date.getFullYear() //获取完整的年份(4位)
  528. var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
  529. var datetime = date.getDate() //获取当前日(1-31)
  530. if (mouth < 10) {
  531. mouth = '0' + mouth
  532. }
  533. if (datetime < 10) {
  534. datetime = '0' + datetime
  535. }
  536. return year + mouth + datetime
  537. },
  538. // 随机验证码
  539. verifyinit() {
  540. var arr = []
  541. for (var i = 48; i < 123; i++) {
  542. if (i > 57 && i < 65) continue
  543. if (i > 90 && i < 97) continue
  544. arr.push(String.fromCharCode(i))
  545. }
  546. arr.sort(function () {
  547. return Math.random() - 0.5
  548. })
  549. arr.length = 4
  550. return arr.join('')
  551. },
  552. dataFilter(val) {
  553. // console.log(val,"名")
  554. this.deptBudgetList.staffList = val
  555. if (val) {
  556. //val存在
  557. this.options = this.staffList.filter((item) => {
  558. if (
  559. !!~item.staffName.indexOf(val) ||
  560. !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
  561. ) {
  562. return true
  563. }
  564. })
  565. } else {
  566. //val为空时,还原数组
  567. this.options = this.staffList
  568. }
  569. },
  570. selectstaff(e) {
  571. for (var i = 0; i < this.staffList.length; i++) {
  572. if (this.staffList[i].staffName == e) {
  573. this.dataList.agentKey = this.staffList[i].staffId
  574. }
  575. }
  576. },
  577. selectstaff1(e) {
  578. for (var i = 0; i < this.staffList.length; i++) {
  579. if (this.staffList[i].staffName == e) {
  580. this.dataList1.agentKey = this.staffList[i].staffId
  581. }
  582. }
  583. },
  584. requestadd(list, status) {
  585. list.compId = sessionStorage.getItem('ws-pf_compId')
  586. list.publisher =
  587. sessionStorage.getItem('ws-pf_roleName') +
  588. sessionStorage.getItem('ws-pf_staffName')
  589. addoreditoutput(list)
  590. .toPromise()
  591. .then((response) => {
  592. this.$message.success('添加成功')
  593. this.$router.push({ path: 'tranManagementWarehouseInOutTask' })
  594. })
  595. },
  596. //提交按钮
  597. submit() {
  598. this.dataList.inOutFlag=1
  599. this.dataList1.inOutFlag=2
  600. if (this.dataList.taskTypeKey == 1) {
  601. this.dataList.inOutTaskNo = this.inOutTaskNo
  602. this.requestadd(this.dataList)
  603. } else if (this.dataList1.taskTypeKey == 2) {
  604. this.dataList1.inOutTaskNo = this.inOutTaskNo1
  605. this.requestadd(this.dataList1)
  606. } else if (
  607. this.dataList.taskTypeKey == 3 ||
  608. this.dataList.taskTypeKey == 4
  609. ) {
  610. this.dataList.inOutTaskNo = this.inOutTaskNo
  611. this.dataList.relevanceId = this.GetRandomNum(100000, 999999)
  612. this.requestadd(this.dataList, 'repetition')
  613. this.dataList1.inOutTaskNo = this.inOutTaskNo1
  614. this.dataList1.relevanceId = this.dataList.relevanceId
  615. this.requestadd(this.dataList1, 'repetition')
  616. }
  617. },
  618. selectwarehouseName() {},
  619. tarechange(e) {
  620. if (this.dataList.grossWeight && this.dataList.tare) {
  621. this.dataList.netWeight = Number(
  622. this.dataList.grossWeight - this.dataList.tare
  623. )
  624. }
  625. },
  626. grossWeightchange(e) {
  627. if (this.dataList.grossWeight && this.dataList.tare) {
  628. this.dataList.netWeight = Number(
  629. this.dataList.grossWeight - this.dataList.tare
  630. )
  631. }
  632. },
  633. selectgoodsName(e) {
  634. for (var i = 0; i < this.goodnameList.length; i++) {
  635. if (this.goodnameList[i].constValue == e) {
  636. this.dataList.goodsNameKey = this.goodnameList[i].constKey
  637. }
  638. }
  639. },
  640. selectgoodsName1(e) {
  641. for (var i = 0; i < this.goodnameList.length; i++) {
  642. if (this.goodnameList[i].constValue == e) {
  643. this.dataList1.goodsNameKey = this.goodnameList[i].constKey
  644. }
  645. }
  646. },
  647. selectpackingMethod(e) {
  648. for (var i = 0; i < this.packtypeList.length; i++) {
  649. if (this.packtypeList[i].constValue == e) {
  650. this.dataList.packingMethodKey = this.packtypeList[i].constKey
  651. }
  652. }
  653. },
  654. selectpackingMethod1(e) {
  655. for (var i = 0; i < this.packtypeList.length; i++) {
  656. if (this.packtypeList[i].constValue == e) {
  657. this.dataList1.packingMethodKey = this.packtypeList[i].constKey
  658. }
  659. }
  660. },
  661. selectstorageType(e) {
  662. for (var i = 0; i < this.storageType.length; i++) {
  663. if (this.storageType[i].constValue == e) {
  664. this.dataList.inOutTypeKey = this.storageType[i].constKey
  665. }
  666. }
  667. },
  668. selectstorageType1(e) {
  669. for (var i = 0; i < this.storageType1.length; i++) {
  670. if (this.storageType1[i].constValue == e) {
  671. this.dataList1.inOutTypeKey = this.storageType1[i].constKey
  672. }
  673. }
  674. },
  675. handleClose() {
  676. this.accessoryTFs = false
  677. },
  678. handleSizeChange(val) {
  679. console.log(`每页 ${val} 条`)
  680. this.pageSize = val
  681. this.getList()
  682. },
  683. businessDescriptionchange(e) {
  684. console.log(e)
  685. },
  686. handleCurrentChange(val) {
  687. this.currentPage = val
  688. console.log(`当前页: ${val}`)
  689. this.getList()
  690. },
  691. tasknumber() {
  692. if (this.dataList.taskTypeKey == 1) {
  693. this.inOutTaskNo = 'CK' + this.getdate() + this.verifyinit()
  694. } else if (this.dataList.taskTypeKey == 2) {
  695. this.inOutTaskNo1 = 'RK' + this.getdate() + this.verifyinit()
  696. } else if (this.dataList.taskTypeKey == 3) {
  697. this.inOutTaskNo = 'YKC' + this.getdate() + this.verifyinit()
  698. this.inOutTaskNo1 = 'YKR' + this.getdate() + this.verifyinit()
  699. } else if (this.dataList.taskTypeKey == 4) {
  700. this.inOutTaskNo = 'TCC' + this.getdate() + this.verifyinit()
  701. this.inOutTaskNo1 = 'TCR' + this.getdate() + this.verifyinit()
  702. }
  703. },
  704. tasktypechange(e) {
  705. if (!this.$route.query.relevanceId) {
  706. this.tasknumber()
  707. }
  708. this.dataList1.taskTypeKey = e
  709. },
  710. GetRandomNum(Min, Max) {
  711. var Range = Max - Min
  712. var Rand = Math.random()
  713. return Min + Math.round(Rand * Range)
  714. },
  715. getList() {
  716. if (this.$route.query.relevanceId) {
  717. outexamine({ relevanceId: this.$route.query.relevanceId })
  718. .toPromise()
  719. .then((response) => {
  720. if (response.length > 1) {
  721. this.dataList = response[0]
  722. this.dataList1 = response[1]
  723. } else {
  724. this.dataList = response[0]
  725. }
  726. })
  727. } else {
  728. this.tasknumber()
  729. }
  730. // 货名
  731. pullDown({ constId: 'CON2' })
  732. .toPromise()
  733. .then((response) => {
  734. this.goodnameList = response
  735. })
  736. // 品级
  737. pullDown({ constId: 'CON3' })
  738. .toPromise()
  739. .then((response) => {
  740. this.gradeList = response
  741. })
  742. pullDown({ constId: 'CON6' })
  743. .toPromise()
  744. .then((response) => {
  745. this.storageType = response
  746. })
  747. pullDown({ constId: 'CON5' })
  748. .toPromise()
  749. .then((response) => {
  750. this.storageType1 = response
  751. })
  752. xialaNo({
  753. compId: this.compId,
  754. })
  755. .toPromise()
  756. .then((response) => {
  757. this.contractNoList = response
  758. })
  759. // //临时仓库入库类型
  760. // pullDown({ constId: 'WARE1' })
  761. // .toPromise()
  762. // .then((response) => {
  763. // this.storageType = respons
  764. // })
  765. // //临时仓库出库类型
  766. // pullDown({ constId: 'WARE2' })
  767. // .toPromise()
  768. // .then((response) => {
  769. // this.deliveryType = response
  770. // })
  771. //仓库名
  772. getwarehousename({
  773. compId: this.compId,
  774. warehouseType: 1,
  775. })
  776. .toPromise()
  777. .then((response) => {
  778. this.warehouseNameList = response
  779. })
  780. getwarehousename({
  781. compId: this.compId,
  782. warehouseType: 2,
  783. })
  784. .toPromise()
  785. .then((response) => {
  786. this.warehouseNameList1 = response
  787. })
  788. //经办人
  789. getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
  790. .toPromise()
  791. .then((response) => {
  792. this.options = response
  793. this.staffList = response
  794. // this.agent = response
  795. })
  796. },
  797. selecttaskType(e) {
  798. for (var i = 0; i < this.taskTypeList.length; i++) {
  799. if (this.taskTypeList[i].value == e) {
  800. this.searchType = this.taskTypeList[i].type
  801. }
  802. }
  803. },
  804. fujian(row) {
  805. if (
  806. row.receiveAttachmentPath === null ||
  807. row.receiveAttachmentPath === ''
  808. ) {
  809. EventBus.$emit(
  810. 'warning',
  811. this.$t('system.noticeCircular.NoInformation')
  812. )
  813. } else {
  814. this.accessoryTFs = true
  815. }
  816. this.appendixIdss = row.receiveAttachmentPath
  817. },
  818. handleExamine(row) {
  819. this.$router.push({
  820. name: 'salesContractExamine',
  821. query: { id: row.id },
  822. })
  823. },
  824. // 关闭 dialog时 处理文件url 初始化upload组件
  825. handleCloe() {
  826. this.dialogViewSpareMoney = false
  827. },
  828. history(row) {
  829. console.log(row)
  830. billoperatehis({ id: row.id })
  831. .toPromise()
  832. .then((response) => {
  833. this.historyList = response
  834. })
  835. },
  836. async exportlist() {
  837. const { data } = await export1(
  838. {
  839. compId: sessionStorage.getItem('ws-pf_compId'),
  840. contractType: this.contractType,
  841. currentPage: this.currentPage,
  842. pageSize: this.pageSize,
  843. searchType: this.searchType,
  844. searchKeyWord: this.searchKeyWord,
  845. startDate: this.startDate,
  846. endDate: this.endDate,
  847. },
  848. {},
  849. { responseType: 'blob' }
  850. ).toPromise()
  851. downloadFile({
  852. res: data,
  853. fileName: `${
  854. this.date.year + (this.date.month ? `-${this.date.month}` : '')
  855. }_采购合同`,
  856. type: 'xls',
  857. })
  858. },
  859. // deletecontract(){},
  860. //删除
  861. approve() {},
  862. listQuery() {},
  863. total() {},
  864. clearfiltQuery() {},
  865. selectCrtDuty() {},
  866. },
  867. }
  868. </script>
  869. <style lang="scss" scoped>
  870. /deep/.basicInformation {
  871. .el-info-table {
  872. border: none;
  873. position: relative;
  874. }
  875. .el-form-item {
  876. width: 33.3333%;
  877. border: none;
  878. margin: 0;
  879. .el-form-item__label {
  880. text-align: left;
  881. font-size: 14px;
  882. font-family: PingFangSC-Regular, PingFang SC;
  883. font-weight: 400;
  884. color: #8890b1;
  885. }
  886. .el-form-item__content {
  887. padding-left: 0px;
  888. padding-right: 10px;
  889. // background: #fff;
  890. white-space: nowrap;
  891. height: 40px;
  892. display: flex;
  893. -webkit-box-align: center;
  894. align-items: center;
  895. text-align: left;
  896. overflow: hidden;
  897. }
  898. }
  899. }
  900. /deep/.el-radio {
  901. color: #606266;
  902. font-weight: 500;
  903. line-height: 1;
  904. cursor: pointer;
  905. white-space: nowrap;
  906. outline: 0;
  907. margin-right: 30px;
  908. margin-top: 15px;
  909. }
  910. /deep/.el-radio__inner {
  911. border: 1px solid #dcdfe6;
  912. border-radius: 100%;
  913. width: 14px;
  914. height: 14px;
  915. background-color: #fff;
  916. cursor: pointer;
  917. -webkit-box-sizing: border-box;
  918. box-sizing: border-box;
  919. margin-left: 100px;
  920. }
  921. /deep/.el-radio__input {
  922. white-space: nowrap;
  923. cursor: pointer;
  924. outline: 0;
  925. line-height: 1;
  926. vertical-align: middle;
  927. margin-top: -1px;
  928. }
  929. .title {
  930. position: relative;
  931. padding-left: 10px;
  932. }
  933. .title::before {
  934. content: '';
  935. display: inline-block;
  936. width: 5px;
  937. height: 30px;
  938. background: #5473e8;
  939. position: absolute;
  940. left: 0;
  941. }
  942. .el-form {
  943. padding: 0 15%;
  944. display: flex;
  945. flex-wrap: wrap;
  946. margin-left: -50px;
  947. margin-top: 15px;
  948. width: 110%;
  949. }
  950. .el-button--primary {
  951. background-color: #5878e8;
  952. border-color: #5878e8;
  953. }
  954. .el-col {
  955. background: #f6f7fc;
  956. }
  957. .bg-right {
  958. text-align: right;
  959. padding: 16px 20px;
  960. }
  961. .center {
  962. position: relative;
  963. top: 50px;
  964. width: 40%;
  965. height: 2000px;
  966. margin: 0 auto;
  967. margin-right: 180px;
  968. }
  969. /deep/.el-form-item__label {
  970. width: 160px;
  971. }
  972. .inspector {
  973. width: 50%;
  974. }
  975. /deep/.el-form-item--small .el-form-item__label,
  976. .el-form-item--small .el-form-item__content {
  977. text-align: left;
  978. }
  979. /deep/.el-input--small {
  980. font-size: 13px;
  981. position: relative;
  982. display: inline-block;
  983. }
  984. .center1 .small-title {
  985. margin-left: 150px;
  986. }
  987. .center1 {
  988. width: 90%;
  989. margin: 0 auto;
  990. margin-left: 10px;
  991. margin-top: 25px;
  992. }
  993. /deep/.el-input--small .el-input__inner {
  994. height: 32px;
  995. line-height: 32px;
  996. }
  997. /deep/.el-select {
  998. display: inline-block;
  999. position: relative;
  1000. width: 100%;
  1001. }
  1002. .annu{
  1003. height: 81px;
  1004. background: #FFFFFF;
  1005. border-radius: 4px;
  1006. }
  1007. .basicInformation .el-form-item {
  1008. width: 50.3333%;
  1009. border: none;
  1010. margin: 0;
  1011. }
  1012. .huom{
  1013. width: 100px;
  1014. }
  1015. .el-form{
  1016. font-size: 14px;
  1017. font-family: PingFangSC-Regular, PingFang SC;
  1018. font-weight: 400;
  1019. color: #8890B1;
  1020. line-height: 16px;
  1021. }
  1022. .a{
  1023. margin-left: -32px;
  1024. }
  1025. .el-radio-group {
  1026. margin-left: 80px;
  1027. }
  1028. .ding{
  1029. height: 23px;
  1030. background: #E8ECF6;
  1031. box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
  1032. }
  1033. </style>