Browse Source

BUG修改

master
parent
commit
ce39013ced
  1. 15
      src/utils/disposition/defaultButtons.ts
  2. 14
      src/views/eam/item/countadjustPlan/countadjustPlan.data.ts
  3. 25
      src/views/eam/item/countadjustWork/index.vue
  4. 157
      src/views/eam/item/itemApplyMain/itemApplyMain.data.ts

15
src/utils/disposition/defaultButtons.ts

@ -663,6 +663,21 @@ export function mainListDocumentPrintBtn(option:any) {
hasPermi: ''
})
}
// 主列表-打印
export function mainExport(option:any) {
return __defaultBtnOption(option,{
label: '导出',
name: 'mainExport',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-生成到货检验申请
export function mainInspectRequestBtn(option:any) {
return __defaultBtnOption(option,{

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

@ -20,21 +20,15 @@ export const CountadjustPlan = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
},
// {
// label: '盘点类型',
// field: 'classification',
// sort: 'custom',
// isSearch: false,
// },
{
label: '盘点类型',
field: 'type',
sort: 'classification',
field: 'classification',
sort: 'custom',
dictType: DICT_TYPE.CLASSIFICATION,
dictClass: 'string',
isSearch: true,
isSearch: false,
isTable: true,
isForm: true,
table: {
width: 150
},

25
src/views/eam/item/countadjustWork/index.vue

@ -47,7 +47,7 @@
<script setup lang="ts">
import download from '@/utils/download'
import { CountJobMain, CountJobMainRules, CountJobDetail, CountJobDetailRules } from './countJobMain.data'
import { CountJobMain, CountJobMainRules, CountJobDetail, CountJobDetailRules } from './countadjustWork.data'
import * as CountJobMainApi from '@/api/eam/item/countJobMain'
import * as CountJobDetailApi from '@/api/eam/item/countJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -156,6 +156,7 @@
// -
const butttondata = (row) => {
return [
defaultButtons.mainExport(null),//
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn(null), //
]
@ -163,9 +164,13 @@
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
}
else if (val == 'mainExport') { //
handleMainExport(row.id)
}
else if (val == 'mainOrderClo') { //
handleClose(row.id)
}
@ -200,6 +205,23 @@
} catch { }
}
/** 列表导出按钮操作 */
const exportLoading = ref(false) //
const handleMainExport = async (id : number) => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await CountJobMainApi.handleMainExport(id)
download.excel(data, '盘点工单.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 关闭按钮操作 */
const handleClose = async (id : number) => {
try {
@ -214,7 +236,6 @@
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//

157
src/views/eam/item/itemApplyMain/itemApplyMain.data.ts

@ -21,13 +21,7 @@ export const ItemApplyMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'left'
},
},
{
label: '申领人',
field: 'applyId',
sort: 'custom',
isForm: false,
isSearch: false,
},
{
label: '审批人',
field: 'approveId',
@ -47,32 +41,17 @@ export const ItemApplyMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'name',
sort: 'custom',
},
{
label: '状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.ITEM_APPLY_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
width: 200,
fixed: 'right'
}
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 200,
fixed: 'right'
}
}
}
]))
//表单校验
@ -137,124 +116,6 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
]
},
},
{
label: '类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.DEVICE_MOLD_TYPE,
dictClass: 'string',
isSearch: true,
isTable: true,
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: false
}
},
{
label: '设备/模具编号',
field: 'deviceNumber',
sort: 'custom',
isSearch: true,
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择单号',
searchField: 'number',
searchTitle: '单号信息',
searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类
searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: "TRUE",
isMainValue: false
}, {
key: 'type',
value: "type",
isMainValue: true
}
]
},
},
{
label: '申领数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
label: '库存数量',
field: 'currentQty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isTable: true,
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
}
},
{
label: '是否以旧换新',
field: 'isRadeIn',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isTable: true,
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
}
},
{
label: '备注',
field: 'remark',

Loading…
Cancel
Save