From fd12bca625f3337ee54530411c88eb29373bca85 Mon Sep 17 00:00:00 2001 From: wlikett <2331964395@qq.com> Date: Sat, 23 Dec 2023 18:42:25 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=86=E6=96=99=E7=94=B3=E8=AF=B7=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../receive/receiveApplyAdd.vue | 71 ++++-- .../claimAndRefund/receive/receiveExamine.vue | 223 +++++++++++++----- .../claimAndRefund/receive/receiveManage.vue | 163 +++++++++---- 3 files changed, 327 insertions(+), 130 deletions(-) diff --git a/sgzb-ui/src/views/claimAndRefund/receive/receiveApplyAdd.vue b/sgzb-ui/src/views/claimAndRefund/receive/receiveApplyAdd.vue index 860a409f..e9b214e2 100644 --- a/sgzb-ui/src/views/claimAndRefund/receive/receiveApplyAdd.vue +++ b/sgzb-ui/src/views/claimAndRefund/receive/receiveApplyAdd.vue @@ -165,14 +165,15 @@ import { getDeviceTypeTree, getAgreementInfoById, submitLeaseApply, - getTaskDetail + getTaskDetail, + editLeaseApply } from '@/api/claimAndRefund/receive' - -import { mapState } from 'vuex' +import { getInfo } from '@/api/login' export default { name: "Role", data() { return { + user:null, // 用户信息 // 遮罩层 loading: false, // 选中数组 @@ -250,10 +251,11 @@ export default { }, leaseApplyDetails:[], - + leaseApplyInfoList:[], //领料详情单条模板 leaseApplyDetailsItem:{ + parenntId:null, createBy: null, companyId: null, status: 0, @@ -280,6 +282,9 @@ export default { unitList:[], //单位 集合 proList:[], // 工程 集合 deviceTypeTree: [], // 设备 树结构数据 + + taskId:null, // 是否编辑 + // 设备 树显示 配置 deviceTypeTreeProps: { multiple:false, @@ -309,21 +314,27 @@ export default { }; }, created() { + this.GetUserInfo() + this.GetUnitData() this.GetProData() this.GetDeviceTypeTree() // this.getList(); - console.log('this.$route.query.taskId',this.$route.query.taskId) if(this.$route.query.taskId){ this.GetTaskDetail(this.$route.query.taskId) + this.taskId = this.$route.query.taskId } }, - computed:{ - ...mapState(['user']) - }, + methods: { + // 获取用户信息 + async GetUserInfo(){ + const res = await getInfo() + this.user = res.user + }, + // 获取 来往单位 列表数据 async GetUnitData(){ const params = { @@ -381,7 +392,6 @@ export default { const res = await getTaskDetail({taskId}) const data = res.rows[0] - console.log('GetTaskDetail =================',data) // unitId:null, // proId:null, @@ -390,11 +400,12 @@ export default { this.queryParams.unitId = data.unitId this.queryParams.proId = data.projectId - this.queryParams.leaseApplyInfo.phone = data.leaseApplyInfo.phone - this.queryParams.leaseApplyInfo.leasePerson = data.leaseApplyInfo.leasePerson + this.queryParams.leaseApplyInfo.phone = data.leaseApplyInfoList[0].phone + this.queryParams.leaseApplyInfo.leasePerson = data.leaseApplyInfoList[0].leasePerson this.queryParams.agreementCode = data.agreementCode - this.queryParams.leaseApplyInfo.remark = data.leaseApplyInfo.remark - + this.queryParams.agreementId = data.agreementId + this.queryParams.leaseApplyInfo.remark = data.leaseApplyInfoList[0].remark + this.leaseApplyInfoList = data.leaseApplyInfoList this.leaseApplyDetails = data.leaseApplyDetails.map(item => { return this.handelEchoData(item) }) @@ -412,7 +423,7 @@ export default { template.remark = item.remark template.preNum = item.preNum template.status = item.status - + template.parenntId = item.parenntId return template }, @@ -534,11 +545,27 @@ export default { this.$message.error('请添加数据'); return } - this.queryParams.createBy = this.user.name - this.queryParams.companyId = this.user.id + this.queryParams.createBy = this.user.userName + this.queryParams.companyId = this.user.companyId - const res = await submitLeaseApply(this.queryParams) + let res; + if(this.taskId){ + this.leaseApplyInfoList.forEach(v => { + v = Object.assign(v,this.queryParams.leaseApplyInfo) + this.$set(v,'leaseApplyDetails',this.queryParams.leaseApplyDetails) + }) + + const params = { + ...this.queryParams,taskId:this.taskId, + leaseApplyInfoList:this.leaseApplyInfoList + } + + res = await editLeaseApply(params) + }else { + res = await submitLeaseApply(this.queryParams) + } + if(res.code == 200){ this.$message({ type:'success', @@ -623,7 +650,7 @@ export default { if(nodes[0].level != 4){ return } - + console.log('nodes[0]',nodes[0],this.user) this.leaseApplyDetails.push( this.handelTableItemData(nodes[0]) ) @@ -641,11 +668,17 @@ export default { handelTableItemData(node){ const template = JSON.parse(JSON.stringify(this.leaseApplyDetailsItem)) template.createBy = this.user.name - template.companyId = this.user.id + template.companyId = node.data.companyId template.typeId = node.data.id template.unitCn = node.data.unitName template.typeCn = node.pathLabels[2] template.guigeCn = node.pathLabels[3] + + if(this.taskId){ + const index = this.leaseApplyInfoList.find(key => key.companyId == node.data.companyId) + template.parenntId = index ? index.id : '' + } + return template } } diff --git a/sgzb-ui/src/views/claimAndRefund/receive/receiveExamine.vue b/sgzb-ui/src/views/claimAndRefund/receive/receiveExamine.vue index 4934af3e..3ff46583 100644 --- a/sgzb-ui/src/views/claimAndRefund/receive/receiveExamine.vue +++ b/sgzb-ui/src/views/claimAndRefund/receive/receiveExamine.vue @@ -1,54 +1,50 @@ - 肖洁提交的领料申请 - 领料单号:L20231122-001 + {{ queryParams.applyFor }}提交的领料申请 + 领料单号:{{ queryParams.code }} - - - - - + + + + + - - - - - - + + + + + - + @@ -69,13 +65,13 @@ - + + + + + + + @@ -88,48 +84,76 @@ - + - 提交审批 - 肖洁 提交于 2018/4/12 20:46 + 提交审批 + 申请人:{{queryParams.applyFor}} + 申请时间:{{queryParams.updateTimes}} - + - 公司审批 - 肖洁 提交于 2018/4/3 20:46 - - - - - 部门审批 - 肖洁 提交于 2018/4/2 20:46 + {{v.name}} + 审核人:{{queryParams[v.authorKey]}} + 审核时间:{{queryParams[v.timeKey]}} + 审核意见:{{ queryParams[v.remarkKey] }} + + + + + + + + diff --git a/sgzb-ui/src/views/claimAndRefund/receive/receiveManage.vue b/sgzb-ui/src/views/claimAndRefund/receive/receiveManage.vue index 568ab57a..388a3fd3 100644 --- a/sgzb-ui/src/views/claimAndRefund/receive/receiveManage.vue +++ b/sgzb-ui/src/views/claimAndRefund/receive/receiveManage.vue @@ -97,18 +97,7 @@ - 编辑 - 删除 + 领料单 @@ -135,53 +124,72 @@ @pagination="getList" /> - - - - - - - - - - - - - - - - - - - - - - - - + + + + + 领料单 + + + + 领料单位:{{ leaseApplyData.unitName }} + + + 工程名称:{{ leaseApplyData.proName }} + + + 时间:{{ leaseApplyData.updateTimes }} + + + 编号:{{ leaseApplyData.agreementCode }} + + + + + + + + + + + + + + + + + 审核: + + + 领料: + + + 仓库: + + + 操作人: + + + + + - - - - - - - + + +
肖洁 提交于 2018/4/12 20:46
提交审批
申请人:{{queryParams.applyFor}}
申请时间:{{queryParams.updateTimes}}
肖洁 提交于 2018/4/3 20:46
肖洁 提交于 2018/4/2 20:46
{{v.name}}
审核人:{{queryParams[v.authorKey]}}
审核时间:{{queryParams[v.timeKey]}}
审核意见:{{ queryParams[v.remarkKey] }}