报废管理一级列表

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-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="关键字" prop="keyword"> <el-form-item label="关键字" prop="keyWord">
<el-input <el-input
v-model="queryParams.keyword" v-model="queryParams.keyWord"
placeholder="请输入关键字" placeholder="请输入关键字"
clearable clearable
maxlength="50" maxlength="50"
@ -103,7 +103,7 @@
<el-table <el-table
v-loading="loading" v-loading="loading"
:data="typeList" :data="tableList"
row-key="id" row-key="id"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
border border
@ -227,6 +227,9 @@
import { import {
getListTestExamineApply, getListTestExamineApply,
} from "@/api/repair/testExamine"; } from "@/api/repair/testExamine";
import {
getScrapApplyListApi,
} from "@/api/repair/scrapManage";
import { import {
outerAudit, outerAudit,
} from "@/api/repair/repair"; } from "@/api/repair/repair";
@ -236,9 +239,7 @@ export default {
data() { data() {
return { return {
// //
loading: true, loading: true,
loadingTwo: true,
updateTime: "",
// //
ids: [], ids: [],
// //
@ -247,58 +248,22 @@ export default {
multiple: true, multiple: true,
// //
showSearch: true, showSearch: true,
showPeople: false,
peopleOpen: false,
// //
total: 0, total: 0,
totalTwo: 0,
//
typesList: [],
modelList: [],
// //
typeList: [], tableList: [],
getListPeople: [],
configUserList: [],
phoneNumbers: [],
//
chosenUserList: [],
userList: [],
//
title: "",
// //
dateRange: [], dateRange: [],
statusDataRange: [],
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
time: null, // time: null, //
name: undefined, name: undefined,
taskStatus: "", keyWord: "",
keyword: "",
}, },
form: {
remark: "",
},
//
rules: {
remark: [
{ required: true, message: "通知内容不能为空", trigger: "blur" },
],
},
openPrint: false,
open: false,
printData: {},
printTableData: [],
//
supplierStr: "",
//
leaseApplyDetails: [],
//
leaseApplyData: {},
passTemp: [], passTemp: [],
faliTemp: [], failTemp: [],
}; };
}, },
created() { created() {
@ -331,16 +296,14 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
const params = { const params = {
keyword: this.queryParams.keyword, keyWord: this.queryParams.keyWord,
startTime: this.queryParams.time && this.queryParams.time[0], startTime: this.queryParams.time && this.queryParams.time[0],
endTime: this.queryParams.time && this.queryParams.time[1], endTime: this.queryParams.time && this.queryParams.time[1],
pageSize: this.queryParams.pageSize, pageSize: this.queryParams.pageSize,
pageNum: this.queryParams.pageNum, pageNum: this.queryParams.pageNum,
taskStatus: this.queryParams.taskStatus,
taskType:5,
}; };
getListTestExamineApply(this.addDateRange(params)).then((response) => { getScrapApplyListApi(params).then((response) => {
this.typeList = response.rows; this.tableList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
@ -354,7 +317,7 @@ export default {
resetQuery() { resetQuery() {
this.queryParams.time = []; this.queryParams.time = [];
this.resetForm("queryForm"); this.resetForm("queryForm");
this.queryParams.keyword = ""; this.queryParams.keyWord = "";
this.handleQuery(); this.handleQuery();
}, },
/** 通过按钮操作 */ /** 通过按钮操作 */
@ -391,7 +354,6 @@ export default {
}); });
} }
}, },
/** 查看按钮操作 */ /** 查看按钮操作 */
handleView(row) { handleView(row) {
this.$emit("queryTools", row.taskId, row.id, row); this.$emit("queryTools", row.taskId, row.id, row);
@ -400,66 +362,8 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.$emit("addTools", row.taskId, row.id,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) { handleDeletePurchase(row) {
// console.log(row) // console.log(row)
@ -476,8 +380,7 @@ export default {
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}) })
.catch(() => {}); .catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download( this.download(
@ -489,51 +392,7 @@ export default {
}, },
`修试审核_${new Date().getTime()}.xlsx` `修试审核_${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> </script>