feat 货位打印
This commit is contained in:
parent
4b94c31f91
commit
d31791c8ee
@ -71,7 +71,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<el-table border :height="tableHeight" v-loading="materialTableConfig.loading" :data="state.wareHouseList" highlight-current-row
|
||||
row-key="id" style="width: 100%">
|
||||
row-key="id" style="width: 100%" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<template v-for="(col, index) in materialTableConfig.column" :key="index">
|
||||
<el-table-column v-if="!col.hide" :label="col.header" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
@ -278,6 +279,8 @@ onMounted(() => {
|
||||
handleQuery();
|
||||
updateTableHeight();
|
||||
ERPFactoryQuery();
|
||||
// 打印机
|
||||
getPRINTLIST();
|
||||
window.addEventListener('resize', handleResize);
|
||||
});
|
||||
const queryInfo = () => {
|
||||
@ -416,7 +419,7 @@ function submitForm() {
|
||||
SITENAME: 'SDK'
|
||||
};
|
||||
editStorage(params).then((res: any) => {
|
||||
if (res.code === "0") {
|
||||
if (res.code === "200") {
|
||||
proxy.$ElMessage.success("修改成功");
|
||||
cancel();
|
||||
handleQuery();
|
||||
@ -426,7 +429,7 @@ function submitForm() {
|
||||
})
|
||||
} else {
|
||||
createStorage(state.formData).then((res: any) => {
|
||||
if (res.code === "0") {
|
||||
if (res.code === "200") {
|
||||
proxy.$ElMessage.success("新增成功");
|
||||
cancel();
|
||||
handleQuery();
|
||||
@ -447,7 +450,7 @@ function handleDelete(row: any) {
|
||||
SITENAME: 'SDK',
|
||||
};
|
||||
delStorage(params).then((res: any) => {
|
||||
if (res.code === "0") {
|
||||
if (res.code === "200") {
|
||||
proxy.$ElMessage.success("删除成功");
|
||||
handleQuery();
|
||||
} else {
|
||||
@ -455,5 +458,56 @@ function handleDelete(row: any) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 打印机
|
||||
*/
|
||||
function print() {
|
||||
if (state.PRINTNAME == null || state.PRINTNAME == "") {
|
||||
ElMessageBox.alert('请选择打印机', {
|
||||
confirmButtonText: 'OK',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (state.multipleSelection.length == 0) {
|
||||
ElMessageBox.alert('打印清单为空', {
|
||||
confirmButtonText: 'OK',
|
||||
})
|
||||
return
|
||||
}
|
||||
let PRINT = {
|
||||
LIST: state.multipleSelection,
|
||||
PRINTNAME: state.PRINTNAME,
|
||||
USER: ls.get('userId')
|
||||
}
|
||||
state.button_print = true;
|
||||
state.loadings = true;
|
||||
printStorage(PRINT).then((res: any) => {
|
||||
console.log('PRINT',res)
|
||||
}).catch(() => {
|
||||
state.button_print = false;
|
||||
state.loadings = false;
|
||||
});
|
||||
state.button_print = false;
|
||||
state.loadings = false;
|
||||
ElMessageBox.alert('标签打印成功', {
|
||||
confirmButtonText: 'OK',
|
||||
})
|
||||
}
|
||||
|
||||
function getPRINTLIST() {
|
||||
getQueryList({
|
||||
queryId: "getPRINTLIST",
|
||||
version: "00001",
|
||||
params: {
|
||||
},
|
||||
}).then((res: any) => {
|
||||
state.PRINTLIST = res.data
|
||||
})
|
||||
}
|
||||
|
||||
const handleSelectionChange = (val: any) => {
|
||||
state.multipleSelection = val;
|
||||
}
|
||||
</script>
|
||||
<style scoped></style>
|
||||
|
Loading…
x
Reference in New Issue
Block a user