Merge branch 'developer' of ssh://code.cyweb.top:30033/scj/zhxy/v3/cloud-ui into developer
This commit is contained in:
@@ -78,6 +78,7 @@ import { useMessage } from '/@/hooks/message'
|
|||||||
import other from '/@/utils/other'
|
import other from '/@/utils/other'
|
||||||
import UploadFile from '/@/components/Upload/index.vue'
|
import UploadFile from '/@/components/Upload/index.vue'
|
||||||
import { Session } from '/@/utils/storage'
|
import { Session } from '/@/utils/storage'
|
||||||
|
import * as orderVue from '/@/api/order/order-key-vue'
|
||||||
|
|
||||||
/** 部门审核角色编码:仅该角色下显示采购代表相关页面和功能,流转至部门审核时需填写采购代表 */
|
/** 部门审核角色编码:仅该角色下显示采购代表相关页面和功能,流转至部门审核时需填写采购代表 */
|
||||||
const PURCHASE_DEPT_AUDIT_ROLE_CODE = 'PURCHASE_DEPT_AUDIT'
|
const PURCHASE_DEPT_AUDIT_ROLE_CODE = 'PURCHASE_DEPT_AUDIT'
|
||||||
@@ -95,6 +96,10 @@ const props = defineProps({
|
|||||||
currJob: { type: Object, default: null },
|
currJob: { type: Object, default: null },
|
||||||
currElTab: { type: Object, default: null }
|
currElTab: { type: Object, default: null }
|
||||||
})
|
})
|
||||||
|
const emit = defineEmits(['handleJob'])
|
||||||
|
|
||||||
|
/** 是否被流程 handle 页面通过 dynamic-link 嵌入 */
|
||||||
|
const isFlowEmbed = computed(() => !!props.currJob)
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const PURCHASE_FILE_TYPE = '130'
|
const PURCHASE_FILE_TYPE = '130'
|
||||||
@@ -249,6 +254,10 @@ const handleImplementSubmit = async () => {
|
|||||||
implementFileIds.value = []
|
implementFileIds.value = []
|
||||||
await loadData()
|
await loadData()
|
||||||
postMessage('purchasingimplement:saved')
|
postMessage('purchasingimplement:saved')
|
||||||
|
// 流程嵌入场景:通知流程当前 Tab 已保存,避免审批时提示“未保存”
|
||||||
|
if (isFlowEmbed.value && props.currJob && props.currElTab?.id) {
|
||||||
|
orderVue.currElTabIsSave(props.currJob, props.currElTab.id, true, emit)
|
||||||
|
}
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
useMessage().error(err?.msg || '实施采购失败')
|
useMessage().error(err?.msg || '实施采购失败')
|
||||||
} finally {
|
} finally {
|
||||||
@@ -289,6 +298,11 @@ const handleStartFileFlow = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 流程嵌入时供 handle.vue 调用的“保存”回调:与页面按钮保存逻辑保持一致 */
|
||||||
|
async function flowSubmitForm() {
|
||||||
|
await handleImplementSubmit()
|
||||||
|
}
|
||||||
|
|
||||||
// 流程切换工单时重新加载数据(与 add 编辑页一致)
|
// 流程切换工单时重新加载数据(与 add 编辑页一致)
|
||||||
watch(
|
watch(
|
||||||
() => props.currJob?.orderId ?? props.currJob?.id,
|
() => props.currJob?.orderId ?? props.currJob?.id,
|
||||||
@@ -299,12 +313,17 @@ watch(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
loadData()
|
await loadData()
|
||||||
if (isInIframe()) {
|
if (isInIframe()) {
|
||||||
document.documentElement.classList.add('iframe-mode')
|
document.documentElement.classList.add('iframe-mode')
|
||||||
document.body.classList.add('iframe-mode')
|
document.body.classList.add('iframe-mode')
|
||||||
}
|
}
|
||||||
|
// 流程嵌入:注册 tab 保存回调,供审批页调用(与采购申请编辑页保持一致)
|
||||||
|
if (isFlowEmbed.value && props.currJob && props.currElTab?.id) {
|
||||||
|
orderVue.currElTabIsExist(props.currJob, props.currElTab.id)
|
||||||
|
await orderVue.currElTabIsView({}, props.currJob, props.currElTab.id, flowSubmitForm)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user