warehouseManagementPutOutLook.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690
  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="small-title">
  26. </div>
  27. <el-form ref="dataList" :model="dataList" label-width="140px">
  28. <!-- 任务编号 -->
  29. <el-form-item label="任务编号">
  30. <el-select
  31. disabled
  32. v-model="dataList.warehouseName"
  33. class="typeselect"
  34. >
  35. <el-option
  36. v-for="item in warehouseNameList"
  37. :key="item.constKey"
  38. :label="item.warehouseName"
  39. :value="item.warehouseName"
  40. />
  41. </el-select>
  42. </el-form-item>
  43. <!-- 合同编号 -->
  44. <el-form-item label="合同编号">
  45. <el-select
  46. disabled
  47. v-model="dataList.contractNo"
  48. placeholder="请输入合同编号"
  49. class="typeselect"
  50. >
  51. <el-option
  52. v-for="item in contractNoList"
  53. :key="item.constKey"
  54. :label="item.contractNo"
  55. :value="item.contractNo"
  56. ></el-option>
  57. </el-select>
  58. </el-form-item>
  59. <!-- 库房名 -->
  60. <el-form-item label="库房名">
  61. <el-select
  62. disabled
  63. v-model="dataList.goodsName"
  64. placeholder="货名"
  65. class="typeselect"
  66. >
  67. <el-option
  68. v-for="item in goodnameList"
  69. :key="item.constKey"
  70. :label="item.constValue"
  71. :value="item.constValue"
  72. ></el-option>
  73. </el-select>
  74. </el-form-item>
  75. <!-- 类型-->
  76. <el-form-item label="类型">
  77. <el-select
  78. disabled
  79. v-model="dataList.goodsName"
  80. placeholder="货名"
  81. class="typeselect"
  82. >
  83. <el-option
  84. v-for="item in goodnameList"
  85. :key="item.constKey"
  86. :label="item.constValue"
  87. :value="item.constValue"
  88. ></el-option>
  89. </el-select>
  90. </el-form-item>
  91. <!-- 货名 -->
  92. <el-form-item label="货名">
  93. <el-select
  94. disabled
  95. v-model="dataList.goodsName"
  96. placeholder="货名"
  97. class="typeselect"
  98. >
  99. <el-option
  100. v-for="item in goodnameList"
  101. :key="item.constKey"
  102. :label="item.constValue"
  103. :value="item.constValue"
  104. ></el-option>
  105. </el-select>
  106. </el-form-item>
  107. <!--重量(吨)-->
  108. <el-form-item label="重量(吨)">
  109. <el-input
  110. disabled
  111. v-model="dataList.weight"
  112. placeholder="请输入重量"
  113. maxlength="120"
  114. size="small"
  115. />
  116. </el-form-item>
  117. <!-- 预计日期 -->
  118. <el-form-item
  119. label="预计日期"
  120. span="1"
  121. prop="predictDate"
  122. class="deliverydate"
  123. >
  124. <el-date-picker
  125. disabled
  126. v-model="dataList.predictDate"
  127. type="date"
  128. placeholder="请选择预计出库日期"
  129. value-format="yyyy-MM-dd"
  130. />
  131. </el-form-item>
  132. <!--经办人-->
  133. <el-form-item label="经办人">
  134. <el-select
  135. disabled
  136. v-model="dataList.agent"
  137. placeholder="请选择经办人"
  138. filterable
  139. :filter-method="dataFilter"
  140. >
  141. <el-option
  142. v-for="item in options"
  143. :key="item.value"
  144. :label="item.staffName"
  145. :value="item.staffName"
  146. />
  147. </el-select>
  148. </el-form-item>
  149. <!-- 品级 -->
  150. <el-form-item label="品级">
  151. <el-select
  152. v-model="dataList.grade"
  153. placeholder=""
  154. class="typeselect"
  155. disabled
  156. >
  157. <el-option
  158. v-for="item in gradeList"
  159. :key="item.constKey"
  160. :label="item.constValue"
  161. :value="item.constValue"
  162. />
  163. </el-select>
  164. </el-form-item>
  165. <!--容重(克/升)>=-->
  166. <el-form-item label="容重(克/升)>=">
  167. <el-input
  168. disabled
  169. v-model="dataList.bulkDensity"
  170. placeholder="请输入容重"
  171. maxlength="120"
  172. size="small"
  173. />
  174. </el-form-item>
  175. <!--水分(%)<=-->
  176. <el-form-item label="水分(%)<=">
  177. <el-input
  178. disabled
  179. v-model="dataList.waterContent"
  180. placeholder="请输入水分占比"
  181. maxlength="120"
  182. size="small"
  183. />
  184. </el-form-item>
  185. <!--单价(元/吨)-->
  186. <el-form-item label="单价(元/吨)">
  187. <el-input
  188. disabled
  189. v-model="dataList.unitPrice"
  190. placeholder="请输入单价"
  191. maxlength="120"
  192. size="small"
  193. />
  194. </el-form-item>
  195. <!--发布人-->
  196. <el-form-item label="发布人">
  197. <el-input
  198. disabled
  199. v-model="dataList.unitPrice"
  200. maxlength="120"
  201. size="small"
  202. />
  203. </el-form-item>
  204. <!--审核人-->
  205. <el-form-item label="审核人">
  206. <el-input
  207. disabled
  208. v-model="dataList.unitPrice"
  209. maxlength="120"
  210. size="small"
  211. />
  212. </el-form-item>
  213. <!--仓位-->
  214. <el-form-item label="仓位">
  215. <el-input
  216. disabled
  217. v-model="dataList.unitPrice"
  218. maxlength="120"
  219. size="small"
  220. />
  221. </el-form-item>
  222. <!--业务描述=-->
  223. <el-form-item label="业务描述">
  224. <el-input
  225. disabled
  226. v-model="dataList.businessDescribe"
  227. placeholder="请输入业务描述,不超过150字"
  228. maxlength="150"
  229. size="small"
  230. />
  231. </el-form-item>
  232. </el-form>
  233. </div>
  234. <!-- 提交 -->
  235. <div style="text-align: right; padding: 10px" class="center">
  236. <el-button class="bg-bottom" type="primary" size="small" @click="submit()"
  237. >提交</el-button
  238. >
  239. </div>
  240. </div>
  241. </template>
  242. <script>
  243. import {
  244. getwarehousename,
  245. xialaNo,
  246. addoreditoutput,
  247. outexamine,
  248. } from '@/model/tasksport/index'
  249. import { packList } from '@/model/contarct/index'
  250. import { pullDown, getstaff } from '@/model/warehouse/index'
  251. import { downloadFile } from '@/utils/batchDown'
  252. import Pagination from '@/components/Pagination'
  253. import { mapActions, mapGetters, mapState } from 'vuex'
  254. import WsUpload from '@/components/WsUpload'
  255. // import { dayjs, fmoney, EventBus } from 'base-core-lib'
  256. import { dayjs, EventBus } from 'base-core-lib'
  257. export default {
  258. name: 'viewSpareMoney',
  259. components: {
  260. WsUpload,
  261. Pagination,
  262. },
  263. watch: {
  264. // vesselId(val) {
  265. // this.getList()
  266. // },
  267. isShow(val) {
  268. this.showType = val
  269. },
  270. },
  271. computed: {
  272. ...mapGetters(['deptBudgetList']),
  273. },
  274. data() {
  275. return {
  276. //弹出框
  277. dialogViewSpareMoney: false,
  278. dialogApproveFormVisible: false,
  279. // 船舶类型
  280. monetaryKey: null,
  281. // 表格显示数据
  282. tableDate: [],
  283. // 是否显示
  284. showType: true,
  285. // 年
  286. year: '',
  287. contractNoList: [],
  288. deptBudgetTotal: 0,
  289. readonly: true,
  290. currentPage: 1,
  291. pageSize: 10,
  292. searchType: 1,
  293. searchKeyWord: '',
  294. radio: '1',
  295. contractType: 2,
  296. startDate: null,
  297. endDate: null,
  298. goodnameList: [],
  299. checked: true,
  300. form: {},
  301. staffList: [],
  302. options: [],
  303. storageType: [],
  304. storageType1: [],
  305. outContractNo: [],
  306. // 提交类型
  307. submitType: true,
  308. status: [],
  309. unitPricechange: [],
  310. warehouseNameList: [],
  311. warehouseNameList1: [],
  312. waterContentchange: [],
  313. appendixIdsAdd: '',
  314. uploadSuccess: {},
  315. warehouseInOutDetail: {},
  316. onChange: {},
  317. deptBudgetList1: [],
  318. gradeList: [],
  319. rules: {
  320. netWeight: [
  321. {
  322. required: true,
  323. type: 'number',
  324. message: '请输入活动名称',
  325. trigger: 'blur',
  326. },
  327. ],
  328. },
  329. size: 10,
  330. compId: sessionStorage.getItem('ws-pf_compId'),
  331. deptCircularPage: {},
  332. packtypeList: {},
  333. date: {
  334. year: dayjs().format('YYYY'),
  335. month: dayjs().format('MM'),
  336. },
  337. contractList: [],
  338. inOutTaskNo: '',
  339. inOutTaskNo1: '',
  340. dataList: { taskTypeKey: '1' },
  341. dataList1: { taskTypeKey: '1' },
  342. historyList: [],
  343. pickerBeginDateBefore: {
  344. disabledDate: (time) => {
  345. return time.getTime() > Date.now()
  346. },
  347. },
  348. accessoryTFs: false,
  349. }
  350. },
  351. mounted() {
  352. this.getList()
  353. },
  354. methods: {
  355. //返回按钮
  356. revert() {
  357. this.$router.go(-1)
  358. },
  359. returnsales() {
  360. this.$router.push({ path: 'tranManagementWarehouseInOutTask' })
  361. },
  362. // 获取当前年月日
  363. getdate() {
  364. var date = new Date()
  365. var year = date.getFullYear() //获取完整的年份(4位)
  366. var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
  367. var datetime = date.getDate() //获取当前日(1-31)
  368. if (mouth < 10) {
  369. mouth = '0' + mouth
  370. }
  371. if (datetime < 10) {
  372. datetime = '0' + datetime
  373. }
  374. return year + mouth + datetime
  375. },
  376. // 随机验证码
  377. verifyinit() {
  378. var arr = []
  379. for (var i = 48; i < 123; i++) {
  380. if (i > 57 && i < 65) continue
  381. if (i > 90 && i < 97) continue
  382. arr.push(String.fromCharCode(i))
  383. }
  384. arr.sort(function () {
  385. return Math.random() - 0.5
  386. })
  387. arr.length = 4
  388. return arr.join('')
  389. },
  390. dataFilter(val) {
  391. // console.log(val,"名")
  392. this.deptBudgetList.staffList = val
  393. if (val) {
  394. //val存在
  395. this.options = this.staffList.filter((item) => {
  396. if (
  397. !!~item.staffName.indexOf(val) ||
  398. !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
  399. ) {
  400. return true
  401. }
  402. })
  403. } else {
  404. //val为空时,还原数组
  405. this.options = this.staffList
  406. }
  407. },
  408. selectstaff(e) {
  409. for (var i = 0; i < this.staffList.length; i++) {
  410. if (this.staffList[i].staffName == e) {
  411. this.dataList.agentKey = this.staffList[i].staffId
  412. }
  413. }
  414. },
  415. selectstaff1(e) {
  416. for (var i = 0; i < this.staffList.length; i++) {
  417. if (this.staffList[i].staffName == e) {
  418. this.dataList1.agentKey = this.staffList[i].staffId
  419. }
  420. }
  421. },
  422. requestadd(list, status) {
  423. this.$refs.dataList.validate((valid) => {
  424. if (valid) {
  425. list.compId = sessionStorage.getItem('ws-pf_compId')
  426. list.publisher =
  427. sessionStorage.getItem('ws-pf_roleName') +
  428. sessionStorage.getItem('ws-pf_staffName')
  429. addoreditoutput(list)
  430. .toPromise()
  431. .then((response) => {
  432. this.$message.success('添加成功')
  433. this.$router.push({ path: 'tranManagementWarehouseInOutTask' })
  434. })
  435. } else {
  436. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  437. return false
  438. }
  439. })
  440. },
  441. //提交按钮
  442. submit() {
  443. if (this.dataList.taskTypeKey == 1) {
  444. this.dataList.inOutTaskNo = this.inOutTaskNo
  445. this.requestadd(this.dataList)
  446. } else if (this.dataList.taskTypeKey == 2) {
  447. this.dataList.inOutTaskNo = this.inOutTaskNo1
  448. this.requestadd(this.dataList)
  449. } else if (
  450. this.dataList.taskTypeKey == 3 ||
  451. this.dataList.taskTypeKey == 4
  452. ) {
  453. this.dataList.inOutTaskNo = this.inOutTaskNo
  454. this.dataList.relevanceId = this.GetRandomNum(100000, 999999)
  455. this.requestadd(this.dataList, 'repetition')
  456. this.dataList1.inOutTaskNo = this.inOutTaskNo1
  457. this.dataList1.relevanceId = this.dataList.relevanceId
  458. this.requestadd(this.dataList1, 'repetition')
  459. }
  460. },
  461. selectwarehouseName() {},
  462. tarechange(e) {
  463. if (this.dataList.grossWeight && this.dataList.tare) {
  464. this.dataList.netWeight = Number(
  465. this.dataList.grossWeight - this.dataList.tare
  466. )
  467. }
  468. },
  469. grossWeightchange(e) {
  470. if (this.dataList.grossWeight && this.dataList.tare) {
  471. this.dataList.netWeight = Number(
  472. this.dataList.grossWeight - this.dataList.tare
  473. )
  474. }
  475. },
  476. selectgoodsName(e) {
  477. for (var i = 0; i < this.goodnameList.length; i++) {
  478. if (this.goodnameList[i].constValue == e) {
  479. this.dataList.goodsNameKey = this.goodnameList[i].constKey
  480. }
  481. }
  482. },
  483. selectgoodsName1(e) {
  484. for (var i = 0; i < this.goodnameList.length; i++) {
  485. if (this.goodnameList[i].constValue == e) {
  486. this.dataList1.goodsNameKey = this.goodnameList[i].constKey
  487. }
  488. }
  489. },
  490. selectpackingMethod(e) {
  491. for (var i = 0; i < this.packtypeList.length; i++) {
  492. if (this.packtypeList[i].constValue == e) {
  493. this.dataList.packingMethodKey = this.packtypeList[i].constKey
  494. }
  495. }
  496. },
  497. selectpackingMethod1(e) {
  498. for (var i = 0; i < this.packtypeList.length; i++) {
  499. if (this.packtypeList[i].constValue == e) {
  500. this.dataList1.packingMethodKey = this.packtypeList[i].constKey
  501. }
  502. }
  503. },
  504. selectstorageType(e) {
  505. for (var i = 0; i < this.storageType.length; i++) {
  506. if (this.storageType[i].constValue == e) {
  507. this.dataList.inOutTypeKey = this.storageType[i].constKey
  508. }
  509. }
  510. },
  511. selectstorageType1(e) {
  512. for (var i = 0; i < this.storageType1.length; i++) {
  513. if (this.storageType1[i].constValue == e) {
  514. this.dataList1.inOutTypeKey = this.storageType[i].constKey
  515. }
  516. }
  517. },
  518. handleClose() {
  519. this.accessoryTFs = false
  520. },
  521. tasktypechange() {
  522. this.tasknumber()
  523. },
  524. GetRandomNum(Min, Max) {
  525. var Range = Max - Min
  526. var Rand = Math.random()
  527. return Min + Math.round(Rand * Range)
  528. },
  529. getList() {
  530. console.log(11111)
  531. outexamine({ relevanceId: this.$route.query.relevanceId })
  532. .toPromise()
  533. .then((response) => {
  534. if (response.length > 1) {
  535. this.dataList = response[0]
  536. this.dataList1 = response[1]
  537. } else {
  538. this.dataList = response[0]
  539. }
  540. })
  541. },
  542. // deletecontract(){},
  543. //删除
  544. approve() {},
  545. listQuery() {},
  546. total() {},
  547. clearfiltQuery() {},
  548. selectCrtDuty() {},
  549. },
  550. }
  551. </script>
  552. <style lang="scss" scoped>
  553. /deep/.basicInformation {
  554. .el-info-table {
  555. border: none;
  556. position: relative;
  557. }
  558. .el-form-item {
  559. width: 33.3333%;
  560. border: none;
  561. margin: 0;
  562. .el-form-item__label {
  563. text-align: left;
  564. font-size: 14px;
  565. font-family: PingFangSC-Regular, PingFang SC;
  566. font-weight: 400;
  567. color: #8890b1;
  568. }
  569. .el-form-item__content {
  570. padding-left: 0px;
  571. padding-right: 10px;
  572. background: #fff;
  573. white-space: nowrap;
  574. height: 40px;
  575. display: flex;
  576. -webkit-box-align: center;
  577. align-items: center;
  578. text-align: left;
  579. overflow: hidden;
  580. }
  581. }
  582. }
  583. /deep/.el-radio {
  584. color: #606266;
  585. font-weight: 500;
  586. line-height: 1;
  587. cursor: pointer;
  588. white-space: nowrap;
  589. outline: 0;
  590. margin-right: 30px;
  591. margin-top: 15px;
  592. }
  593. /deep/.el-radio__inner {
  594. border: 1px solid #dcdfe6;
  595. border-radius: 100%;
  596. width: 14px;
  597. height: 14px;
  598. background-color: #fff;
  599. cursor: pointer;
  600. -webkit-box-sizing: border-box;
  601. box-sizing: border-box;
  602. margin-left: 100px;
  603. }
  604. /deep/.el-radio__input {
  605. white-space: nowrap;
  606. cursor: pointer;
  607. outline: 0;
  608. line-height: 1;
  609. vertical-align: middle;
  610. margin-top: -1px;
  611. }
  612. .title {
  613. position: relative;
  614. padding-left: 10px;
  615. }
  616. .title::before {
  617. content: '';
  618. display: inline-block;
  619. width: 5px;
  620. height: 30px;
  621. background: #5473e8;
  622. position: absolute;
  623. left: 0;
  624. }
  625. .el-form {
  626. padding: 0 15%;
  627. display: flex;
  628. flex-wrap: wrap;
  629. margin-left: -50px;
  630. margin-top: 15px;
  631. width: 110%;
  632. }
  633. .el-button--primary {
  634. background-color: #5878e8;
  635. border-color: #5878e8;
  636. }
  637. .el-col {
  638. background: #f6f7fc;
  639. }
  640. .bg-right {
  641. text-align: right;
  642. padding: 16px 20px;
  643. }
  644. .center {
  645. position: relative;
  646. top: 50px;
  647. width: 40%;
  648. height: 2000px;
  649. margin: 0 auto;
  650. margin-right: 180px;
  651. }
  652. /deep/.el-form-item__label {
  653. width: 160px;
  654. }
  655. .inspector {
  656. width: 50%;
  657. }
  658. /deep/.el-form-item--small .el-form-item__label,
  659. .el-form-item--small .el-form-item__content {
  660. text-align: left;
  661. }
  662. /deep/.el-input--small {
  663. font-size: 13px;
  664. position: relative;
  665. display: inline-block;
  666. }
  667. .center1 .small-title {
  668. margin-left: 150px;
  669. }
  670. .center1 {
  671. width: 90%;
  672. margin: 0 auto;
  673. margin-left: 10px;
  674. margin-top: 25px;
  675. }
  676. /deep/.el-input--small .el-input__inner {
  677. height: 32px;
  678. line-height: 32px;
  679. }
  680. /deep/.el-select {
  681. display: inline-block;
  682. position: relative;
  683. width: 100%;
  684. }
  685. </style>