diff --git a/src/utils/warehouse.js b/src/utils/warehouse.js
index 56b0aad..eeea4ed 100644
--- a/src/utils/warehouse.js
+++ b/src/utils/warehouse.js
@@ -5,5 +5,6 @@ export const warehouseOptions = [
{ warehouseCode: 'WH004', warehouseName: '退货库' },
{ warehouseCode: 'WH005', warehouseName: '转用库' },
{ warehouseCode: 'WH006', warehouseName: '报废库' },
+ { warehouseCode: 'WH007', warehouseName: '不良品库' }
// 更多仓库...
-]
\ No newline at end of file
+]
diff --git a/src/views/materialManagement/productionMaterial/MmLocation.vue b/src/views/materialManagement/productionMaterial/MmLocation.vue
index ffe1783..4776b67 100644
--- a/src/views/materialManagement/productionMaterial/MmLocation.vue
+++ b/src/views/materialManagement/productionMaterial/MmLocation.vue
@@ -318,6 +318,10 @@ const state = reactive({
dictValue: '退货',
dictLabel: '退货'
},
+ {
+ dictValue: '不良品',
+ dictLabel: '不良品'
+ },
{
dictValue: '转用',
dictLabel: '转用'
diff --git a/src/views/productManagement/ProWorkorder/components/WorkorderDefectDialog.vue b/src/views/productManagement/ProWorkorder/components/WorkorderDefectDialog.vue
index 6566093..2c7a29a 100644
--- a/src/views/productManagement/ProWorkorder/components/WorkorderDefectDialog.vue
+++ b/src/views/productManagement/ProWorkorder/components/WorkorderDefectDialog.vue
@@ -130,7 +130,9 @@
-
+
+
+
diff --git a/src/views/productManagement/ProWorkorder/index.vue b/src/views/productManagement/ProWorkorder/index.vue
index 7358c14..9691072 100644
--- a/src/views/productManagement/ProWorkorder/index.vue
+++ b/src/views/productManagement/ProWorkorder/index.vue
@@ -75,6 +75,11 @@
工单导出
+
+
+ 批量打印
+
+
@@ -87,8 +92,9 @@
size="small"
header-row-class-name="table-header"
:cell-class-name="tableCellClassName"
- @sort-change="sortChange">
-
+ @sort-change="sortChange"
+ @selection-change="handleSelectionChange">
+
@@ -441,6 +447,9 @@ const defectDialogVisible = ref(false)
const selectedWorkorderId = ref(null)
const selectedWorkorderInfo = ref({})
+// 多选相关变量
+const selectedWorkorders = ref([])
+
var dictParams = []
const allList = ref([])
@@ -1068,6 +1077,37 @@ function handleDefectSubmit(data) {
getList()
}
+// 处理表格多选
+function handleSelectionChange(selection) {
+ selectedWorkorders.value = selection
+}
+
+// 处理批量打印
+function handlePrint() {
+ if (selectedWorkorders.value.length === 0) {
+ proxy.$modal.msgWarning('请选择要打印的工单')
+ return
+ }
+
+ // 提取选中的工单号为数组
+ const workorderArray = selectedWorkorders.value.map((item) => item.workorder)
+ // path暂时为空字符串
+ const path = ''
+
+ // 调用printByBarTender API
+ printByBarTender({ workorderArray, path })
+ .then((res) => {
+ if (res.code === 200) {
+ proxy.$modal.msgSuccess('打印请求已发送')
+ } else {
+ proxy.$modal.msgError('打印失败: ' + res.msg)
+ }
+ })
+ .catch((error) => {
+ proxy.$modal.msgError('打印失败: ' + error.message)
+ })
+}
+
// initDict()
getMaterialCodeList()
handleQuery()