This commit is contained in:
XaoLi717 2025-01-17 11:30:31 +08:00
parent 614dd80941
commit c08dd34b8b
2 changed files with 28 additions and 5 deletions

View File

@ -375,7 +375,11 @@ export enum OperationButtonType {
/**
*
*/
COPY = 7
COPY = 7,
/**
*
*/
NUMBER = 8
}
/**
@ -520,6 +524,7 @@ OPERATION_BUTTON_NAME.set(OperationButtonType.DELEGATE, '委派')
OPERATION_BUTTON_NAME.set(OperationButtonType.ADD_SIGN, '加签')
OPERATION_BUTTON_NAME.set(OperationButtonType.RETURN, '退回')
OPERATION_BUTTON_NAME.set(OperationButtonType.COPY, '抄送')
OPERATION_BUTTON_NAME.set(OperationButtonType.NUMBER, '文号')
// 默认的按钮权限设置
export const DEFAULT_BUTTON_SETTING: ButtonSetting[] = [
@ -528,7 +533,8 @@ export const DEFAULT_BUTTON_SETTING: ButtonSetting[] = [
{ id: OperationButtonType.TRANSFER, displayName: '转办', enable: true },
{ id: OperationButtonType.DELEGATE, displayName: '委派', enable: true },
{ id: OperationButtonType.ADD_SIGN, displayName: '加签', enable: true },
{ id: OperationButtonType.RETURN, displayName: '退回', enable: true }
{ id: OperationButtonType.RETURN, displayName: '退回', enable: true },
{ id: OperationButtonType.NUMBER, displayName: '文号', enable: true }
]
// 发起人的按钮权限。暂时定死,不可以编辑
@ -538,7 +544,8 @@ export const START_USER_BUTTON_SETTING: ButtonSetting[] = [
{ id: OperationButtonType.TRANSFER, displayName: '转办', enable: false },
{ id: OperationButtonType.DELEGATE, displayName: '委派', enable: false },
{ id: OperationButtonType.ADD_SIGN, displayName: '加签', enable: false },
{ id: OperationButtonType.RETURN, displayName: '退回', enable: false }
{ id: OperationButtonType.RETURN, displayName: '退回', enable: false },
{ id: OperationButtonType.NUMBER, displayName: '文号', enable: false }
]
export const MULTI_LEVEL_DEPT: DictDataVO = [

View File

@ -318,7 +318,7 @@ const queryParamsNumbers = reactive({
createTime: [],
})
const visible = ref(false) //
const OpenNumber = ref(true) //
const OpenNumber = ref(false) //
const message = useMessage() //
//
@ -415,8 +415,24 @@ const updateForm = async () => {
formLoading.value = false
}
}
const updateNumber = async (date) => {
const numberDate = await ClglApi.getClgl(date.id)
const data = numberDate as unknown as ClglVO
//
if (data.numberType !== 1) {
message.error("编号类型不是文号!")
return
}
// usageName
if (!data.serialNumber) {
data.serialNumber = date.value
await ClglApi.updateClgl(data)
} else {
message.error("文号已存在")
}
}
/** 打开弹窗 */
defineExpose({ updateForm }) // open
defineExpose({ updateForm, updateNumber }) // open
/** 初始化 **/
onMounted(async () => {