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,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -99,4 +99,13 @@ export function getScrapDetailsList(query) {
|
|||
method: 'get',
|
||||
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-form-item>
|
||||
<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 prop="sltStatus">
|
||||
<el-select
|
||||
|
|
@ -238,9 +243,9 @@
|
|||
import {
|
||||
// getProjectList,
|
||||
getUnitList,
|
||||
getAgreementInfoById,
|
||||
// getAgreementInfoById,
|
||||
} 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 Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
|
@ -288,7 +293,7 @@ export default {
|
|||
isCommit:'',
|
||||
unitId: null,
|
||||
projectId: null,
|
||||
agreementId: '',
|
||||
agreementId: [],
|
||||
agreementCode: '',
|
||||
},
|
||||
openPrint:false
|
||||
|
|
@ -329,8 +334,10 @@ export default {
|
|||
}
|
||||
const res = await getUnitList(params)
|
||||
this.unitList = res.data;
|
||||
if(this.queryParams.projectId){
|
||||
this.getAgreementInfo()
|
||||
}
|
||||
|
||||
this.getAgreementInfo()
|
||||
},
|
||||
unitChange(val){
|
||||
console.log('Selected values:', val); // 检查选中的值
|
||||
|
|
@ -374,29 +381,38 @@ export default {
|
|||
},
|
||||
// 获取 协议id
|
||||
async getAgreementInfo() {
|
||||
if (this.queryParams.unitId && this.queryParams.projectId) {
|
||||
if (this.unitIds && this.unitIds.length > 0 && this.queryParams.projectId) {
|
||||
const params = {
|
||||
unitId: this.queryParams.unitId,
|
||||
unitIds: this.unitIds,
|
||||
projectId: this.queryParams.projectId,
|
||||
}
|
||||
const res = await getAgreementInfoById(params)
|
||||
console.log(res)
|
||||
if (!(res.data && res.data.agreementId)) {
|
||||
if ((!res.data && res.data.some(item => !item.agreementId))) {
|
||||
this.$message.error('当前单位和工程无协议!')
|
||||
this.queryParams.unitId = null
|
||||
this.queryParams.projectId = null
|
||||
this.GetUnitData()
|
||||
this.GetProData()
|
||||
} else {
|
||||
this.queryParams.agreementId = res.data.agreementId
|
||||
this.queryParams.agreementCode = res.data.agreementCode
|
||||
this.queryParams.agreementId = res.data.map(item => item.agreementId);
|
||||
this.queryParams.agreementCode = res.data.map(item => item.agreementCode).join(',');
|
||||
}
|
||||
}
|
||||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
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.total = response.total
|
||||
this.loading = false
|
||||
|
|
@ -418,7 +434,7 @@ export default {
|
|||
isCommit:'',
|
||||
unitId: null,
|
||||
projectId: null,
|
||||
agreementId: '',
|
||||
agreementId: [],
|
||||
agreementCode: '',
|
||||
}
|
||||
this.resetForm('queryForm')
|
||||
|
|
@ -440,17 +456,12 @@ export default {
|
|||
},
|
||||
handleApplyList() {
|
||||
if (this.ids.length < 1) {
|
||||
this.$message.error('请候选需要结算的数据!')
|
||||
this.$message.error('请勾选需要结算的数据!')
|
||||
return
|
||||
}
|
||||
if (this.ids.length > 0) {
|
||||
let arr = this.ids
|
||||
this.$tab.closeOpenPage({
|
||||
path: '/cost/cost/costApplyAdd',
|
||||
query: {
|
||||
rowData: JSON.stringify(arr),
|
||||
},
|
||||
})
|
||||
this.$emit("goDetail",JSON.stringify(arr));
|
||||
}
|
||||
},
|
||||
// 多选框选中数据
|
||||
|
|
|
|||
|
|
@ -138,18 +138,10 @@
|
|||
|
||||
<script>
|
||||
import {
|
||||
getListLeaseApply,
|
||||
getPurchaseCheckInfo,
|
||||
getAcceptanceForm,
|
||||
purchaseCheckInfoRemove,
|
||||
queryStatusDataApi,
|
||||
getApplyInfo,
|
||||
applyRemove,
|
||||
applySend,
|
||||
applySendAll,
|
||||
getCheckInfo
|
||||
|
||||
} from "@/api/lease/apply";
|
||||
import { getInventoryList, } from '@/api/repair/scrapLedgerReview';
|
||||
import { getInventoryList,inventoryPass } from '@/api/repair/scrapLedgerReview';
|
||||
import vueEasyPrint from "vue-easy-print";
|
||||
import printJS from 'print-js';
|
||||
|
||||
|
|
@ -236,17 +228,17 @@ export default {
|
|||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.sendTemp = [];
|
||||
this.ids = selection.map((item) => item.id);
|
||||
selection.forEach((item) => {
|
||||
this.sendTemp.push({ id: item.id, taskId: item.taskId });
|
||||
});
|
||||
this.ids = selection.map((item) => item.taskId);
|
||||
// selection.forEach((item) => {
|
||||
// this.sendTemp.push({ id: item.id, taskId: item.taskId });
|
||||
// });
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
|
||||
//是否可用勾选框
|
||||
selectable(row) {
|
||||
if (row.taskStatus != 1) {
|
||||
if (row.taskStatus != 1 && row.taskStatus!= 2) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
@ -293,8 +285,6 @@ export default {
|
|||
this.$emit("editTools", row.taskId, row.id);
|
||||
},
|
||||
|
||||
|
||||
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
|
|
@ -304,9 +294,6 @@ export default {
|
|||
this.resetForm("form");
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
// 关闭弹窗并刷新页面
|
||||
closeDialogAndRefresh() {
|
||||
this.openPrint = false;
|
||||
|
|
@ -335,6 +322,40 @@ export default {
|
|||
})
|
||||
.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