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: '操作', 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', 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/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 = [] } 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' }