diff --git a/src/api/claimAndRefund/return.js b/src/api/claimAndRefund/return.js index f5f5271..a9b2c65 100644 --- a/src/api/claimAndRefund/return.js +++ b/src/api/claimAndRefund/return.js @@ -228,3 +228,11 @@ export function endBack(data) { }) } +// 再用编码 +export function getMachineById(query) { + return request({ + url: '/material/backApply/getMachineById', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/api/cost/cost.js b/src/api/cost/cost.js index 5ad0b1f..5473a4f 100644 --- a/src/api/cost/cost.js +++ b/src/api/cost/cost.js @@ -88,12 +88,21 @@ export const costAuditingPassApi = (params) => { }) } - - - - - - +// 费用维修审核 +export const getSltMonthInfoApi = (params) => { + return request.get('/material/sltMonthInfo/getSltMonthInfo', { + params + }) +} + +// 费用维修审核-提交 +export function auditSltApi(data) { + return request({ + url: '/material/sltMonthInfo/auditSlt', + method: 'post', + data + }) +} diff --git a/src/views/claimAndreturn/return/receive/component/addReturn1.vue b/src/views/claimAndreturn/return/receive/component/addReturn1.vue index 97a11a6..5a07b07 100644 --- a/src/views/claimAndreturn/return/receive/component/addReturn1.vue +++ b/src/views/claimAndreturn/return/receive/component/addReturn1.vue @@ -8,6 +8,7 @@ :inline="true" v-show="showSearch" label-width="100px" + :disabled="isView" > @@ -20,12 +21,7 @@ placeholder="请选择" :disabled="isEdit" > - + @@ -39,21 +35,12 @@ placeholder="请选择" :disabled="isEdit" > - + - + - + @@ -126,28 +118,13 @@ - - + - 保存 + 保存 + + + 完成退料 - - - + + - + - - - - - - diff --git a/src/views/claimAndreturn/return/receive/component/home.vue b/src/views/claimAndreturn/return/receive/component/home.vue index 110cabc..94d11f7 100644 --- a/src/views/claimAndreturn/return/receive/component/home.vue +++ b/src/views/claimAndreturn/return/receive/component/home.vue @@ -233,7 +233,7 @@ > 编辑 - 退料 - + --> - - + + + + - - + + - + - - - - - - - + + @@ -45,7 +41,7 @@ - 导出数据 + 导出数据 提交 @@ -54,22 +50,29 @@ - + - + - + + + + + import { getUnitList, getProjectList } from '@/api/claimAndRefund/receive' -import { getSltAgreementInfo } from '@/api/cost/cost' +import { getSltMonthInfoApi, auditSltApi } from '@/api/cost/cost' export default { data() { @@ -101,44 +104,39 @@ export default { unitList: [], // 工程数据 projectList: [], - statusList: [ - { id: '', name: '全部' }, - { id: '0', name: '结算中' }, - { id: '1', name: '已结算' }, - ], //集合 auditList: [ - { id: '', name: '全部' }, { id: '0', name: '未审核' }, { id: '1', name: '已审核' }, ], // 表格数据 - agreementList: [ - { - agreementCode: '测试', - leaseExpense: 100.89, - }, - ], + agreementList: [], // 日期范围 dateRange: [], // 查询参数 queryParams: { pageNum: 1, pageSize: 10, - keyWord: undefined, - sltStatus: '', + status: '', unitId: '', projectId: '', - agreementNo: '', // 协议编号 - pushMonth: '', // 推送月份 + agreementCode: '', // 协议编号 + month: '', // 推送月份 }, } }, created() { - // this.getList() + this.getCurrentMonth() + this.getList() this.getUnitList() this.getProjectList() }, methods: { + getCurrentMonth() { + const now = new Date() + const year = now.getFullYear() + const month = String(now.getMonth() + 1).padStart(2, '0') + this.queryParams.month = `${year}-${month}` + }, //获取单位类型 ,getUnitList, getProjectList getUnitList() { getUnitList().then((response) => { @@ -155,7 +153,7 @@ export default { getList() { console.log('🚀 ~ getList ~ :', this.queryParams) this.loading = true - getSltAgreementInfo(this.queryParams) + getSltMonthInfoApi(this.queryParams) .then((response) => { this.agreementList = response.rows this.total = response.total @@ -180,14 +178,45 @@ export default { }, // 多选框选中数据 handleSelectionChange(selection) { - this.ids = selection.map((item) => item) + this.ids = selection.map((item) => item.id) console.log('🚀 ~ handleSelectionChange ~ this.ids:', this.ids) }, // 导出 - handleExport() {}, + handleExport() { + this.download( + 'material/sltMonthInfo/export', + { + ...this.queryParams + }, + `费用推送审核_${new Date().getTime()}.xlsx`, + ) + }, // 提交 handleSubmit() { console.log('🚀 ~ handleSubmit ~ handleSubmit:') + // 弹框确认 + this.$confirm('确认提交吗?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }) + .then(() => { + // 提交 + auditSltApi({ dataCondition: this.ids }) + .then((res) => { + if (res.code === 200) { + this.$message({ + type: 'success', + message: '提交成功!', + }) + this.getList() + } + }) + .catch((err) => { + console.log('🚀 ~ err:', err) + }) + }) + .catch(() => {}) }, }, }