From 56df191d98b9357ce992eee53ee52c93fea6767e Mon Sep 17 00:00:00 2001 From: git_rabbit Date: Mon, 2 Feb 2026 19:03:27 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E4=BA=A7=E5=93=81=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E7=AE=A1=E7=90=86):=20=E6=B7=BB=E5=8A=A0=E7=89=A9=E6=96=99?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E4=B8=8B=E6=8B=89=E6=A1=86=E5=B9=B6=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=AD=97=E6=AE=B5=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在查询条件中添加物料选择下拉框,替代原有的产品名称和编号输入框 - 调整表格列顺序和宽度,优化显示效果 - 将"原材料批次"字段标签改为"原料领料批次" - 修改相关字段的提示信息和校验规则 --- .../orderPurchase/index.vue | 3 +- .../productManagement/ProWorkorder/index.vue | 53 +++++++++++++++---- 2 files changed, 44 insertions(+), 12 deletions(-) diff --git a/src/views/orderPurchaseManagement/orderPurchase/index.vue b/src/views/orderPurchaseManagement/orderPurchase/index.vue index f21e22a..52ecd74 100644 --- a/src/views/orderPurchaseManagement/orderPurchase/index.vue +++ b/src/views/orderPurchaseManagement/orderPurchase/index.vue @@ -59,8 +59,9 @@ - + + - - + + @@ -391,6 +397,7 @@ import { WorkOrderLog, printByBarTender } from '@/api/productManagement/proworkorder.js' +import { getMaterialOption } from '@/api/materialManagement/productionMaterial/mminventory.js' import { getOneDict } from '@/utils/dict.js' import { downFile } from '@/utils/request.js' @@ -410,6 +417,7 @@ const queryParams = reactive({ groupCode: '', workorderDate: [proxy.dayjs(), proxy.dayjs()], status: -1, + materialCode: '', sort: 'sort', sortType: 'asc' }) @@ -464,6 +472,28 @@ function getAllGroupSelectOptions() { getAllGroupSelectOptions() // ================================== +// =========== 获取所有物料 ========== +const allMaterialOptions = ref([]) +function getMaterialCodeList() { + try { + getMaterialOption('materialCode').then((res) => { + const { code, data } = res + if (code == 200) { + allMaterialOptions.value = data.map((item) => { + return { + id: item.id, + label: `${item.type || ''} ${item.materialCode} ${item.materialName} [${item.supplierName || ''}]`, + value: item.materialCode + } + }) + } + }) + } catch (error) { + proxy.$modal.msgError(error.message) + } +} +// ================================== + // 校验搜索 function handleCheck() { loading.value = true @@ -533,7 +563,7 @@ function sortChange(column) { } function tableCellClassName({ row, column, rowIndex, columnIndex }) { - if (row.isMatch_material_name === null && column.label === '产品名称') { + if (row.isMatch_material_name === null && column.label === '主体品名') { return 'danger-cell-1' } if (row.isMatch_material_code === null && column.label === '物料编号') { @@ -561,7 +591,7 @@ const state = reactive({ multiple: true, form: {}, rules: { - productionName: [{ required: true, message: '产品名称不能为空', trigger: 'blur' }], + productionName: [{ required: true, message: '主体品名不能为空', trigger: 'blur' }], productionCode: [{ required: true, message: '物料编号不能为空', trigger: 'blur' }], deliveryNum: [{ required: true, message: '交互数量不能为空', trigger: 'blur' }], groupCode: [{ required: true, message: '组别不能为空', trigger: 'blur' }], @@ -1021,6 +1051,7 @@ function handleShipmentSubmit(data) { } // initDict() +getMaterialCodeList() handleQuery()