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 2 months ago
parent
commit
18c75ec828
  1. 30
      src/views/qms/inspectionRecordFirst/index.vue
  2. 25
      src/views/qms/inspectionRecordFirst/inspectionRecordFirstMain.data.ts

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

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

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

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

Loading…
Cancel
Save