服务指令bug修复

This commit is contained in:
1378012178@qq.com 2025-08-06 16:01:50 +08:00
parent 171e8f14e4
commit fbfc1672e9
10 changed files with 85 additions and 55 deletions

View File

@ -37,14 +37,14 @@
<a-form-item label="收费价格(元)" v-bind="validateInfos.tollPrice" id="ConfigServiceDirectiveForm-tollPrice"
name="tollPrice">
<a-input-number v-model:value="formData.tollPrice" placeholder="请输入收费价格" style="width: 100%"
precision="4" />
precision="2" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="提成价格(元)" v-bind="validateInfos.comPrice" id="ConfigServiceDirectiveForm-comPrice"
name="comPrice">
<a-input-number v-model:value="formData.comPrice" placeholder="请输入提成价格" style="width: 100%"
precision="4" />
precision="2" />
</a-form-item>
</a-col>
<a-col :span="12">
@ -319,7 +319,7 @@ async function submitForm() {
}
//
if (model.tollPrice <= model.comPrice) {
if (model.tollPrice < model.comPrice) {
createMessage.warning('提成价格不能高于收费价格!');
confirmLoading.value = false;
retrun;

View File

@ -8,7 +8,8 @@
<a-col :span="24">
<a-form-item label="分类标签名称" v-bind="validateInfos.instructionName"
id="ConfigServiceCategoryForm-instructionName" name="instructionName">
<a-input v-model:value="formData.instructionName" placeholder="请输入分类标签名称" allow-clear></a-input>
<a-input v-model:value="formData.instructionName" placeholder="请输入分类标签名称" allow-clear :maxlength="10"
:showCount="true"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">

View File

@ -16,7 +16,7 @@
<a-col :span="24">
<a-form-item label="服务类别名称" v-bind="validateInfos.categoryName"
id="ConfigServiceCategoryForm-categoryName" name="categoryName">
<a-input v-model:value="formData.categoryName" placeholder="请输入服务类别名称"
<a-input v-model:value="formData.categoryName" placeholder="请输入服务类别名称" :maxlength="10" :showCount="true"
:disabled="!formData.instructionId" allow-clear></a-input>
</a-form-item>
</a-col>

View File

@ -70,12 +70,13 @@ export const columns: BasicColumn[] = [
title: '收费价格',
align: 'center',
dataIndex: 'tollPrice',
width: 100,
width: 95,
},
{
title: '提成价格',
align: 'center',
dataIndex: 'comPrice',
width: 95,
},
{
title: '医保报销',

View File

@ -41,7 +41,7 @@
<a-form-item name="bodyTags">
<template #label><span title="体型标签">体型标签</span></template>
<j-dict-select-tag type='list' v-model:value="queryParam.bodyTags"
:dictCode="`nu_config_body_tag,tag_name,id,del_flag = '0' order by sort asc`" :ignoreDisabled="true"
:dictCode="`nu_config_body_tag,tag_name,id,del_flag = '0' and iz_enabled = 0 order by sort asc`" :ignoreDisabled="true"
placeholder="请选择体型标签" allowClear />
</a-form-item>
</a-col>
@ -49,7 +49,7 @@
<a-form-item name="emotionTags">
<template #label><span title="情绪标签">情绪标签</span></template>
<j-dict-select-tag type="list" v-model:value="queryParam.emotionTags"
:dictCode="`nu_config_emotion_tag,tag_name,id,del_flag = '0' order by sort asc`" :ignoreDisabled="true"
:dictCode="`nu_config_emotion_tag,tag_name,id,del_flag = '0' and iz_enabled = 0 order by sort asc`" :ignoreDisabled="true"
placeholder="请选择情绪标签" allowClear />
</a-form-item>
</a-col>
@ -337,7 +337,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
pageSizeOptions: ['10', '20', '50', '100'],
},
actionColumn: {
width: 200,
width: 70,
fixed: 'right',
},
beforeFetch: async (params) => {

View File

@ -5,7 +5,7 @@
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="ConfigService2DirectiveForm">
<a-row v-show="!isEditMedia">
<!-- <a-col :span="12">
<a-col :span="12" v-show="false">
<a-form-item label="分类标签" v-bind="validateInfos.instructionTagId"
id="ConfigServiceDirectiveForm-instructionTagId" name="instructionTagId">
<j-dict-select-tag v-model:value="formData.instructionTagId" :orgCode="mainOrgCode"
@ -13,7 +13,7 @@
placeholder="请选择分类标签" allowClear @upDictCode="upInstructionDictCode" :disabled="!!formData.id" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-col :span="12" v-show="false">
<a-form-item label="服务类别" v-bind="validateInfos.categoryId" id="ConfigServiceDirectiveForm-categoryId"
name="categoryId">
<j-dict-select-tag type="list" v-model:value="formData.categoryId" :disabled="!!formData.id"
@ -21,14 +21,14 @@
@upDictCode="upCategoryDictCode" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-col :span="12" v-show="false">
<a-form-item label="服务类型" v-bind="validateInfos.typeId" id="ConfigServiceDirectiveForm-typeId"
name="typeId">
<j-dict-select-tag type="list" v-model:value="formData.typeId" :dictCode="typeDictCode"
:orgCode="mainOrgCode" :disabled="!!formData.id" placeholder="请选择服务类型" allowClear
@upDictCode="upTypeDictCode" />
</a-form-item>
</a-col> -->
</a-col>
<a-col :span="12">
<a-form-item label="服务指令名称" v-bind="validateInfos.directiveName"
id="ConfigServiceDirectiveForm-directiveName" name="directiveName">
@ -39,15 +39,15 @@
<a-col :span="12">
<a-form-item label="收费价格(元)" v-bind="validateInfos.tollPrice" id="ConfigServiceDirectiveForm-tollPrice"
name="tollPrice">
<a-input-number v-model:value="formData.tollPrice" placeholder="请输入收费价格" style="width: 100%"
precision="4" />
<a-input-number v-model:value="formData.tollPrice" placeholder="请输入收费价格" style="width: 100%" :min="0"
:max="99999.99" :precision="2" @keydown="onPriceKeydown" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="提成价格(元)" v-bind="validateInfos.comPrice" id="ConfigServiceDirectiveForm-comPrice"
name="comPrice">
<a-input-number v-model:value="formData.comPrice" placeholder="请输入提成价格" style="width: 100%"
precision="4" />
<a-input-number v-model:value="formData.comPrice" placeholder="请输入提成价格" style="width: 100%" :min="0"
:max="99999.99" :precision="2" @keydown="onPriceKeydown" />
</a-form-item>
</a-col>
<a-col :span="12">
@ -83,14 +83,16 @@
<a-col :span="24">
<a-form-item label="体型标签" id="ConfigServiceDirectiveForm-typeId" :labelCol="labelCol2"
:wrapperCol="wrapperCol2" name="typeId">
<JCheckbox v-model:value="formData.bodyTags" :orgCode="mainOrgCode" :dictCode="bodyTagDictCode"
<span v-if="disabled && !formData.bodyTags">-</span>
<JCheckbox v-else v-model:value="formData.bodyTags" :orgCode="mainOrgCode" :dictCode="bodyTagDictCode"
@upDictCode="upBodyTagsDictCode" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="情绪标签" :labelCol="labelCol2" :wrapperCol="wrapperCol2" name="emoTags">
<JCheckbox v-model:value="formData.emotionTags" :orgCode="mainOrgCode" :dictCode="emotionTagDictCode"
@upDictCode="upEmotionTagsDictCode" />
<span v-if="disabled && !formData.emotionTags">-</span>
<JCheckbox v-else v-model:value="formData.emotionTags" :orgCode="mainOrgCode"
:dictCode="emotionTagDictCode" @upDictCode="upEmotionTagsDictCode" />
</a-form-item>
</a-col>
<a-col :span="12">
@ -189,14 +191,31 @@ import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
const onPriceKeydown = (e: KeyboardEvent) => {
const key = e.key;
//
if (['Backspace', 'Delete', 'ArrowLeft', 'ArrowRight', 'Tab'].includes(key)) return;
//
if (!/[\d.]/.test(key)) {
e.preventDefault();
return;
}
const input = e.target as HTMLInputElement;
const { value, selectionStart: s, selectionEnd: t } = input;
const next = value.slice(0, s!) + key + value.slice(t!);
// 52
if (!/^\d{0,5}(?:\.\d{0,2})?$/.test(next)) {
e.preventDefault();
}
};
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({}) },
formBpm: { type: Boolean, default: true },
mainOrgCode: '',
});
const bodyTagDictCode = ref(`nu_config_body_tag,tag_name,id,del_flag = 0 order by sort asc`)
const emotionTagDictCode = ref(`nu_config_emotion_tag,tag_name,id,del_flag = 0 order by sort asc`)
const bodyTagDictCode = ref(`nu_config_body_tag,tag_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`)
const emotionTagDictCode = ref(`nu_config_emotion_tag,tag_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`)
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
@ -272,6 +291,7 @@ const validatorRules = reactive({
],
izEnabled: [{ required: true, message: '请选择是否启用!' },],
});
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
//
const disabled = computed(() => {
@ -411,19 +431,25 @@ const showMedia = ref(true)
* 编辑
* isEditMedia_是否为编辑指令资源 隐藏业务字段
*/
function edit(record, isEditMedia_ = false, showMedia_ = true) {
// if (!!record.bodyTags) {
// // 'id1','id2','id3'
// const bodyTagIds = record.bodyTags.split(',').map(id => `'${id}'`).join(',');
// bodyTagDictCode.value = `nu_config_body_tag,tag_name,id,del_flag = 0` + " and id in (" + bodyTagIds + ")" + ` order by sort asc`;
// }
// console.log("🌊 ~ edit ~ bodyTagDictCode.value:", bodyTagDictCode.value)
// if (!!record.emotionTags) {
// // 'id1','id2','id3'
// const emotionTagIds = record.emotionTags.split(',').map(id => `'${id}'`).join(',');
// emotionTagDictCode.value = `nu_config_emotion_tag,tag_name,id,del_flag = 0` + " and id in (" + emotionTagIds + ")" + ` order by sort asc`;
// }
function edit(record, isEditMedia_ = false, showMedia_ = true, showExistTags = true) {
if (!!record.bodyTags && showExistTags) {
// "id = 'id1' or id = 'id2'"
const bodyTagConditions = record.bodyTags.split(',')
.map(id => `id = '${id}'`)
.join(' or ');
bodyTagDictCode.value = `nu_config_body_tag,tag_name,id,del_flag = 0 and iz_enabled = 0 ` +
(bodyTagConditions ? ` and (${bodyTagConditions})` : '') +
` order by sort asc`;
}
if (!!record.emotionTags && showExistTags) {
// "id = 'id1' or id = 'id2'"
const emotionTagConditions = record.emotionTags.split(',')
.map(id => `id = '${id}'`)
.join(' or ');
emotionTagDictCode.value = `nu_config_emotion_tag,tag_name,id,del_flag = 0 and iz_enabled = 0 ` +
(emotionTagConditions ? ` and (${emotionTagConditions})` : '') +
` order by sort asc`;
}
needWatch.value = false
showMedia.value = showMedia_
setTimeout(() => {
@ -485,7 +511,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;
return

View File

@ -31,15 +31,15 @@
</template>
</a-drawer>
<j-modal :title="'指令库'" :fullscreen="true" width="100vw" :visible="dmVisible" @cancel="handleCancelDM"
<!-- <j-modal :title="'指令库'" :fullscreen="true" width="100vw" :visible="dmVisible" @cancel="handleCancelDM"
:maskClosable="false">
<template #footer>
<a-button @click="handleCancelDM">关闭</a-button>
<a-button @click="handlePullDM">镜像</a-button>
</template>
<DirectiveRespositoryList ref="dmRef" :mainOrgCode="mainOrgCode"></DirectiveRespositoryList>
</j-modal>
<!-- <a-drawer :title="'指令库'" width="100vw" v-model:visible="dmVisible" :closable="true"
</j-modal> -->
<a-drawer :title="'指令库'" width="80vw" v-model:visible="dmVisible" :closable="true"
:footer-style="{ textAlign: 'right' }" @close="handleCancelDM" :maskClosable="false">
<a-spin :spinning="loading">
<DirectiveRespositoryList ref="dmRef" :mainOrgCode="mainOrgCode"></DirectiveRespositoryList>
@ -48,7 +48,7 @@
<a-button @click="handleCancelDM" style="margin-right: 8px;">关闭</a-button>
<a-button @click="handlePullDM">镜像</a-button>
</template>
</a-drawer> -->
</a-drawer>
</template>
<script lang="ts" setup>
@ -100,7 +100,7 @@ function edit(record, editMedia = false, showMedia = true) {
visible.value = true;
mainOrgCode.value = record.orgCode_
nextTick(() => {
registerForm.value.edit(record, editMedia, showMedia);
registerForm.value.edit(record, editMedia, showMedia, disableSubmit.value);
});
}
@ -225,8 +225,9 @@ function handlePullDM() {
cancelText: '取消',
onOk: () => {
syncDirective(mainOrgCode.value, { syncIds: selectedData.ids, })
createMessage.success('已开始自动拉取,请耐心等待')
dmRef.value?.init()
createMessage.success('从标准指令库开始拉取')
// dmRef.value?.init()
handleCancelDM()
}
});
}

View File

@ -41,7 +41,7 @@
<a-form-item name="bodyTags">
<template #label><span title="体型标签">体型标签</span></template>
<j-dict-select-tag type='list' v-model:value="queryParam.bodyTags" :orgCode="mainOrgCode"
:dictCode="`nu_config_body_tag,tag_name,id,del_flag = '0' order by sort asc`" :ignoreDisabled="true"
:dictCode="`nu_config_body_tag,tag_name,id,del_flag = '0' and iz_enabled = 0 order by sort asc`" :ignoreDisabled="true"
placeholder="请选择体型标签" allowClear />
</a-form-item>
</a-col>
@ -49,7 +49,7 @@
<a-form-item name="emotionTags">
<template #label><span title="情绪标签">情绪标签</span></template>
<j-dict-select-tag type="list" v-model:value="queryParam.emotionTags" :orgCode="mainOrgCode"
:dictCode="`nu_config_emotion_tag,tag_name,id,del_flag = '0' order by sort asc`" :ignoreDisabled="true"
:dictCode="`nu_config_emotion_tag,tag_name,id,del_flag = '0' and iz_enabled = 0 order by sort asc`" :ignoreDisabled="true"
placeholder="请选择情绪标签" allowClear />
</a-form-item>
</a-col>
@ -150,7 +150,8 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
beforeFetch: async (params) => {
// let res = await idListByDS({ dataSourceCode: 'master' })
params.dataSourceCode = props.mainOrgCode
params.excludeIds = excludeIds.value
params.excludeIds = excludeIds.value.join(',')
params.izEnabled = '0'
let rangerQuery = await setRangeQuery();
return Object.assign(params, rangerQuery);
},

View File

@ -37,14 +37,14 @@
<a-form-item label="收费价格(元)" v-bind="validateInfos.tollPrice" id="ConfigServiceDirectiveForm-tollPrice"
name="tollPrice">
<a-input-number v-model:value="formData.tollPrice" placeholder="请输入收费价格" style="width: 100%"
precision="4" />
precision="2" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="提成价格(元)" v-bind="validateInfos.comPrice" id="ConfigServiceDirectiveForm-comPrice"
name="comPrice">
<a-input-number v-model:value="formData.comPrice" placeholder="请输入提成价格" style="width: 100%"
precision="4" />
precision="2" />
</a-form-item>
</a-col>
<a-col :span="12">
@ -94,14 +94,14 @@
<a-form-item label="体型标签" id="ConfigServiceDirectiveForm-typeId" :labelCol="labelCol2"
:wrapperCol="wrapperCol2" name="bodyTags">
<JCheckbox v-model:value="formData.bodyTags"
:dictCode="`nu_config_body_tag,tag_name,id,del_flag = 0 order by sort asc`" />
:dictCode="`nu_config_body_tag,tag_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="情绪标签" :labelCol="labelCol2"
:wrapperCol="wrapperCol2" name="emotionTags">
<JCheckbox v-model:value="formData.emotionTags"
:dictCode="`nu_config_emotion_tag,tag_name,id,del_flag = 0 order by sort asc`" />
:dictCode="`nu_config_emotion_tag,tag_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`" />
</a-form-item>
</a-col>
<a-col :span="12">
@ -326,7 +326,7 @@ async function submitForm() {
}
//
if (model.tollPrice <= model.comPrice) {
if (model.tollPrice < model.comPrice) {
createMessage.warning('提成价格不能高于收费价格!');
confirmLoading.value = false;
retrun;

View File

@ -23,8 +23,8 @@
<a-col :span="24">
<a-form-item label="服务类型" v-bind="validateInfos.typeName" id="ConfigServiceTypeForm-typeName"
name="typeName">
<a-input v-model:value="formData.typeName" placeholder="请输入服务类型" allow-clear
:disabled="!formData.categoryId"></a-input>
<a-input v-model:value="formData.typeName" placeholder="请输入服务类型" allow-clear :maxlength="10"
:showCount="true" :disabled="!formData.categoryId"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
@ -96,8 +96,8 @@ const categoryDictCode = computed(() => {
});
// instructionId categoryId
watch(() => formData.instructionId, (n,o) => {
if(!!0){
watch(() => formData.instructionId, (n, o) => {
if (!!0) {
formData.categoryId = '';
}
});