修改
This commit is contained in:
parent
20ad78b4e8
commit
e1c8a1105e
@ -14,7 +14,7 @@ export function getCouponDetail(id){
|
|||||||
}
|
}
|
||||||
export function addCoupon(data){//系统-新增系统优惠卷
|
export function addCoupon(data){//系统-新增系统优惠卷
|
||||||
return request({
|
return request({
|
||||||
url:'/admin/coupon/system/'+id,
|
url:'/admin/coupon/system/',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
|
|||||||
@ -9,7 +9,11 @@
|
|||||||
<a-textarea v-model.trim="form.cancel_remarks" allow-clear placeholder="请输入取消订单理由"></a-textarea>
|
<a-textarea v-model.trim="form.cancel_remarks" allow-clear placeholder="请输入取消订单理由"></a-textarea>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item field="refund_amount" label="退款金额(元)" >
|
<a-form-item field="refund_amount" label="退款金额(元)" >
|
||||||
<a-input-number v-model="form.refund_amount" placeholder="请输入退款金额" size="large" class="input-demo" :min="0"/>
|
<a-input-number v-model="form.refund_amount" placeholder="请输入退款金额" size="large" class="input-demo" :min="0" :max="payment_amount_total"/>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item field="" label="" v-if="type=='service'">
|
||||||
|
温馨提示:退款金额不可大于实际付款金额,请谨慎填写;\n
|
||||||
|
退款理由请认真填写,会显示给患者(本单实付金额金额:{{payment_amount_total}}元)。
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@ -33,6 +37,10 @@ const props = defineProps({
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
type:{
|
||||||
|
type: String,
|
||||||
|
default:'',
|
||||||
|
},
|
||||||
id:{
|
id:{
|
||||||
type: String,
|
type: String,
|
||||||
default:'',
|
default:'',
|
||||||
@ -53,7 +61,7 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
const emits = defineEmits(['closeChange']);
|
const emits = defineEmits(['closeChange']);
|
||||||
const {okVisible,title,id,api,payment_amount_total} = toRefs(props);
|
const {okVisible,title,id,api,payment_amount_total,type} = toRefs(props);
|
||||||
|
|
||||||
// Akiraka 20230210 关闭弹窗
|
// Akiraka 20230210 关闭弹窗
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
@ -61,7 +69,10 @@ const handleClose = () => {
|
|||||||
// alert(flag)
|
// alert(flag)
|
||||||
}
|
}
|
||||||
watch(()=>props.payment_amount_total,(newVal,oldVal)=>{
|
watch(()=>props.payment_amount_total,(newVal,oldVal)=>{
|
||||||
form.refund_amount=Number(newVal);
|
if(!props.type){
|
||||||
|
form.refund_amount=Number(newVal);
|
||||||
|
}
|
||||||
|
//
|
||||||
},{immediate:true})
|
},{immediate:true})
|
||||||
// Akiraka 20230210 删除数据校验
|
// Akiraka 20230210 删除数据校验
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item field="application_scope" label="使用范围:">
|
<a-form-item field="application_scope" label="使用范围:">
|
||||||
<a-select
|
<a-select
|
||||||
@change="changeScope"
|
@change="changeScope"
|
||||||
placeholder="请选择使用范围"
|
placeholder="请选择使用范围"
|
||||||
v-model="modalForm.application_scope"
|
v-model="modalForm.application_scope"
|
||||||
>
|
>
|
||||||
@ -75,16 +75,25 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item field="inquiry_type" label="有效时间:">
|
<a-form-item field="distribution_object" label="发放对象:">
|
||||||
<a-range-picker
|
<a-select
|
||||||
style="width: 360px; margin: 0 24px 24px 0"
|
placeholder="请选择发放对象"
|
||||||
show-time
|
v-model="modalForm.distribution_object"
|
||||||
:time-picker-props="{ defaultValue: ['00:00:00', '09:09:06'] }"
|
@change="changeObject"
|
||||||
format="YYYY-MM-DD HH:mm"
|
>
|
||||||
@change="onChange"
|
<!-- 1:全部用户 2:新注册用户 3:会员 4:近期消费 5:近期购药 6:存量用户 7:健康包服务用户 -->
|
||||||
@select="onSelect"
|
<a-option :key="1" :value="1" label="全部用户">全部用户</a-option>
|
||||||
@ok="onOk"
|
<a-option :key="2" :value="2" label="新注册用户"
|
||||||
/>
|
>新注册用户</a-option
|
||||||
|
>
|
||||||
|
<a-option :key="3" :value="3" label="会员">会员</a-option>
|
||||||
|
<a-option :key="4" :value="4" label="近期消费">近期消费</a-option>
|
||||||
|
<a-option :key="5" :value="5" label="近期购药">近期购药</a-option>
|
||||||
|
<a-option :key="6" :value="6" label="存量用户">存量用户</a-option>
|
||||||
|
<a-option :key="7" :value="7" label="健康包服务用户"
|
||||||
|
>健康包服务用户</a-option
|
||||||
|
>
|
||||||
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
@ -101,60 +110,182 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24" v-if="showConnectType">
|
||||||
<a-col a-col :span="24">
|
<a-col a-col :span="24">
|
||||||
<a-form-item field="valid_days" label="有效天数:">
|
<a-form-item field="inquiry_type" label="问诊类型:">
|
||||||
<a-input-number v-model="modalForm.valid_days" :style="{width:'320px'}" placeholder="请输入有效天数" class="input-demo" :min="1" />
|
<a-select
|
||||||
</a-form-item>
|
:style="{ width: '320px' }"
|
||||||
|
placeholder="请选择问诊类型"
|
||||||
|
v-model="modalForm.inquiry_type"
|
||||||
|
|
||||||
|
>
|
||||||
|
<!-- 1:'专家问诊', 2:'快速问诊', 3:'公益问诊', 4:'问诊购药',5:'糖组检测') -->
|
||||||
|
<a-option key="1" value="1" label="专家问诊">专家问诊</a-option>
|
||||||
|
<a-option key="2" value="2" label="快速问诊">快速问诊</a-option>
|
||||||
|
<a-option key="3" value="3" label="公益问诊">公益问诊</a-option>
|
||||||
|
<a-option key="4" value="4" label="问诊购药">问诊购药</a-option>
|
||||||
|
<a-option key="5" value="5" label="糖组检测">糖组检测</a-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24" v-if="showTimeRange">
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item field="inquiry_type" label="有效时间:">
|
||||||
|
<a-range-picker
|
||||||
|
style="width: 360px; margin: 0 24px 24px 0"
|
||||||
|
show-time
|
||||||
|
:defaultValue="defaultValue"
|
||||||
|
:disabled-date="disabledDate"
|
||||||
|
format="YYYY-MM-DD HH:mm"
|
||||||
|
@ok="onOk"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24" v-if="showValidDay">
|
||||||
|
<a-col a-col :span="24">
|
||||||
|
<a-form-item field="valid_days" label="领取之日起有效天数:">
|
||||||
|
<a-input-number
|
||||||
|
v-model="modalForm.valid_days"
|
||||||
|
:style="{ width: '320px' }"
|
||||||
|
placeholder="请输入有效天数"
|
||||||
|
class="input-demo"
|
||||||
|
:min="1"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<!-- <a-row :gutter="24">
|
||||||
<a-col a-col :span="24">
|
<a-col a-col :span="24">
|
||||||
<a-form-item field="inquiry_type" label="发放个数:">
|
<a-form-item field="inquiry_type" label="发放个数:">
|
||||||
<a-input-number v-model="value" :style="{width:'320px'}" placeholder="请输入发放个数" class="input-demo" :min="1" />
|
<a-input-number
|
||||||
</a-form-item>
|
v-model="value"
|
||||||
|
:style="{ width: '320px' }"
|
||||||
|
placeholder="请输入发放个数"
|
||||||
|
class="input-demo"
|
||||||
|
:min="1"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row> -->
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24" v-if="showManjian">
|
||||||
<a-col a-col :span="24">
|
<a-col a-col :span="24">
|
||||||
<a-form-item field="with_amount" label="满减金额(元):">
|
<a-form-item field="with_amount" label="满减金额(元):">
|
||||||
<a-input-number v-model="modalForm.with_amount" :style="{width:'320px'}" placeholder="请输入满减金额" class="input-demo" :min="0" />
|
<a-input-number
|
||||||
</a-form-item>
|
v-model="modalForm.with_amount"
|
||||||
|
:style="{ width: '320px' }"
|
||||||
|
placeholder="请输入满减金额"
|
||||||
|
class="input-demo"
|
||||||
|
:min="0"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col a-col :span="24">
|
<a-col a-col :span="24">
|
||||||
<a-form-item field="min_usable_number" label="单商品最小可使用数量:">
|
<a-form-item field="min_usable_number" label="单商品最小可使用数量:">
|
||||||
<a-input-number v-model="modalForm.min_usable_number" :style="{width:'320px'}" placeholder="请输入单商品最小可使用数量" class="input-demo" :min="1" />
|
<a-input-number
|
||||||
</a-form-item>
|
v-model="modalForm.min_usable_number"
|
||||||
|
:style="{ width: '320px' }"
|
||||||
|
placeholder="请输入单商品最小可使用数量"
|
||||||
|
class="input-demo"
|
||||||
|
:min="1"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col a-col :span="24">
|
<a-col a-col :span="24">
|
||||||
<a-form-item field="distribution_with_day" label="发放关联天数:">
|
<a-form-item field="distribution_with_day" label="发放关联天数:">
|
||||||
<a-input-number v-model="modalForm.distribution_with_day" :style="{width:'320px'}" placeholder="请输入发放关联天数" class="input-demo" :min="1" />
|
<a-input-number
|
||||||
</a-form-item>
|
v-model="modalForm.distribution_with_day"
|
||||||
|
:style="{ width: '320px' }"
|
||||||
|
placeholder="请输入发放关联天数"
|
||||||
|
class="input-demo"
|
||||||
|
:min="1"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<!-- <a-row :gutter="24">
|
||||||
<a-col a-col :span="24">
|
<a-col a-col :span="24">
|
||||||
<a-form-item field="brand_id" label="关联品牌:">
|
<a-form-item field="brand_id" label="关联品牌:">
|
||||||
<a-input-number v-model="modalForm.brand_id" :style="{width:'320px'}" placeholder="请选择关联品牌" class="input-demo" :min="1" />
|
<a-input-number v-model="modalForm.brand_id" :style="{width:'320px'}" placeholder="请选择关联品牌" class="input-demo" :min="1" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
</a-row> -->
|
||||||
|
<a-row :gutter="24" v-if="showProduct">
|
||||||
|
<a-col a-col :span="24">
|
||||||
|
<a-form-item field="product_id" label="关联商品:">
|
||||||
|
<a-input-number
|
||||||
|
v-model="modalForm.product_id"
|
||||||
|
:style="{ width: '320px' }"
|
||||||
|
placeholder="请选择关联商品"
|
||||||
|
class="input-demo"
|
||||||
|
:min="1"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col a-col :span="24">
|
<a-col a-col :span="24">
|
||||||
<a-form-item field="product_id" label="关联商品:">
|
<a-form-item field="is_display" label="是否展示:">
|
||||||
<a-input-number v-model="modalForm.product_id" :style="{width:'320px'}" placeholder="请选择关联商品" class="input-demo" :min="1" />
|
<a-switch v-model="modalForm.is_display" :checked-value="1" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col a-col :span="24">
|
||||||
|
<a-form-item field="is_mutex" label="是否互斥:">
|
||||||
|
<a-switch v-model="modalForm.is_mutex" :checked-value="1" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col a-col :span="24">
|
||||||
|
<a-form-item
|
||||||
|
field="is_reissuable_after_expire"
|
||||||
|
label="是否允许过期之后再次发放:"
|
||||||
|
>
|
||||||
|
<a-switch
|
||||||
|
v-model="modalForm.is_reissuable_after_expire"
|
||||||
|
:checked-value="1"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col a-col :span="24">
|
<a-col a-col :span="24">
|
||||||
<a-form-item field="inquiry_type" label="是否发放:">
|
<a-form-item field="inquiry_type" label="是否发放:">
|
||||||
<a-switch v-model="modalForm.coupon_status" :checked-value="1" :disabled="modalForm.coupon_status==1"/>
|
<a-switch
|
||||||
</a-form-item>
|
v-model="modalForm.coupon_status"
|
||||||
|
:checked-value="1"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col a-col :span="24">
|
||||||
|
<a-form-item field="is_popup" label="是否弹窗:">
|
||||||
|
<a-switch
|
||||||
|
v-model="modalForm.is_popup"
|
||||||
|
:checked-value="1"
|
||||||
|
:unchecked-value="0"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col a-col :span="12">
|
||||||
|
<a-form-item field="coupon_desc" label="优惠卷描述:">
|
||||||
|
<a-textarea
|
||||||
|
v-model="modalForm.coupon_desc"
|
||||||
|
placeholder="请输入优惠卷描述"
|
||||||
|
allow-clear
|
||||||
|
:style="{ minHeight: '100px' }"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
@ -166,75 +297,33 @@
|
|||||||
<a-row :gutter="24" style="margin-top: 35px">
|
<a-row :gutter="24" style="margin-top: 35px">
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item field="" label="" no-style>
|
<a-form-item field="" label="" no-style>
|
||||||
<a-space
|
<a-space style="margin-right: 8px" v-if="!modalForm.coupon_id">
|
||||||
style="margin-right: 8px"
|
|
||||||
>
|
|
||||||
<a-button
|
<a-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-has="'admin:sysProductList:report'"
|
v-has="'admin:sysProductList:report'"
|
||||||
@click="
|
@click="handleAddCoupon"
|
||||||
() => {
|
|
||||||
isVisible = true;
|
|
||||||
modalForm.coupon_id='';
|
|
||||||
}
|
|
||||||
"
|
|
||||||
>添加</a-button
|
>添加</a-button
|
||||||
>
|
>
|
||||||
</a-space>
|
</a-space>
|
||||||
<!-- 订单状态=2退款状态=4,5支付状态=2上报状态!=1 -->
|
|
||||||
<a-space
|
<a-space style="margin-right: 8px" v-else>
|
||||||
style="margin-right: 8px"
|
|
||||||
|
|
||||||
>
|
|
||||||
<a-button
|
<a-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-has="'admin:sysProductList:cancel'"
|
v-has="'admin:sysProductList:cancel'"
|
||||||
status="danger"
|
status="danger"
|
||||||
@click="
|
@click="handleUpdateCoupon"
|
||||||
() => {
|
>修改</a-button
|
||||||
okVisible = true;
|
|
||||||
modalForm.coupon_id='';
|
|
||||||
}
|
|
||||||
"
|
|
||||||
>保存</a-button
|
|
||||||
>
|
>
|
||||||
</a-space>
|
</a-space>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
<!-- 医生详情弹框 -->
|
|
||||||
<doctorModal
|
|
||||||
:doctorVisible="doctorVisible"
|
|
||||||
:doctor_id="doctor_id"
|
|
||||||
@doctorVisibleChange="
|
|
||||||
() => {
|
|
||||||
doctorVisible = false;
|
|
||||||
doctor_id = '';
|
|
||||||
}
|
|
||||||
"
|
|
||||||
></doctorModal>
|
|
||||||
<!-- 患者详情弹窗 -->
|
|
||||||
<patientModal
|
|
||||||
:patientVisible="patientVisible"
|
|
||||||
:data="patientData"
|
|
||||||
@patientVisibleChange="
|
|
||||||
() => {
|
|
||||||
patientVisible = false;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
></patientModal>
|
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, toRefs, reactive, watch, nextTick } from 'vue';
|
import { ref, toRefs, reactive, watch} from 'vue';
|
||||||
import { formatDoctorTitle } from '@/utils/format';
|
import { addCoupon,updateCoupon } from '@/api/coupon/list';
|
||||||
import { parseTime } from '@/utils/parseTime';
|
import { Message } from '@arco-design/web-vue';
|
||||||
import { inquiryCase } from '@/api/order/list';
|
|
||||||
import {
|
|
||||||
formatInquiryType,
|
|
||||||
formatInquiryStatus,
|
|
||||||
formatMode,
|
|
||||||
} from '@/utils/format';
|
|
||||||
const emits = defineEmits(['closeChange']);
|
const emits = defineEmits(['closeChange']);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
// 是否显示
|
// 是否显示
|
||||||
@ -245,51 +334,106 @@ const props = defineProps({
|
|||||||
modalForm: {
|
modalForm: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: {
|
default: {
|
||||||
order_inquiry_case: {
|
|
||||||
inquiry_case_id: '',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const doctorVisible = ref(false);
|
const valid_start_time = ref('');
|
||||||
const doctor_id = ref('');
|
const valid_end_time = ref('');
|
||||||
const patientVisible = ref(false);
|
|
||||||
|
|
||||||
const patientData = reactive({});
|
|
||||||
const { modalVisible, modalForm } = toRefs(props);
|
const { modalVisible, modalForm } = toRefs(props);
|
||||||
|
const showManjian = ref(false);
|
||||||
|
const showMinNumber = ref(false);
|
||||||
|
const showConnectType = ref(false);
|
||||||
|
const showProduct = ref(false);
|
||||||
|
const showTimeRange =ref(false);
|
||||||
|
const showValidDay = ref(false);
|
||||||
|
const defaultValue = ref([]);
|
||||||
|
const changeType = (val) => {
|
||||||
|
showManjian.value = false;
|
||||||
|
showMinNumber.value = false;
|
||||||
|
if (val == 2) {
|
||||||
|
showManjian.value = true;
|
||||||
|
} else if (val == 3) {
|
||||||
|
showMinNumber.value = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const changeValidType = (val) => {
|
||||||
|
showTimeRange.value=false;
|
||||||
|
showValidDay.value=false;
|
||||||
|
if (val == 1) {
|
||||||
|
showTimeRange.value=true;
|
||||||
|
}else{
|
||||||
|
showValidDay.value=true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const changeScope = (val) => {
|
||||||
|
showConnectType.value = false;
|
||||||
|
showProduct.value = false;
|
||||||
|
showManjian.value = false;
|
||||||
|
showMinNumber.value = false;
|
||||||
|
if (val == 1) {
|
||||||
|
modalForm.coupon_type == 2 && (showManjian.value = true);
|
||||||
|
modalForm.coupon_type == 3 && (showMinNumber.value = true);
|
||||||
|
} else if (val == 2) {
|
||||||
|
showConnectType.value = true;
|
||||||
|
} else if (val == 5) {
|
||||||
|
showProduct.value = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const changeObject = (val) => {
|
||||||
|
showMinNumber.value = false;
|
||||||
|
if(val==4){
|
||||||
|
showMinNumber.value = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
const order_inquiry_id = ref('');
|
|
||||||
watch(
|
watch(
|
||||||
() => props.modalForm,
|
() => props.modalForm,
|
||||||
() => {
|
() => {
|
||||||
if (
|
console.log(props.modalForm);
|
||||||
props.modalForm.order_inquiry_case &&
|
if(props.modalForm.coupon_id){
|
||||||
props.modalForm.order_inquiry_case.inquiry_case_id
|
changeType(props.modalForm.coupon_type);
|
||||||
) {
|
changeScope(props.modalForm.application_scope);
|
||||||
let id = props.modalForm.order_inquiry_case.inquiry_case_id;
|
changeObject(props.modalForm.distribution_object);
|
||||||
inquiryCase(id).then((data) => {
|
changeValidType(props.modalForm.valid_type)
|
||||||
Object.assign(patientData, data.data);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ immediate: true, deep: true }
|
{ immediate: true, deep: true }
|
||||||
);
|
);
|
||||||
const changeType=(val)=>{
|
const onOk = (dateString, date) => {
|
||||||
alert(val)
|
[valid_start_time.value, valid_end_time.value] = dateString;
|
||||||
}
|
};
|
||||||
const changeValidType=(val)=>{
|
|
||||||
alert(val)
|
|
||||||
}
|
|
||||||
const changeScope=(val)=>{
|
|
||||||
alert(val)
|
|
||||||
}
|
|
||||||
const changeObject=(val)=>{
|
|
||||||
alert(val)
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
emits('closeChange', (modalVisible.value = false));
|
emits('closeChange', (modalVisible.value = false));
|
||||||
};
|
};
|
||||||
|
const disabledDate = (time) => {
|
||||||
|
return time.getTime() < Date.now() - 8.64e7;
|
||||||
|
};
|
||||||
|
const handleAddCoupon=async()=>{
|
||||||
|
const {code}=await addCoupon({
|
||||||
|
|
||||||
|
})
|
||||||
|
if(code==200){
|
||||||
|
Message.success("添加成功");
|
||||||
|
handleClose();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const handleUpdateCoupon=async()=>{
|
||||||
|
const {code}=await updateCoupon({
|
||||||
|
|
||||||
|
})
|
||||||
|
if(code==200){
|
||||||
|
Message.success("修改成功");
|
||||||
|
handleClose()
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const rules = {
|
||||||
|
coupon_name: [{ required: true, message: '请输入优惠卷名称' }],
|
||||||
|
department_custom_id: [{ required: true, message: '请选择所在科室' }],
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.infobox {
|
.infobox {
|
||||||
|
|||||||
@ -464,6 +464,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
v-has="'admin:sysProductList:cancel'"
|
v-has="'admin:sysProductList:cancel'"
|
||||||
status="danger"
|
status="danger"
|
||||||
|
v-show="showCancelOrderBtn"
|
||||||
@click="
|
@click="
|
||||||
() => {
|
() => {
|
||||||
okVisible = true;
|
okVisible = true;
|
||||||
@ -503,7 +504,7 @@
|
|||||||
:api="cancelProduct"
|
:api="cancelProduct"
|
||||||
:dealType="'order_inquiry_id'"
|
:dealType="'order_inquiry_id'"
|
||||||
:payment_amount_total="modalForm.payment_amount_total
|
:payment_amount_total="modalForm.payment_amount_total
|
||||||
"
|
" :type="'service'"
|
||||||
:id="cur_product_id"
|
:id="cur_product_id"
|
||||||
@closeChange="closeChange"
|
@closeChange="closeChange"
|
||||||
></confirmModal>
|
></confirmModal>
|
||||||
@ -541,7 +542,10 @@ const props = defineProps({
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
showCancelOrderBtn:{
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
modalForm: {
|
modalForm: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: {
|
default: {
|
||||||
@ -553,7 +557,7 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const { medinceVisible, modalForm } = toRefs(props);
|
const { medinceVisible, modalForm,showCancelOrderBtn } = toRefs(props);
|
||||||
const IMG_URL = import.meta.env.VITE_IMG_URL;
|
const IMG_URL = import.meta.env.VITE_IMG_URL;
|
||||||
const emits = defineEmits(['medinceVisibleChange']);
|
const emits = defineEmits(['medinceVisibleChange']);
|
||||||
|
|
||||||
|
|||||||
@ -728,9 +728,7 @@
|
|||||||
|
|
||||||
<a-space
|
<a-space
|
||||||
style="margin-right: 8px"
|
style="margin-right: 8px"
|
||||||
v-if="
|
v-if="modalForm.order_service_status == 3 || modalForm.order_service_status == 4
|
||||||
modalForm.order_service_status == 2 ||
|
|
||||||
modalForm.order_service_status == 3 || modalForm.order_service_status == 4
|
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<a-button
|
<a-button
|
||||||
@ -1058,7 +1056,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- 药品订单详情Modal -->
|
<!-- 药品订单详情Modal -->
|
||||||
<medinceOrderModal :medinceVisible="medinceVisible" :modalForm="modalMedinceForm" @medinceVisibleChange="()=>{medinceVisible=false; modalMedinceForm.refund_status=5}"></medinceOrderModal>
|
<medinceOrderModal :showCancelOrderBtn="false" :medinceVisible="medinceVisible" :modalForm="modalMedinceForm" @medinceVisibleChange="()=>{medinceVisible=false; modalMedinceForm.refund_status=5}"></medinceOrderModal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user