ljlong_2630 2 weeks ago
parent
commit
7792bc5636
  1. 10
      src/api/eam/basic/location/index.ts
  2. 2
      src/components/BasicForm/src/BasicForm.vue
  3. 2
      src/router/modules/remaining.ts
  4. 2
      src/utils/dict.ts
  5. 27
      src/views/eam/basic/item/item.data.ts
  6. 6
      src/views/eam/basic/location/location.data.ts
  7. 1
      src/views/eam/device/deviceRepair/deviceRepair.data.ts
  8. 28
      src/views/eam/item/itemInLocation/itemInLocation.data.ts
  9. 14
      src/views/eam/item/itemLocationReplace/itemLocationReplace.data.ts
  10. 19
      src/views/eam/item/itemOutLocation/itemOutLocation.data.ts

10
src/api/eam/basic/location/index.ts

@ -56,7 +56,15 @@ export const getLocationNoPage = async (params) => {
// 查询库位列表 // 查询库位列表
export const selectPageByConditions = async (params) => { export const selectPageByConditions = async (params) => {
return await request.get({ url: `/eam/location/selectPageByConditions`, params })
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/location/selectPageByConditionsSenior', data })
} else {
return await request.get({ url: `/eam/location/selectPageByConditions`, params })
}
} }
// 不在台账中的库位 // 不在台账中的库位

2
src/components/BasicForm/src/BasicForm.vue

@ -456,7 +456,7 @@ const submitForm = async () => {
const data = unref(formRef)?.formModel const data = unref(formRef)?.formModel
emit('success', formType.value, data) emit('success', formType.value, data)
} finally { } finally {
// formLoading.value = false formLoading.value = false
} }
} }
} }

2
src/router/modules/remaining.ts

