报废管理一级列表

This commit is contained in:
zzyuan 2024-12-13 13:30:22 +08:00
parent 7fcc9e3100
commit 51a095555d
2 changed files with 42 additions and 163 deletions

View File

@ -0,0 +1,20 @@
import request from '@/utils/request'
// 查询报废审核列表
export function getScrapApplyListApi(query) {
return request({
url: '/material/scrap_apply_details/list',
method: 'get',
params: query
})
}

View File

@ -21,9 +21,9 @@
</el-date-picker>
</el-form-item>
<el-form-item label="关键字" prop="keyword">
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="queryParams.keyword"
v-model="queryParams.keyWord"
placeholder="请输入关键字"
clearable
maxlength="50"
@ -103,7 +103,7 @@
<el-table
v-loading="loading"
:data="typeList"
:data="tableList"
row-key="id"
@selection-change="handleSelectionChange"
border
@ -227,6 +227,9 @@
import {
getListTestExamineApply,
} from "@/api/repair/testExamine";
import {
getScrapApplyListApi,
} from "@/api/repair/scrapManage";
import {
outerAudit,
} from "@/api/repair/repair";
@ -236,9 +239,7 @@ export default {
data() {
return {
//
loading: true,
loadingTwo: true,
updateTime: "",
loading: true,
//
ids: [],
//
@ -247,58 +248,22 @@ export default {
multiple: true,
//
showSearch: true,
showPeople: false,
peopleOpen: false,
//
total: 0,
totalTwo: 0,
//
typesList: [],
modelList: [],
total: 0,
//
typeList: [],
getListPeople: [],
configUserList: [],
phoneNumbers: [],
//
chosenUserList: [],
userList: [],
//
title: "",
tableList: [],
//
dateRange: [],
statusDataRange: [],
dateRange: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
time: null, //
name: undefined,
taskStatus: "",
keyword: "",
name: undefined,
keyWord: "",
},
form: {
remark: "",
},
//
rules: {
remark: [
{ required: true, message: "通知内容不能为空", trigger: "blur" },
],
},
openPrint: false,
open: false,
printData: {},
printTableData: [],
//
supplierStr: "",
//
leaseApplyDetails: [],
//
leaseApplyData: {},
passTemp: [],
faliTemp: [],
failTemp: [],
};
},
created() {
@ -331,16 +296,14 @@ export default {
getList() {
this.loading = true;
const params = {
keyword: this.queryParams.keyword,
keyWord: this.queryParams.keyWord,
startTime: this.queryParams.time && this.queryParams.time[0],
endTime: this.queryParams.time && this.queryParams.time[1],
pageSize: this.queryParams.pageSize,
pageNum: this.queryParams.pageNum,
taskStatus: this.queryParams.taskStatus,
taskType:5,
pageNum: this.queryParams.pageNum,
};
getListTestExamineApply(this.addDateRange(params)).then((response) => {
this.typeList = response.rows;
getScrapApplyListApi(params).then((response) => {
this.tableList = response.rows;
this.total = response.total;
this.loading = false;
});
@ -354,7 +317,7 @@ export default {
resetQuery() {
this.queryParams.time = [];
this.resetForm("queryForm");
this.queryParams.keyword = "";
this.queryParams.keyWord = "";
this.handleQuery();
},
/** 通过按钮操作 */
@ -391,7 +354,6 @@ export default {
});
}
},
/** 查看按钮操作 */
handleView(row) {
this.$emit("queryTools", row.taskId, row.id, row);
@ -400,66 +362,8 @@ export default {
handleUpdate(row) {
this.$emit("addTools", row.taskId, row.id,row);
},
//----
getNowTime() {
var today = new Date();
var year = today.getFullYear(); //
var month = today.getMonth() + 1; //
var day = today.getDate(); //
return year + "-" + month + "-" + day;
},
//
reset() {
this.form = {
taskId: "",
remark: "",
};
this.resetForm("form");
},
//
getPrintTable(taskId) {
getAcceptanceForm({ taskId: taskId }).then((response) => {
this.printData = response.data;
this.printTableData = response.data.checkDetailsList;
let supplierList = [];
this.printTableData.forEach((e) => {
if (e.supplier) {
supplierList.push(e.supplier);
}
});
supplierList = [...new Set(supplierList)];
this.supplierStr = supplierList.join(",");
});
},
//
handlePrint(row) {
// this.query.taskId = row.taskId
// this.getPrintTable(row.taskId)
this.openPrint = true;
this.title = "机具设备到货验收单";
},
//
async handleLld(row) {
this.open = true;
var ids = row.id;
const res = await getApplyInfo(ids);
console.log(res);
this.leaseApplyDetails = res.data.leaseApplyDetailsList;
this.leaseApplyData = res.data.leaseApplyInfo;
console.log(this.leaseApplyData);
},
//
print() {
this.$refs.remarksPrintRef.print();
},
// ---------------------------------------
/** 删除按钮操作 */
handleDeletePurchase(row) {
// console.log(row)
@ -476,8 +380,7 @@ export default {
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
},
/** 导出按钮操作 */
handleExport() {
this.download(
@ -489,51 +392,7 @@ export default {
},
`修试审核_${new Date().getTime()}.xlsx`
);
},
//
handleSend(row) {
const param = { id: row.id, taskId: row.taskId };
this.$modal
.confirm("是否确认发布所选择的数据项?")
.then(function () {
return applySend(param);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("发布成功");
})
.catch(() => {});
},
handleSendAll() {
if (this.ids.length == 0) {
this.$alert("请至少勾选一个领料申请", "提示", {
type: "warning",
confirmButtonText: "确定",
});
return;
} else {
applySendAll(this.sendTemp).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess("发布成功");
}
this.getList();
});
}
},
},
watch: {
$route: {
handler(to) {
if (to.query.keyword) {
this.queryParams.keyword = to.query.keyword;
}
},
deep: true,
immediate: true,
},
},
},
};
</script>