|
|
@ -99,7 +99,7 @@ |
|
|
|
type="danger" |
|
|
|
icon="el-icon-delete" |
|
|
|
size="mini" |
|
|
|
@click="handleDelete()" |
|
|
|
@click="print()" |
|
|
|
>作废(支持批量)</el-button |
|
|
|
> |
|
|
|
</el-form-item> |
|
|
@ -195,6 +195,57 @@ |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-dialog |
|
|
|
title="作废信息" |
|
|
|
append-to-body="true" |
|
|
|
:visible.sync="dialogTableVisible" |
|
|
|
> |
|
|
|
<el-table :data="zflist"> |
|
|
|
<el-table-column |
|
|
|
property="billNum" |
|
|
|
label="装箱单号" |
|
|
|
width="100" |
|
|
|
></el-table-column> |
|
|
|
<el-table-column |
|
|
|
property="billSerialNum" |
|
|
|
label="单据顺号" |
|
|
|
width="100" |
|
|
|
></el-table-column> |
|
|
|
<el-table-column |
|
|
|
property="billLocation" |
|
|
|
label="左或右" |
|
|
|
width="100" |
|
|
|
></el-table-column> |
|
|
|
<el-table-column |
|
|
|
property="providerCode" |
|
|
|
label="供应商厂家代码" |
|
|
|
width="100" |
|
|
|
></el-table-column> |
|
|
|
<el-table-column |
|
|
|
property="partType" |
|
|
|
label="零件类型" |
|
|
|
width="100" |
|
|
|
></el-table-column> |
|
|
|
<el-table-column |
|
|
|
property="capacity" |
|
|
|
label="器具容量" |
|
|
|
width="100" |
|
|
|
></el-table-column> |
|
|
|
<el-table-column |
|
|
|
property="printDate" |
|
|
|
label="打印日期" |
|
|
|
width="100" |
|
|
|
></el-table-column> |
|
|
|
</el-table> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="text" @click="dialogTableVisible = false" |
|
|
|
>取消</el-button |
|
|
|
> |
|
|
|
<el-button type="primary" @click="handleDelete">确 认</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -243,6 +294,7 @@ export default { |
|
|
|
}; |
|
|
|
return { |
|
|
|
crmType: "M100Online-MB", |
|
|
|
dialogTableVisible: false, |
|
|
|
getRowKeys: (row) => { |
|
|
|
return row.id; //这里看这一行中需要根据哪个属性值是id |
|
|
|
}, |
|
|
@ -506,20 +558,14 @@ export default { |
|
|
|
this.listQuery |
|
|
|
) |
|
|
|
.then((response) => { |
|
|
|
response.items.forEach((item)=>{ |
|
|
|
if(item.printType == 0) |
|
|
|
{ |
|
|
|
response.items.forEach((item) => { |
|
|
|
if (item.printType == 0) { |
|
|
|
item.printType = "正常打印"; |
|
|
|
} |
|
|
|
else if(item.printType == 1) |
|
|
|
{ |
|
|
|
} else if (item.printType == 1) { |
|
|
|
item.printType = "重打"; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
} else { |
|
|
|
item.printType = "补打"; |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
this.list = response.items; |
|
|
|
this.totalCount = response.totalCount; |
|
|
@ -581,25 +627,21 @@ export default { |
|
|
|
.catch(() => {}); |
|
|
|
} |
|
|
|
}, |
|
|
|
//作废操作,支持批量操作-门板 |
|
|
|
handleDelete(row) { |
|
|
|
//批量删除 |
|
|
|
print(row) { |
|
|
|
var params = []; |
|
|
|
let myalert = ""; //声明变量,其变量必须在此声明后使用 |
|
|
|
let myalertcount = []; |
|
|
|
if (row) { |
|
|
|
//单行 |
|
|
|
params.push(row.id); |
|
|
|
myalert = row.name; |
|
|
|
} else { |
|
|
|
//多选 |
|
|
|
this.multipleSelection.forEach((element) => { |
|
|
|
let id = element.id; |
|
|
|
params.push(id); |
|
|
|
}); |
|
|
|
myalert = "选中项"; |
|
|
|
} |
|
|
|
console.log("作废查询参数:" + JSON.stringify(params)); |
|
|
|
this.zuofei = params; |
|
|
|
|
|
|
|
this.dialogTableVisible = true; |
|
|
|
this.$axios |
|
|
|
.posts("/api/newjit/MenBanPackingList/get-all-del-List", params) |
|
|
|
.then((response) => { |
|
|
@ -613,46 +655,111 @@ export default { |
|
|
|
return; |
|
|
|
} else { |
|
|
|
this.fileQuery.dataname = JSON.stringify(response); |
|
|
|
response.forEach((itemsss) => { |
|
|
|
myalertcount.push(itemsss.billNum); |
|
|
|
}); |
|
|
|
this.zflist = response; |
|
|
|
console.log( |
|
|
|
"门板-调用Handlers/Handler1.ashx?report=menban传的值:" + |
|
|
|
JSON.stringify(this.fileQuery.dataname) |
|
|
|
); |
|
|
|
this.$confirm( |
|
|
|
"是否作废选中的" + response.length + "条记录?", |
|
|
|
"提示", |
|
|
|
{ |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
} |
|
|
|
) |
|
|
|
.then(() => { |
|
|
|
this.$axios |
|
|
|
.posts("/api/newjit/MenBanPackingList/scrap", 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: "已取消操作", |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
}, |
|
|
|
|
|
|
|
//作废详情页确认按钮 |
|
|
|
handleDelete() { |
|
|
|
//debugger; |
|
|
|
let params = this.zuofei; |
|
|
|
|
|
|
|
this.$axios |
|
|
|
.posts("/api/newjit/MenBanPackingList/scrap", params) |
|
|
|
.then((response) => { |
|
|
|
console.log( |
|
|
|
"门板-调用Handlers/Handler1.ashx?report=menban传的值:" + |
|
|
|
JSON.stringify(response) |
|
|
|
); |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "作废成功", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.dialogTableVisible = false; |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
|
|
|
|
//作废操作,支持批量操作-门板 |
|
|
|
// handleDelete(row) { |
|
|
|
// //批量删除 |
|
|
|
// var params = []; |
|
|
|
// let myalert = ""; //声明变量,其变量必须在此声明后使用 |
|
|
|
// let myalertcount = []; |
|
|
|
// if (row) { |
|
|
|
// //单行 |
|
|
|
// params.push(row.id); |
|
|
|
// myalert = row.name; |
|
|
|
// } else { |
|
|
|
// //多选 |
|
|
|
// this.multipleSelection.forEach((element) => { |
|
|
|
// let id = element.id; |
|
|
|
// params.push(id); |
|
|
|
// }); |
|
|
|
// myalert = "选中项"; |
|
|
|
// } |
|
|
|
// console.log("作废查询参数:" + JSON.stringify(params)); |
|
|
|
// this.$axios |
|
|
|
// .posts("/api/newjit/MenBanPackingList/get-all-del-List", params) |
|
|
|
// .then((response) => { |
|
|
|
// //alert(response.status); |
|
|
|
// const index = this.list.indexOf(row); |
|
|
|
// if (response.status === false) { |
|
|
|
// this.$message({ |
|
|
|
// message: response.message, |
|
|
|
// type: "error", |
|
|
|
// }); |
|
|
|
// return; |
|
|
|
// } else { |
|
|
|
// this.fileQuery.dataname = JSON.stringify(response); |
|
|
|
// response.forEach((itemsss) => { |
|
|
|
// myalertcount.push(itemsss.billNum); |
|
|
|
// }); |
|
|
|
// console.log( |
|
|
|
// "门板-调用Handlers/Handler1.ashx?report=menban传的值:" + |
|
|
|
// JSON.stringify(this.fileQuery.dataname) |
|
|
|
// ); |
|
|
|
// this.$confirm( |
|
|
|
// "是否作废选中的" + response.length + "条记录?", |
|
|
|
// "提示", |
|
|
|
// { |
|
|
|
// confirmButtonText: "确定", |
|
|
|
// cancelButtonText: "取消", |
|
|
|
// type: "warning", |
|
|
|
// } |
|
|
|
// ) |
|
|
|
// .then(() => { |
|
|
|
// this.$axios |
|
|
|
// .posts("/api/newjit/MenBanPackingList/scrap", 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: "已取消操作", |
|
|
|
// }); |
|
|
|
// }); |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// .catch(() => {}); |
|
|
|
// }, |
|
|
|
fetchData(id) { |
|
|
|
//循环动态 |
|
|
|
this.$axios |
|
|
|