|
|
@ -10,6 +10,12 @@ |
|
|
|
@click="handleDownload()" |
|
|
|
>导出全部 |
|
|
|
</el-button> --> |
|
|
|
<JobSelectVerson |
|
|
|
:options="JobVersionList" |
|
|
|
style="width: 150px; margin-left: -10px" |
|
|
|
class="search-container" |
|
|
|
@value-change="JobVersionValue" |
|
|
|
></JobSelectVerson> |
|
|
|
<el-button |
|
|
|
class="filter-item" |
|
|
|
type="success" |
|
|
@ -21,7 +27,7 @@ |
|
|
|
<el-button |
|
|
|
class="filter-item" |
|
|
|
size="mini" |
|
|
|
type="info" |
|
|
|
type="warning" |
|
|
|
icon="el-icon-download" |
|
|
|
@click="handleCancelBills()" |
|
|
|
>取消出库(支持批量) |
|
|
@ -106,10 +112,11 @@ import Pagination from "@/components/Pagination"; // secondary package based on |
|
|
|
import permission from "@/directive/permission/index.js"; |
|
|
|
import CRMTableHead from "../../components/CRMTableHead"; |
|
|
|
import { downloadFile } from "@/utils/crmindex.js"; |
|
|
|
import JobSelectVerson from "@/components/CreateCom/Job-Select.vue"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "sendUnsettledDiffReport", |
|
|
|
components: { Pagination, CRMTableHead, CRMTableHead }, |
|
|
|
components: { Pagination, CRMTableHead, CRMTableHead, JobSelectVerson }, |
|
|
|
directives: { permission }, |
|
|
|
props: { |
|
|
|
customerInfos: { |
|
|
@ -131,6 +138,7 @@ export default { |
|
|
|
searchContent: "", // 输入内容 |
|
|
|
customerInfo: { |
|
|
|
parentId: "", |
|
|
|
version: "", |
|
|
|
}, |
|
|
|
form: { |
|
|
|
dicDetailID: "", |
|
|
@ -141,6 +149,13 @@ export default { |
|
|
|
totalCount: 0, |
|
|
|
listLoading: true, |
|
|
|
formLoading: false, |
|
|
|
JobVersionList: [ |
|
|
|
{ value: "0", label: "未处理" }, |
|
|
|
{ value: "1", label: "申请出库" }, |
|
|
|
{ value: "2", label: "确认出库" }, |
|
|
|
{ value: "3", label: "不能出库" }, |
|
|
|
{ value: "4", label: "取消出库" }, |
|
|
|
], |
|
|
|
// 高级搜索 |
|
|
|
filterObj: { |
|
|
|
type: Object, |
|
|
@ -152,27 +167,29 @@ export default { |
|
|
|
Filters: [ |
|
|
|
{ |
|
|
|
logic: 0, |
|
|
|
column: "", |
|
|
|
column: "Enabled", |
|
|
|
action: 0, |
|
|
|
value: "", |
|
|
|
value: "true", |
|
|
|
}, //默认查询可用的 |
|
|
|
], |
|
|
|
//OrgID:"", |
|
|
|
SkipCount: 0, |
|
|
|
MaxResultCount: 15, |
|
|
|
ParentId: "", |
|
|
|
billNum: "", |
|
|
|
}, |
|
|
|
listOutPutQuery: { |
|
|
|
version: "", |
|
|
|
ids: "", |
|
|
|
guids: "", |
|
|
|
billNum: "", |
|
|
|
}, |
|
|
|
page: 1, |
|
|
|
JobversionValue: "", |
|
|
|
JobversionValueVerson: "", |
|
|
|
dialogFormVisible: false, |
|
|
|
multipleSelection: [], |
|
|
|
formTitle: "", |
|
|
|
drawer: false, |
|
|
|
showExcelImport: false, |
|
|
|
tableHeight: document.documentElement.clientHeight - 260, |
|
|
|
tableHeight: document.documentElement.clientHeight - 230, |
|
|
|
isEdit: false, |
|
|
|
}; |
|
|
|
}, |
|
|
@ -194,6 +211,7 @@ export default { |
|
|
|
} else { |
|
|
|
newVal.forEach((element) => { |
|
|
|
this.customerInfo.parentId = element.ParentId; |
|
|
|
this.customerInfo.version = element.Version; |
|
|
|
}); |
|
|
|
if (this.customerInfo.parentId != "") { |
|
|
|
this.getList(); |
|
|
@ -210,20 +228,38 @@ export default { |
|
|
|
tempsTabs.push({ |
|
|
|
label: "版本", |
|
|
|
prop: "version", |
|
|
|
width: 150, |
|
|
|
width: 110, |
|
|
|
}); |
|
|
|
tempsTabs.push({ |
|
|
|
label: "零件号", |
|
|
|
prop: "materialCode", |
|
|
|
width: 150, |
|
|
|
}); |
|
|
|
tempsTabs.push({ label: "KEEN号", prop: "kennCode", width: 170 }); |
|
|
|
tempsTabs.push({ label: "底盘号", prop: "chassisNumber", width: 190 }); |
|
|
|
tempsTabs.push({ label: "零件描述", prop: "materialDesc", width: 250 }); |
|
|
|
tempsTabs.push({ label: "物料组", prop: "materialGroup", width: 220 }); |
|
|
|
tempsTabs.push({ label: "数量", prop: "wmsBillNum", width: 100 }); |
|
|
|
tempsTabs.push({ label: "交货单号", prop: "wmsBillNum", width: 100 }); |
|
|
|
tempsTabs.push({ label: "数量", prop: "qty", width: 100 }); |
|
|
|
tempsTabs.push({ label: "状态", prop: "state", width: 100 }); |
|
|
|
return tempsTabs; |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
//版本下拉列表选择项 |
|
|
|
JobVersionValue(params) { |
|
|
|
//版本下拉选择 |
|
|
|
this.listQuery.Filters = []; |
|
|
|
var column = "state"; |
|
|
|
let filter = { |
|
|
|
logic: 0, |
|
|
|
column: column, |
|
|
|
action: 0, |
|
|
|
value: params.value, |
|
|
|
}; |
|
|
|
this.listQuery.Filters.push(filter); |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
//取消出库单 |
|
|
|
handleCancelBills(row) { |
|
|
|
if (this.multipleSelection.length == 0) { |
|
|
@ -233,8 +269,7 @@ export default { |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
//var params = []; |
|
|
|
var params = ""; |
|
|
|
var params = []; |
|
|
|
let myalert = ""; //声明变量,其变量必须在此声明后使用 |
|
|
|
if (row) { |
|
|
|
//单行 |
|
|
@ -244,13 +279,14 @@ export default { |
|
|
|
//多选 |
|
|
|
this.multipleSelection.forEach((element) => { |
|
|
|
let id = element.id; |
|
|
|
//params.push(id); |
|
|
|
params += id + ","; |
|
|
|
params.push(id); |
|
|
|
}); |
|
|
|
myalert = "选中项"; |
|
|
|
} |
|
|
|
this.listOutPutQuery.version = row.version; |
|
|
|
this.listOutPutQuery.ids = params.substr(0, params.length - 1); |
|
|
|
this.listOutPutQuery.version = this.customerInfo.version; |
|
|
|
this.listOutPutQuery.guids = params; |
|
|
|
this.listOutPutQuery.billNum = this.customerInfo.parentId; |
|
|
|
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery)); |
|
|
|
|
|
|
|
this.$confirm("是否确认取消出库" + myalert + "?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
@ -260,7 +296,7 @@ export default { |
|
|
|
.then(() => { |
|
|
|
this.$axios |
|
|
|
.posts( |
|
|
|
"/api/settleaccount/wmsjitoutput/WmsJitOutPut-Cancel", |
|
|
|
"/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Cancel", |
|
|
|
this.listOutPutQuery |
|
|
|
) |
|
|
|
.then((response) => { |
|
|
@ -284,14 +320,46 @@ export default { |
|
|
|
//出库单 |
|
|
|
handleCreateBills(row) { |
|
|
|
if (this.multipleSelection.length == 0) { |
|
|
|
this.$message({ |
|
|
|
message: "至少选择一行!", |
|
|
|
this.listLoading = true; |
|
|
|
this.listOutPutQuery.guids = []; |
|
|
|
this.listOutPutQuery.version = this.customerInfo.version; |
|
|
|
this.listOutPutQuery.billNum = this.customerInfo.parentId; |
|
|
|
console.log( |
|
|
|
"未选择时全部确认出库条件:" + JSON.stringify(this.listOutPutQuery) |
|
|
|
); |
|
|
|
this.$confirm("是否全部确认出库?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.$axios |
|
|
|
.posts( |
|
|
|
"/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Pass", |
|
|
|
this.listOutPutQuery |
|
|
|
) |
|
|
|
.then((response) => { |
|
|
|
const index = this.list.indexOf(row); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "生成成功", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
//var params = []; |
|
|
|
var params = ""; |
|
|
|
this.getList(); |
|
|
|
this.listLoading = false; |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: "info", |
|
|
|
message: "已取消操作", |
|
|
|
}); |
|
|
|
this.listLoading = false; |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.listLoading = true; |
|
|
|
var params = []; |
|
|
|
let myalert = ""; //声明变量,其变量必须在此声明后使用 |
|
|
|
if (row) { |
|
|
|
//单行 |
|
|
@ -301,15 +369,17 @@ export default { |
|
|
|
//多选 |
|
|
|
this.multipleSelection.forEach((element) => { |
|
|
|
let id = element.id; |
|
|
|
//params.push(id); |
|
|
|
params += id + ","; |
|
|
|
params.push(id); |
|
|
|
}); |
|
|
|
myalert = "选中项"; |
|
|
|
} |
|
|
|
this.listOutPutQuery.version = row.version; |
|
|
|
this.listOutPutQuery.ids = params.substr(0, params.length - 1); |
|
|
|
|
|
|
|
this.$confirm("是否确认出库" + myalert + "?", "提示", { |
|
|
|
this.listOutPutQuery.version = this.customerInfo.version; |
|
|
|
this.listOutPutQuery.guids = params; |
|
|
|
this.listOutPutQuery.billNum = this.customerInfo.parentId; |
|
|
|
console.log( |
|
|
|
"部分选择时确认出库条件:" + JSON.stringify(this.listOutPutQuery) |
|
|
|
); |
|
|
|
this.$confirm("是否确认将选中的出库" + myalert + "?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
@ -317,7 +387,7 @@ export default { |
|
|
|
.then(() => { |
|
|
|
this.$axios |
|
|
|
.posts( |
|
|
|
"/api/settleaccount/wmsjitoutput/WmsJitOutPut-Pass", |
|
|
|
"/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Pass", |
|
|
|
this.listOutPutQuery |
|
|
|
) |
|
|
|
.then((response) => { |
|
|
@ -329,6 +399,7 @@ export default { |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
this.getList(); |
|
|
|
this.listLoading = false; |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
@ -336,7 +407,9 @@ export default { |
|
|
|
type: "info", |
|
|
|
message: "已取消操作", |
|
|
|
}); |
|
|
|
this.listLoading = false; |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
/** 刷新列表 */ |
|
|
|
handleHandle(data) { |
|
|
@ -346,6 +419,15 @@ export default { |
|
|
|
}, |
|
|
|
/** 格式化字段 */ |
|
|
|
fieldFormatter(row, column) { |
|
|
|
if (column.property == "state") { |
|
|
|
return { |
|
|
|
0: "未处理", |
|
|
|
1: "申请出库", |
|
|
|
2: "确认出库", |
|
|
|
3: "不能出库", |
|
|
|
4: "取消出库", |
|
|
|
}[row[column.property]]; |
|
|
|
} |
|
|
|
return row[column.property] || "--"; |
|
|
|
}, |
|
|
|
importExcelData() { |
|
|
@ -402,18 +484,11 @@ export default { |
|
|
|
} else { |
|
|
|
this.listQuery.SkipCount = (this.page - 1) * 15; |
|
|
|
} |
|
|
|
let filter = { |
|
|
|
logic: 0, |
|
|
|
column: "wmsBillNum", |
|
|
|
action: 6, |
|
|
|
value: this.customerInfo.parentId, |
|
|
|
}; |
|
|
|
this.listQuery.Filters.push(filter); |
|
|
|
//this.listQuery.ParentId = this.customerInfo.parentId; |
|
|
|
this.listQuery.billNum = this.customerInfo.parentId; |
|
|
|
console.log("查询条件:" + JSON.stringify(this.listQuery)); |
|
|
|
this.$axios |
|
|
|
.posts( |
|
|
|
"/api/settleaccount/wmsjitoutput/WmsJitDetailList", |
|
|
|
"/api/settleaccount/wmskanbanoutput/WmsKanbanDetailList", |
|
|
|
this.listQuery |
|
|
|
) |
|
|
|
.then((response) => { |
|
|
|