bug修复
This commit is contained in:
parent
2d6cffa4a2
commit
b0212fcc5e
|
|
@ -128,7 +128,14 @@ export function getProjectListByUnitIds(params){
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 协议
|
||||||
|
export function getAgreementInfoById(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/slt_agreement_info/getAgreementInfoById',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -100,3 +100,12 @@ export function getScrapDetailsList(query) {
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//盘点报废通过与驳回
|
||||||
|
export function inventoryPass(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/scrap_apply_details/inventoryApprove',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -44,7 +44,12 @@
|
||||||
></el-cascader> -->
|
></el-cascader> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="agreementCode">
|
<el-form-item prop="agreementCode">
|
||||||
<el-input v-model="queryParams.agreementCode" placeholder="请输入协议号" clearable disabled/>
|
<el-tooltip content="协议编号" placement="top" :disabled="!queryParams.agreementCode">
|
||||||
|
<template #content>
|
||||||
|
{{ queryParams.agreementCode }}
|
||||||
|
</template>
|
||||||
|
<el-input v-model="queryParams.agreementCode" placeholder="请输入协议号" clearable disabled/>
|
||||||
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="sltStatus">
|
<el-form-item prop="sltStatus">
|
||||||
<el-select
|
<el-select
|
||||||
|
|
@ -238,9 +243,9 @@
|
||||||
import {
|
import {
|
||||||
// getProjectList,
|
// getProjectList,
|
||||||
getUnitList,
|
getUnitList,
|
||||||
getAgreementInfoById,
|
// getAgreementInfoById,
|
||||||
} from '@/api/back/index.js'
|
} from '@/api/back/index.js'
|
||||||
import { getSltAgreementInfo,getProjectListByUnitIds } from '@/api/cost/cost'
|
import { getSltAgreementInfo,getProjectListByUnitIds,getAgreementInfoById } from '@/api/cost/cost'
|
||||||
import vueEasyPrint from "vue-easy-print";
|
import vueEasyPrint from "vue-easy-print";
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
|
@ -288,7 +293,7 @@ export default {
|
||||||
isCommit:'',
|
isCommit:'',
|
||||||
unitId: null,
|
unitId: null,
|
||||||
projectId: null,
|
projectId: null,
|
||||||
agreementId: '',
|
agreementId: [],
|
||||||
agreementCode: '',
|
agreementCode: '',
|
||||||
},
|
},
|
||||||
openPrint:false
|
openPrint:false
|
||||||
|
|
@ -329,8 +334,10 @@ export default {
|
||||||
}
|
}
|
||||||
const res = await getUnitList(params)
|
const res = await getUnitList(params)
|
||||||
this.unitList = res.data;
|
this.unitList = res.data;
|
||||||
|
if(this.queryParams.projectId){
|
||||||
|
this.getAgreementInfo()
|
||||||
|
}
|
||||||
|
|
||||||
this.getAgreementInfo()
|
|
||||||
},
|
},
|
||||||
unitChange(val){
|
unitChange(val){
|
||||||
console.log('Selected values:', val); // 检查选中的值
|
console.log('Selected values:', val); // 检查选中的值
|
||||||
|
|
@ -374,29 +381,38 @@ export default {
|
||||||
},
|
},
|
||||||
// 获取 协议id
|
// 获取 协议id
|
||||||
async getAgreementInfo() {
|
async getAgreementInfo() {
|
||||||
if (this.queryParams.unitId && this.queryParams.projectId) {
|
if (this.unitIds && this.unitIds.length > 0 && this.queryParams.projectId) {
|
||||||
const params = {
|
const params = {
|
||||||
unitId: this.queryParams.unitId,
|
unitIds: this.unitIds,
|
||||||
projectId: this.queryParams.projectId,
|
projectId: this.queryParams.projectId,
|
||||||
}
|
}
|
||||||
const res = await getAgreementInfoById(params)
|
const res = await getAgreementInfoById(params)
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if (!(res.data && res.data.agreementId)) {
|
if ((!res.data && res.data.some(item => !item.agreementId))) {
|
||||||
this.$message.error('当前单位和工程无协议!')
|
this.$message.error('当前单位和工程无协议!')
|
||||||
this.queryParams.unitId = null
|
this.queryParams.unitId = null
|
||||||
this.queryParams.projectId = null
|
this.queryParams.projectId = null
|
||||||
this.GetUnitData()
|
this.GetUnitData()
|
||||||
this.GetProData()
|
this.GetProData()
|
||||||
} else {
|
} else {
|
||||||
this.queryParams.agreementId = res.data.agreementId
|
this.queryParams.agreementId = res.data.map(item => item.agreementId);
|
||||||
this.queryParams.agreementCode = res.data.agreementCode
|
this.queryParams.agreementCode = res.data.map(item => item.agreementCode).join(',');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getSltAgreementInfo(this.queryParams).then((response) => {
|
const params = {
|
||||||
|
pageNum: this.queryParams.pageNum,
|
||||||
|
pageSize: this.queryParams.pageSize,
|
||||||
|
projectId: this.queryParams.projectId,
|
||||||
|
sltStatus: this.queryParams.sltStatus,
|
||||||
|
// ...this.queryParams,
|
||||||
|
unitIds: this.unitIds,
|
||||||
|
|
||||||
|
}
|
||||||
|
getSltAgreementInfo(params).then((response) => {
|
||||||
this.tableList = response.rows
|
this.tableList = response.rows
|
||||||
this.total = response.total
|
this.total = response.total
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|
@ -418,7 +434,7 @@ export default {
|
||||||
isCommit:'',
|
isCommit:'',
|
||||||
unitId: null,
|
unitId: null,
|
||||||
projectId: null,
|
projectId: null,
|
||||||
agreementId: '',
|
agreementId: [],
|
||||||
agreementCode: '',
|
agreementCode: '',
|
||||||
}
|
}
|
||||||
this.resetForm('queryForm')
|
this.resetForm('queryForm')
|
||||||
|
|
@ -440,17 +456,12 @@ export default {
|
||||||
},
|
},
|
||||||
handleApplyList() {
|
handleApplyList() {
|
||||||
if (this.ids.length < 1) {
|
if (this.ids.length < 1) {
|
||||||
this.$message.error('请候选需要结算的数据!')
|
this.$message.error('请勾选需要结算的数据!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.ids.length > 0) {
|
if (this.ids.length > 0) {
|
||||||
let arr = this.ids
|
let arr = this.ids
|
||||||
this.$tab.closeOpenPage({
|
this.$emit("goDetail",JSON.stringify(arr));
|
||||||
path: '/cost/cost/costApplyAdd',
|
|
||||||
query: {
|
|
||||||
rowData: JSON.stringify(arr),
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
|
|
|
||||||
|
|
@ -138,18 +138,10 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
getListLeaseApply,
|
|
||||||
getPurchaseCheckInfo,
|
|
||||||
getAcceptanceForm,
|
|
||||||
purchaseCheckInfoRemove,
|
|
||||||
queryStatusDataApi,
|
|
||||||
getApplyInfo,
|
|
||||||
applyRemove,
|
applyRemove,
|
||||||
applySend,
|
|
||||||
applySendAll,
|
|
||||||
getCheckInfo
|
|
||||||
} from "@/api/lease/apply";
|
} from "@/api/lease/apply";
|
||||||
import { getInventoryList, } from '@/api/repair/scrapLedgerReview';
|
import { getInventoryList,inventoryPass } from '@/api/repair/scrapLedgerReview';
|
||||||
import vueEasyPrint from "vue-easy-print";
|
import vueEasyPrint from "vue-easy-print";
|
||||||
import printJS from 'print-js';
|
import printJS from 'print-js';
|
||||||
|
|
||||||
|
|
@ -236,17 +228,17 @@ export default {
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.sendTemp = [];
|
this.sendTemp = [];
|
||||||
this.ids = selection.map((item) => item.id);
|
this.ids = selection.map((item) => item.taskId);
|
||||||
selection.forEach((item) => {
|
// selection.forEach((item) => {
|
||||||
this.sendTemp.push({ id: item.id, taskId: item.taskId });
|
// this.sendTemp.push({ id: item.id, taskId: item.taskId });
|
||||||
});
|
// });
|
||||||
this.single = selection.length != 1;
|
this.single = selection.length != 1;
|
||||||
this.multiple = !selection.length;
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
|
|
||||||
//是否可用勾选框
|
//是否可用勾选框
|
||||||
selectable(row) {
|
selectable(row) {
|
||||||
if (row.taskStatus != 1) {
|
if (row.taskStatus != 1 && row.taskStatus!= 2) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -293,8 +285,6 @@ export default {
|
||||||
this.$emit("editTools", row.taskId, row.id);
|
this.$emit("editTools", row.taskId, row.id);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
|
|
@ -304,9 +294,6 @@ export default {
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 关闭弹窗并刷新页面
|
// 关闭弹窗并刷新页面
|
||||||
closeDialogAndRefresh() {
|
closeDialogAndRefresh() {
|
||||||
this.openPrint = false;
|
this.openPrint = false;
|
||||||
|
|
@ -335,6 +322,40 @@ export default {
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//通过
|
||||||
|
batchPass() {
|
||||||
|
if (this.ids.length == 0) {
|
||||||
|
this.$alert("未勾选数据", "提示", {
|
||||||
|
type: "warning",
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
inventoryPass({taskIdList:this.ids,status:1}).then((response) => {
|
||||||
|
this.$modal.msgSuccess("通过成功");
|
||||||
|
this.ids = [];
|
||||||
|
this.getList();
|
||||||
|
this.$refs.multipleTable.clearSelection();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//驳回
|
||||||
|
batchReject(){
|
||||||
|
if (this.ids.length == 0) {
|
||||||
|
this.$alert("未勾选数据", "提示", {
|
||||||
|
type: "warning",
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
inventoryPass({taskIdList:this.ids,status:2}).then((response) => {
|
||||||
|
this.$modal.msgSuccess("驳回成功");
|
||||||
|
this.ids = [];
|
||||||
|
this.getList();
|
||||||
|
this.$refs.multipleTable.clearSelection();
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue