Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

hella_online_20240829
wangyufei 3 months ago
parent
commit
18c75ec828
  1. 26
      src/views/qms/inspectionRecordFirst/index.vue
  2. 25
      src/views/qms/inspectionRecordFirst/inspectionRecordFirstMain.data.ts

26
src/views/qms/inspectionRecordFirst/index.vue

@ -136,8 +136,10 @@ const buttonBaseClick = (val, item) => {
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, 'publish'),hasPermi: 'wms:inspection-recode-first-main:update' }), //
defaultButtons.mainListDeleteBtn({hasPermi: 'wms:inspection-recode-first-main:delete' }), //
defaultButtons.mainListDeleteBtn({ hide: isShowMainButton(row, 'publish'),hasPermi: 'wms:inspection-recode-first-main:delete' }), //
defaultButtons.mainListOrderPubBtn({ hide: isShowMainButton(row, 'publish'), hasPermi: 'qms:inspection-recode-first-main:pub' }), //
defaultButtons.mainExport({ hide: !row.isPublished}), //
]
}
@ -153,6 +155,9 @@ const buttonBaseClick = (val, item) => {
handleDelete(row.id)
}else if (val == 'mainOrderPub') { //
handleOrderPub(row)
}else if (val == 'mainExport') {
//
handleMainExport(row)
}
}
/** 添加/修改操作 */
@ -194,9 +199,24 @@ const buttonBaseClick = (val, item) => {
}
/** 列表导出按钮操作 */
const exportLoading = ref(false) //
const handleMainExport = async (row: any) => {
try {
await message.exportConfirm()
//
exportLoading.value = true
tableObject.params.number = row.number
const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params)
download.excel(data, '首件检验记录.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
@ -204,7 +224,7 @@ const buttonBaseClick = (val, item) => {
//
exportLoading.value = true
const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params)
download.excel(data, '备件申领记录主.xlsx')
download.excel(data, '首件检验记录.xlsx')
} catch {
} finally {
exportLoading.value = false

25
src/views/qms/inspectionRecordFirst/inspectionRecordFirstMain.data.ts

@ -35,7 +35,7 @@ export const InspectionRecordMain = useCrudSchemas(
label: '物料编码',
field: 'itemCode',
sort: 'custom',
isSearch: false,
isSearch: true,
isForm: false,
table: {
width: 150
@ -90,13 +90,25 @@ export const InspectionRecordMain = useCrudSchemas(
width: 130
},
isForm: false,
isTable: true
isTable: false,
isSearch: false
},
{
label: '检验人',
field: 'creatorName',
table: {
width: 130
},
isForm: false,
isTable: true,
isSearch: true
},
{
label: '检验时间',
field: 'inspectionTime',
sort: 'custom',
isDetail: true,
isSearch: true,
isForm: false,
formatter: dateFormatter,
detail: {
@ -105,6 +117,15 @@ export const InspectionRecordMain = useCrudSchemas(
table: {
width: 180
},
search: {
component: 'DatePicker',
componentProps: {
type: 'datetimerange',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
form: {
component: 'DatePicker',
componentProps: {

Loading…
Cancel
Save