|
|
@ -32,16 +32,17 @@ |
|
|
|
type="success" |
|
|
|
icon="el-icon-check" |
|
|
|
size="mini" |
|
|
|
@click="handleCreateBills()" |
|
|
|
>生成出库单(支持批量)</el-button |
|
|
|
@click="handleConfirm()" |
|
|
|
>已确认(支持批量)</el-button |
|
|
|
> |
|
|
|
<el-button |
|
|
|
class="filter-item" |
|
|
|
type="success" |
|
|
|
icon="el-icon-check" |
|
|
|
type="warning" |
|
|
|
icon="el-icon-edit" |
|
|
|
size="mini" |
|
|
|
@click="handleConfirm()" |
|
|
|
>已确认</el-button |
|
|
|
v-loading="formLoading" |
|
|
|
@click="handleCreateBills()" |
|
|
|
>生成出库单(支持批量)</el-button |
|
|
|
> |
|
|
|
</flexbox> |
|
|
|
</div> |
|
|
@ -63,7 +64,7 @@ |
|
|
|
</el-tooltip> |
|
|
|
|
|
|
|
<span style="margin-left: 10px; color: #ff5640; float: right" |
|
|
|
>说明:每间隔30秒进行自动刷新!</span |
|
|
|
>说明:每间隔3分钟进行自动刷新!</span |
|
|
|
> |
|
|
|
</flexbox> |
|
|
|
</div> |
|
|
@ -106,7 +107,7 @@ |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<!-- 操作名称 --> |
|
|
|
<el-table-column |
|
|
|
<!-- <el-table-column |
|
|
|
prop="actionName" |
|
|
|
label="操作名称(单击箭头过滤)" |
|
|
|
width="165" |
|
|
@ -130,7 +131,7 @@ |
|
|
|
</el-tag> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> --> |
|
|
|
<!-- 状态 --> |
|
|
|
<el-table-column |
|
|
|
prop="stateName" |
|
|
@ -816,8 +817,8 @@ export default { |
|
|
|
version: "", |
|
|
|
materialCode: undefined, |
|
|
|
sapCode: undefined, |
|
|
|
cp7begin: undefined, |
|
|
|
cp7end: undefined, |
|
|
|
cp7Begin: undefined, |
|
|
|
cp7End: undefined, |
|
|
|
kenncode: undefined, |
|
|
|
chassisNumber: undefined, |
|
|
|
materialGroup: undefined, |
|
|
@ -862,7 +863,7 @@ export default { |
|
|
|
this.listQuery.taskId = ""; |
|
|
|
this.listQuery.stateName = ""; |
|
|
|
setTimeout(this.getList, 0); |
|
|
|
}, 1000 * 30); //30秒刷新一次页面 |
|
|
|
}, 1000 * 180); //30秒刷新一次页面 |
|
|
|
// 通过$once来监听定时器,在beforeDestroy钩子可以被清除。 |
|
|
|
this.$once("hook:beforeDestroy", () => { |
|
|
|
clearInterval(timer); |
|
|
@ -895,15 +896,15 @@ export default { |
|
|
|
prop: "taskId", |
|
|
|
width: 120, |
|
|
|
}); |
|
|
|
tempsTabs.push({ |
|
|
|
label: "模块名称", |
|
|
|
prop: "name", |
|
|
|
width: 170, |
|
|
|
}); |
|
|
|
// tempsTabs.push({ |
|
|
|
// label: "模块名称", |
|
|
|
// prop: "name", |
|
|
|
// width: 180, |
|
|
|
// }); |
|
|
|
tempsTabs.push({ |
|
|
|
label: "创建人", |
|
|
|
prop: "email", |
|
|
|
width: 110, |
|
|
|
width: 150, |
|
|
|
}); |
|
|
|
tempsTabs.push({ |
|
|
|
label: "创建时间", |
|
|
@ -913,12 +914,12 @@ export default { |
|
|
|
tempsTabs.push({ |
|
|
|
label: "说明", |
|
|
|
prop: "remark", |
|
|
|
width: 220, |
|
|
|
width: 350, |
|
|
|
}); |
|
|
|
tempsTabs.push({ |
|
|
|
label: "审批状态", |
|
|
|
prop: "fileName", |
|
|
|
width: 150, |
|
|
|
width: 350, |
|
|
|
}); |
|
|
|
return tempsTabs; |
|
|
|
}, |
|
|
@ -934,7 +935,7 @@ export default { |
|
|
|
console.log(this.listQuery.Sorting); |
|
|
|
this.handleFilter(); |
|
|
|
}, |
|
|
|
/** 筛选操作 */ |
|
|
|
/** 筛选操作 */ |
|
|
|
handleFilter() { |
|
|
|
this.page = 1; |
|
|
|
this.getList(); |
|
|
@ -952,163 +953,234 @@ export default { |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
handleSelectionChange(val) { |
|
|
|
this.isEdit = false; |
|
|
|
this.multipleSelection = []; |
|
|
|
this.multipleSelection = val; |
|
|
|
}, |
|
|
|
//已确认 |
|
|
|
handleConfirm(row) { |
|
|
|
this.isEdit = false; |
|
|
|
if (this.multipleSelection.length == 0) { |
|
|
|
this.$message({ |
|
|
|
message: "至少选择一行!", |
|
|
|
type: "warning", |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
var params = []; |
|
|
|
let myalert = ""; //声明变量,其变量必须在此声明后使用 |
|
|
|
if (row) { |
|
|
|
//单行 |
|
|
|
params.push(row.id); |
|
|
|
myalert = row.name; |
|
|
|
} else { |
|
|
|
//多选 |
|
|
|
var getbillNum = ""; |
|
|
|
//判断已经生成出库单的不能再生成出库操作 |
|
|
|
this.multipleSelection.forEach((element) => { |
|
|
|
let id = element.id; |
|
|
|
params.push(id); |
|
|
|
let state = element.fileName; |
|
|
|
if (state != "" && state != "已确认") { |
|
|
|
this.isEdit = true; |
|
|
|
getbillNum += state + ","; |
|
|
|
} |
|
|
|
}); |
|
|
|
myalert = "选中项"; |
|
|
|
} |
|
|
|
this.$confirm("是否确认" + myalert + "?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.$axios |
|
|
|
.posts("/api/settleaccount/wmsjitoutput/WmsJitOutPutAudit", params) |
|
|
|
.then((response) => { |
|
|
|
const index = this.list.indexOf(row); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "操作成功", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
if (this.isEdit == true) { |
|
|
|
this.$message({ |
|
|
|
message: |
|
|
|
"已经生成出库单的不能再确认!单号:" + |
|
|
|
getbillNum.substr(0, getbillNum.length - 1), |
|
|
|
type: "warning", |
|
|
|
}); |
|
|
|
return; |
|
|
|
} else { |
|
|
|
var params = []; |
|
|
|
let myalert = ""; //声明变量,其变量必须在此声明后使用 |
|
|
|
if (row) { |
|
|
|
//单行 |
|
|
|
params.push(row.id); |
|
|
|
myalert = row.name; |
|
|
|
} else { |
|
|
|
//多选 |
|
|
|
this.multipleSelection.forEach((element) => { |
|
|
|
let id = element.id; |
|
|
|
params.push(id); |
|
|
|
}); |
|
|
|
myalert = "选中项"; |
|
|
|
} |
|
|
|
this.$confirm("是否确认" + myalert + "?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.$axios |
|
|
|
.posts( |
|
|
|
"/api/settleaccount/wmsjitoutput/WmsJitOutPutAudit", |
|
|
|
params |
|
|
|
) |
|
|
|
.then((response) => { |
|
|
|
const index = this.list.indexOf(row); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "操作成功", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
this.getList(); |
|
|
|
}); |
|
|
|
this.getList(); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: "info", |
|
|
|
message: "已取消操作", |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: "info", |
|
|
|
message: "已取消操作", |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
//出库单 |
|
|
|
handleCreateBills(row) { |
|
|
|
// if (this.multipleSelection.length == 0) { |
|
|
|
// this.$message({ |
|
|
|
// message: "至少选择一行!", |
|
|
|
// type: "warning", |
|
|
|
// }); |
|
|
|
// return; |
|
|
|
// } |
|
|
|
var params = []; |
|
|
|
let myalert = ""; //声明变量,其变量必须在此声明后使用 |
|
|
|
if (row) { |
|
|
|
//单行 |
|
|
|
params.push(row.id); |
|
|
|
myalert = row.name; |
|
|
|
this.isEdit = false; |
|
|
|
if (this.multipleSelection.length == 0) { |
|
|
|
this.$message({ |
|
|
|
message: "至少选择一行!", |
|
|
|
type: "warning", |
|
|
|
}); |
|
|
|
return; |
|
|
|
} else { |
|
|
|
//多选 |
|
|
|
var getbillNum = ""; |
|
|
|
//判断已经生成出库单的不能再生成出库操作 |
|
|
|
this.multipleSelection.forEach((element) => { |
|
|
|
let id = element.id; |
|
|
|
params.push(id); |
|
|
|
let state = element.fileName; |
|
|
|
if (state != "" && state != "已确认") { |
|
|
|
this.isEdit = true; |
|
|
|
getbillNum += state + ","; |
|
|
|
} |
|
|
|
}); |
|
|
|
myalert = "选中项"; |
|
|
|
} |
|
|
|
this.listBillQuery.guids = params; |
|
|
|
this.listBillQuery.version = this.JobversionValue; |
|
|
|
console.log("出库单条件:" + JSON.stringify(this.listBillQuery)); |
|
|
|
this.$confirm("是否确认出库" + myalert + "?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.$axios |
|
|
|
.posts( |
|
|
|
"/api/settleaccount/wmsjitoutput/WmsJitOutPut", |
|
|
|
this.listBillQuery |
|
|
|
) |
|
|
|
.then((response) => { |
|
|
|
console.log( |
|
|
|
"检查柱护板-hostCheckQuery" + JSON.stringify(response) |
|
|
|
); |
|
|
|
const index = this.list.indexOf(row); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "生成成功", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
if (this.isEdit == true) { |
|
|
|
this.$message({ |
|
|
|
message: |
|
|
|
"已经生成出库单的不能再重新生成!单号:" + |
|
|
|
getbillNum.substr(0, getbillNum.length - 1), |
|
|
|
type: "warning", |
|
|
|
}); |
|
|
|
return; |
|
|
|
} else { |
|
|
|
var params = []; |
|
|
|
let myalert = ""; //声明变量,其变量必须在此声明后使用 |
|
|
|
if (row) { |
|
|
|
//单行 |
|
|
|
params.push(row.id); |
|
|
|
myalert = row.name; |
|
|
|
} else { |
|
|
|
//多选 |
|
|
|
this.multipleSelection.forEach((element) => { |
|
|
|
let id = element.id; |
|
|
|
params.push(id); |
|
|
|
}); |
|
|
|
myalert = "选中项"; |
|
|
|
} |
|
|
|
this.listBillQuery.guids = params; |
|
|
|
this.listBillQuery.version = this.JobversionValue; |
|
|
|
console.log("出库单条件:" + JSON.stringify(this.listBillQuery)); |
|
|
|
this.$confirm("是否确认出库" + myalert + "?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.formLoading = true; |
|
|
|
this.$axios |
|
|
|
.posts( |
|
|
|
"/api/settleaccount/wmsjitoutput/WmsJitOutPut", |
|
|
|
this.listBillQuery |
|
|
|
) |
|
|
|
.then((response) => { |
|
|
|
const index = this.list.indexOf(row); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "生成成功", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
|
|
|
|
this.getList(); |
|
|
|
this.getList(); |
|
|
|
this.formLoading = false; |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.formLoading = false; |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: "info", |
|
|
|
message: "已取消操作", |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: "info", |
|
|
|
message: "已取消操作", |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
//批量删除 |
|
|
|
handleDelete(row) { |
|
|
|
this.isEdit = false; |
|
|
|
if (this.multipleSelection.length == 0) { |
|
|
|
this.$message({ |
|
|
|
message: "至少选择一行!", |
|
|
|
type: "warning", |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
var params = []; |
|
|
|
let myalert = ""; //声明变量,其变量必须在此声明后使用 |
|
|
|
if (row) { |
|
|
|
//单行 |
|
|
|
params.push(row.id); |
|
|
|
myalert = row.name; |
|
|
|
} else { |
|
|
|
//多选 |
|
|
|
var getbillNum = ""; |
|
|
|
//判断已经生成出库单的不能执行删除操作 |
|
|
|
this.multipleSelection.forEach((element) => { |
|
|
|
let id = element.id; |
|
|
|
params.push(id); |
|
|
|
let state = element.fileName; |
|
|
|
if (state != "" && state != "已确认") { |
|
|
|
this.isEdit = true; |
|
|
|
getbillNum += state + ","; |
|
|
|
} |
|
|
|
}); |
|
|
|
myalert = "选中项"; |
|
|
|
} |
|
|
|
this.$confirm("是否删除" + myalert + "?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.$axios |
|
|
|
.posts("/api/settleaccount/Job/delete", params) |
|
|
|
.then((response) => { |
|
|
|
const index = this.list.indexOf(row); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "删除成功", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
if (this.isEdit == true) { |
|
|
|
this.$message({ |
|
|
|
message: |
|
|
|
"已经生成出库单的不能删除!单号:" + |
|
|
|
getbillNum.substr(0, getbillNum.length - 1), |
|
|
|
type: "warning", |
|
|
|
}); |
|
|
|
return; |
|
|
|
} else { |
|
|
|
var params = []; |
|
|
|
let myalert = ""; //声明变量,其变量必须在此声明后使用 |
|
|
|
if (row) { |
|
|
|
//单行 |
|
|
|
params.push(row.id); |
|
|
|
myalert = row.name; |
|
|
|
} else { |
|
|
|
//多选 |
|
|
|
this.multipleSelection.forEach((element) => { |
|
|
|
let id = element.id; |
|
|
|
params.push(id); |
|
|
|
}); |
|
|
|
myalert = "选中项"; |
|
|
|
} |
|
|
|
this.$confirm("是否删除" + myalert + "?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.$axios |
|
|
|
.posts("/api/settleaccount/Job/delete", params) |
|
|
|
.then((response) => { |
|
|
|
const index = this.list.indexOf(row); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "删除成功", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
this.getList(); |
|
|
|
}); |
|
|
|
this.getList(); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: "info", |
|
|
|
message: "已取消操作", |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: "info", |
|
|
|
message: "已取消操作", |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
//版本下拉列表选择项 |
|
|
|
JobVersionValue(params) { |
|
|
@ -1279,7 +1351,7 @@ export default { |
|
|
|
project: "物料组", |
|
|
|
maxResultCount: 1000, |
|
|
|
skipCount: 0, |
|
|
|
sorting:"value ascending" |
|
|
|
sorting: "value ascending", |
|
|
|
}) |
|
|
|
.then((response) => { |
|
|
|
this.materialGroupList = []; |
|
|
@ -1323,10 +1395,10 @@ export default { |
|
|
|
this.listExportQuery.end = this.cp5endTime |
|
|
|
? this.cp5endTime |
|
|
|
: undefined; |
|
|
|
this.listExportQuery.cp7begin = this.startTime |
|
|
|
this.listExportQuery.cp7Begin = this.startTime |
|
|
|
? this.startTime |
|
|
|
: undefined; |
|
|
|
this.listExportQuery.cp7end = this.endTime ? this.endTime : undefined; |
|
|
|
this.listExportQuery.cp7End = this.endTime ? this.endTime : undefined; |
|
|
|
if (this.formCount.chassisNumber != "") { |
|
|
|
this.listExportQuery.chassisNumber = this.formCount.chassisNumber; //底盘号 |
|
|
|
} |
|
|
@ -1343,7 +1415,7 @@ export default { |
|
|
|
JSON.stringify(this.listExportQuery) |
|
|
|
); |
|
|
|
this.$axios |
|
|
|
.gets( |
|
|
|
.posts( |
|
|
|
"/api/settleaccount/ReportMakeService/InvoiceSettledDetailDiff-Make", |
|
|
|
this.listExportQuery |
|
|
|
) |
|
|
@ -1530,13 +1602,11 @@ export default { |
|
|
|
/** 通过回调控制style */ |
|
|
|
cellStyle({ row, column, rowIndex, columnIndex }) { |
|
|
|
var item = this.list[rowIndex]; |
|
|
|
if (column.property === "stateName") { |
|
|
|
if (item.stateName === "Succeeded") { |
|
|
|
return { color: "#71d87f", cursor: "pointer" }; |
|
|
|
} else if (item.stateName === "Processing") { |
|
|
|
return { color: "#d87171", cursor: "pointer" }; |
|
|
|
} else if (item.stateName === "Failed") { |
|
|
|
return { color: "#ff5640", cursor: "pointer" }; |
|
|
|
if (column.property === "fileName") { |
|
|
|
if (item.fileName === "已确认") { |
|
|
|
return { color: "#13CE66", cursor: "pointer", fontWeight: 700 }; |
|
|
|
} else { |
|
|
|
return { color: "#FFBA00", cursor: "pointer", fontWeight: 800 }; |
|
|
|
} |
|
|
|
} |
|
|
|
return { textAlign: "left" }; |
|
|
|