From ab07a0d626cb44399172acea526609219e78f2e1 Mon Sep 17 00:00:00 2001 From: bjang03 Date: Wed, 20 Mar 2024 09:03:53 +0800 Subject: [PATCH 1/4] =?UTF-8?q?1=E3=80=81=E5=B7=A5=E4=BD=8D=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E5=B7=A5=E7=BB=84=E3=80=81=E5=B7=A5=E5=BA=8F=E3=80=81?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=AD=89=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/workstationBind/index.ts | 3 + .../workstationBind/src/workstationBind.vue | 642 ++++++++++++++++++ src/utils/disposition/defaultButtons.ts | 26 +- src/views/mes/workstation/index.vue | 15 +- src/views/mes/workstation/workstation.data.ts | 39 +- 5 files changed, 701 insertions(+), 24 deletions(-) create mode 100644 src/components/workstationBind/index.ts create mode 100644 src/components/workstationBind/src/workstationBind.vue diff --git a/src/components/workstationBind/index.ts b/src/components/workstationBind/index.ts new file mode 100644 index 000000000..bbab7d7c3 --- /dev/null +++ b/src/components/workstationBind/index.ts @@ -0,0 +1,3 @@ +import workstationBind from './src/workstationBind.vue' +import detail from './src/Detail.vue' +export { workstationBind,detail } diff --git a/src/components/workstationBind/src/workstationBind.vue b/src/components/workstationBind/src/workstationBind.vue new file mode 100644 index 000000000..df08c7e94 --- /dev/null +++ b/src/components/workstationBind/src/workstationBind.vue @@ -0,0 +1,642 @@ + + + + + diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index b7f8ca791..0b59fdb7b 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -250,7 +250,18 @@ export function mainListDeleteBtn(option:any) { hasPermi: '' }) } - +// 主列表-绑定 +export function mainListBindBtn(option:any) { + return __defaultBtnOption(option,{ + label: '绑定', + name: 'bind', + hide: false, + type: 'primary', + color: '', + link: true, // 文本展现按钮 + hasPermi: '' + }) +} // 主列表-申请流程-关闭按钮 export function mainListCloseBtn(option:any) { return __defaultBtnOption(option,{ @@ -735,18 +746,7 @@ export function mainThawRequesttBtn(option:any) { hasPermi: '' }) } -// 主列表-绑定 -export function mainListBindBtn(option:any) { - return __defaultBtnOption(option,{ - label: '绑定', - name: 'bind', - hide: false, - type: 'primary', - color: '', - link: true, // 文本展现按钮 - hasPermi: '' - }) -} + // 默认按钮规则 function __defaultBtnOption(option:any,specific:any){ return { diff --git a/src/views/mes/workstation/index.vue b/src/views/mes/workstation/index.vue index 35f6f2dd1..83f02b07f 100644 --- a/src/views/mes/workstation/index.vue +++ b/src/views/mes/workstation/index.vue @@ -52,7 +52,8 @@ - + + @@ -65,7 +66,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import BindDetail from '@/components/workstationBind/src/workstationBind.vue' defineOptions({ name: 'Workstation' }) const message = useMessage() // 消息弹窗 @@ -144,11 +145,10 @@ const buttonTableClick = async (val, row) => { openForm('update', row) } else if (val == 'delete') { // 删除 await handleDelete(row.id) - }else if (val == 'bind') { // 删除 - await detailRef.value.openDetail(row, '绑定', row.name, 'mesWorkstation') + }else if (val == 'bind') { // 绑定 + openBindDetail(row,row.name,row.code) } } - /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { @@ -184,6 +184,11 @@ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { detailRef.value.openDetail(row, titleName, titleValue, 'basicWorkstation') } +/** 绑定操作 */ +const bindDetailRef = ref() +const openBindDetail = (row: any, titleName: any, titleValue: any) => { + bindDetailRef.value.openDetail(row, titleName, titleValue, 'basicWorkstation') +} /** 删除按钮操作 */ const handleDelete = async (id: number) => { diff --git a/src/views/mes/workstation/workstation.data.ts b/src/views/mes/workstation/workstation.data.ts index 611194817..b4e7b8f1a 100644 --- a/src/views/mes/workstation/workstation.data.ts +++ b/src/views/mes/workstation/workstation.data.ts @@ -1,11 +1,28 @@ -import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter } from '@/utils/formatTime' +import type {CrudSchema} from '@/hooks/web/useCrudSchemas' +import {dateFormatter} from '@/utils/formatTime' // 表单校验 export const WorkstationRules = reactive({ code: [required] }) +export const TabsList = [{ + label: "工组", + prop: 'Team', +}, + { + label: "设备", + prop: 'Equipment', + }, + { + label: "工序", + prop: 'Process', + }, + { + label: "产品", + prop: 'Production', + } +] export const Workstation = useCrudSchemas(reactive([ { @@ -46,26 +63,36 @@ export const Workstation = useCrudSchemas(reactive([ field: 'activeTime', sort: 'custom', formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, form: { component: 'DatePicker', componentProps: { + style: {width: '100%'}, type: 'datetime', - valueFormat: 'x' + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } - } + }, }, { label: '失效时间', field: 'expireTime', sort: 'custom', formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, form: { component: 'DatePicker', componentProps: { + style: {width: '100%'}, type: 'datetime', - valueFormat: 'x' + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } - } + }, }, { label: '操作', From fbbc3fe5700df428da88135a3f0bcd64cc153920 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Wed, 20 Mar 2024 13:01:30 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E4=BF=AE=E6=94=B9i?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliver/supplierdeliverRequestMain/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index 94e827a47..e1ef80cea 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -157,7 +157,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => let beginTime = val[0]['endTime'] let deliveryDate = formatDate(val[0]['deliveryDate'],'YYYY-MM-DD') planArriveTimeStr.value = deliveryDate + ' '+ beginTime+":00" - setV['planArriveTime']= new Date(planArriveTimeStr.value) + setV['planArriveTime']= new Date(planArriveTimeStr.value).valueOf(); // 清空子表数据 tableData.value = [] } From 3aae780a565f2fef313d6daddd651eaddebeb036 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Wed, 20 Mar 2024 13:55:10 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91?= =?UTF-8?q?=E8=B4=A7=E6=A0=A1=E9=AA=8C=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliver/purchaseMain/purchaseMain.data.ts | 1 + .../supplierdeliverRequestMain.data.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts index a608952a1..2bb831a34 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts @@ -449,6 +449,7 @@ export const PurchaseDetail = useCrudSchemas(reactive([ width: 150 }, tableForm: { + disabled:true, type: 'Select' } }, diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts index 5f20f3fee..a858281dd 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts @@ -506,7 +506,7 @@ export const SupplierdeliverRequestMainRules = reactive({ ], contactEmail: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' }, - { validator: validateEmail, message: '请输入正确的手机号', trigger: 'blur' } + { validator: validateEmail, message: '请输入正确的邮箱地址', trigger: 'blur' } ], carrierCode: [ { max: 50, message: '不得超过50个字符', trigger: 'blur' } From d8b612f21bd04f6b0f0fbd4365e58017cb4b7f47 Mon Sep 17 00:00:00 2001 From: chenfang Date: Wed, 20 Mar 2024 13:59:21 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=A4=87=E8=B4=A7=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=8F=91=E8=B4=A7=E8=AE=B0=E5=BD=95=E6=90=9C=E7=B4=A2=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stockup/stockupMainRequest/index.vue | 2 + .../stockupMainRequest.data.ts | 244 ++++++++++-------- 2 files changed, 140 insertions(+), 106 deletions(-) diff --git a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue index df54d6c80..a0d1bca2c 100644 --- a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue +++ b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue @@ -90,6 +90,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import * as DeliverPlanDetailApi from '@/api/wms/deliverPlanDetail' +import {DeliverRequestDetail} from '../../deliver/deliverRequestMain/deliverRequestMain.data' + // 备货申请 defineOptions({ name: 'StockupMainRequest' }) diff --git a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts index 156c1f1df..d0241eb88 100644 --- a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts +++ b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts @@ -7,6 +7,9 @@ import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as BalanceApi from '@/api/wms/balance' import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' +import * as DeliverPlanMainApi from '@/api/wms/deliverPlanMain' +import { DeliverPlanMain } from '../../deliverplan/deliverPlanMain/deliverPlanMain.data' + import * as locationApi from '@/api/wms/location' import { Location } from '../../../basicDataManage/factoryModeling/location/location.data' @@ -48,6 +51,35 @@ export const StockupMainRequest = useCrudSchemas(reactive([ }, isForm: false, }, + { + label: '发货计划单号', + field: 'deliverPlanNumber', + sort: 'custom', + table: { + width: 180 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择发货计划单号', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: '发货计划信息', // 查询弹窗标题 + searchAllSchemas: DeliverPlanMain.allSchemas, // 查询弹窗所需类 + searchPage: DeliverPlanMainApi.getDeliverPlanMainPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'status', + value: '6', + isMainValue: false + }] + } + } + }, { label: '从仓库代码', field: 'fromWarehouseCode', @@ -318,26 +350,26 @@ export const StockupMainRequest = useCrudSchemas(reactive([ } } }, - { - label: '直接生成记录', - field: 'directCreateRecord', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: requestsettingData.directCreateRecord, - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE', - disabled: true - } - } - }, + // { + // label: '直接生成记录', + // field: 'directCreateRecord', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'Switch', + // value: requestsettingData.directCreateRecord, + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE', + // disabled: true + // } + // } + // }, { label: '到库区类型范围', @@ -443,92 +475,92 @@ export const StockupDetailRequest = useCrudSchemas(reactive([ width: 100 }, }, - { - label: '包装号', - field: 'packingNumber', - sort: 'custom', - table: { - width: 150 - }, - tableForm:{ - isInpuFocusShow: true, // 开启查询弹窗 - searchListPlaceholder: '请选择包装号', - searchField: 'packingNumber', - searchTitle: '库存余额信息', - searchAllSchemas: Balance.allSchemas, - searchPage: BalanceApi.getBalanceItemPage, - searchCondition: [ - // { - // key:'customerCode', // 查询列表中字段 - // value:'customerCode', // 指主表某字段 - // message: '请选择客户代码!', // 当前置条件为空时 弹出信息提示 - // isMainValue: true // 表示查询条件是主表的字段的值 - // } - ] - }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择包装号', - searchField: 'packingNumber', - searchTitle: '库存余额信息', - searchAllSchemas: Balance.allSchemas, - searchPage: BalanceApi.getBalanceItemPage, - searchCondition: [ - // { - // key:'customerCode', // 查询列表中字段 - // value:'customerCode', // 指主表某字段 - // message: '请选择客户代码!', // 当前置条件为空时 弹出信息提示 - // isMainValue: true // 表示查询条件是主表的字段的值 - // } - ] - } - } - }, - { - label: '器具号', - field: 'containerNumber', - sort: 'custom', - table: { - width: 100 - }, - isSearch: true, - }, - { - label: '批次', - field: 'batch', - sort: 'custom', - isSearch: true, - tableForm: { - disabled: true, - }, - form: { - componentProps: { - disabled: true - } - } - }, - { - label: '库存状态', - field: 'inventoryStatus', - dictType: DICT_TYPE.INVENTORY_STATUS, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 120 - }, - tableForm: { - disabled: true, - type: 'Select' - }, - form: { - componentProps: { - disabled: true - } - } - }, + // { + // label: '包装号', + // field: 'packingNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // tableForm:{ + // isInpuFocusShow: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择包装号', + // searchField: 'packingNumber', + // searchTitle: '库存余额信息', + // searchAllSchemas: Balance.allSchemas, + // searchPage: BalanceApi.getBalanceItemPage, + // searchCondition: [ + // // { + // // key:'customerCode', // 查询列表中字段 + // // value:'customerCode', // 指主表某字段 + // // message: '请选择客户代码!', // 当前置条件为空时 弹出信息提示 + // // isMainValue: true // 表示查询条件是主表的字段的值 + // // } + // ] + // }, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择包装号', + // searchField: 'packingNumber', + // searchTitle: '库存余额信息', + // searchAllSchemas: Balance.allSchemas, + // searchPage: BalanceApi.getBalanceItemPage, + // searchCondition: [ + // // { + // // key:'customerCode', // 查询列表中字段 + // // value:'customerCode', // 指主表某字段 + // // message: '请选择客户代码!', // 当前置条件为空时 弹出信息提示 + // // isMainValue: true // 表示查询条件是主表的字段的值 + // // } + // ] + // } + // } + // }, + // { + // label: '器具号', + // field: 'containerNumber', + // sort: 'custom', + // table: { + // width: 100 + // }, + // isSearch: true, + // }, + // { + // label: '批次', + // field: 'batch', + // sort: 'custom', + // isSearch: true, + // tableForm: { + // disabled: true, + // }, + // form: { + // componentProps: { + // disabled: true + // } + // } + // }, + // { + // label: '库存状态', + // field: 'inventoryStatus', + // dictType: DICT_TYPE.INVENTORY_STATUS, + // dictClass: 'string', + // isTable: true, + // sort: 'custom', + // table: { + // width: 120 + // }, + // tableForm: { + // disabled: true, + // type: 'Select' + // }, + // form: { + // componentProps: { + // disabled: true + // } + // } + // }, { label: '物品代码', field: 'itemCode',