Browse Source

HL-6107 Q2通知单邮件改为手动发送

hella_online_20240924
tengxiaofei 2 months ago
parent
commit
42e01fef06
  1. 4
      src/api/qms/inspectionQ2/index.ts
  2. 12
      src/utils/disposition/defaultButtons.ts
  3. 21
      src/views/qms/inspectionQ2/index.vue
  4. 2
      src/views/qms/inspectionQ2/inspectionQ2.data.ts
  5. 4
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/index.vue

4
src/api/qms/inspectionQ2/index.ts

@ -81,3 +81,7 @@ export const finishQ2 = async (id: number) => {
export const getEmail = () => {
return request.get({ url: `/qms/inspectionQ2/getEmail`})
}
export const sendQ2 = async (id: number) => {
return await request.get({ url: `/qms/inspectionQ2/send?id=` + id })
}

12
src/utils/disposition/defaultButtons.ts

@ -452,6 +452,18 @@ export function mainListFinishBtn(option: any) {
})
}
export function mainListSendBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.发送邮件`).replace('ts.', ''),
name: 'send',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-作废按钮
export function mainListCancelBtn(option: any) {
return __defaultBtnOption(option, {

21
src/views/qms/inspectionQ2/index.vue

@ -651,7 +651,10 @@ const butttondata = (row) => {
defaultButtons.mainListFinishBtn({
hide: isShowMainButton(row, ['0']),
hasPermi: 'qms:Q2:finish'
}) //
}), //
defaultButtons.mainListSendBtn({
hide: isShowMainButton(row, ['0']),
}) //
]
}
@ -667,6 +670,9 @@ const buttonTableClick = async (val, row) => {
//
handleFinish(row.id)
}
else if (val == 'send') {
handleSend(row.id)
}
}
const handleFinish = async (id: number) => {
@ -678,6 +684,19 @@ const handleFinish = async (id: number) => {
} catch {}
}
const handleSend = async (id: number) => {
try {
//
await message.confirm('确认发送邮件吗?')
//
await Q2Api.sendQ2(id)
message.success(t('邮件发送成功'))
// message.success(t('common.success'))
//
// await getList()
} catch {}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {

2
src/views/qms/inspectionQ2/inspectionQ2.data.ts

@ -868,7 +868,7 @@ export const Q2 = useCrudSchemas(
isForm: false,
isDetail: false,
table: {
width: 150,
width: 230,
fixed: 'right'
}
}

4
src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/index.vue

@ -163,7 +163,7 @@ const handleExport = async () => {
//
loadStart()
const excelTitle = ref(route.meta.title)
const data = await SupplierdeliverRequestMainApi.exportSupplierdeliverRequestMain(
const data = await RuleApi.exportRule(
queryParams
)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
@ -182,7 +182,7 @@ const handleImport = () => {
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn(null), //
// defaultButtons.defaultExportBtn({ hasPermi: 'wms:supplierdeliver-request-main:export' }), //
defaultButtons.defaultExportBtn( null), //
]
//

Loading…
Cancel
Save