Browse Source

BUG修改

master
parent
commit
eb68040d26
  1. 6
      src/api/eam/item/itemAccounts/index.ts
  2. 7
      src/views/eam/basic/item/index.vue
  3. 75
      src/views/eam/device/deviceAccounts/index.vue
  4. 171
      src/views/eam/device/deviceInternalAudit/deviceInternalAudit.data.ts
  5. 21
      src/views/eam/item/itemAccounts/index.vue

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 })
}

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) => {

Loading…
Cancel
Save