✨ feat: 二维码增加状态放置重复扫描,增加批次号
This commit is contained in:
@@ -926,7 +926,7 @@ body {
|
|||||||
left: 0;
|
left: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 10vh auto 0;
|
margin: 10vh auto 0;
|
||||||
background: $--metal-gradient-light;
|
background: $--metal-gradient-light !important;
|
||||||
border: 1px solid $--border-color-light;
|
border: 1px solid $--border-color-light;
|
||||||
box-shadow: $--metal-shadow;
|
box-shadow: $--metal-shadow;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
@@ -1362,7 +1362,7 @@ body {
|
|||||||
// ====================== 描述列表组件(el-descriptions)- 深色模式 ======================
|
// ====================== 描述列表组件(el-descriptions)- 深色模式 ======================
|
||||||
.el-descriptions {
|
.el-descriptions {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: $--color-background; // 黑色背景
|
background: $--color-background !important; // 黑色背景
|
||||||
box-shadow: $--metal-shadow;
|
box-shadow: $--metal-shadow;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: $--color-text-primary; // 白色文字
|
color: $--color-text-primary; // 白色文字
|
||||||
@@ -1397,7 +1397,7 @@ body {
|
|||||||
// 描述列表标签项(左侧)
|
// 描述列表标签项(左侧)
|
||||||
.el-descriptions-item__label {
|
.el-descriptions-item__label {
|
||||||
padding: $--spacing-lg;
|
padding: $--spacing-lg;
|
||||||
background: $--color-background; // 极浅灰背景区分标签
|
background: $--color-background !important; // 极浅灰背景区分标签
|
||||||
color: $--color-text-secondary; // 浅灰文字
|
color: $--color-text-secondary; // 浅灰文字
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
border-right: 1px solid $--border-color-lighter;
|
border-right: 1px solid $--border-color-lighter;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<span>
|
<span>
|
||||||
<el-select v-model="selected" :placeholder="placeholder" filterable clearable :loading="loading" @change="onChange"
|
<el-select v-model="selected" :placeholder="placeholder" filterable clearable :loading="loading"
|
||||||
style="width: 100%" :value-key="'rawMaterialId'">
|
style="width: 100%" :value-key="'rawMaterialId'">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<el-button v-if="canAdd" @click="add" icon="el-icon-plus">未搜索到原材料,点击添加</el-button>
|
<el-button v-if="canAdd" @click="add" icon="el-icon-plus">未搜索到原材料,点击添加</el-button>
|
||||||
@@ -114,6 +114,7 @@ export default {
|
|||||||
},
|
},
|
||||||
selected(val) {
|
selected(val) {
|
||||||
this.$emit("input", val);
|
this.$emit("input", val);
|
||||||
|
this.$emit('change', this.rawMaterialList.find(p => p.rawMaterialId === val));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
@@ -78,6 +78,7 @@
|
|||||||
<!-- <el-table-column label="是否启用" align="center" prop="isEnabled" /> -->
|
<!-- <el-table-column label="是否启用" align="center" prop="isEnabled" /> -->
|
||||||
<el-table-column label="编号" align="center" prop="serialNumber" />
|
<el-table-column label="编号" align="center" prop="serialNumber" />
|
||||||
<el-table-column label="二维码尺寸" align="center" prop="size" />
|
<el-table-column label="二维码尺寸" align="center" prop="size" />
|
||||||
|
<el-table-column label="状态" align="center" prop="status" />
|
||||||
<el-table-column v-if="showQRCode" label="二维码" align="center" prop="content">
|
<el-table-column v-if="showQRCode" label="二维码" align="center" prop="content">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<QRCode :content="scope.row.recordId" :size="scope.row.size"/>
|
<QRCode :content="scope.row.recordId" :size="scope.row.size"/>
|
||||||
@@ -114,7 +115,7 @@
|
|||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="二维码内容">
|
<el-form-item label="二维码内容">
|
||||||
<editor v-model="form.content" :min-height="192"/>
|
<textarea v-model="form.content" :min-height="192" style="width: 100%;height: 192px;background-color: #393e43;color: #fff;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否启用" prop="isEnabled">
|
<el-form-item label="是否启用" prop="isEnabled">
|
||||||
<!-- 单选框 -->
|
<!-- 单选框 -->
|
||||||
@@ -123,6 +124,9 @@
|
|||||||
<el-radio :label="0">禁用</el-radio>
|
<el-radio :label="0">禁用</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-input v-model="form.status" placeholder="请输入状态" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="编号" prop="serialNumber">
|
<el-form-item label="编号" prop="serialNumber">
|
||||||
<el-input v-model="form.serialNumber" placeholder="请输入编号" />
|
<el-input v-model="form.serialNumber" placeholder="请输入编号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -177,12 +181,13 @@ export default {
|
|||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
qrcodeType: undefined,
|
qrcodeType: undefined,
|
||||||
content: undefined,
|
content: undefined,
|
||||||
isEnabled: undefined,
|
isEnabled: undefined,
|
||||||
serialNumber: undefined,
|
serialNumber: undefined,
|
||||||
size: undefined,
|
size: undefined,
|
||||||
|
status: undefined,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
@@ -223,7 +228,8 @@ export default {
|
|||||||
createTime: undefined,
|
createTime: undefined,
|
||||||
createBy: undefined,
|
createBy: undefined,
|
||||||
updateTime: undefined,
|
updateTime: undefined,
|
||||||
updateBy: undefined
|
updateBy: undefined,
|
||||||
|
status: undefined,
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -158,6 +158,15 @@
|
|||||||
@change="(warehouse) => onFromWarehouseChange(cfg, idx, warehouse)" />
|
@change="(warehouse) => onFromWarehouseChange(cfg, idx, warehouse)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12" v-if="cfg.ioType === 'in'">
|
||||||
|
<el-form-item label="备用单据" :error="getError(cfg, 'stockIoWaitId')" class="form-item">
|
||||||
|
<el-select clearable filterable size="mini" v-model="cfg.stockIoWaitId" placeholder="请选择备用单据"
|
||||||
|
class="form-select" :disabled="!cfg.ioType">
|
||||||
|
<el-option v-for="item in masterList.filter(i => i.ioType === 'out')"
|
||||||
|
:key="item.stockIoId" :label="item.stockIoCode" :value="item.stockIoId" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="8">
|
<el-row :gutter="8">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -182,11 +191,16 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="8">
|
<el-row :gutter="8">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="物料数量" :error="getError(cfg, 'count')" class="form-item">
|
<el-form-item label="物料数量" :error="getError(cfg, 'quantity')" class="form-item">
|
||||||
<el-input-number :controls=false controls-position="right" v-model="cfg.count" :min="1"
|
<el-input-number :controls=false controls-position="right" v-model="cfg.quantity" :min="1"
|
||||||
:max="100" size="mini" placeholder="请输入数量" />
|
:max="100" size="mini" placeholder="请输入数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="批次号" class="form-item">
|
||||||
|
<el-input v-model="cfg.batchNo" size="mini" placeholder="请输入批次号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row :gutter="8">
|
<el-row :gutter="8">
|
||||||
@@ -274,6 +288,7 @@ export default {
|
|||||||
onItemChange(item, idx) {
|
onItemChange(item, idx) {
|
||||||
if (item && this.drawerBarcodeData[idx]) {
|
if (item && this.drawerBarcodeData[idx]) {
|
||||||
// 设置对应的物料名称
|
// 设置对应的物料名称
|
||||||
|
console.log(item, '物料信息');
|
||||||
const name = item.name || item.materialName || item.productName || item.rawMaterialName;
|
const name = item.name || item.materialName || item.productName || item.rawMaterialName;
|
||||||
const code = item.code || item.materialCode || item.productCode || item.rawMaterialCode;
|
const code = item.code || item.materialCode || item.productCode || item.rawMaterialCode;
|
||||||
this.$set(this.drawerBarcodeData[idx], 'itemName', name);
|
this.$set(this.drawerBarcodeData[idx], 'itemName', name);
|
||||||
@@ -343,6 +358,20 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 添加二维码配置 - 增加hover状态初始化
|
// 添加二维码配置 - 增加hover状态初始化
|
||||||
|
// randomBatchNo, 生成10位的批次号
|
||||||
|
randomBatchNo() {
|
||||||
|
const year = new Date().getFullYear();
|
||||||
|
const month = new Date().getMonth() + 1;
|
||||||
|
const day = new Date().getDate();
|
||||||
|
const hour = new Date().getHours();
|
||||||
|
const salt = Math.random().toString(36).substring(2, 4);
|
||||||
|
|
||||||
|
// 如果出现2月、3日,5点等需补全为02,03,05
|
||||||
|
function pad(num) {
|
||||||
|
return num < 10 ? '0' + num : num;
|
||||||
|
}
|
||||||
|
return year + pad(month) + pad(day) + pad(hour) + salt;
|
||||||
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
const newConfig = {
|
const newConfig = {
|
||||||
ioType: undefined,
|
ioType: undefined,
|
||||||
@@ -352,13 +381,15 @@ export default {
|
|||||||
itemType: undefined,
|
itemType: undefined,
|
||||||
gend: false,
|
gend: false,
|
||||||
itemId: undefined,
|
itemId: undefined,
|
||||||
batchNo: 'auto',
|
// 年月日时 + 随机两个字符
|
||||||
count: 1, // 默认数量1
|
batchNo: this.randomBatchNo(),
|
||||||
|
quantity: 1, // 默认数量1
|
||||||
totalCount: 1, // 默认数量1
|
totalCount: 1, // 默认数量1
|
||||||
unit: '',
|
unit: '',
|
||||||
text: '二维码', // 默认文字
|
text: '二维码', // 默认文字
|
||||||
hovered: false, // 新增hover状态,用于交互反馈,
|
hovered: false, // 新增hover状态,用于交互反馈,
|
||||||
showForm: true // 新增表单展示开关
|
showForm: true, // 新增表单展示开关
|
||||||
|
stockIoWaitId: undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.drawerBarcodeData.push(newConfig);
|
this.drawerBarcodeData.push(newConfig);
|
||||||
@@ -443,7 +474,7 @@ export default {
|
|||||||
// 移库需要额外验证源仓库
|
// 移库需要额外验证源仓库
|
||||||
const transferValid = cfg.ioType !== 'transfer' || !!cfg.fromWarehouseId;
|
const transferValid = cfg.ioType !== 'transfer' || !!cfg.fromWarehouseId;
|
||||||
// 物料相关验证
|
// 物料相关验证
|
||||||
const itemValid = !!cfg.itemType && !!cfg.itemId && !!cfg.count && cfg.count >= 1;
|
const itemValid = !!cfg.itemType && !!cfg.itemId && !!cfg.quantity && cfg.quantity >= 1;
|
||||||
|
|
||||||
return basicValid && transferValid && itemValid;
|
return basicValid && transferValid && itemValid;
|
||||||
},
|
},
|
||||||
@@ -464,8 +495,8 @@ export default {
|
|||||||
return !cfg.itemType ? '请选择物料类型' : '';
|
return !cfg.itemType ? '请选择物料类型' : '';
|
||||||
case 'itemId':
|
case 'itemId':
|
||||||
return !cfg.itemId ? '请选择物料信息' : '';
|
return !cfg.itemId ? '请选择物料信息' : '';
|
||||||
case 'count':
|
case 'quantity':
|
||||||
return !cfg.count || cfg.count < 1 ? '请输入有效的数量(至少1)' : '';
|
return !cfg.quantity || cfg.quantity < 1 ? '请输入有效的数量(至少1)' : '';
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,10 +144,12 @@ export default {
|
|||||||
|
|
||||||
.company-name {
|
.company-name {
|
||||||
font-size: 0.95em;
|
font-size: 0.95em;
|
||||||
|
width: 100%;
|
||||||
line-height: 1.1;
|
line-height: 1.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.english-name {
|
.english-name {
|
||||||
|
width: 100%;
|
||||||
font-size: 0.6em;
|
font-size: 0.6em;
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,107 +87,107 @@ export default {
|
|||||||
const labelHeight = labelContainer.offsetHeight;
|
const labelHeight = labelContainer.offsetHeight;
|
||||||
|
|
||||||
// 3. 定义打印样式(确保与预览一致)
|
// 3. 定义打印样式(确保与预览一致)
|
||||||
const printStyles = `
|
// const printStyles = `
|
||||||
/* 基础容器样式 */
|
// /* 基础容器样式 */
|
||||||
#label-preview-container {
|
// #label-preview-container {
|
||||||
width: ${labelWidth}px !important;
|
// width: ${labelWidth}px !important;
|
||||||
height: ${labelHeight}px !important;
|
// height: ${labelHeight}px !important;
|
||||||
padding: 1.5rem !important;
|
// padding: 1.5rem !important;
|
||||||
box-sizing: border-box !important;
|
// box-sizing: border-box !important;
|
||||||
border: 1px solid #333 !important;
|
// border: 1px solid #333 !important;
|
||||||
background-color: #fff !important;
|
// background-color: #fff !important;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.company-header {
|
// .company-header {
|
||||||
display: flex;
|
// display: flex;
|
||||||
align-items: center;
|
// align-items: center;
|
||||||
margin-bottom: 0.3em;
|
// margin-bottom: 0.3em;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.company-logo {
|
// .company-logo {
|
||||||
width: 2.8em;
|
// width: 2.8em;
|
||||||
height: 2.8em;
|
// height: 2.8em;
|
||||||
margin-right: 0.5em;
|
// margin-right: 0.5em;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.company-name {
|
// .company-name {
|
||||||
font-size: 0.95em;
|
// font-size: 0.95em;
|
||||||
line-height: 1.1;
|
// line-height: 1.1;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.english-name {
|
// .english-name {
|
||||||
font-size: 0.6em;
|
// font-size: 0.6em;
|
||||||
opacity: 0.8;
|
// opacity: 0.8;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.product-title {
|
// .product-title {
|
||||||
font-size: 1.4em;
|
// font-size: 1.4em;
|
||||||
font-weight: bold;
|
// font-weight: bold;
|
||||||
text-align: center;
|
// text-align: center;
|
||||||
margin-bottom: 0.4em;
|
// margin-bottom: 0.4em;
|
||||||
border-bottom: 1.5px solid #000;
|
// border-bottom: 1.5px solid #000;
|
||||||
padding-bottom: 0.2em;
|
// padding-bottom: 0.2em;
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
.footer-info {
|
// .footer-info {
|
||||||
display: flex;
|
// display: flex;
|
||||||
justify-content: space-between;
|
// justify-content: space-between;
|
||||||
align-items: flex-start;
|
// align-items: flex-start;
|
||||||
font-size: 0.7em;
|
// font-size: 0.7em;
|
||||||
margin-top: 0.3em;
|
// margin-top: 0.3em;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.address {
|
// .address {
|
||||||
line-height: 1.2;
|
// line-height: 1.2;
|
||||||
width: 65%;
|
// width: 65%;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.english-address {
|
// .english-address {
|
||||||
opacity: 0.8;
|
// opacity: 0.8;
|
||||||
font-size: 0.9em;
|
// font-size: 0.9em;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.contact-timestamp {
|
// .contact-timestamp {
|
||||||
text-align: right;
|
// text-align: right;
|
||||||
line-height: 1.4;
|
// line-height: 1.4;
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
/* 表格与单元格样式(解决空单元格问题) */
|
// /* 表格与单元格样式(解决空单元格问题) */
|
||||||
table {
|
// table {
|
||||||
border-collapse: collapse !important;
|
// border-collapse: collapse !important;
|
||||||
width: 100% !important;
|
// width: 100% !important;
|
||||||
table-layout: fixed !important; /* 固定列宽 */
|
// table-layout: fixed !important; /* 固定列宽 */
|
||||||
}
|
// }
|
||||||
|
|
||||||
td {
|
// td {
|
||||||
border: 1px solid #000 !important;
|
// border: 1px solid #000 !important;
|
||||||
padding: 6px 4px !important; /* 确保单元格大小 */
|
// padding: 6px 4px !important; /* 确保单元格大小 */
|
||||||
min-height: 28px !important; /* 空单元格最小高度 */
|
// min-height: 28px !important; /* 空单元格最小高度 */
|
||||||
vertical-align: middle !important;
|
// vertical-align: middle !important;
|
||||||
text-align: center !important;
|
// text-align: center !important;
|
||||||
word-break: break-all !important; /* 长文本换行 */
|
// word-break: break-all !important; /* 长文本换行 */
|
||||||
font-family: "SimSun", serif !important;
|
// font-family: "SimSun", serif !important;
|
||||||
font-size: 14px !important;
|
// font-size: 14px !important;
|
||||||
}
|
// }
|
||||||
|
|
||||||
/* 标签与值单元格样式 */
|
// /* 标签与值单元格样式 */
|
||||||
.label-cell {
|
// .label-cell {
|
||||||
font-weight: bold !important;
|
// font-weight: bold !important;
|
||||||
background-color: #f5f5f5 !important;
|
// background-color: #f5f5f5 !important;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.value-cell {
|
// .value-cell {
|
||||||
background-color: #fff !important;
|
// background-color: #fff !important;
|
||||||
}
|
// }
|
||||||
|
|
||||||
/* 列宽分配(根据实际列数调整) */
|
// /* 列宽分配(根据实际列数调整) */
|
||||||
td { width: 25% !important; } /* 4列布局 */
|
// td { width: 25% !important; } /* 4列布局 */
|
||||||
td[colspan="2"] { width: 50% !important; }
|
// td[colspan="2"] { width: 50% !important; }
|
||||||
td[colspan="3"] { width: 75% !important; }
|
// td[colspan="3"] { width: 75% !important; }
|
||||||
td[colspan="4"] { width: 100% !important; }
|
// td[colspan="4"] { width: 100% !important; }
|
||||||
`;
|
// `;
|
||||||
|
|
||||||
// 4. 调用print-js打印
|
// 4. 调用print-js打印
|
||||||
printJS({
|
printJS({
|
||||||
@@ -195,8 +195,8 @@ export default {
|
|||||||
type: 'html', // 打印类型为HTML
|
type: 'html', // 打印类型为HTML
|
||||||
header: null, // 不显示页眉
|
header: null, // 不显示页眉
|
||||||
footer: null, // 不显示页脚
|
footer: null, // 不显示页脚
|
||||||
style: printStyles, // 注入打印样式
|
// style: printStyles, // 注入打印样式
|
||||||
scanStyles: false, // 禁用自动扫描页面样式(避免冲突)
|
scanStyles: true, // 禁用自动扫描页面样式(避免冲突)
|
||||||
targetStyles: ['*'], // 允许所有样式生效
|
targetStyles: ['*'], // 允许所有样式生效
|
||||||
printContainer: true, // 打印指定容器
|
printContainer: true, // 打印指定容器
|
||||||
onError: (error) => { // 错误处理
|
onError: (error) => { // 错误处理
|
||||||
|
|||||||
@@ -65,6 +65,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import ProductInfo from '@/components/KLPService/Renderer/ProductInfo';
|
import ProductInfo from '@/components/KLPService/Renderer/ProductInfo';
|
||||||
import RawMaterialInfo from '@/components/KLPService/Renderer/RawMaterialInfo';
|
import RawMaterialInfo from '@/components/KLPService/Renderer/RawMaterialInfo';
|
||||||
|
import { getGenerateRecord } from '@/api/wms/generateRecord';
|
||||||
import { addStockIoDetail } from '@/api/wms/stockIoDetail';
|
import { addStockIoDetail } from '@/api/wms/stockIoDetail';
|
||||||
|
|
||||||
// 通用防抖高阶函数(可放在工具类中全局复用)
|
// 通用防抖高阶函数(可放在工具类中全局复用)
|
||||||
@@ -150,21 +151,14 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 5. 实际的“JSON解析+提交”业务逻辑(纯业务,无防抖代码)
|
// 5. 实际的“JSON解析+提交”业务逻辑(纯业务,无防抖代码)
|
||||||
actualParseAndSubmit(validValue) {
|
async actualParseAndSubmit(validValue) {
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
try {
|
try {
|
||||||
// 1. 解析JSON
|
// 1. 解析JSON
|
||||||
const parsedData = JSON.parse(validValue);
|
const res = await getGenerateRecord(validValue);
|
||||||
|
const parsedData = JSON.stringify(res.data.content);
|
||||||
|
|
||||||
|
this.result = parsedData;
|
||||||
// if (!this.isValid) {
|
|
||||||
// this.inputHint = "解析的数据格式不完整,请检查二维码是否正确";
|
|
||||||
// this.$message.warning({
|
|
||||||
// message: "数据格式不完整",
|
|
||||||
// duration: 2000,
|
|
||||||
// });
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// 3. 解析成功:反馈+提交
|
// 3. 解析成功:反馈+提交
|
||||||
this.inputHint = "数据解析成功,可以提交操作";
|
this.inputHint = "数据解析成功,可以提交操作";
|
||||||
this.$message.success({
|
this.$message.success({
|
||||||
@@ -196,7 +190,10 @@ export default {
|
|||||||
|
|
||||||
this.isSubmitting = true;
|
this.isSubmitting = true;
|
||||||
|
|
||||||
addStockIoDetail(this.result)
|
addStockIoDetail({
|
||||||
|
...this.result,
|
||||||
|
recordType: 1, // recordType为1标识扫码录入
|
||||||
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.$message.success({
|
this.$message.success({
|
||||||
message: '操作成功',
|
message: '操作成功',
|
||||||
|
|||||||
@@ -18,21 +18,13 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||||
|
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<!-- <el-col :span="1.5">
|
|
||||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleStockBox">添加暂存单据</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleViewStockBox">查看暂存单据</el-button>
|
|
||||||
</el-col> -->
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
|
||||||
|
|
||||||
|
|
||||||
<KLPTable v-loading="loading" :data="stockList" @selection-change="handleSelectionChange">
|
<KLPTable v-loading="loading" :data="stockList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
@@ -64,16 +56,8 @@
|
|||||||
<el-table-column label="库存数量" align="center" prop="quantity" />
|
<el-table-column label="库存数量" align="center" prop="quantity" />
|
||||||
<el-table-column label="在途数量" align="center" prop="onTheWay" />
|
<el-table-column label="在途数量" align="center" prop="onTheWay" />
|
||||||
<el-table-column label="单位" align="center" prop="unit" />
|
<el-table-column label="单位" align="center" prop="unit" />
|
||||||
<!-- <el-table-column label="批次号" align="center" prop="batchNo" /> -->
|
<el-table-column label="批次号" align="center" prop="batchNo" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
|
||||||
v-hasPermi="['wms:stock:edit']">修改</el-button>
|
|
||||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['wms:stock:remove']">删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column> -->
|
|
||||||
</KLPTable>
|
</KLPTable>
|
||||||
|
|
||||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量" align="center" prop="quantity" />
|
<el-table-column label="数量" align="center" prop="quantity" />
|
||||||
<el-table-column label="单位" align="center" prop="unit" />
|
<el-table-column label="单位" align="center" prop="unit" />
|
||||||
<!-- <el-table-column label="批次号" align="center" prop="batchNo" /> -->
|
<el-table-column label="批次号" align="center" prop="batchNo" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量" align="center" prop="quantity" />
|
<el-table-column label="数量" align="center" prop="quantity" />
|
||||||
<el-table-column label="单位" align="center" prop="unit" />
|
<el-table-column label="单位" align="center" prop="unit" />
|
||||||
<!-- <el-table-column label="批次号" align="center" prop="batchNo" /> -->
|
<el-table-column label="批次号" align="center" prop="batchNo" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|||||||
Reference in New Issue
Block a user