diff --git a/src/api/production/production-issue.js b/src/api/production/production-issue.js
index 3082b6a..97d3830 100644
--- a/src/api/production/production-issue.js
+++ b/src/api/production/production-issue.js
@@ -25,4 +25,6 @@ export const getIssueHistory = data => createAPI(`/pda/production/issue/getIssue
export const validateWorkOrder = data => createAPI(`/pda/production/issue/validateWorkOrder`,'post',data)
// 验证申请单状态
export const validateNotify = data => createAPI(`/pda/production/issue/validateNotify`,'post',data)
+// 扫描材料是否存在
+export const scanMaterialLabel = data => createAPI(`/pda/production/issue/scanMaterialLabel`,'post',data)
diff --git a/src/views/modules/outsourcing-issue/PickingIssue.vue b/src/views/modules/outsourcing-issue/PickingIssue.vue
index 4eb7ed4..22da0f5 100644
--- a/src/views/modules/outsourcing-issue/PickingIssue.vue
+++ b/src/views/modules/outsourcing-issue/PickingIssue.vue
@@ -29,11 +29,11 @@
-
+
+ 请选择打印机
+ 打印机01
+ 打印机02
+
@@ -45,7 +45,8 @@ export default {
data() {
return {
notifyNo: '',
- scannedUnit: ''
+ scannedUnit: '',
+ selectedPrinter: '',
}
}
}
diff --git a/src/views/modules/production-issue/productionIssuePda.vue b/src/views/modules/production-issue/productionIssuePda.vue
index 0da80c6..1c23fe1 100644
--- a/src/views/modules/production-issue/productionIssuePda.vue
+++ b/src/views/modules/production-issue/productionIssuePda.vue
@@ -245,7 +245,7 @@
@@ -285,6 +307,7 @@ import {
bindUnitsToPallet,
printPalletLabel,
getPalletInfo,
+ scanMaterialLabel,
} from '@/api/production/production-issue'
export default {
@@ -345,6 +368,64 @@ export default {
showScanLabel: false,
scanLabelContext: {},
scanLabelData: {},
+ scanTableInput: '',
+ scanTableData: [],
+ columnList: [
+ {
+ userId: this.$store.state.user.name,
+ functionId: 701002,
+ serialNumber: '701002Table1NotifyNo',
+ tableId: '701002Table1',
+ tableName: '生产入库申请主表',
+ columnProp: 'partNo',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: '材料单号',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 100,
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 701002,
+ serialNumber: '701002Table1WorkShopName',
+ tableId: '701002Table1',
+ tableName: '生产入库申请主表',
+ columnProp: 'desc',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: '材料描述',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 100,
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 701002,
+ serialNumber: '701002Table1WorkShopName',
+ tableId: '701002Table1',
+ tableName: '生产入库申请主表',
+ columnProp: 'qty',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: '数量',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 100,
+ },
+ ],
}
},
computed: {
@@ -783,11 +864,11 @@ export default {
selectedMaterials: [
{
...this.scanLabelContext.material,
- issueQty: this.scanLabelData.issueQty
- }
+ issueQty: this.scanLabelData.issueQty,
+ },
],
scannedLabel: this.scanLabelData.scannedLabel,
- remark: this.scanLabelData.remark
+ remark: this.scanLabelData.remark,
}
const response = await directIssue(issueData)
if (response.data.code === 0) {
@@ -809,11 +890,11 @@ export default {
selectedMaterials: [
{
...this.scanLabelContext.material,
- issueQty: this.scanLabelData.issueQty
- }
+ issueQty: this.scanLabelData.issueQty,
+ },
],
scannedLabel: this.scanLabelData.scannedLabel,
- remark: this.scanLabelData.remark
+ remark: this.scanLabelData.remark,
}
const response = await requestIssue(issueData)
if (response.data.code === 0) {
@@ -836,6 +917,32 @@ export default {
this.loading = false
}
},
+ handleScanTableInput() {
+ if (!this.scanTableInput) return
+ // 假设扫描内容为材料编号,自动生成描述(实际可根据业务查接口)
+ let params = {
+ scanTableInput: this.scanTableInput,
+ }
+ scanMaterialLabel(params).then(({data}) => {
+ if (data.code === 0) {
+ let material = {
+ partNo: data.labelInfo.partNo ,
+ desc: data.labelInfo.partDesc || '材料描述-' + this.scanTableInput,
+ qty: 1, // 默认数量为1
+ }
+ this.scanTableData.push(material)
+ this.scanTableInput = ''
+ } else {
+ this.$message.error(data.msg || '扫描失败')
+ return
+ }
+ }).catch(error => {
+ this.$message.error('扫描异常: ' + error.message)
+ return
+ })
+
+
+ },
},
}