更新订单管理
This commit is contained in:
@@ -111,7 +111,7 @@
|
||||
|
||||
<!-- Modal -->
|
||||
<a-modal v-model:visible="modalVisible" fullscreen :title="modalTitle" title-align="start" :footer="false"
|
||||
@before-ok="handleSubmit" @close="() => {$refs.modalFormRef.resetFields(); modalForm.doctor_id = null;}">
|
||||
@close="() => {$refs.modalFormRef.resetFields(); modalForm.doctor_id = null;}">
|
||||
<div class="titlebox">
|
||||
<div class="bar"></div>
|
||||
<div class="name">订单信息</div>
|
||||
@@ -145,19 +145,20 @@
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="amount_total" label="订单金额:">
|
||||
<span>{{modalForm.amount_total}}</span>
|
||||
<span>{{modalForm.amount_total}}元</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="coupon_amount_total" label="优惠卷:">
|
||||
<span>{{modalForm.coupon_amount_total}}</span>
|
||||
<span v-if="modalForm.coupon_amount_total>0">{{modalForm.coupon_amount_total}}元</span>
|
||||
<span v-else>暂无</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="payment_amount_total" label="实付金额:">
|
||||
<span>{{modalForm.payment_amount_total}}</span>
|
||||
<span>{{modalForm.payment_amount_total}}元</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
@@ -194,7 +195,7 @@
|
||||
<a-row :gutter="24" v-if="modalForm.order_inquiry_refund">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="inquiry_refund_no" label="退款金额:">
|
||||
<span>{{modalForm.order_inquiry_refund.refund_total}}</span>
|
||||
<span>{{modalForm.order_inquiry_refund.refund_total}}元</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
@@ -266,9 +267,9 @@
|
||||
<div class="nameDesc">确诊疾病:</div>
|
||||
<div class="desc">{{modalForm.order_inquiry_case.disease_class_name}} {{modalForm.user_doctor.department_custom_name}}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row" v-if="modalForm.order_inquiry_case.disease_desc">
|
||||
<div class="nameDesc">病情描述:</div>
|
||||
<div class="desc">{{modalForm.order_inquiry_case.disease_desc}} {{modalForm.user_doctor.department_custom_name}}</div>
|
||||
<div class="desc">{{modalForm.order_inquiry_case.disease_desc}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -314,7 +315,7 @@
|
||||
<a-col :span="24">
|
||||
<a-form-item field="" label="" no-style>
|
||||
<a-space style="margin-right: 8px;">
|
||||
<a-button type="primary" @click="()=>(alert('开发中'))">问诊记录</a-button>
|
||||
<a-button type="primary" @click="openInquiryRecord">问诊记录</a-button>
|
||||
</a-space>
|
||||
<a-space style="margin-right: 8px;" v-if="modalForm.inquiry_status==4 || modalForm.inquiry_status==5">
|
||||
<a-button type="primary" status="danger" v-has="'admin:sysOrderList:cancel'" @click="()=>{okVisible=true;cur_inruiry_id=modalForm.order_inquiry_id;}">取消问诊</a-button>
|
||||
@@ -326,6 +327,10 @@
|
||||
|
||||
<!-- 医生详情弹框 -->
|
||||
<doctorModal :doctorVisible="doctorVisible" :doctor_id="doctor_id" @doctorVisibleChange="() => {doctorVisible = false;doctor_id='';}"></doctorModal>
|
||||
|
||||
<!-- 患者详情弹窗 -->
|
||||
<patientModal :patientVisible="patientVisible" :data="patientData" @patientVisibleChange="() => {patientVisible = false;}"></patientModal>
|
||||
|
||||
<confirmModal :okVisible="okVisible" :api="cancelInquiry" :title="'确定取消此订单吗?'" :dealType="'order_inquiry_id'" :id="cur_inruiry_id" @closeChange="handelCloseChange"></confirmModal>
|
||||
</div>
|
||||
|
||||
@@ -347,6 +352,9 @@ const doctorVisible=ref(false);
|
||||
const okVisible=ref(false);
|
||||
const cur_inruiry_id=ref('');
|
||||
const doctor_id=ref('');
|
||||
const patientVisible=ref(false);
|
||||
const patientData=reactive({
|
||||
});
|
||||
// Akiraka 20230210 监听删除事件
|
||||
watch(() => deleteVisible.value ,(value) => {
|
||||
|
||||
@@ -446,35 +454,35 @@ const handleUpdate = async (record) => {
|
||||
|
||||
// Modal ok
|
||||
// 异步关闭Modal需要调用 done()
|
||||
const handleSubmit = (done) => {
|
||||
proxy.$refs.modalFormRef.validate(async (valid) => {
|
||||
if (!valid) {
|
||||
let res;
|
||||
if (!modalForm.post_id) {
|
||||
const { code, message } = await addPost(modalForm);
|
||||
if (code == 200 ) {
|
||||
proxy.$notification.success('新增成功');
|
||||
} else {
|
||||
proxy.$notification.error(message);
|
||||
}
|
||||
} else {
|
||||
console.log("post_id:"+modalForm.post_id)
|
||||
// const handleSubmit = (done) => {
|
||||
// proxy.$refs.modalFormRef.validate(async (valid) => {
|
||||
// if (!valid) {
|
||||
// let res;
|
||||
// if (!modalForm.post_id) {
|
||||
// const { code, message } = await addPost(modalForm);
|
||||
// if (code == 200 ) {
|
||||
// proxy.$notification.success('新增成功');
|
||||
// } else {
|
||||
// proxy.$notification.error(message);
|
||||
// }
|
||||
// } else {
|
||||
// console.log("post_id:"+modalForm.post_id)
|
||||
|
||||
const { code, message } = await updatePost(modalForm, modalForm.post_id);
|
||||
if (code == 200 ) {
|
||||
proxy.$notification.success('更新成功');
|
||||
} else {
|
||||
proxy.$notification.error(message);
|
||||
}
|
||||
}
|
||||
done();
|
||||
getOrderInfo(pager);
|
||||
} else {
|
||||
proxy.$message.error('表单校验失败');
|
||||
done(false);
|
||||
}
|
||||
});
|
||||
};
|
||||
// const { code, message } = await updatePost(modalForm, modalForm.post_id);
|
||||
// if (code == 200 ) {
|
||||
// proxy.$notification.success('更新成功');
|
||||
// } else {
|
||||
// proxy.$notification.error(message);
|
||||
// }
|
||||
// }
|
||||
// done();
|
||||
// getOrderInfo(pager);
|
||||
// } else {
|
||||
// proxy.$message.error('表单校验失败');
|
||||
// done(false);
|
||||
// }
|
||||
// });
|
||||
// };
|
||||
|
||||
|
||||
/**
|
||||
@@ -559,12 +567,17 @@ const handleQuery = async () => {
|
||||
|
||||
|
||||
const openDcotor=()=>{
|
||||
|
||||
doctor_id.value=modalForm.doctor_id;
|
||||
doctorVisible.value=true;
|
||||
}
|
||||
const openPatient=()=>{
|
||||
alert('开发中')
|
||||
//patientData=modalForm.order_inquiry_case;
|
||||
Object.assign(patientData,modalForm.order_inquiry_case);
|
||||
// console.log(patientData);
|
||||
patientVisible.value=true;
|
||||
}
|
||||
const openInquiryRecord=()=>{
|
||||
alert("开发中");
|
||||
}
|
||||
//关闭确认框
|
||||
const handelCloseChange=(data)=>{
|
||||
|
||||
Reference in New Issue
Block a user