|
|
@ -1,27 +1,32 @@ |
|
|
|
<!--FIS发运数据对比输出表-明细数据--> |
|
|
|
<!--大众无条码看板-明细数据--> |
|
|
|
<template> |
|
|
|
<div class="cr-body-content"> |
|
|
|
<flexbox class="content-header"> |
|
|
|
<!-- <el-button |
|
|
|
class="filter-item" |
|
|
|
size="mini" |
|
|
|
type="info" |
|
|
|
icon="el-icon-download" |
|
|
|
@click="handleDownload()" |
|
|
|
>导出全部 |
|
|
|
</el-button> --> |
|
|
|
<JobSelectVerson |
|
|
|
:options="JobVersionList" |
|
|
|
style="width: 150px; margin-left: -10px" |
|
|
|
class="search-container" |
|
|
|
@value-change="JobVersionValue" |
|
|
|
></JobSelectVerson> |
|
|
|
<el-select |
|
|
|
v-model="PurchaseDateValue" |
|
|
|
clearable |
|
|
|
style="width: 188px; margin-left: -10px; margin-right: 5px" |
|
|
|
placeholder="请选择采购日期" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in PurchaseDateList" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
></el-option> |
|
|
|
</el-select> |
|
|
|
<el-button |
|
|
|
class="filter-item" |
|
|
|
type="success" |
|
|
|
icon="el-icon-check" |
|
|
|
size="mini" |
|
|
|
@click="print()" |
|
|
|
@click="handleCreateBills()" |
|
|
|
>确认出库单</el-button |
|
|
|
> |
|
|
|
<el-button |
|
|
@ -29,17 +34,17 @@ |
|
|
|
size="mini" |
|
|
|
type="warning" |
|
|
|
icon="el-icon-download" |
|
|
|
@click="handleCancelBills()" |
|
|
|
@click="print()" |
|
|
|
>取消出库(支持批量) |
|
|
|
</el-button> |
|
|
|
<!-- <el-button |
|
|
|
<el-button |
|
|
|
class="filter-item" |
|
|
|
size="mini" |
|
|
|
type="danger" |
|
|
|
icon="el-icon-download" |
|
|
|
@click="handleDelete()" |
|
|
|
>删除出库单(支持批量) |
|
|
|
</el-button> --> |
|
|
|
</el-button> |
|
|
|
<el-input |
|
|
|
v-model="searchContent" |
|
|
|
clearable |
|
|
@ -101,6 +106,30 @@ |
|
|
|
{{ scope.column.label }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="outputQty" |
|
|
|
label="出库数量" |
|
|
|
v-model="outPutQtylist.outputQty" |
|
|
|
width="100" |
|
|
|
> |
|
|
|
<template slot-scope="list"> |
|
|
|
<el-input |
|
|
|
size="small" |
|
|
|
v-model="list.row.outputQty" |
|
|
|
@change="handleEdit(list.$index, list.row)" |
|
|
|
></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" align="center"> |
|
|
|
<template slot-scope="list"> |
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
v-if="(list.$index = 1)" |
|
|
|
@click="handle(list.row)" |
|
|
|
>确定</el-button |
|
|
|
> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<div class="table-footer"> |
|
|
|
<!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"--> |
|
|
@ -145,9 +174,7 @@ |
|
|
|
<el-button |
|
|
|
v-loading="formLoading" |
|
|
|
type="primary" |
|
|
|
|
|
|
|
@click="handleCreateBills()" |
|
|
|
|
|
|
|
>确认</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
@ -177,13 +204,13 @@ export default { |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
crmType: "kanbanOutOrder", |
|
|
|
crmType: "sparepartOutOrder", |
|
|
|
rules: { |
|
|
|
//前端定义的规则,后端也有验证 |
|
|
|
erpMaterialCode: [ |
|
|
|
{ required: true, message: "必须输入!", trigger: "blur" }, |
|
|
|
], |
|
|
|
accountDate: [ |
|
|
|
accountDate: [ |
|
|
|
{ required: true, message: "日期必须输入!", trigger: "blur" }, |
|
|
|
], |
|
|
|
}, |
|
|
@ -208,6 +235,7 @@ export default { |
|
|
|
{ value: "3", label: "不能出库" }, |
|
|
|
{ value: "4", label: "取消出库" }, |
|
|
|
], |
|
|
|
PurchaseDateList: [], |
|
|
|
// 高级搜索 |
|
|
|
filterObj: { |
|
|
|
type: Object, |
|
|
@ -232,21 +260,29 @@ export default { |
|
|
|
version: "", |
|
|
|
guids: "", |
|
|
|
billNum: "", |
|
|
|
accountDate:"" |
|
|
|
accountDate: "", |
|
|
|
}, |
|
|
|
listDeleteQuery: { |
|
|
|
billNum: "", |
|
|
|
}, |
|
|
|
page: 1, |
|
|
|
JobversionValue: "", |
|
|
|
PurchaseDateValue: "", |
|
|
|
JobversionValueVerson: "", |
|
|
|
dialogFormVisible: false, |
|
|
|
multipleSelection: [], |
|
|
|
outPutQtylist: { |
|
|
|
outputQty: "", |
|
|
|
taskId: "", |
|
|
|
}, |
|
|
|
formTitle: "", |
|
|
|
drawer: false, |
|
|
|
showExcelImport: false, |
|
|
|
tableHeight: document.documentElement.clientHeight - 230, |
|
|
|
isEdit: false, |
|
|
|
accountDatelist:{ |
|
|
|
accountDate:"" |
|
|
|
} |
|
|
|
accountDatelist: { |
|
|
|
accountDate: "", |
|
|
|
}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
mounted() { |
|
|
@ -286,20 +322,26 @@ export default { |
|
|
|
prop: "version", |
|
|
|
width: 110, |
|
|
|
}); |
|
|
|
tempsTabs.push({ label: "单据号", prop: "billNum", width: 100 }); |
|
|
|
tempsTabs.push({ label: "物料号", prop: "sapMaterialCode", width: 100 }); |
|
|
|
tempsTabs.push({ |
|
|
|
label: "零件号", |
|
|
|
prop: "materialCode", |
|
|
|
width: 150, |
|
|
|
label: "物料描述", |
|
|
|
prop: "materialDesc", |
|
|
|
width: 250, |
|
|
|
}); |
|
|
|
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: "qty", width: 100 }); |
|
|
|
tempsTabs.push({ label: "结算数量", prop: "qty", width: 100 }); |
|
|
|
tempsTabs.push({ label: "寄售库存数量", prop: "sockQty", width: 120 }); |
|
|
|
tempsTabs.push({ label: "实际数量", prop: "realityNumber", width: 100 }); |
|
|
|
|
|
|
|
tempsTabs.push({ label: "状态", prop: "state", width: 100 }); |
|
|
|
return tempsTabs; |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
//可获取到编辑的数据 |
|
|
|
handleEdit(index, row) { |
|
|
|
console.log(index, row); |
|
|
|
}, |
|
|
|
//版本下拉列表选择项 |
|
|
|
JobVersionValue(params) { |
|
|
|
//版本下拉选择 |
|
|
@ -314,6 +356,46 @@ export default { |
|
|
|
this.listQuery.Filters.push(filter); |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
handle(row) { |
|
|
|
this.multipleSelection.forEach((element) => { |
|
|
|
let outPutQty = element.outPutQty; |
|
|
|
}); |
|
|
|
if (row.outPutQty > row.sockQty) { |
|
|
|
this.$message({ |
|
|
|
message: "出库数量大于寄售库存,不允许出库!", |
|
|
|
type: "warning", |
|
|
|
}); |
|
|
|
} else { |
|
|
|
if (row.branchId != "") { |
|
|
|
this.listOutPutQuery.branchId = row.id; |
|
|
|
} |
|
|
|
if (row.outPutQty != "") { |
|
|
|
this.listOutPutQuery.outputQty = row.outputQty; |
|
|
|
} |
|
|
|
console.log( |
|
|
|
"大众备件调整结算数量按钮:" + JSON.stringify(this.listOutPutQuery) |
|
|
|
); |
|
|
|
//"taskId": "3fa85f64-5717-4562-b3fc-2c963f66afa6","outPutQty": 0 |
|
|
|
this.$axios |
|
|
|
.posts( |
|
|
|
"/api/settleaccount/wmskanbanoutputextend/WmsSharePartOutPutModify", |
|
|
|
this.listOutPutQuery |
|
|
|
) |
|
|
|
.then((response) => { |
|
|
|
const index = this.list.indexOf(row); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "操作成功", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
this.getList(); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.listLoading = false; |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
//取消出库单 |
|
|
|
handleCancelBills(row) { |
|
|
|
if (this.multipleSelection.length == 0) { |
|
|
@ -350,7 +432,7 @@ export default { |
|
|
|
.then(() => { |
|
|
|
this.$axios |
|
|
|
.posts( |
|
|
|
"/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Cancel", |
|
|
|
"/api/settleaccount/wmskanbanoutputextend/WmsKanbanOutPut-Cancel", |
|
|
|
this.listOutPutQuery |
|
|
|
) |
|
|
|
.then((response) => { |
|
|
@ -373,18 +455,18 @@ export default { |
|
|
|
}, |
|
|
|
print() { |
|
|
|
this.dialogFormVisible = true; |
|
|
|
if (this.$refs["accountDatelist"] !== undefined) { |
|
|
|
if (this.$refs["accountDatelist"] !== undefined) { |
|
|
|
this.$refs["accountDatelist"].resetFields(); |
|
|
|
} |
|
|
|
}, |
|
|
|
//出库单 |
|
|
|
handleCreateBills(row) { |
|
|
|
this.dialogFormVisible = true; |
|
|
|
this.listLoading = true; |
|
|
|
this.listOutPutQuery.guids = []; |
|
|
|
this.listOutPutQuery.version = this.customerInfo.version; |
|
|
|
this.listOutPutQuery.billNum = this.customerInfo.parentId; |
|
|
|
if (this.accountDatelist.accountDate == "") { |
|
|
|
this.formLoading = true; |
|
|
|
this.listOutPutQuery.guids = []; |
|
|
|
this.listOutPutQuery.version = this.customerInfo.version; |
|
|
|
this.listOutPutQuery.billNum = this.customerInfo.parentId; |
|
|
|
if (this.accountDatelist.accountDate == "") { |
|
|
|
this.$message({ |
|
|
|
message: "请选择日期!", |
|
|
|
type: "warning", |
|
|
@ -394,8 +476,8 @@ export default { |
|
|
|
//this.getList(); |
|
|
|
} else { |
|
|
|
if (this.accountDatelist != "") { |
|
|
|
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; |
|
|
|
} |
|
|
|
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; |
|
|
|
} |
|
|
|
//this.listOutPutQuery.accountDate = this.accountDatelist; |
|
|
|
console.log( |
|
|
|
"未选择时全部确认出库条件:" + JSON.stringify(this.listOutPutQuery) |
|
|
@ -403,7 +485,7 @@ export default { |
|
|
|
|
|
|
|
this.$axios |
|
|
|
.posts( |
|
|
|
"/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Pass", |
|
|
|
"/api/settleaccount/wmskanbanoutputextend/WmsKanbanOutPut-Pass", |
|
|
|
this.listOutPutQuery |
|
|
|
) |
|
|
|
.then((response) => { |
|
|
@ -417,55 +499,60 @@ export default { |
|
|
|
this.accountDatelist.accountDate = ""; |
|
|
|
this.dialogFormVisible = false; |
|
|
|
this.getList(); |
|
|
|
this.listLoading = false; |
|
|
|
this.formLoading = false; |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.listLoading = false; |
|
|
|
this.formLoading = false; |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
//删除出库单 |
|
|
|
// handleDelete(row){ |
|
|
|
// 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(); |
|
|
|
// }); |
|
|
|
// }) |
|
|
|
// .catch(() => { |
|
|
|
// this.$message({ |
|
|
|
// type: "info", |
|
|
|
// message: "已取消操作", |
|
|
|
// }); |
|
|
|
// }); |
|
|
|
// }, |
|
|
|
handleDelete(row) { |
|
|
|
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.listDeleteQuery.billNum = this.listQuery.billNum; |
|
|
|
console.log("单据号:" + JSON.stringify(this.listDeleteQuery)); |
|
|
|
this.$confirm("是否删除" + myalert + "?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.$axios |
|
|
|
.posts( |
|
|
|
"/api/settleaccount/wmskanbanoutputextend/WmsOutPutDelete", |
|
|
|
this.listDeleteQuery |
|
|
|
) |
|
|
|
.then((response) => { |
|
|
|
const index = this.list.indexOf(row); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "删除成功", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
this.getList(); |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: "info", |
|
|
|
message: "已取消操作", |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
/** 刷新列表 */ |
|
|
|
handleHandle(data) { |
|
|
|
if (data.type !== "edit") { |
|
|
@ -543,7 +630,7 @@ export default { |
|
|
|
console.log("查询条件:" + JSON.stringify(this.listQuery)); |
|
|
|
this.$axios |
|
|
|
.posts( |
|
|
|
"/api/settleaccount/wmskanbanoutput/WmsKanbanDetailList", |
|
|
|
"/api/settleaccount/wmskanbanoutputextend/WmsKanbanDetailList", |
|
|
|
this.listQuery |
|
|
|
) |
|
|
|
.then((response) => { |
|
|
@ -637,7 +724,7 @@ export default { |
|
|
|
if ( |
|
|
|
column.property === "fisQty" || |
|
|
|
column.property === "diffQty" || |
|
|
|
column.property === "stockQty" |
|
|
|
column.property === "sockQty" |
|
|
|
) { |
|
|
|
return { textAlign: "right" }; |
|
|
|
} else { |
|
|
@ -649,7 +736,7 @@ export default { |
|
|
|
if ( |
|
|
|
column.property === "fisQty" || |
|
|
|
column.property === "diffQty" || |
|
|
|
column.property === "stockQty" |
|
|
|
column.property === "sockQty" |
|
|
|
) { |
|
|
|
return { textAlign: "right", background: "#FAFAFA" }; |
|
|
|
} else { |
|
|
@ -669,3 +756,4 @@ export default { |
|
|
|
@import "../../styles/crmtable.scss"; |
|
|
|
</style> |
|
|
|
|
|
|
|
|
|
|
|