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', OFF_BACK_STATUS = 'off_back_status',
SPAREPARTS_APPLY_STATUS_ENUM = 'spareparts_apply_status_enum',// 流程状态 SPAREPARTS_APPLY_STATUS_ENUM = 'spareparts_apply_status_enum',// 流程状态
IS_LINE_ITEM = 'is_line_item', // 是否是线边 IS_LINE_ITEM = 'is_line_item', // 是否是线边
PUT_IN_TYPE = 'put_in_type',// 入库类型
} }

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

@ -82,7 +82,7 @@
<!-- 导入 --> <!-- 导入 -->
<ImportForm <ImportForm
ref="importFormRef" ref="importFormRef"
url="/eam/sparePartsApplyDetail/import" url="/eam/spare-parts-in-location-main/import"
:importTemplateData="importTemplateData" :importTemplateData="importTemplateData"
@success="importSuccess" @success="importSuccess"
/> />
@ -131,6 +131,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
row['areaCode'] = val[0].areaCode row['areaCode'] = val[0].areaCode
row['sparePartsCode'] = val[0].sparePartsCode row['sparePartsCode'] = val[0].sparePartsCode
row['currentQty'] = val[0].qty row['currentQty'] = val[0].qty
row['isRadeIn'] = val[0].isRadeIn
} }
} else { } else {
if (formField == 'locationCode') { if (formField == 'locationCode') {
@ -138,6 +139,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
setV['areaCode'] = val[0].areaCode setV['areaCode'] = val[0].areaCode
setV['sparePartsCode'] = val[0].sparePartsCode setV['sparePartsCode'] = val[0].sparePartsCode
setV['currentQty'] = val[0].qty 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) => { const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(async () => { nextTick(async () => {
const setV = {} const setV = {}
if (formField == 'sparePartsCode') { if (formField == 'locationCode') {
setV['sparePartsCode'] = val[0].itemNumber setV['locationCode'] = val[0].code
setV['currentQty'] = val[0].qty setV['areaCode'] = val[0].areaCode
setV['sparePartsCode'] = val[0].sparePartsCode
setV['currentQty'] = val[0].qty
setV['isRadeIn'] = val[0].isRadeIn
} }
formRef.setValues(setV) formRef.setValues(setV)
}) })
@ -218,8 +223,8 @@ const isShowMainButton = (row, val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListEditBtn({ hasPermi: 'eam:spare-parts-in-location-main:update' }) // defaultButtons.mainListEditBtn({ hasPermi: 'eam:spare-parts-in-location-main:update' }), //
// defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:sparePartsInLocationMain:delete' }) // 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({ export const SparePartsInLocationMainRules = reactive({
number: [required], number: [required],
theme: [required], theme: [required],
// status: [required], type: [required],
// areaCode: [required],
// locationCode: [required],
concurrencyStamp: [required],
}) })
// 备件入库主表 // 备件入库主表
export const SparePartsInLocationMain = useCrudSchemas(reactive<CrudSchema[]>([ export const SparePartsInLocationMain = useCrudSchemas(reactive<CrudSchema[]>([
@ -38,6 +35,13 @@ export const SparePartsInLocationMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'theme', field: 'theme',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
},{
label: '入库类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.PUT_IN_TYPE,
dictClass: 'string',
}, },
{ {
label: '流程状态', label: '流程状态',
@ -140,7 +144,6 @@ export const SparePartsInLocationDetailRules = reactive({
areaCode: [required], areaCode: [required],
sparePartsCode: [required], sparePartsCode: [required],
applyQty: [required], applyQty: [required],
concurrencyStamp: [required],
}) })
export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>([
@ -167,19 +170,19 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
} }
}, },
tableForm: { tableForm: {
// isInpuFocusShow: true, isInpuFocusShow: true,
// searchListPlaceholder: '请选择备件编号', // 输入框占位文本 searchListPlaceholder: '请选择备件编号', // 输入框占位文本
// searchField: 'itemNumber', // 查询弹窗赋值字段 searchField: 'itemNumber', // 查询弹窗赋值字段
// searchTitle: '备件信息', // 查询弹窗标题 searchTitle: '备件信息', // 查询弹窗标题
// searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
// searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法 searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
// searchCondition: [ searchCondition: [
// { {
// key: 'available', key: 'available',
// value: 'TRUE', value: 'TRUE',
// isMainValue: false isMainValue: false
// } }
// ] ]
} }
}, },
{ {
@ -193,7 +196,7 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
} }
}, },
tableForm:{ tableForm:{
// disabled: true disabled: true
} }
}, },
{ {

Loading…
Cancel
Save