warehouseManagementPutOutLook.vue 17 KB

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