Browse Source

BUG修改

master
parent
commit
118a90b102
  1. 1
      src/api/eam/basic/location/index.ts
  2. 272
      src/views/eam/basic/item/item.data.ts
  3. 78
      src/views/eam/basic/location/location.data.ts
  4. 18
      src/views/eam/basic/locationArea/index.vue
  5. 50
      src/views/eam/basic/locationArea/locationArea.data.ts

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

@ -48,7 +48,6 @@ export const exportLocation = async (params) => {
return await request.download({ url: `/eam/location/export-excel`, params })
}
// 查询库位列表
export const getLocationNoPage = async (params) => {
return await request.get({ url: `/eam/location/noPage`, params })

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

@ -11,302 +11,174 @@ export const ItemRules = reactive({
{ required: true, message: '请选择备件单位', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
classification: [
{ required: true, message: '请选择备件分类', trigger: 'blur' },
],
})
export const Item = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '备件编号',
label: '零件编码',
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 180,
fixed: 'left'
},
},
{
label: '件名称',
label: '件名称',
field: 'name',
sort: 'custom',
isSearch: true,
table: {
width: 110,
width: 110
},
},
{
label: '规格',
label: '规格型号',
field: 'specifications',
sort: 'custom',
},
{
label: '是否常储',
field: 'isConstant',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: false,
isTable: true,
sort: 'custom',
table: {
width: 110,
width: 110
},
tableForm: {
type: 'Select',
inactiveValue: 'FALSE',
disabled: true
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '科目',
field: 'subject',
sort: 'custom',
dictType: DICT_TYPE.ITEM_SUBJECT,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '科目代码',
field: 'subjectCode',
sort: 'custom',
isTable: true,
},
{
label: '单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
table: {
width: 110
},
},
{
label: '类别',
field: 'category',
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
dictType: DICT_TYPE.ITEM_CATEGORY,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
table: {
width: 130
},
},
{
label: '备件分类',
field: 'classification',
label: '生产厂家',
field: 'brand',
sort: 'custom',
dictType: DICT_TYPE.CLASSIFICATION,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
table: {
width: 110
},
},
{
label: '区域',
field: 'region',
label: '最高库存',
field: 'maxInventory',
sort: 'custom',
dictType: DICT_TYPE.ITEM_REGION,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
form: {
component: 'InputNumber',
value: 0
},
// {
// label: '单价',
// field: 'singlePrice',
// sort: 'custom',
// },
{
label: '重采购点',
field: 'reprocurement',
sort: 'custom',
table: {
width: 110,
width: 110
},
},
{
label: '最低库存',
field: 'minInventory',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 110
},
},
{
label: '安全库存',
field: 'safetyStock',
label: '采购周期(周)',
field: 'procurementCycle',
sort: 'custom',
table: {
width: 110,
},
isSearch: false,
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 150
},
},
{
label: '成本中心',
field: 'cost',
label: 'ABC分类',
field: 'classification',
sort: 'custom',
isSearch: false,
table: {
width: 110,
width: 110
},
},
{
label: '采购员',
field: 'purchaser',
label: '使用地点',
field: 'usePlace',
sort: 'custom',
isSearch: false,
table: {
width: 100,
width: 110
},
},
{
label: '财务',
field: 'financer',
label: '项目',
field: 'project',
sort: 'custom',
isSearch: false,
table: {
width: 110
},
},
{
label: '是否以旧换新',
field: 'isRadeIn',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: false,
isTable: true,
label: '价格',
field: 'price',
sort: 'custom',
isSearch: false,
table: {
width: 140
width: 110
},
tableForm: {
type: 'Select',
inactiveValue: 'FALSE',
disabled: true
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '是否框架协议',
field: 'isFramework',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: false,
isTable: true,
label: '描述',
field: 'describes',
sort: 'custom',
isSearch: false,
table: {
width: 140
width: 110
},
tableForm: {
type: 'Select',
inactiveValue: 'FALSE',
disabled: true
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
// {
// label: '是否可用',
// field: 'available',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isSearch: false,
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm: {
// type: 'Select',
// inactiveValue: 'FALSE',
// disabled: true
// },
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
table: {
width: 170
width: 180
},
},
{
label: '描述',
field: 'describes',
sort: 'custom',
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 180,
width: 150,
fixed: 'right'
}
}
]))
export const ItemSearchTable = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '备件编号',
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
fixed: 'left'
},
},
{
label: '备件名称',
field: 'name',
sort: 'custom',
isSearch: true,
table: {
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
}
]))

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

@ -43,85 +43,7 @@ export const Location = useCrudSchemas(reactive<CrudSchema[]>([
field: 'areaNumber',
sort: 'custom',
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库区编号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: '库区信息', // 查询弹窗标题
searchAllSchemas: LocationArea.allSchemas, // 查询弹窗所需类
searchPage: LocationAreaApi.getLocationAreaPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: "TRUE",
isMainValue: false
}]
}
}
},
{
label: '类型',
field: 'type',
dictType: DICT_TYPE.LOCATION_AREA_TYPE,
dictClass: 'string',
sort: 'custom',
isSearch: false,
form: {
component: 'Select'
},
},
{
label: '是否为账内',
field: 'isInAccount',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: false,
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
inactiveValue: 'FALSE',
disabled: true
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
// {
// label: '是否可用',
// field: 'available',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isSearch: false,
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm: {
// type: 'Select',
// inactiveValue: 'FALSE',
// disabled: true
// },
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
{
label: '创建时间',
field: 'createTime',

18
src/views/eam/basic/locationArea/index.vue

@ -34,6 +34,9 @@
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="LocationArea.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/location/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
@ -203,6 +206,21 @@
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '库区导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {

50
src/views/eam/basic/locationArea/locationArea.data.ts

@ -31,69 +31,23 @@ export const LocationArea = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
},
{
label: '类型',
field: 'type',
dictType: DICT_TYPE.LOCATION_AREA_TYPE,
dictClass: 'string',
label: '描述',
field: 'description',
sort: 'custom',
isSearch: false,
form: {
component: 'Select'
},
},
// {
// label: '是否可用',
// field: 'available',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isSearch: false,
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm: {
// type: 'Select',
// inactiveValue: 'FALSE',
// disabled: true
// },
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 170
},
},
{
label: '描述',
field: 'description',
sort: 'custom',
table: {
width: 150
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}

Loading…
Cancel
Save