Browse Source

导入

master_hella_20240701
zhang_li 5 months ago
parent
commit
4635ef4991
  1. 1
      src/utils/dict.ts
  2. 17
      src/views/eam/sparepartsinlocation/index.vue
  3. 41
      src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts

1
src/utils/dict.ts

@ -367,4 +367,5 @@ export enum DICT_TYPE {
OFF_BACK_STATUS = 'off_back_status',
SPAREPARTS_APPLY_STATUS_ENUM = 'spareparts_apply_status_enum',// 流程状态
IS_LINE_ITEM = 'is_line_item', // 是否是线边
PUT_IN_TYPE = 'put_in_type',// 入库类型
}

17
src/views/eam/sparepartsinlocation/index.vue

@ -82,7 +82,7 @@
<!-- 导入 -->
<ImportForm
ref="importFormRef"
url="/eam/sparePartsApplyDetail/import"
url="/eam/spare-parts-in-location-main/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
/>
@ -131,6 +131,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
row['areaCode'] = val[0].areaCode
row['sparePartsCode'] = val[0].sparePartsCode
row['currentQty'] = val[0].qty
row['isRadeIn'] = val[0].isRadeIn
}
} else {
if (formField == 'locationCode') {
@ -138,6 +139,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
setV['areaCode'] = val[0].areaCode
setV['sparePartsCode'] = val[0].sparePartsCode
setV['currentQty'] = val[0].qty
setV['isRadeIn'] = val[0].isRadeIn
}
}
@ -149,9 +151,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(async () => {
const setV = {}
if (formField == 'sparePartsCode') {
setV['sparePartsCode'] = val[0].itemNumber
setV['currentQty'] = val[0].qty
if (formField == 'locationCode') {
setV['locationCode'] = val[0].code
setV['areaCode'] = val[0].areaCode
setV['sparePartsCode'] = val[0].sparePartsCode
setV['currentQty'] = val[0].qty
setV['isRadeIn'] = val[0].isRadeIn
}
formRef.setValues(setV)
})
@ -218,8 +223,8 @@ const isShowMainButton = (row, val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({ hasPermi: 'eam:spare-parts-in-location-main:update' }) //
// defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:sparePartsInLocationMain:delete' }) //
defaultButtons.mainListEditBtn({ hasPermi: 'eam:spare-parts-in-location-main:update' }), //
defaultButtons.mainListDeleteBtn({ hasPermi: 'eam:spare-parts-in-location-main:delete' }) //
]
}

41
src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts

@ -10,10 +10,7 @@ import { ItemAccounts } from '@/views/eam/itemAccounts/itemAccounts.data'
export const SparePartsInLocationMainRules = reactive({
number: [required],
theme: [required],
// status: [required],
// areaCode: [required],
// locationCode: [required],
concurrencyStamp: [required],
type: [required],
})
// 备件入库主表
export const SparePartsInLocationMain = useCrudSchemas(reactive<CrudSchema[]>([
@ -38,6 +35,13 @@ export const SparePartsInLocationMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'theme',
sort: 'custom',
isSearch: true,
},{
label: '入库类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.PUT_IN_TYPE,
dictClass: 'string',
},
{
label: '流程状态',
@ -140,7 +144,6 @@ export const SparePartsInLocationDetailRules = reactive({
areaCode: [required],
sparePartsCode: [required],
applyQty: [required],
concurrencyStamp: [required],
})
export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>([
@ -167,19 +170,19 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
}
},
tableForm: {
// isInpuFocusShow: true,
// searchListPlaceholder: '请选择备件编号', // 输入框占位文本
// searchField: 'itemNumber', // 查询弹窗赋值字段
// searchTitle: '备件信息', // 查询弹窗标题
// searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
// searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
// searchCondition: [
// {
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }
// ]
isInpuFocusShow: true,
searchListPlaceholder: '请选择备件编号', // 输入框占位文本
searchField: 'itemNumber', // 查询弹窗赋值字段
searchTitle: '备件信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
{
@ -193,7 +196,7 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
}
},
tableForm:{
// disabled: true
disabled: true
}
},
{

Loading…
Cancel
Save