报废管理一级列表
This commit is contained in:
parent
7fcc9e3100
commit
51a095555d
|
|
@ -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
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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";
|
||||
|
|
@ -237,8 +240,6 @@ export default {
|
|||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
loadingTwo: true,
|
||||
updateTime: "",
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
|
|
@ -247,58 +248,22 @@ export default {
|
|||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
showPeople: false,
|
||||
peopleOpen: false,
|
||||
// 总条数
|
||||
total: 0,
|
||||
totalTwo: 0,
|
||||
//搜索下拉数据
|
||||
typesList: [],
|
||||
modelList: [],
|
||||
// 字典表格数据
|
||||
typeList: [],
|
||||
getListPeople: [],
|
||||
configUserList: [],
|
||||
phoneNumbers: [],
|
||||
//选择人员
|
||||
chosenUserList: [],
|
||||
userList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
tableList: [],
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
statusDataRange: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
time: null, //申请时间
|
||||
name: undefined,
|
||||
taskStatus: "",
|
||||
keyword: "",
|
||||
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,
|
||||
};
|
||||
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);
|
||||
|
|
@ -401,65 +363,7 @@ export default {
|
|||
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)
|
||||
|
|
@ -477,7 +381,6 @@ export default {
|
|||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
|
|
@ -490,50 +393,6 @@ 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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue