|
|
@ -2,14 +2,6 @@ |
|
|
|
<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" |
|
|
@ -56,6 +48,14 @@ |
|
|
|
@click="handleFilter" |
|
|
|
>搜索 |
|
|
|
</el-button> |
|
|
|
<el-button |
|
|
|
class="filter-item" |
|
|
|
size="mini" |
|
|
|
type="info" |
|
|
|
icon="el-icon-download" |
|
|
|
@click="handleDownload()" |
|
|
|
>全部导出 |
|
|
|
</el-button> |
|
|
|
<!--表格头组件,filter查询--> |
|
|
|
<c-r-m-table-head |
|
|
|
ref="crmTableHead" |
|
|
@ -101,29 +101,32 @@ |
|
|
|
{{ scope.column.label }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="OutPutQty" |
|
|
|
label="出库数量" |
|
|
|
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 prop="OutPutQty" label="出库数量" 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 |
|
|
|
prop="state" |
|
|
|
:formatter="fieldFormatter" |
|
|
|
label="状态" |
|
|
|
width="100"> |
|
|
|
width="100" |
|
|
|
> |
|
|
|
</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> |
|
|
|
<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;"--> |
|
|
@ -142,7 +145,7 @@ |
|
|
|
:title="formTitle" |
|
|
|
width="700px" |
|
|
|
> |
|
|
|
<el-form |
|
|
|
<el-form |
|
|
|
ref="accountDatelist" |
|
|
|
:inline="true" |
|
|
|
:model="accountDatelist" |
|
|
@ -168,9 +171,7 @@ |
|
|
|
<el-button |
|
|
|
v-loading="formLoading" |
|
|
|
type="primary" |
|
|
|
|
|
|
|
@click="handleCreateBills()" |
|
|
|
|
|
|
|
>确认</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
@ -206,7 +207,7 @@ export default { |
|
|
|
erpMaterialCode: [ |
|
|
|
{ required: true, message: "必须输入!", trigger: "blur" }, |
|
|
|
], |
|
|
|
accountDate: [ |
|
|
|
accountDate: [ |
|
|
|
{ required: true, message: "日期必须输入!", trigger: "blur" }, |
|
|
|
], |
|
|
|
}, |
|
|
@ -255,11 +256,11 @@ export default { |
|
|
|
version: "", |
|
|
|
guids: "", |
|
|
|
billNum: "", |
|
|
|
accountDate:"", |
|
|
|
branchId:"", |
|
|
|
outPutQty:"", |
|
|
|
accountDate: "", |
|
|
|
branchId: "", |
|
|
|
outPutQty: "", |
|
|
|
}, |
|
|
|
listDeleteQuery: { |
|
|
|
listDeleteQuery: { |
|
|
|
billNum: "", |
|
|
|
}, |
|
|
|
page: 1, |
|
|
@ -268,14 +269,14 @@ export default { |
|
|
|
dialogFormVisible: false, |
|
|
|
multipleSelection: [], |
|
|
|
formTitle: "", |
|
|
|
stockQty: "", |
|
|
|
stockQty: "", |
|
|
|
drawer: false, |
|
|
|
showExcelImport: false, |
|
|
|
tableHeight: document.documentElement.clientHeight - 230, |
|
|
|
isEdit: false, |
|
|
|
accountDatelist:{ |
|
|
|
accountDate:"" |
|
|
|
} |
|
|
|
accountDatelist: { |
|
|
|
accountDate: "", |
|
|
|
}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
mounted() { |
|
|
@ -338,48 +339,95 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleEdit(index, row) { |
|
|
|
console.log(index, row); |
|
|
|
//导出全部功能 |
|
|
|
handleDownload(command) { |
|
|
|
this.listLoading = true; |
|
|
|
this.listOutPutQuery.version = this.customerInfo.version; |
|
|
|
this.listOutPutQuery.billNum = this.customerInfo.parentId; |
|
|
|
|
|
|
|
console.log( |
|
|
|
"红旗M备件出库单导出:" + JSON.stringify(this.listOutPutQuery) |
|
|
|
); |
|
|
|
this.$axios |
|
|
|
.posts( |
|
|
|
"/api/settleaccount/WmsHQMSharePartoutput/Export", |
|
|
|
this.listOutPutQuery |
|
|
|
) |
|
|
|
.then((res) => { |
|
|
|
let fileNameOfProject = res; |
|
|
|
this.$axios |
|
|
|
.BolbGets( |
|
|
|
"/api/settleaccount/getblobfile/download/" + fileNameOfProject |
|
|
|
) |
|
|
|
.then((response) => { |
|
|
|
if (fileNameOfProject.indexOf("_") != -1) { |
|
|
|
let downName = |
|
|
|
fileNameOfProject.slice( |
|
|
|
0, |
|
|
|
fileNameOfProject.lastIndexOf("_") |
|
|
|
) + |
|
|
|
fileNameOfProject.slice(fileNameOfProject.lastIndexOf(".")); |
|
|
|
downloadFile(response, downName); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "数据-导出成功!", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
} else { |
|
|
|
downloadFile(response, fileNameOfProject); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "数据-导出成功!", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
} |
|
|
|
this.listLoading = false; |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
handleEdit(index, row) { |
|
|
|
console.log(index, row); |
|
|
|
}, |
|
|
|
handle(row){ |
|
|
|
handle(row) { |
|
|
|
this.multipleSelection.forEach((element) => { |
|
|
|
let outPutQty=element.outPutQty; |
|
|
|
}); |
|
|
|
let outPutQty = element.outPutQty; |
|
|
|
}); |
|
|
|
if (row.outPutQty > row.stockQty) { |
|
|
|
this.$message({ |
|
|
|
message: "出库数量大于寄售库存,不允许出库!", |
|
|
|
type: "warning", |
|
|
|
}); |
|
|
|
} else { |
|
|
|
if (row.branchId != "") { |
|
|
|
this.listOutPutQuery.branchId = row.branchId; |
|
|
|
} |
|
|
|
if (row.outPutQty != "") { |
|
|
|
this.listOutPutQuery.outPutQty = row.outPutQty; |
|
|
|
} |
|
|
|
console.log( |
|
|
|
"111111结算数量按钮:" + JSON.stringify(this.listOutPutQuery) |
|
|
|
); |
|
|
|
//"taskId": "3fa85f64-5717-4562-b3fc-2c963f66afa6","outPutQty": 0 |
|
|
|
this.$axios |
|
|
|
.posts( |
|
|
|
"/api/settleaccount/WmsHQMSharePartoutput/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; |
|
|
|
}); |
|
|
|
if (row.branchId != "") { |
|
|
|
this.listOutPutQuery.branchId = row.branchId; |
|
|
|
} |
|
|
|
if (row.outPutQty != "") { |
|
|
|
this.listOutPutQuery.outPutQty = row.outPutQty; |
|
|
|
} |
|
|
|
console.log( |
|
|
|
"111111结算数量按钮:" + JSON.stringify(this.listOutPutQuery) |
|
|
|
); |
|
|
|
//"taskId": "3fa85f64-5717-4562-b3fc-2c963f66afa6","outPutQty": 0 |
|
|
|
this.$axios |
|
|
|
.posts( |
|
|
|
"/api/settleaccount/WmsHQMSharePartoutput/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; |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
//版本下拉列表选择项 |
|
|
@ -453,24 +501,24 @@ export default { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
print() { |
|
|
|
print() { |
|
|
|
this.dialogFormVisible = true; |
|
|
|
if (this.$refs["accountDatelist"] !== undefined) { |
|
|
|
if (this.$refs["accountDatelist"] !== undefined) { |
|
|
|
this.$refs["accountDatelist"].resetFields(); |
|
|
|
} |
|
|
|
}, |
|
|
|
handleCreateBillsEnd(row) { |
|
|
|
handleCreateBillsEnd(row) { |
|
|
|
this.dialogFormVisible = false; |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
//出库单 |
|
|
|
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.listLoading = 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", |
|
|
@ -478,10 +526,10 @@ export default { |
|
|
|
this.getList(); |
|
|
|
return; |
|
|
|
//this.getList(); |
|
|
|
}else{ |
|
|
|
} 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) |
|
|
@ -512,48 +560,51 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
//删除出库单 |
|
|
|
handleDelete(row){ |
|
|
|
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 ; |
|
|
|
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/WmsHQMSharePartoutput/WmsOutPutDelete", this.listDeleteQuery) |
|
|
|
.then((response) => { |
|
|
|
const index = this.list.indexOf(row); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "删除成功", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
this.getList(); |
|
|
|
this.$confirm("是否删除" + myalert + "?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.$axios |
|
|
|
.posts( |
|
|
|
"/api/settleaccount/WmsHQMSharePartoutput/WmsOutPutDelete", |
|
|
|
this.listDeleteQuery |
|
|
|
) |
|
|
|
.then((response) => { |
|
|
|
const index = this.list.indexOf(row); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "删除成功", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: "info", |
|
|
|
message: "已取消操作", |
|
|
|
this.getList(); |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: "info", |
|
|
|
message: "已取消操作", |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
/** 刷新列表 */ |
|
|
|
handleHandle(data) { |
|
|
@ -579,48 +630,7 @@ export default { |
|
|
|
this.showExcelImport = false; |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
async handleDownload() { |
|
|
|
//await this.getDownBoms(); |
|
|
|
this.listLoading = true; |
|
|
|
this.$axios |
|
|
|
.gets( |
|
|
|
"/api/settleaccount/bt-kb-not-consign/export/" + |
|
|
|
this.customerInfo.parentId |
|
|
|
) |
|
|
|
.then((res) => { |
|
|
|
let fileNameOfProject = res; |
|
|
|
this.$axios |
|
|
|
.BolbGets( |
|
|
|
"/api/settleaccount/getblobfile/download/" + fileNameOfProject |
|
|
|
) |
|
|
|
.then((response) => { |
|
|
|
if (fileNameOfProject.indexOf("_") != -1) { |
|
|
|
let downName = |
|
|
|
fileNameOfProject.slice( |
|
|
|
0, |
|
|
|
fileNameOfProject.lastIndexOf("_") |
|
|
|
) + |
|
|
|
fileNameOfProject.slice(fileNameOfProject.lastIndexOf(".")); |
|
|
|
downloadFile(response, downName); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "数据-导出成功!", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
} else { |
|
|
|
downloadFile(response, fileNameOfProject); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "数据-导出成功!", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
} |
|
|
|
this.listLoading = false; |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
getList(data) { |
|
|
|
this.listLoading = true; |
|
|
|
if (data != undefined) { |
|
|
|