diff --git a/src/api/common/api.ts b/src/api/common/api.ts index 4274193..965f35b 100644 --- a/src/api/common/api.ts +++ b/src/api/common/api.ts @@ -18,6 +18,7 @@ enum Api { getOrgInfo = '/api/common/getOrgInfo', //根据机构编码获取机构信息 changeDirectiveMain = '/sys/sysDepart/changeDirectiveMain', //变更指令库 getDirectiveMain = '/sys/sysDepart/getDirectiveMain', //查询当前指令库机构信息 + getDMOrgInfo = '/api/common/getDMOrgInfo', //标准指令库信息 } /** @@ -167,6 +168,11 @@ export const getOrgInfo = (params) => { return defHttp.get({ url: Api.getOrgInfo, params }); }; +//标准指令库信息 +export const getDMOrgInfo = () => { + return defHttp.get({ url: Api.getDMOrgInfo }); +}; + /** * 变更指令库 * @param params diff --git a/src/views/services/directivePackage/components/ConfigServiceDirectiveForm.vue b/src/views/services/directivePackage/components/ConfigServiceDirectiveForm.vue index 169425b..1e59e17 100644 --- a/src/views/services/directivePackage/components/ConfigServiceDirectiveForm.vue +++ b/src/views/services/directivePackage/components/ConfigServiceDirectiveForm.vue @@ -9,7 +9,7 @@ @@ -37,14 +37,14 @@ + precision="2" /> + precision="2" /> @@ -251,9 +251,9 @@ watch( (newCategoryId) => { if (!newCategoryId) { formData.typeId = ''; - typeDictCode.value = 'nu_config_service_type,type_name,id,del_flag = 99 order by sort asc'; + typeDictCode.value = 'nu_config_service_type,type_name,id,1=2'; } else { - typeDictCode.value = `nu_config_service_type,type_name,id,del_flag = 0 and category_id = '${newCategoryId}' order by sort asc`; + typeDictCode.value = `nu_config_service_type,type_name,id,del_flag = 0 and iz_enabled = 0 and category_id = '${newCategoryId}' order by sort asc`; } } ); @@ -319,7 +319,7 @@ async function submitForm() { } //提成价格不能高于收费价格 - if (model.tollPrice <= model.comPrice) { + if (model.tollPrice < model.comPrice) { createMessage.warning('提成价格不能高于收费价格!'); confirmLoading.value = false; retrun; diff --git a/src/views/services/directivePackage/components/ConfigServiceDirectiveList.vue b/src/views/services/directivePackage/components/ConfigServiceDirectiveList.vue index 76ba106..351843e 100644 --- a/src/views/services/directivePackage/components/ConfigServiceDirectiveList.vue +++ b/src/views/services/directivePackage/components/ConfigServiceDirectiveList.vue @@ -25,7 +25,7 @@ diff --git a/src/views/services/serviceCategory/ConfigServiceCategoryList.vue b/src/views/services/serviceCategory/ConfigServiceCategoryList.vue index fe559ae..9ab6893 100644 --- a/src/views/services/serviceCategory/ConfigServiceCategoryList.vue +++ b/src/views/services/serviceCategory/ConfigServiceCategoryList.vue @@ -9,7 +9,7 @@ diff --git a/src/views/services/serviceCategory/components/ConfigServiceCategoryForm.vue b/src/views/services/serviceCategory/components/ConfigServiceCategoryForm.vue index cae6e81..b88cc4e 100644 --- a/src/views/services/serviceCategory/components/ConfigServiceCategoryForm.vue +++ b/src/views/services/serviceCategory/components/ConfigServiceCategoryForm.vue @@ -9,7 +9,7 @@ diff --git a/src/views/services/serviceDirective/ConfigServiceDirectiveList.vue b/src/views/services/serviceDirective/ConfigServiceDirectiveList.vue index 46724fa..be457c8 100644 --- a/src/views/services/serviceDirective/ConfigServiceDirectiveList.vue +++ b/src/views/services/serviceDirective/ConfigServiceDirectiveList.vue @@ -9,7 +9,7 @@ @@ -27,7 +27,7 @@ @@ -41,7 +41,7 @@ @@ -49,7 +49,7 @@ diff --git a/src/views/services/serviceDirective/components/ConfigServiceDirectiveForm.vue b/src/views/services/serviceDirective/components/ConfigServiceDirectiveForm.vue index 4d91efe..e53541f 100644 --- a/src/views/services/serviceDirective/components/ConfigServiceDirectiveForm.vue +++ b/src/views/services/serviceDirective/components/ConfigServiceDirectiveForm.vue @@ -30,7 +30,7 @@ @@ -59,14 +59,14 @@ + precision="2" /> + precision="2" /> @@ -103,13 +103,13 @@ + :dictCode="`nu_config_body_tag,tag_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`" /> + :dictCode="`nu_config_emotion_tag,tag_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`" /> @@ -364,7 +364,7 @@ watch( formData.typeId = '' categoryDictCode.value = 'nu_config_service_category,category_name,id,1=2'; } else { - categoryDictCode.value = `nu_config_service_category,category_name,id,del_flag = 0 and instruction_id = '${newInstructionTagId}' order by sort asc`; + categoryDictCode.value = `nu_config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0 and instruction_id = '${newInstructionTagId}' order by sort asc`; } } ); @@ -373,9 +373,9 @@ watch( (newCategoryId) => { if (!newCategoryId) { formData.typeId = '' - typeDictCode.value = 'nu_config_service_type,type_name,id,del_flag = 99 order by sort asc'; + typeDictCode.value = 'nu_config_service_type,type_name,id,1=2'; } else { - typeDictCode.value = `nu_config_service_type,type_name,id,del_flag = 0 and category_id = '${newCategoryId}' order by sort asc`; + typeDictCode.value = `nu_config_service_type,type_name,id,del_flag = 0 and iz_enabled = 0 and category_id = '${newCategoryId}' order by sort asc`; } } ); @@ -446,7 +446,7 @@ async function submitForm() { } //提成价格不能高于收费价格 - if (model.comPrice != 0 && model.tollPrice <= model.comPrice) { + if (model.comPrice != 0 && model.tollPrice < model.comPrice) { createMessage.warning('提成价格不能高于收费价格!'); confirmLoading.value = false; retrun; diff --git a/src/views/services/serviceType/ConfigServiceTypeList.vue b/src/views/services/serviceType/ConfigServiceTypeList.vue index c446421..1ee9d00 100644 --- a/src/views/services/serviceType/ConfigServiceTypeList.vue +++ b/src/views/services/serviceType/ConfigServiceTypeList.vue @@ -139,12 +139,12 @@ const wrapperCol = reactive({ }); // 计算 dictCode -const instructionDictCode = 'nu_config_service_instruction_tag,instruction_name,id,del_flag = 0 order by sort asc'; +const instructionDictCode = 'nu_config_service_instruction_tag,instruction_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc'; const categoryDictCode = computed(() => { if (!queryParam.instructionId) { - return 'nu_config_service_category,category_name,id,del_flag = 0'; + return 'nu_config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0'; } - return `nu_config_service_category,category_name,id,del_flag = 0 and instruction_id = ${queryParam.instructionId} order by sort asc`; + return `nu_config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0 and instruction_id = ${queryParam.instructionId} order by sort asc`; }); // 监听 instructionId 变化,清空二级 diff --git a/src/views/services/serviceType/components/ConfigServiceTypeForm.vue b/src/views/services/serviceType/components/ConfigServiceTypeForm.vue index 6d1ce81..292f132 100644 --- a/src/views/services/serviceType/components/ConfigServiceTypeForm.vue +++ b/src/views/services/serviceType/components/ConfigServiceTypeForm.vue @@ -9,7 +9,7 @@ @@ -92,7 +92,7 @@ const categoryDictCode = computed(() => { if (!formData.instructionId) { return 'nu_config_service_category,category_name,id,1=2'; } - return `nu_config_service_category,category_name,id,del_flag = 0 and instruction_id = ${formData.instructionId} order by sort asc`; + return `nu_config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0 and instruction_id = ${formData.instructionId} order by sort asc`; }); // 监听 instructionId 变化,清空 categoryId diff --git a/src/views/synchronization/directive/canadddirective/CanAddDirective.data.ts b/src/views/synchronization/directive/canadddirective/CanAddDirective.data.ts index 319d5f1..99ba420 100644 --- a/src/views/synchronization/directive/canadddirective/CanAddDirective.data.ts +++ b/src/views/synchronization/directive/canadddirective/CanAddDirective.data.ts @@ -14,16 +14,19 @@ export const columns: BasicColumn[] = [ title: '分类标签', align: 'center', dataIndex: 'instructionTag', + width: 170, }, { title: '服务类别', align: 'center', dataIndex: 'category', + width: 170, }, { title: '服务类型', align: 'center', dataIndex: 'type', + width: 170, }, { title: '服务指令', @@ -34,11 +37,13 @@ export const columns: BasicColumn[] = [ title: '周期类型', align: 'center', dataIndex: 'cycleType', + width: 120, }, { title: '创建日期', align: 'center', dataIndex: 'createTime', + width: 160, }, ]; diff --git a/src/views/synchronization/directive/canadddirective/CanAddDirectiveList.vue b/src/views/synchronization/directive/canadddirective/CanAddDirectiveList.vue index 9c8bd17..a07ee12 100644 --- a/src/views/synchronization/directive/canadddirective/CanAddDirectiveList.vue +++ b/src/views/synchronization/directive/canadddirective/CanAddDirectiveList.vue @@ -42,7 +42,7 @@ diff --git a/src/views/synchronization/directive/serviceDirective/ConfigServiceDirectiveList.vue b/src/views/synchronization/directive/serviceDirective/ConfigServiceDirectiveList.vue index 378daa7..83592fd 100644 --- a/src/views/synchronization/directive/serviceDirective/ConfigServiceDirectiveList.vue +++ b/src/views/synchronization/directive/serviceDirective/ConfigServiceDirectiveList.vue @@ -5,40 +5,48 @@ - + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/synchronization/directive/serviceDirective/DirectiveChooseCom.vue b/src/views/synchronization/directive/serviceDirective/DirectiveChooseCom.vue index 7a550d3..c7aeeb0 100644 --- a/src/views/synchronization/directive/serviceDirective/DirectiveChooseCom.vue +++ b/src/views/synchronization/directive/serviceDirective/DirectiveChooseCom.vue @@ -8,19 +8,20 @@ - + - @@ -28,9 +29,9 @@ - @@ -44,7 +45,7 @@ @@ -52,7 +53,7 @@ --> @@ -422,12 +423,12 @@ function cleanTargetSourceData() { function syncFunc() { if (props.targetChooseType == 'one') { if (!targetOrg.value || !targetOrg.value.orgCode) { - createMessage.warning('请选择业务平台') + createMessage.warning('请选择目标平台') return } } else { if (!props.targetOrgs.length) { - createMessage.warning('请选择业务平台') + createMessage.warning('请选择目标平台') return } } @@ -452,18 +453,18 @@ function handleOk() { .map(item => item.id) .join(','), syncOrgCodes: targetOrg.value.orgCode, - syncOption:syncOption.value, + syncOption: syncOption.value, } } else { params = { syncIds: rightNeedAddList.value.map(item => item.id).join(','), upIds: '', syncOrgCodes: props.targetOrgs.map(item => item.orgCode).join(','), - syncOption:syncOption.value, + syncOption: syncOption.value, } } - - syncDirective(sourceOrgInfo.value.orgCode,params) + + syncDirective(sourceOrgInfo.value.orgCode, params) createMessage.success('已开始自动同步!') visible.value = false } diff --git a/src/views/synchronization/directive/serviceDirective/DirectiveChooseCom分步骤版本.vue b/src/views/synchronization/directive/serviceDirective/DirectiveChooseCom分步骤版本.vue index 4289ce6..595c521 100644 --- a/src/views/synchronization/directive/serviceDirective/DirectiveChooseCom分步骤版本.vue +++ b/src/views/synchronization/directive/serviceDirective/DirectiveChooseCom分步骤版本.vue @@ -10,7 +10,7 @@ @@ -20,7 +20,7 @@ @@ -30,7 +30,7 @@ @@ -44,7 +44,7 @@ @@ -52,7 +52,7 @@ --> diff --git a/src/views/synchronization/directive/syncList.vue b/src/views/synchronization/directive/syncList.vue index 037cbd1..d92b12f 100644 --- a/src/views/synchronization/directive/syncList.vue +++ b/src/views/synchronization/directive/syncList.vue @@ -22,7 +22,7 @@ 日志 指令库 + style="margin-right: 10px;">标准指令库 新增指令 @@ -32,13 +32,14 @@ - + - @@ -67,9 +68,9 @@ 关闭 - - + @@ -111,6 +112,7 @@ import { useMessage } from '/@/hooks/web/useMessage'; import AsyncListComponent from '@/components/dataAsync/AsyncMainList0731.vue' import { getDirectiveMain, changeDirectiveMain } from '/@/api/common/api' import { idListByDS } from '/@/views/synchronization/directive/serviceDirective/ConfigServiceDirective.api'; +import { nextTick } from 'process'; const { createMessage } = useMessage() const canAddDirectiveRef = ref() @@ -191,6 +193,7 @@ function handleViewLogs() { function handleLookNewDirectives() { newDirectiveVisible.value = true + refreshDMExistedIds(directiveMainOrgInfo.value, true) } //关闭日志模态框 @@ -232,11 +235,20 @@ function handleCanceldirectiveMain() { directiveMainVisible.value = false } -watch(directiveMainOrgInfo, (newValue, oldValue) => { - idListByDS({ dataSourceCode: newValue.orgCode }).then(res => { +//刷新已有指令库 +function refreshDMExistedIds(dmOrgInfo, izReset = false, izQuery = true) { + idListByDS({ dataSourceCode: dmOrgInfo.orgCode }).then(res => { existDirectiveIds.value = res.records - canAddDirectiveRef.value?.reload() + if (izReset) { + canAddDirectiveRef.value?.searchReset() + } else { + canAddDirectiveRef.value?.reload() + } }) +} + +watch(directiveMainOrgInfo, (newValue, oldValue) => { + refreshDMExistedIds(newValue) }, { deep: true }) const tempDM = ref() @@ -251,23 +263,24 @@ function directiveMainFunc(orgInfo_) { * 确认指令库 */ function handleAsyncdirectiveMain() { - createConfirm({ - iconType: 'warning', - title: '指令库变更提醒', - content: '是否变更指令库为:' + tempDM.value.departName, - okText: '确认', - cancelText: '取消', - onOk: () => { - directiveMainOrgInfo.value = tempDM.value - changeDirectiveMain(directiveMainOrgInfo.value.orgCode).then(() => { - createMessage.success('指令库已变更') - handleCanceldirectiveMain() - canAddDirectiveRef.value?.reload() - }).catch(() => { - createMessage.error('指令库变更失败,请稍后再试') - }) - } - }); + // createConfirm({ + // iconType: 'warning', + // title: '指令库变更提醒', + // content: '是否变更指令库为:' + tempDM.value.departName, + // okText: '确认', + // cancelText: '取消', + // onOk: () => { + directiveMainOrgInfo.value = tempDM.value + changeDirectiveMain(directiveMainOrgInfo.value.orgCode).then(() => { + createMessage.success('标准指令库已变更') + handleCanceldirectiveMain() + canAddDirectiveRef.value?.reload() + orgListComRef.value?.reload() + }).catch(() => { + createMessage.error('指令库变更失败,请稍后再试') + }) + // } + // }); } //获取指令库机构信息 @@ -283,6 +296,7 @@ function getDirectiveMainOrgInfo() { onMounted(() => { reload(); getDirectiveMainOrgInfo() + orgListComRef.value?.reload(); }); diff --git a/src/views/synchronization/directive/syncStep/SyncStepList.vue b/src/views/synchronization/directive/syncStep/SyncStepList.vue index bb8e4db..6aaa3de 100644 --- a/src/views/synchronization/directive/syncStep/SyncStepList.vue +++ b/src/views/synchronization/directive/syncStep/SyncStepList.vue @@ -82,7 +82,7 @@