@ -40,7 +40,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
children: [ children: [
{ {
path: '/redirect/:path(.*)', path: '/redirect/:path(.*)',
name: 'Redirect', name: 'Redirect1',
component: () => import('@/views/redirect/redirect.vue'), component: () => import('@/views/redirect/redirect.vue'),
meta: {} meta: {}
} }

2
src/utils/dict.ts

@ -313,5 +313,7 @@ export enum DICT_TYPE {
ITEM_OUT_IN_TYPE = 'item_out_in_type',//备件出入库类型 ITEM_OUT_IN_TYPE = 'item_out_in_type',//备件出入库类型
PUSH_STATUS = 'push_status',//推送状态 PUSH_STATUS = 'push_status',//推送状态
MOLD_TIME_SYNC_STATUS = 'mold_time_sync_status',//模具时间同步状态 MOLD_TIME_SYNC_STATUS = 'mold_time_sync_status',//模具时间同步状态
PURCHASE_WAY = 'purchase_way',//模具时间同步状态
} }

27
src/views/eam/basic/item/item.data.ts

@ -4,6 +4,10 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const ItemRules = reactive({ export const ItemRules = reactive({
number: [
{ required: true, message: '请输入备件编号', trigger: 'blur' },
{ max: 20, message: '不得超过20个字符', trigger: 'blur' }
],
name: [ name: [
{ required: true, message: '请输入备件名称', trigger: 'blur' }, { required: true, message: '请输入备件名称', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
@ -26,7 +30,7 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false, isForm: true,
table: { table: {
width: 180, width: 180,
fixed: 'left' fixed: 'left'
@ -138,6 +142,27 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
type: 'Select' type: 'Select'
} }
}, },
{
label: '采购方式',
field: 'purchaseWay',
sort: 'custom',
dictType: DICT_TYPE.PURCHASE_WAY,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '物料类型',
field: 'itemType',
sort: 'custom',
isSearch: true,
table: {
width: 110,
},
},
{ {
label: '单价', label: '单价',
field: 'singlePrice', field: 'singlePrice',

6
src/views/eam/basic/location/location.data.ts

@ -38,6 +38,12 @@ export const Location = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
}, },
{
label: '备件编号',
field: 'itemNumber',
sort: 'custom',
isSearch: true,
},
{ {
label: '库区编号', label: '库区编号',
field: 'areaNumber', field: 'areaNumber',

1
src/views/eam/device/deviceRepair/deviceRepair.data.ts

@ -17,6 +17,7 @@ export const DeviceRepairRules = reactive({
number: [required], number: [required],
deviceNumber: [required], deviceNumber: [required],
factoryAreaNumber: [required], factoryAreaNumber: [required],
upload: [required],
declarer: [required], declarer: [required],
faultType: [required], faultType: [required],
type: [required], type: [required],

28
src/views/eam/item/itemInLocation/itemInLocation.data.ts

@ -16,45 +16,30 @@ export const ItemInLocation = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 150
},
}, },
{ {
label: '备件编号', label: '备件编号',
field: 'itemNumber', field: 'itemNumber',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 150
},
}, },
{ {
label: '备件名称', label: '备件名称',
field: 'name', field: 'name',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 180,
},
}, },
{ {
label: '库位编号', label: '库位编号',
field: 'locationNumber', field: 'locationNumber',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 150
},
}, },
{ {
label: '规格型号', label: '规格型号',
field: 'specifications', field: 'specifications',
sort: 'custom', sort: 'custom',
isTable: true, isTable: true,
table: {
width: 150
},
}, },
{ {
label: '类型', label: '类型',
@ -63,9 +48,6 @@ export const ItemInLocation = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false, isSearch: false,
dictType: DICT_TYPE.ITEM_OUT_IN_TYPE, dictType: DICT_TYPE.ITEM_OUT_IN_TYPE,
dictClass: 'string', dictClass: 'string',
table: {
width: 150
},
form: { form: {
component: 'Select' component: 'Select'
}, },
@ -75,9 +57,6 @@ export const ItemInLocation = useCrudSchemas(reactive<CrudSchema[]>([
field: 'qty', field: 'qty',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
table: {
width: 150
},
}, },
{ {
label: '创建人', label: '创建人',
@ -87,9 +66,6 @@ export const ItemInLocation = useCrudSchemas(reactive<CrudSchema[]>([
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userListAll.find((account) => account.id == cellValue)?.nickname return userListAll.find((account) => account.id == cellValue)?.nickname
}, },
table: {
width: 150
},
}, },
{ {
label: '创建时间', label: '创建时间',
@ -97,9 +73,6 @@ export const ItemInLocation = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: true, isSearch: true,
table: {
width: 150
},
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -115,7 +88,6 @@ export const ItemInLocation = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action', field: 'action',
isForm: false, isForm: false,
table: { table: {
width: 150,
fixed: 'right' fixed: 'right'
} }
} }

14
src/views/eam/item/itemLocationReplace/itemLocationReplace.data.ts

@ -39,12 +39,14 @@ export const ItemLocationReplace = useCrudSchemas(reactive<CrudSchema[]>([
value:'TRUE', value:'TRUE',
message: '是否可用', message: '是否可用',
isMainValue: false isMainValue: false
},{ },
key:'qty', // {
value:'0', // key:'qty',
message: '库存数量', // value:'0',
isMainValue: false // message: '库存数量',
},] // isMainValue: false
// },
]
} }
}, },
}, },

19
src/views/eam/item/itemOutLocation/itemOutLocation.data.ts

@ -14,27 +14,18 @@ export const ItemOutLocation = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 180,
},
}, },
{ {
label: '备件名称', label: '备件名称',
field: 'name', field: 'name',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 180,
},
}, },
{ {
label: '库位编号', label: '库位编号',
field: 'locationNumber', field: 'locationNumber',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 180,
},
}, },
{ {
label: '类型', label: '类型',
@ -46,18 +37,12 @@ export const ItemOutLocation = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'Select' component: 'Select'
}, },
table: {
width: 180,
},
}, },
{ {
label: '数量', label: '数量',
field: 'qty', field: 'qty',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
table: {
width: 180,
},
}, },
{ {
@ -66,9 +51,6 @@ export const ItemOutLocation = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isTable: true, isTable: true,
table: {
width: 180,
},
isForm: false isForm: false
}, },
{ {
@ -76,7 +58,6 @@ export const ItemOutLocation = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action', field: 'action',
isForm: false, isForm: false,
table: { table: {
width: 150,
fixed: 'right' fixed: 'right'
} }
} }

Loading…
Cancel
Save