From 626216f242f64705c9cee9f91a752ff6aa75d962 Mon Sep 17 00:00:00 2001 From: liuchen864 <23082234@qq.com> Date: Tue, 9 Apr 2024 17:51:41 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E5=8E=BB=E6=8E=89json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspectionJob/inspectionJobMain.data.ts | 6 ------ .../inspectionRecord/inspectionRecordMain.data.ts | 11 ----------- 2 files changed, 17 deletions(-) diff --git a/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts b/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts index cfbacc86e..38a0a5692 100644 --- a/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts +++ b/src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts @@ -163,12 +163,6 @@ export const InspectionJobMain = useCrudSchemas(reactive([ width: 150 } }, - // { - // label: '检验方案Json', - // field: 'inspectionSchemeJson', - // sort: 'custom', - // isSearch: false, - // }, { label: '检验批次', field: 'inspectionBatch', diff --git a/src/views/qms/inspection/inspectionRecord/inspectionRecordMain.data.ts b/src/views/qms/inspection/inspectionRecord/inspectionRecordMain.data.ts index 0264c6085..c7bf33ae9 100644 --- a/src/views/qms/inspection/inspectionRecord/inspectionRecordMain.data.ts +++ b/src/views/qms/inspection/inspectionRecord/inspectionRecordMain.data.ts @@ -78,17 +78,6 @@ export const InspectionRecordMain = useCrudSchemas(reactive([ width: 150 } }, - { - label: '检验方案Json', - field: 'inspectionSchemeJson', - sort: 'custom', - isSearch: false, - isForm:false, - isTable:false, - table: { - width: 150 - } - }, { label: '检验批次', field: 'inspectionBatch', From ebaa587a4e6456c66c6ef66344d4fd9023a58769 Mon Sep 17 00:00:00 2001 From: bjang03 Date: Wed, 10 Apr 2024 16:21:27 +0800 Subject: [PATCH 2/8] =?UTF-8?q?1=E3=80=81=E5=B7=A5=E4=BD=8D=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=85=B3=E8=81=94=E7=8F=AD=E7=BB=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/workstation/index.ts | 37 ------------------- src/views/mes/workstation/index.vue | 18 +++------ src/views/mes/workstation/workstation.data.ts | 29 +-------------- 3 files changed, 7 insertions(+), 77 deletions(-) diff --git a/src/api/mes/workstation/index.ts b/src/api/mes/workstation/index.ts index e397ff645..336c9714a 100644 --- a/src/api/mes/workstation/index.ts +++ b/src/api/mes/workstation/index.ts @@ -48,45 +48,8 @@ export const exportWorkstation = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/mes/workstation/get-import-template' }) -}// 查询班组列表 -export const getTeamPage = async (params) => { - params.workstationCode = goalParams.workstationCode - if (params.isSearch) { - delete params.isSearch - const data = {...params} - return await request.post({ url: '/mes/team/senior', data }) - } else { - return await request.get({ url: `/mes/team/pageListByWorkstationCode`, params }) - } -} -// 查询选择班组列表 -export const checkTeamPageList = async (params) => { - params.workstationCode = goalParams.workstationCode - if (params.isSearch) { - delete params.isSearch - const data = {...params} - return await request.post({ url: '/mes/team/senior', data }) - } else { - return await request.get({ url: `/mes/team/pageCheckListByWorkstationCode`, params }) - } -} -// 添加班组关联 -export const createTeamRelation = async (teamCodes:string[]) => { - const data = { - workstationCode : goalParams.workstationCode, - teamCodes : teamCodes - } - return await request.post({ url: `/mes/team/createRelation`, data }) } -// 删除班组关联 -export const deleteTeamRelation = async (teamCodes:string[]) => { - const data = { - workstationCode : goalParams.workstationCode, - teamCodes : teamCodes - } - return await request.post({ url: `/mes/team/deleteRelation`, data }) -} export const getEquipmentPage = async (params) => { params.workstationCode = goalParams.workstationCode if (params.isSearch) { diff --git a/src/views/mes/workstation/index.vue b/src/views/mes/workstation/index.vue index 327d30923..1e85ee1d4 100644 --- a/src/views/mes/workstation/index.vue +++ b/src/views/mes/workstation/index.vue @@ -86,7 +86,7 @@ import { TabsList, Team, Workstation, - WorkstationRules, teamPopList,equipmentPopList,processPopList,stepPopList + WorkstationRules,equipmentPopList,processPopList,stepPopList } from './workstation.data' import * as WorkstationApi from '@/api/mes/workstation' import * as defaultButtons from '@/utils/disposition/defaultButtons' @@ -97,8 +97,8 @@ import { } from "@/api/mes/workstation"; import Detail from './components/Detail.vue' defineOptions({ name: 'Workstation' }) -let tabsDeleteApi = WorkstationApi.deleteTeamRelation -let tabsCreateApi = WorkstationApi.createTeamRelation +let tabsDeleteApi = WorkstationApi.deleteEquipmentRelation +let tabsCreateApi = WorkstationApi.createEquipmentRelation const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 const route = useRoute() // 路由信息 @@ -271,19 +271,13 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } // 子包装数据 const detailAllSchemas = ref(Team.allSchemas) -const apiPage = ref(WorkstationApi.getTeamPage) +const apiPage = ref(WorkstationApi.getEquipmentPage) const tableKey = ref("Team"); -let tmpPopList = teamPopList.allSchemas +let tmpPopList = equipmentPopList.allSchemas // tabs 切换事件 const changeTabs = (data) =>{ tableKey.value = data.prop - if(data.prop == 'Team'){ - apiPage.value = WorkstationApi.getTeamPage - detailAllSchemas.value = Team.allSchemas - tabsDeleteApi = WorkstationApi.deleteTeamRelation - tabsCreateApi = WorkstationApi.createTeamRelation - tmpPopList = teamPopList.allSchemas - }else if(data.prop == 'Equipment'){ + if(data.prop == 'Equipment'){ apiPage.value = WorkstationApi.getEquipmentPage detailAllSchemas.value = Equipment.allSchemas tabsDeleteApi = WorkstationApi.deleteEquipmentRelation diff --git a/src/views/mes/workstation/workstation.data.ts b/src/views/mes/workstation/workstation.data.ts index 60e3aa682..31278352b 100644 --- a/src/views/mes/workstation/workstation.data.ts +++ b/src/views/mes/workstation/workstation.data.ts @@ -16,10 +16,6 @@ export const WorkstationRules = reactive({ productionLineCode: [required] }) export const TabsList = [{ - label: "班组", - prop: 'Team', -}, - { label: "设备", prop: 'Equipment', }, @@ -280,30 +276,7 @@ export const Opersteps = useCrudSchemas(reactive([ isTableForm:true, } ])) -export const teamPopList = useCrudSchemas(reactive([ - { - label: '选择班组', - field: 'list', - sort: 'custom', - isSearch: false, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择选择班组', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '选择班组', // 查询弹窗标题 - searchAllSchemas: Team.allSchemas, // 查询弹窗所需类 - searchPage: WorkstationApi.checkTeamPageList, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] - } - } - } -])) + export const equipmentPopList = useCrudSchemas(reactive([ { label: '选择设备', From 44c3120cfd693505145b52a28a8a992213c216e2 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 10 Apr 2024 16:31:48 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/qms/inspection/inspectionJob/index.vue | 4 ++-- src/views/qms/inspection/inspectionRecord/index.vue | 4 ++-- src/views/qms/inspection/inspectionRequest/index.vue | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/qms/inspection/inspectionJob/index.vue b/src/views/qms/inspection/inspectionJob/index.vue index baf4fad85..0413a48aa 100644 --- a/src/views/qms/inspection/inspectionJob/index.vue +++ b/src/views/qms/inspection/inspectionJob/index.vue @@ -51,7 +51,7 @@ :isShowAddBtn="false" :detailButtonIsShow="true" /> - + + From 18dcb1ed29685930a964791063d817cdaefbfe3a Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Wed, 10 Apr 2024 16:36:12 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E8=A6=81=E8=B4=A7=E8=AE=A1=E5=88=92---?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=88=E6=9C=89=E6=95=88=E6=9C=9F=E7=9B=AE?= =?UTF-8?q?=E5=89=8D=E5=86=99=E6=AD=BB=EF=BC=8C=E8=AE=B0=E5=BE=97=E6=B5=8B?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=95=B0=E6=8D=AE=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliverRequestMain/index.vue | 81 ++++++- .../supplierdeliverRequestMain.data.ts | 212 +++++++++--------- 2 files changed, 188 insertions(+), 105 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index 6f933f9f5..4154c55ff 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -46,7 +46,7 @@ + > + + nextTick(() => { console.log("type:",type) console.log("formField:",formField) + console.log(formField, searchField, val, formRef, type, row) if (type == 'tableForm') { // 明细查询页赋值 // row[formField] = val[0][searchField] @@ -165,7 +178,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => // row['orderQty'] = val[0]['orderQty'] // row['uom'] = val[0]['uom'] // } + //添加费用明细--点击确定 + const itemCodes = [] val.forEach(item=>{ + if(tableData.value.find(item1=>item1['id'] == item['id'])) return const newRow = {...row} newRow[formField] = item[searchField] newRow['poNumber'] = item['poNumber'] @@ -173,12 +189,29 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => newRow['poLine'] = item['poLine'] newRow['orderQty'] = item['orderQty'] newRow['uom'] = item['uom'] + itemCodes.push(item['itemCode']) tableData.value.push(newRow) }) + //有效期 + ItembasicApi.getItembasicPage({ + code:itemCodes.join(',') + }).then((res)=>{ + console.log('有效期',res) + tableData.value.forEach((item,index)=>{ + tableData.value[index]['expireTime'] = index==0?1:2 + }) + // res.list.forEach((item,index)=>{ + // const findItem = tableData.value.find(item1=>item1['itemCode']==item['code']) + // findItem['expireTime'] = findItem['expireTime'] + // }) + }) } else { const setV = {} setV[formField] = val[0][searchField] if(formField == 'ppNumber'){ + //新增--选择完要货计划,自动展示明细 + getSearchTableData(val[0]['number'],formField,searchField) + // 设置计划到货时间 let beginTime = val[0]['endTime'] let deliveryDate = formatDate(val[0]['deliveryDate'],'YYYY-MM-DD') @@ -196,6 +229,46 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => } }) } +const getSearchTableData = async (number,formField,searchField)=>{ + const {tableObject ,tableMethods} = useTable({ + defaultParams:{number}, + getListApi: PurchasePlanDetailApi.getPurchasePlanDetailPage // 分页接口 + }) + // 获得表格的各种操作 + const { getList:getList1 } = tableMethods + await getList1() + const tableColumns = PurchasePlanDetail.allSchemas.tableFormColumns + tableColumns.forEach((item) => { + item.width = item.table?.width || 150 + }) + tableData.value = [] + const itemCodes = [] + tableObject.tableList.forEach(row=>{ + const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row})) + newRow[formField] = row[searchField] + newRow['poNumber'] = row['poNumber'] + newRow['itemCode'] = row['itemCode'] + newRow['poLine'] = row['poLine'] + newRow['orderQty'] = row['orderQty'] + newRow['uom'] = row['uom'] + tableData.value.push(newRow) + itemCodes.push(row['itemCode']) + }) + + //有效期 + ItembasicApi.getItembasicPage({ + code:itemCodes.join(',') + }).then((res)=>{ + console.log('有效期',res) + tableData.value.forEach((item,index)=>{ + tableData.value[index]['expireTime'] = index==0?1:2 + }) + // res.list.forEach((item,index)=>{ + // const findItem = tableData.value.find(item1=>item1['itemCode']==item['code']) + // findItem['expireTime'] = findItem['expireTime'] + // }) + }) +} // 查询页面返回——详情 const searchTableSuccessDetail = (formField, searchField, val, formRef) => { nextTick(() => { @@ -232,6 +305,8 @@ const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row }) } + + const { tableObject, tableMethods } = useTable({ getListApi: SupplierdeliverRequestMainApi.getSupplierdeliverRequestMainPage // 分页接口 }) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts index e57d5b280..13eccf5d8 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts @@ -553,7 +553,103 @@ export const SupplierdeliverRequestMainRules = reactive({ */ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive([ { - label: '生产日期', + label: '订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, + searchListPlaceholder: '请选择订单号', + searchField: 'number', + searchTitle: '要货计划信息', + searchAllSchemas: PurchasePlanDetail.allSchemas, + searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage, + searchCondition: [ + { + key: 'number', + value: 'ppNumber', + message: '请填写要货计划单号!', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + + ] + } + }, + tableForm: { + isInpuFocusShow: true, + searchListPlaceholder: '请选择订单号', + searchField: 'number', + searchTitle: '要货计划信息', + searchAllSchemas: PurchasePlanDetail.allSchemas, + searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage, + searchCondition: [ + { + key: 'number', + value: 'ppNumber', + message: '请填写要货计划单号!', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true + } + }, + tableForm: { + disabled: true + } + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + disabled: false + } + }, + { + label: '生产日期1', field: 'produceDate', formatter: dateFormatter2, detail: { @@ -578,17 +674,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive Date: Wed, 10 Apr 2024 16:37:41 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ListTable1/index.ts | 3 -- src/components/ListTable1/src/ListTable.vue | 40 --------------------- 2 files changed, 43 deletions(-) delete mode 100644 src/components/ListTable1/index.ts delete mode 100644 src/components/ListTable1/src/ListTable.vue diff --git a/src/components/ListTable1/index.ts b/src/components/ListTable1/index.ts deleted file mode 100644 index e95f79c43..000000000 --- a/src/components/ListTable1/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import ListTable from './src/ListTable.vue' - -export { ListTable } diff --git a/src/components/ListTable1/src/ListTable.vue b/src/components/ListTable1/src/ListTable.vue deleted file mode 100644 index b9985a8d0..000000000 --- a/src/components/ListTable1/src/ListTable.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - - From c519e9875f78658e06b31d38493767cf3362124e Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Wed, 10 Apr 2024 17:05:17 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91?= =?UTF-8?q?=E8=B4=A7/=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91=E8=B4=A7?= =?UTF-8?q?=E7=94=B3=E8=AF=B7----=E6=9C=89=E6=95=88=E6=9C=9F=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E6=8E=A5=E5=8F=A3=E8=AF=B7=E6=B1=82=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliverRequestMain/index.vue | 21 +++++++------------ .../supplierdeliverRequestMain.data.ts | 6 +++--- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index 4154c55ff..4b63f0065 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -196,14 +196,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => ItembasicApi.getItembasicPage({ code:itemCodes.join(',') }).then((res)=>{ - console.log('有效期',res) - tableData.value.forEach((item,index)=>{ - tableData.value[index]['expireTime'] = index==0?1:2 + res.list.forEach((item,index)=>{ + const findItem = tableData.value.find(item1=>item1['itemCode']==item['code']) + findItem['expireTime'] = findItem['expireTime'] }) - // res.list.forEach((item,index)=>{ - // const findItem = tableData.value.find(item1=>item1['itemCode']==item['code']) - // findItem['expireTime'] = findItem['expireTime'] - // }) }) } else { const setV = {} @@ -259,14 +255,11 @@ const getSearchTableData = async (number,formField,searchField)=>{ ItembasicApi.getItembasicPage({ code:itemCodes.join(',') }).then((res)=>{ - console.log('有效期',res) - tableData.value.forEach((item,index)=>{ - tableData.value[index]['expireTime'] = index==0?1:2 + res.list.forEach((item,index)=>{ + const findItem = tableData.value.find(item1=>item1['itemCode']==item['code']) + findItem['expireTime'] = findItem['expireTime'] + }) - // res.list.forEach((item,index)=>{ - // const findItem = tableData.value.find(item1=>item1['itemCode']==item['code']) - // findItem['expireTime'] = findItem['expireTime'] - // }) }) } // 查询页面返回——详情 diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts index 13eccf5d8..efeeb61fd 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts @@ -649,7 +649,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive