zhang_li 8 months ago
parent
commit
e5964bcdeb
  1. 6
      src/api/eam/item/itemAccounts/index.ts
  2. 14
      src/components/Detail/src/DetailDeviceLedger.vue
  3. 7
      src/views/eam/basic/item/index.vue
  4. 75
      src/views/eam/device/deviceAccounts/index.vue
  5. 171
      src/views/eam/device/deviceInternalAudit/deviceInternalAudit.data.ts
  6. 21
      src/views/eam/item/itemAccounts/index.vue
  7. 8
      src/views/eam/mold/moldAccounts/moldAccounts.data.ts

6
src/api/eam/item/itemAccounts/index.ts

@ -55,3 +55,9 @@ export const importTemplate = () => {
export const replaceLocation = async (data: Array<ItemAccountsVO>) => { export const replaceLocation = async (data: Array<ItemAccountsVO>) => {
return await request.post({url: `/eam/item-accounts/replaceLocation `, data }); return await request.post({url: `/eam/item-accounts/replaceLocation `, data });
}; };
// 备件不分页
export const getItemAccountsNoPage = async (params) => {
return await request.get({ url: `/eam/item-accounts/noPage`, params })
}

14
src/components/Detail/src/DetailDeviceLedger.vue

@ -196,11 +196,11 @@
:style="{height:'600px'}" :style="{height:'600px'}"
> >
<el-form ref="fileDialogUploadRef" :model="fileDialogUploadData" :key="dialogFormKey"> <el-form ref="fileDialogUploadRef" :model="fileDialogUploadData" :key="dialogFormKey">
<el-form-item label="文件上传"> <el-form-item label="文件选择">
<UploadFile v-model="fileDialogUploadData.filePathList" :limit="20" /> <UploadFile v-model="fileDialogUploadData.filePathList" :limit="20" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-button type="primary" @click="dialogUploadFile">点击修改</el-button> <el-button type="primary" @click="dialogUploadFile">提交</el-button>
</Dialog> </Dialog>
<!-- dialog表单弹窗添加/修改 --> <!-- dialog表单弹窗添加/修改 -->
<BasicForm <BasicForm
@ -896,6 +896,15 @@ const buttonMilestoneClick = async (val, row) => {
} }
const submitDialogForm = async (type, row) => { const submitDialogForm = async (type, row) => {
const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage, //
defaultParams : props.defaultParams
})
detailAllSchemasRef.value = props.detailAllSchemas
tableObjectRef.value = tableObject
tableMethodsRef.value = tableMethods
tableObjectRef.value.tableList = []
const { getList } = tableMethods
await props.diaLogApiUpdate(row) await props.diaLogApiUpdate(row)
dialogFormRef.value.dialogVisible = false dialogFormRef.value.dialogVisible = false
await getList() await getList()
@ -936,6 +945,7 @@ function dialogUploadFile() {
props.uploadImage(data).then((res) => { props.uploadImage(data).then((res) => {
message.success('修改成功') message.success('修改成功')
getImage() getImage()
dialogUploadVisible.value = false
}) })
} }

7
src/views/eam/basic/item/index.vue

@ -122,13 +122,6 @@
} }
} }
/** 添加设备操作 */
// const searchTableRef = ref()
// const openItem = (number : String) => {
// itemNumber.value = number;
// searchTableRef.value.open('', DeviceAccounts.allSchemas, DeviceAccountsApi.getDeviceAccountsPage(), null, Item.allSchemas.searchSchema, true, null, null, null, null);
// }
const searchTableRef = ref() const searchTableRef = ref()
/** 绑定备件操作 */ /** 绑定备件操作 */
const openItem = async (number : String) => { const openItem = async (number : String) => {

75
src/views/eam/device/deviceAccounts/index.vue

@ -1,36 +1,20 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search <Search :schema="DeviceAccounts.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
:schema="DeviceAccounts.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
<TableHead <TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
:HeadButttondata="HeadButttondata" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick"
@button-base-click="buttonBaseClick" :allSchemas="DeviceAccounts.allSchemas" />
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="DeviceAccounts.allSchemas"
/>
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table <Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total total: tableObject.total
}" }" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:pageSize="tableObject.pageSize" v-model:sort="tableObject.sort">
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{ row }"> <template #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '编号', row.number)"> <el-button type="primary" link @click="openDetail(row, '编号', row.number)">
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
@ -43,46 +27,22 @@
</ContentWrap> </ContentWrap>
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm ref="basicFormRef" @success="formsSuccess" :rules="DeviceAccountsRules"
ref="basicFormRef" :formAllSchemas="DeviceAccounts.allSchemas" :apiUpdate="DeviceAccountsApi.updateDeviceAccounts"
@success="formsSuccess" :apiCreate="DeviceAccountsApi.createDeviceAccounts" @searchTableSuccess="searchTableSuccess" :isBusiness="false" />
:rules="DeviceAccountsRules"
:formAllSchemas="DeviceAccounts.allSchemas"
:apiUpdate="DeviceAccountsApi.updateDeviceAccounts"
:apiCreate="DeviceAccountsApi.createDeviceAccounts"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<SearchTable ref="searchTableRef" @onMountedCallBack="onMountedCallBack" @searchTableSuccess="submitItem" /> <SearchTable ref="searchTableRef" @onMountedCallBack="onMountedCallBack" @searchTableSuccess="submitItem" />
<!-- 详情 --> <!-- 详情 -->
<DetailDeviceLedger <DetailDeviceLedger ref="detailRef" :tabs="DeviceLedgerTabsList" :subTabs="DeviceLedgerSubTabsList" :isBasic="true"
ref="detailRef" :allSchemas="allSchemas" @changeTabs="changeTabs" :detailAllSchemas="detailAllSchemas" :apiPage="apiPage"
:tabs="DeviceLedgerTabsList" :tabsExtend="tabsExtend" :tabName="tabName" :tableObjectExtend="tableObjectExtend" :getImageApi="uploadApi.getImage"
:subTabs="DeviceLedgerSubTabsList" :uploadImage="uploadApi.uploadImage" :defaultParams="defaultParams" :dialogApiPage="dialogApiPage"
:isBasic="true" :dialogAllSchemas="dialogAllSchemas" />
:allSchemas="allSchemas"
@changeTabs="changeTabs"
:detailAllSchemas="detailAllSchemas"
:apiPage="apiPage"
:tabsExtend="tabsExtend"
:tabName="tabName"
:tableObjectExtend="tableObjectExtend"
:getImageApi="uploadApi.getImage"
:uploadImage="uploadApi.uploadImage"
:defaultParams="defaultParams"
:dialogApiPage="dialogApiPage"
:dialogAllSchemas="dialogAllSchemas"
/>
<!-- 导入 --> <!-- 导入 -->
<ImportForm <ImportForm ref="importFormRef" url="/eam/device-accounts/import" :importTemplateData="importTemplateData"
ref="importFormRef" @success="importSuccess" />
url="/eam/device-accounts/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -484,5 +444,4 @@ const CallBack1 = async () => {
}); });
}); });
}; };
</script> </script>

171
src/views/eam/device/deviceInternalAudit/deviceInternalAudit.data.ts

