领料申请

This commit is contained in:
jjLv 2024-11-13 16:05:29 +08:00
parent 94b92c7f84
commit 6d2104dff3
3 changed files with 50 additions and 29 deletions

View File

@ -62,8 +62,21 @@ export function getAgreement(data) {
}) })
} }
// 领料申请-删除
export function applyRemove(ids) {
return request({
url: '/material/lease_apply_info/' + ids,
method: 'delete',
})
}
// 领料申请-发布
export function applySend(ids) {
return request({
url: '/material/lease_apply_info/' + ids,
method: 'delete',
})
}
//新购到货-二级列表详情 //新购到货-二级列表详情
export function getPurchaseCheckInfo(query) { export function getPurchaseCheckInfo(query) {

View File

@ -33,7 +33,6 @@
clearable clearable
filterable filterable
style="width: 240px" style="width: 240px"
@change="projectChange"
> >
<el-option <el-option
v-for="item in projectList" v-for="item in projectList"
@ -333,29 +332,15 @@ export default {
}, },
methods: { methods: {
uniteChange(val) { uniteChange(val) {
if (this.isEdit) {
this.maForm.leaseProjectId = null;
getListProject({ unitId: val }).then((response) => {
if (response.data.length != 0) {
this.projectList = response.data;
} else {
this.projectList = []; this.projectList = [];
} this.$set(this.maForm, "leaseProjectId", null);
getListProject({ unitId: val }).then((response) => {
this.projectList = response.data;
}); });
}
this.unitTemp = val; this.unitTemp = val;
}, },
projectChange(val) { projectChange(val) {
if (this.isEdit) { this.maForm.leaseProjectId = val;
this.maForm.leaseUnitId = null;
getListUnite({ projectId: val }).then((response) => {
if (response.data.length != 0) {
this.uniteList = response.data;
} else {
this.uniteList = [];
}
});
}
this.projectTemp = val; this.projectTemp = val;
}, },
/** 租赁单位和工程-下拉选 */ /** 租赁单位和工程-下拉选 */
@ -363,9 +348,9 @@ export default {
getListUnite({ id: null }).then((response) => { getListUnite({ id: null }).then((response) => {
this.uniteList = response.data; this.uniteList = response.data;
}); });
getListProject({ id: null }).then((response) => { // getListProject({ id: null }).then((response) => {
this.projectList = response.data; // this.projectList = response.data;
}); // });
}, },
// //
// changeSupplier(supplierId) { // changeSupplier(supplierId) {

View File

@ -406,6 +406,7 @@ import {
getAcceptanceForm, getAcceptanceForm,
purchaseCheckInfoRemove, purchaseCheckInfoRemove,
queryStatusDataApi, queryStatusDataApi,
applyRemove,
} from "@/api/lease/apply"; } from "@/api/lease/apply";
export default { export default {
@ -585,10 +586,13 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDeletePurchase(row) { handleDeletePurchase(row) {
// console.log(row) // console.log(row)
let ids = [];
ids.push(row.id);
console.log("ids", ids);
this.$modal this.$modal
.confirm("是否确认删除所选择的数据项?") .confirm("是否确认删除所选择的数据项?")
.then(function () { .then(function () {
return purchaseCheckInfoRemove(row.id); return applyRemove(ids);
}) })
.then(() => { .then(() => {
this.getList(); this.getList();
@ -608,7 +612,18 @@ export default {
// //
handleSend(row) { handleSend(row) {
console.log("发布"); let ids = [];
ids.push(row.id);
this.$modal
.confirm("是否确认发布所选择的数据项?")
.then(function () {
return applySend(ids);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("发布成功");
})
.catch(() => {});
}, },
handleSendAll() { handleSendAll() {
@ -619,8 +634,16 @@ export default {
}); });
return; return;
} else { } else {
const ids = this.ids.join(","); this.$modal
console.log("发布"); .confirm("是否确认发布所选择的数据项?")
.then(function () {
return applySend(this.ids);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("发布成功");
})
.catch(() => {});
} }
}, },
}, },