按钮状态显示
This commit is contained in:
parent
92489a51ff
commit
a42389b4b7
@ -59,18 +59,26 @@ const rules = reactive({
|
|||||||
});
|
});
|
||||||
// Akiraka 20230210 确认按钮 => 开始数据检查
|
// Akiraka 20230210 确认按钮 => 开始数据检查
|
||||||
const handleConfirm = () => {
|
const handleConfirm = () => {
|
||||||
proxy.$refs.modalFormRef.validate((valid) => {
|
proxy.$refs.modalFormRef.validate(async(valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
api.value(id.value,form).then(response => {
|
const {code}= await api.value(id.value,form);
|
||||||
// Akiraka 20230210 关闭弹窗
|
if(code==200){
|
||||||
if(response.code==200){
|
Message.success("取消成功");
|
||||||
Message.success("取消成功");
|
|
||||||
proxy.$refs.modalFormRef.resetFields();
|
proxy.$refs.modalFormRef.resetFields();
|
||||||
}else{
|
}else{
|
||||||
proxy.$notification.error(response.message);
|
proxy.$notification.error(response.message);
|
||||||
}
|
}
|
||||||
emits('closeChange',true);
|
emits('closeChange',true);
|
||||||
})
|
// api.value(id.value,form).then(response => {
|
||||||
|
// // Akiraka 20230210 关闭弹窗
|
||||||
|
// if(response.code==200){
|
||||||
|
// Message.success("取消成功");
|
||||||
|
// proxy.$refs.modalFormRef.resetFields();
|
||||||
|
// }else{
|
||||||
|
// proxy.$notification.error(response.message);
|
||||||
|
// }
|
||||||
|
// emits('closeChange',true);
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, toRefs, getCurrentInstance } from 'vue';
|
import {toRefs, getCurrentInstance } from 'vue';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -44,16 +44,24 @@ const handleClose = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Akiraka 20230210 确认按钮 => 开始数据检查
|
// Akiraka 20230210 确认按钮 => 开始数据检查
|
||||||
const handleConfirm = () => {
|
const handleConfirm = async () => {
|
||||||
api.value(id.value).then(response => {
|
const {code}=api.value(id.value);
|
||||||
// Akiraka 20230210 关闭弹窗
|
if(code==200){
|
||||||
if(response.code==200){
|
Message.success("成功");
|
||||||
Message.success("成功");
|
proxy.$refs.modalFormRef.resetFields();
|
||||||
proxy.$refs.modalFormRef.resetFields();
|
}else{
|
||||||
}else{
|
proxy.$notification.error(response.message);
|
||||||
proxy.$notification.error(response.message);
|
}
|
||||||
}
|
emits('closeChangeOk',true);
|
||||||
emits('closeChangeOk',true);
|
// api.value(id.value).then(response => {
|
||||||
})
|
// // Akiraka 20230210 关闭弹窗
|
||||||
|
// if(response.code==200){
|
||||||
|
// Message.success("成功");
|
||||||
|
// proxy.$refs.modalFormRef.resetFields();
|
||||||
|
// }else{
|
||||||
|
// proxy.$notification.error(response.message);
|
||||||
|
// }
|
||||||
|
// emits('closeChangeOk',true);
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -52,4 +52,12 @@ export const formatDoctorTitle=(val)=>{
|
|||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
export const fromatReportStatus=(val)=>{
|
||||||
|
//上报处方平台状态(0:未上报 1:已上报 2:上报失败))
|
||||||
|
let data={0:'未上报', 1:'已上报', 2:'上报失败'}
|
||||||
|
if(val || val==0){
|
||||||
|
return data[val]
|
||||||
|
}else{
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -422,6 +422,26 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-divider />
|
<a-divider />
|
||||||
|
<div class="titlebox">
|
||||||
|
<div class="bar"></div>
|
||||||
|
<div class="name">处方上报状态</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<a-row :gutter="24" style="margin-top: 35px">
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item field="" label="" >
|
||||||
|
<div class="doctorInfo">
|
||||||
|
<div class="infobox">
|
||||||
|
<div class="row">
|
||||||
|
<div class="nameDesc">上报状态:</div>
|
||||||
|
<div class="desc">{{fromatReportStatus(modalForm.report_pre_status)}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-divider />
|
||||||
<div class="titlebox">
|
<div class="titlebox">
|
||||||
<div class="bar"></div>
|
<div class="bar"></div>
|
||||||
<div class="name">操作</div>
|
<div class="name">操作</div>
|
||||||
@ -429,17 +449,17 @@
|
|||||||
<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 style="margin-right: 8px">
|
<a-space style="margin-right: 8px" v-if="modalForm.report_pre_status==2">
|
||||||
<a-button type="primary" @click="() =>{isVisible=true;order_product_id=modalForm.order_product_id;}"
|
<a-button type="primary" @click="() =>{isVisible=true;order_product_id=modalForm.order_product_id;}"
|
||||||
>上报处方平台</a-button
|
>上报处方平台</a-button
|
||||||
>
|
>
|
||||||
</a-space>
|
</a-space>
|
||||||
<a-space style="margin-right: 8px" v-if="modalForm.order_product_status==2">
|
<a-space style="margin-right: 8px" v-if="modalForm.order_product_status==2 || (modalForm.order_product_refund && modalForm.order_product_refund.product_refund_status==4) || (modalForm.order_product_refund && modalForm.order_product_refund.product_refund_status==5)">
|
||||||
<a-button
|
<a-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-has="'admin:sysProductList:cancel'"
|
v-has="'admin:sysProductList:cancel'"
|
||||||
status="danger"
|
status="danger"
|
||||||
@click="()=>{okVisible=true;cur_product_id=modalForm.order_inquiry_id;}"
|
@click="()=>{okVisible=true;cur_product_id=modalForm.order_product_id;}"
|
||||||
>取消药品订单</a-button
|
>取消药品订单</a-button
|
||||||
>
|
>
|
||||||
</a-space>
|
</a-space>
|
||||||
@ -452,7 +472,7 @@
|
|||||||
<!-- 患者详情弹窗 -->
|
<!-- 患者详情弹窗 -->
|
||||||
<patientModal :patientVisible="patientVisible" :data="patientData" @patientVisibleChange="() => {patientVisible = false;}"></patientModal>
|
<patientModal :patientVisible="patientVisible" :data="patientData" @patientVisibleChange="() => {patientVisible = false;}"></patientModal>
|
||||||
<confirmModal :okVisible="okVisible" :api="cancelProduct" :dealType="'order_inquiry_id'" :id="cur_product_id" @closeChange="closeChange"></confirmModal>
|
<confirmModal :okVisible="okVisible" :api="cancelProduct" :dealType="'order_inquiry_id'" :id="cur_product_id" @closeChange="closeChange"></confirmModal>
|
||||||
<isOkModal :isVisible="isVisible" :api="reportPrePscription" :title="'确定上报处方吗?'" :dealType="'order_product_id'" :id="order_product_id" @closeChangeOk="()=>{isVisible=false;order_product_id='';}"></isOkModal>
|
<isOkModal :isVisible="isVisible" :api="reportPrePscription" :title="'确定上报处方吗?'" :dealType="'order_product_id'" :id="order_product_id" @closeChangeOk="closeChangeOk"></isOkModal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -467,7 +487,7 @@ import {
|
|||||||
} from 'vue';
|
} from 'vue';
|
||||||
import { productList, getProductDetail,cancelProduct,reportPrePscription} from '@/api/order/list';
|
import { productList, getProductDetail,cancelProduct,reportPrePscription} from '@/api/order/list';
|
||||||
import { parseTime } from '@/utils/parseTime';
|
import { parseTime } from '@/utils/parseTime';
|
||||||
import {formatDoctorTitle,formatPrescriptionStatus,formatPharmacistStatus,formatProductCancelReason} from "@/utils/format"
|
import {formatDoctorTitle,fromatReportStatus,formatPrescriptionStatus,formatPharmacistStatus,formatProductCancelReason} from "@/utils/format"
|
||||||
const IMG_URL=import.meta.env.VITE_IMG_URL;
|
const IMG_URL=import.meta.env.VITE_IMG_URL;
|
||||||
// Akiraka 20230210 删除数据
|
// Akiraka 20230210 删除数据
|
||||||
const deleteData = ref([]);
|
const deleteData = ref([]);
|
||||||
@ -653,13 +673,8 @@ const handleQuery = async () => {
|
|||||||
|
|
||||||
getProductInfo(params);
|
getProductInfo(params);
|
||||||
};
|
};
|
||||||
//获取订单详情
|
const getDetail=async(order_product_id)=>{
|
||||||
const handleDetail = async (record) => {
|
const { code, data, message } = await getProductDetail(order_product_id);
|
||||||
modalVisible.value = true;
|
|
||||||
modalTitle.value = '药品订单详情';
|
|
||||||
const { code, data, message } = await getProductDetail(
|
|
||||||
record.order_product_id
|
|
||||||
);
|
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
Object.assign(modalForm, data);
|
Object.assign(modalForm, data);
|
||||||
let result=data.order_prescription;
|
let result=data.order_prescription;
|
||||||
@ -685,6 +700,12 @@ const handleDetail = async (record) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
//获取订单详情
|
||||||
|
const handleDetail = (record) => {
|
||||||
|
modalVisible.value = true;
|
||||||
|
modalTitle.value = '药品订单详情';
|
||||||
|
getDetail(record.order_product_id)
|
||||||
|
|
||||||
};
|
};
|
||||||
const formatProductStatus = (val) => {
|
const formatProductStatus = (val) => {
|
||||||
@ -745,6 +766,14 @@ const closeChange=(data)=>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//关闭上传处方平台弹框
|
||||||
|
const closeChangeOk=(data)=>{
|
||||||
|
order_product_id.value="";
|
||||||
|
isVisible.value=false;
|
||||||
|
if(data){
|
||||||
|
getDetail(modalForm.order_product_id)
|
||||||
|
}
|
||||||
|
}
|
||||||
// 重置搜索
|
// 重置搜索
|
||||||
const handleResetQuery = () => {
|
const handleResetQuery = () => {
|
||||||
proxy.$refs.queryFormRef.resetFields();
|
proxy.$refs.queryFormRef.resetFields();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user