@ -3,8 +3,36 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const DeviceInternalAuditRules = reactive({ export const DeviceInternalAuditRules = reactive({
number: [required], personer: [
personer: [required], { required: true, message: '请输入人员', trigger: 'blur' },
],
fitOut: [
{ required: true, message: '请输入装配', trigger: 'blur' },
],
coating: [
{ required: true, message: '请输入涂装', trigger: 'blur' },
],
injectionMolding: [
{ required: true, message: '请输入注塑', trigger: 'blur' },
],
business: [
{ required: true, message: '请输入商务', trigger: 'blur' },
],
laboratory: [
{ required: true, message: '请输入实验室', trigger: 'blur' },
],
it: [
{ required: true, message: '请输入IT', trigger: 'blur' },
],
qualityDepartment: [
{ required: true, message: '请输入质量保障部', trigger: 'blur' },
],
materialFlow: [
{ required: true, message: '请输入物流', trigger: 'blur' },
],
moldPre: [
{ required: true, message: '请输入模具前期', trigger: 'blur' },
],
}) })
export const DeviceInternalAudit = useCrudSchemas(reactive<CrudSchema[]>([ export const DeviceInternalAudit = useCrudSchemas(reactive<CrudSchema[]>([
@ -30,92 +58,207 @@ export const DeviceInternalAudit = useCrudSchemas(reactive<CrudSchema[]>([
label: '装配', label: '装配',
field: 'fitOut', field: 'fitOut',
sort: 'custom', sort: 'custom',
isSearch: false, table: {
width: 150
},
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: {
min: 0,
max: 200,
precision: 0
}
},
tableForm: {
type: 'InputNumber',
min: 0,
max: 200,
precision: 0
} }
}, },
{ {
label: '涂装', label: '涂装',
field: 'coating', field: 'coating',
sort: 'custom', sort: 'custom',
isSearch: false, table: {
width: 150
},
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: {
min: 0,
max: 200,
precision: 0
}
},
tableForm: {
type: 'InputNumber',
min: 0,
max: 200,
precision: 0
} }
}, },
{ {
label: '注塑', label: '注塑',
field: 'injectionMolding', field: 'injectionMolding',
sort: 'custom', sort: 'custom',
isSearch: false, table: {
width: 150
},
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: {
min: 0,
max: 200,
precision: 0
}
},
tableForm: {
type: 'InputNumber',
min: 0,
max: 200,
precision: 0
} }
}, },
{ {
label: '商务', label: '商务',
field: 'business', field: 'business',
sort: 'custom', sort: 'custom',
isSearch: false, table: {
width: 150
},
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: {
min: 0,
max: 200,
precision: 0
}
},
tableForm: {
type: 'InputNumber',
min: 0,
max: 200,
precision: 0
} }
}, },
{ {
label: '实验室', label: '实验室',
field: 'laboratory', field: 'laboratory',
sort: 'custom', sort: 'custom',
isSearch: false,
table: { table: {
width: 150, width: 150
}, },
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: {
min: 0,
max: 200,
precision: 0
}
},
tableForm: {
type: 'InputNumber',
min: 0,
max: 200,
precision: 0
} }
}, },
{ {
label: 'IT', label: 'IT',
field: 'it', field: 'it',
sort: 'custom', sort: 'custom',
isSearch: false, table: {
width: 150
},
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: {
min: 0,
max: 200,
precision: 0
}
},
tableForm: {
type: 'InputNumber',
min: 0,
max: 200,
precision: 0
} }
}, },
{ {
label: '质量保障部', label: '质量保障部',
field: 'qualityDepartment', field: 'qualityDepartment',
sort: 'custom', sort: 'custom',
isSearch: false,
table: { table: {
width: 180, width: 150
}, },
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: {
min: 0,
max: 200,
precision: 0
}
},
tableForm: {
type: 'InputNumber',
min: 0,
max: 200,
precision: 0
} }
}, },
{ {
label: '物流', label: '物流',
field: 'materialFlow', field: 'materialFlow',
sort: 'custom', sort: 'custom',
isSearch: false, table: {
width: 150
},
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: {
min: 0,
max: 200,
precision: 0
}
},
tableForm: {
type: 'InputNumber',
min: 0,
max: 200,
precision: 0
} }
}, },
{ {
label: '模具前期', label: '模具前期',
field: 'moldPre', field: 'moldPre',
sort: 'custom', sort: 'custom',
isSearch: false,
table: { table: {
width: 150, width: 150
}, },
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: {
min: 0,
max: 200,
precision: 0
} }
}, },
tableForm: {
type: 'InputNumber',
min: 0,
max: 200,
precision: 0
}
},
{
label: '平均分',
field: 'average',
sort: 'custom',
isForm: false,
isSearch: false,
},
{ {
label: '描述', label: '描述',
field: 'describes', field: 'describes',

21
src/views/eam/item/itemAccounts/index.vue

@ -143,7 +143,7 @@
searchTableRef.value.open( searchTableRef.value.open(
'选择备件', '选择备件',
Item.allSchemas, Item.allSchemas,
getDeviceItemList, ItemApi.getItemPage,
null, null,
Item.allSchemas.searchSchema, Item.allSchemas.searchSchema,
true, true,
@ -153,13 +153,11 @@
null null
) )
} }
const submitItem = async (formFieldRef, searchFieldRef, selections, typeRef, rowRef) => { const submitItem = async (formFieldRef, searchFieldRef, selections, typeRef, rowRef) => {
const deviceItemRelList = selections.map((element) => ({ const deviceItemRelList = selections.map((element) => ({
id: wantId1.value, id: wantId1.value,
locationNumber: locationNumber.value, locationNumber: locationNumber.value,
itemNumber: element.number, itemNumber: element.number,
})) }))
ItemAccountsApi.replaceLocation(deviceItemRelList).then((res) => { ItemAccountsApi.replaceLocation(deviceItemRelList).then((res) => {
message.success(t('更换成功')) message.success(t('更换成功'))
@ -193,23 +191,6 @@
} }
} }
// getListApi getItemWithOutBind
const getDeviceItemList = async () => {
tableObject.loading = true
try {
const res = await getItemWithOutBind()
let result = {
list: res,
total: res.length
}
return result
} catch (error) {
console.error(error)
} finally {
tableObject.loading = false
}
}
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type : string, row ?: any) => { const openForm = (type : string, row ?: any) => {

8
src/views/eam/mold/moldAccounts/moldAccounts.data.ts

@ -253,7 +253,13 @@ export const MoldMilestone = useCrudSchemas(reactive<CrudSchema[]>([
field: 'milestoneStage', field: 'milestoneStage',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: true isForm: true,
form: {
component: 'Select',
componentProps: {
disabled: true
}
},
}, },
{ {
label: '里程碑日期', label: '里程碑日期',

Loading…
Cancel
Save