From dd8054b2f131280056f151ce4ee46a4574039662 Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Mon, 17 Mar 2025 10:06:25 +0800 Subject: [PATCH 1/4] =?UTF-8?q?YT-2107=E5=8F=97=E5=85=A5=E5=8F=B7=E4=BE=BF?= =?UTF-8?q?=E6=AC=A1=E6=97=B6=E9=97=B4=E9=85=8D=E7=BD=AE=EF=BC=8C=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=97=B6=E9=80=89=E6=8B=A9=E5=8F=97=E5=85=A5=E5=8F=B7?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=94=BE=E5=A4=A7=E9=95=9C=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/modelDeliTime/index.ts | 11 +++- .../supplierManage/modelDeliTime/index.vue | 36 ++++++----- .../modelDeliTime/modelDeliTime.data.ts | 62 ++++++++++++++++--- 3 files changed, 82 insertions(+), 27 deletions(-) diff --git a/src/api/wms/modelDeliTime/index.ts b/src/api/wms/modelDeliTime/index.ts index 2ac1092b1..5a9558258 100644 --- a/src/api/wms/modelDeliTime/index.ts +++ b/src/api/wms/modelDeliTime/index.ts @@ -52,6 +52,13 @@ export const importTemplate = () => { return request.download({ url: '/wms/model-deli-time-detail/get-import-template' }) } // 查询受入号 -export const getSupplierAddrList = async () => { - return await request.get({ url: `/wms/itembasic/getModel` }) +export const getSupplierAddrList = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/itembasic/getModelSenior', data }) + } else { + return await request.get({ url: `/wms/itembasic/getModel`, params}) + } + } \ No newline at end of file diff --git a/src/views/wms/basicDataManage/supplierManage/modelDeliTime/index.vue b/src/views/wms/basicDataManage/supplierManage/modelDeliTime/index.vue index c90fec274..b98ce454c 100644 --- a/src/views/wms/basicDataManage/supplierManage/modelDeliTime/index.vue +++ b/src/views/wms/basicDataManage/supplierManage/modelDeliTime/index.vue @@ -119,7 +119,7 @@ routeName.value = route.name const tableColumns = ref(ModelDeliTime.allSchemas.tableColumns) const detailAllSchemas = ref(ModelDeliTimeDetail.allSchemas) // 查询页面返回 -const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { +const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { nextTick(async() => { if (formField == 'code') { let codes = val.filter((item) => @@ -146,24 +146,27 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => tableData.value.push(tfk) }) } - const setV = {} setV[formField] = val[0][searchField] - if (formField == 'supplierCode') { + if (formField == 'modelShow') { + setV['modelShow'] = val.map(item=>item.model).join(',') + } + + if (formField == 'supplierCode') { setV['supplierCode'] = val[0].code setV['supplierName'] = val[0].name console.log(ModelDeliTime.allSchemas.formSchema) - const options = await ModelDeliTimeDetailApi.getSupplierAddrList(val[0].code) - ModelDeliTime.allSchemas.formSchema.forEach(item => { - if(item.field == 'modelShow'){ - item.componentProps.options = options.map(item=> { - return { - label: item, - value:item - } - }) - } - }) + // const options = await ModelDeliTimeDetailApi.getSupplierAddrList(val[0].code) + // ModelDeliTime.allSchemas.formSchema.forEach(item => { + // if(item.field == 'modelShow'){ + // item.componentProps.options = options.map(item=> { + // return { + // label: item, + // value:item + // } + // }) + // } + // }) } formRef.setValues(setV) }) @@ -179,7 +182,8 @@ const submitForm = async (formType, submitData) => { if (data.masterId) { data.id = data.masterId } - data.model =data.modelShow.join(',') + data.model =data.modelShow + // data.model =data.modelShow.join(',') data.yearAndMonth =data.yearAndMonthShow.join(',') data.subList = tableData.value // 拼接子表数据参数 data.subList.forEach((item) => { @@ -265,7 +269,7 @@ const HeadButttondata = [ // 头部按钮事件 const buttonBaseClick = (val, item) => { if (val == 'add') { // 新增 - getModelCode() + // getModelCode() openForm('create') } else if (val == 'import') { // 导入 handleImport() diff --git a/src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts b/src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts index eb4193732..6de2912ad 100644 --- a/src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts +++ b/src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts @@ -6,6 +6,8 @@ import { Supplier } from '../supplier/supplier.data' import { DeliTimeWms } from '../DeliTimeWms/deliTimeWms.data' import * as DeliTimeWmsApi from '@/api/wms/deliTimeWms' import { fa } from 'element-plus/es/locale' +import * as modelDeliTimeApi from '@/api/wms/modelDeliTime' + // 表单校验 export const ModelDeliTimeDetailRules = reactive({ @@ -48,6 +50,15 @@ function getMonthArr() { return dateArr; } +export const ModelList = useCrudSchemas(reactive([ + { + label: '受入号', + field: 'model', + sort: 'custom', + isSearch: true, + }, +])) + export const ModelDeliTime = useCrudSchemas(reactive([ // { // label: '供应商代码', @@ -100,17 +111,48 @@ export const ModelDeliTime = useCrudSchemas(reactive([ isSearch: true, isTable: false, isDetail: false, + // form: { + // component: 'Select', + // componentProps: { + // multiple: true, + // collapseTags: true, + // collapseTagsTooltip: true, + // maxCollapseTags: "2", + // optionsAlias: { + // labelField: 'label', + // valueField: 'value' + // } + // } + // } form: { - component: 'Select', + // labelMessage: '信息提示说明!!!', componentProps: { - multiple: true, - collapseTags: true, - collapseTagsTooltip: true, - maxCollapseTags: "2", - optionsAlias: { - labelField: 'label', - valueField: 'value' - } + multiple:true, + disabled:true, + enterSearch: false, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择受入号', // 输入框占位文本 + searchField: 'model', // 查询弹窗赋值字段 + searchTitle: '受入号', // 查询弹窗标题 + searchAllSchemas: ModelList.allSchemas, // 查询弹窗所需类 + searchPage: modelDeliTimeApi.getSupplierAddrList, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + ], + verificationParams: [ + { + key: 'itemCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 } } }, @@ -216,6 +258,8 @@ export const ModelDeliTime = useCrudSchemas(reactive([ } ])) + + export const ModelDeliTimeDetail = useCrudSchemas(reactive([ { label: '编号', From 4124c3cca7f4ab5283ed2caca2cc3bcc24390bb1 Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Mon, 17 Mar 2025 10:39:45 +0800 Subject: [PATCH 2/4] =?UTF-8?q?YT-2110=E5=BA=94=E8=AF=A5=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=E6=A0=A1=E9=AA=8C=E5=BF=85=E5=A1=AB?= =?UTF-8?q?=E9=A1=B9=EF=BC=8C=E7=8E=B0=E5=9C=A8=E7=82=B9=E5=BC=80=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=B0=B1=E6=A0=A1=E9=AA=8C=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierManage/modelDeliTime/modelDeliTime.data.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts b/src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts index 6de2912ad..b1fbbcbcf 100644 --- a/src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts +++ b/src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts @@ -173,6 +173,7 @@ export const ModelDeliTime = useCrudSchemas(reactive([ form: { component: 'Select', api: () => getMonthArr(), + value:[], componentProps: { multiple: true, collapseTags: true, From bce593a547f4218ae671200be0dfdbd9250a35bf Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Mon, 17 Mar 2025 11:01:45 +0800 Subject: [PATCH 3/4] =?UTF-8?q?YT-2090=E4=BE=9B=E5=BA=94=E5=95=86=E4=BE=BF?= =?UTF-8?q?=E6=AC=A1=E9=85=8D=E7=BD=AE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wms/supplierManage/supplierDeliMain/index.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/wms/supplierManage/supplierDeliMain/index.vue b/src/views/wms/supplierManage/supplierDeliMain/index.vue index 653349546..a409dde6c 100644 --- a/src/views/wms/supplierManage/supplierDeliMain/index.vue +++ b/src/views/wms/supplierManage/supplierDeliMain/index.vue @@ -164,7 +164,9 @@ const { tableObject, tableMethods } = useTable({ // 获得表格的各种操作 const { getList, setSearchParams } = tableMethods const getListExecute = () => { - tableObject.params.yearAndMonth=formatDate(new Date(),'YYYY-MM') + if(!tableObject.params.yearAndMonth){ + tableObject.params.yearAndMonth=formatDate(new Date(),'YYYY-MM') + } getList() tableObject.tableList.forEach(item=>item.isOpen = false) } From 19fa0935b30973220cb0e6e5929746d715fb4703 Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Mon, 17 Mar 2025 15:13:10 +0800 Subject: [PATCH 4/4] =?UTF-8?q?YT-2079=E7=9B=98=E7=82=B9=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/dict.ts | 2 +- .../count/countConfig/countConfig.data.ts | 6 +++-- .../countManage/count/countConfig/index.vue | 24 ++++++++++++++++++- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index e720d046e..461accba1 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -427,5 +427,5 @@ export enum DICT_TYPE { ISSUE_SOURCE="issue_source",//发料来源 ISSUE_PLAN_TRIAL_RESULT="issue_plan_trial_result",//备料计划试算结果 COUNT_MODE = "count_mode",//盘点模式(1:PAD盘点,2:Excel导入) - + INVENTORY_MODE = "inventory_mode", } diff --git a/src/views/wms/countManage/count/countConfig/countConfig.data.ts b/src/views/wms/countManage/count/countConfig/countConfig.data.ts index 39fe63dd4..766c98a19 100644 --- a/src/views/wms/countManage/count/countConfig/countConfig.data.ts +++ b/src/views/wms/countManage/count/countConfig/countConfig.data.ts @@ -6,8 +6,8 @@ import * as ItembasicApi from '@/api/wms/itembasic' // 表单校验 export const CountConfigRules = reactive({ itemCode: [required], - available: [required], - concurrencyStamp: [required], + countType: [required], + conversionRate: [required], }) export const CountConfig = useCrudSchemas(reactive([ @@ -117,6 +117,8 @@ export const CountConfig = useCrudSchemas(reactive([ label: '盘点模式', field: 'countType', sort: 'custom', + dictType: DICT_TYPE.INVENTORY_MODE, + dictClass: 'string', table: { width: 180 }, diff --git a/src/views/wms/countManage/count/countConfig/index.vue b/src/views/wms/countManage/count/countConfig/index.vue index eb421aea5..11a8f2d12 100644 --- a/src/views/wms/countManage/count/countConfig/index.vue +++ b/src/views/wms/countManage/count/countConfig/index.vue @@ -54,7 +54,14 @@ - +