From 310d31d3bc8babf977a487596237d3e8aef7516c Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Mon, 15 Jul 2024 09:45:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equipmentSigning/equipmentSigning.data.ts | 105 +++++++++++++----- src/views/eam/equipmentSigning/index.vue | 14 ++- src/views/eam/toolMod/index.vue | 2 +- src/views/eam/toolMod/operateForm.vue | 30 +++-- src/views/eam/toolMod/toolMod.data.ts | 23 ++-- 5 files changed, 113 insertions(+), 61 deletions(-) diff --git a/src/views/eam/equipmentSigning/equipmentSigning.data.ts b/src/views/eam/equipmentSigning/equipmentSigning.data.ts index 2eb131ff6..2e472374a 100644 --- a/src/views/eam/equipmentSigning/equipmentSigning.data.ts +++ b/src/views/eam/equipmentSigning/equipmentSigning.data.ts @@ -5,6 +5,7 @@ import * as DeptApi from '@/api/system/dept' import * as UserApi from '@/api/system/user' import { EquipmentAccounts,EquipmentAccountsRules } from '../equipmentAccounts/equipmentAccounts.data' import * as EquipmentAccountsApi from '@/api/eam/equipmentAccounts' +import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier' import * as ProductionlineApi from '@/api/wms/productionline' import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' import * as WorkshopApi from '@/api/wms/workshop' @@ -19,6 +20,8 @@ export interface User { nickname: string } + +const equipmentSupplierList = await EquipmentSupplierApi.getEquipmentSupplierNoPage({}) const allDeptList = await DeptApi.getSimpleDeptList() const deptList = ref([]) // 树形结构 const userList = ref([]) @@ -136,13 +139,55 @@ export const EquipmentSigning = useCrudSchemas(reactive([ label: '供应商编号', field: 'supplierCode', sort: 'custom', - isSearch: true + isSearch: false, + isForm: true, + isDetail: false, + isTable: false, + isTableForm: false, + form: { + component: 'Select', + componentProps: { + options: equipmentSupplierList, + optionsAlias: { + labelField: 'name', + valueField: 'number' + }, + disabled: true, + } + } }, + // { + // label: '供应商编号', + // field: 'supplierName', + // sort: 'custom', + // isSearch: false, + // isForm: true, + // isDetail: false, + // isTable: false, + // isTableForm: false, + // form: { + // component: 'Input', + // componentProps: { + // disabled: true + // } + // } + // }, { label: '供应商联系人', field: 'supplierPeople', sort: 'custom', - isSearch: true + isSearch: true, + form: { + component: 'Select', + componentProps: { + options: userList.value, + optionsAlias: { + labelField: 'nickname', + valueField: 'id' + }, + disabled: true, + } + } }, { label: '供应商联系方式', @@ -296,34 +341,34 @@ export const EquipmentSigning = useCrudSchemas(reactive([ } }, }, - { - label: '产线编号', - field: 'lineCode', - sort: 'custom', - isSearch: true, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 - multiple:true, - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '生产线信息', // 查询弹窗标题 - searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 - searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 - searchCondition: [{ - key:'workshopCode', - value:'workshopCode', - message: '请填写车间代码!', - isMainValue: true - },{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] - } - } - }, + // { + // label: '产线编号', + // field: 'lineCode', + // sort: 'custom', + // isSearch: true, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + // multiple:true, + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '生产线信息', // 查询弹窗标题 + // searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + // searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key:'workshopCode', + // value:'workshopCode', + // message: '请填写车间代码!', + // isMainValue: true + // },{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // } + // } + // }, // { // label: '工序编号', // field: 'processCode', diff --git a/src/views/eam/equipmentSigning/index.vue b/src/views/eam/equipmentSigning/index.vue index d2968ff35..53b363c72 100644 --- a/src/views/eam/equipmentSigning/index.vue +++ b/src/views/eam/equipmentSigning/index.vue @@ -67,6 +67,7 @@ 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 UserApi from '@/api/system/user' +import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier' defineOptions({ name: 'EquipmentSigning' }) @@ -84,10 +85,17 @@ routeName.value = route.name const tableColumns = ref(EquipmentSigning.allSchemas.tableColumns) // 查询页面返回 -const searchTableSuccess = (formField, searchField, val, formRef) => { +const searchTableSuccess = async (formField, searchField, val, formRef) => { + const setV = {} + setV[formField] = val[0][searchField] + if(formField == 'equipmentCode'){ + setV['supplierCode'] = val[0]['supplierCode'] + const equipmentSupplierList = await EquipmentSupplierApi.getEquipmentSupplierNoPage({}) + const entry = equipmentSupplierList.find(item => item.number == val[0]['supplierCode']) + setV['supplierTelephone'] = entry.phone + setV['supplierPeople'] = Number(entry.contacts) + } nextTick(() => { - const setV = {} - setV[formField] = val[0][searchField] formRef.setValues(setV) }) } diff --git a/src/views/eam/toolMod/index.vue b/src/views/eam/toolMod/index.vue index 3df940dde..73ae1af75 100644 --- a/src/views/eam/toolMod/index.vue +++ b/src/views/eam/toolMod/index.vue @@ -57,7 +57,7 @@ - +