Explorar o código

个微完善信息采集地址和患者信息

wjj hai 2 semanas
pai
achega
6429e597fc

+ 27 - 0
src/views/qw/collectionFully/index.vue

@@ -73,6 +73,14 @@
           >
             查看
           </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            @click="handleMemberdetails(scope.row)"
+          >
+            患者和地址
+          </el-button>
           <el-button
             v-if="scope.row.qwTag === 1 && scope.row.personalCollectStatus === 4"
             size="mini"
@@ -135,6 +143,13 @@
         <el-button @click="downloadImage(codeImage, qrCodeName + '.png')">下载二维码</el-button>
       </div>
     </el-dialog>
+
+    <el-drawer
+        :with-header="false"
+        size="75%"
+          :title="show.title" :visible.sync="show.open">
+      <userDetails  ref="userDetails" />
+    </el-drawer>
   </div>
 </template>
 
@@ -143,15 +158,21 @@ import { fullyCollectionInfoList } from "@/api/qw/collectionPendingSales";
 import { getWxaCodeCollectionUnLimit } from "@/api/hisStore/collection"; // 二维码API
 import FullyCollectionInfoDialog from "./fullyCollectionInfoDialog.vue";
 import BindPackageDialog from "./BindPackageDialog.vue";
+import userDetails from '@/views/store/components/userDetails1.vue';
 
 export default {
   name: "FullySalesInfo",
   components: {
     FullyCollectionInfoDialog,
     BindPackageDialog,
+    userDetails,
   },
   data() {
     return {
+      show:{
+        title:"客户详情",
+        open:false,
+      },
       loading: true,
       showSearch: true,
       total: 0,
@@ -182,6 +203,12 @@ export default {
     this.getList();
   },
   methods: {
+    handleMemberdetails(row){
+            this.show.open=true;
+            setTimeout(() => {
+                 this.$refs.userDetails.getDetails(row.userId);
+            }, 1);
+    },
     getList() {
       this.loading = true;
       fullyCollectionInfoList(this.queryParams).then(response => {

+ 64 - 0
src/views/store/components/userDetails1.vue

@@ -0,0 +1,64 @@
+<template>
+  <div>
+    <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
+      <div style="padding: 20px; background-color: #fff;">
+        患者和地址
+      </div>
+    </div>
+    <template>
+      <el-tabs v-model="activeName"  :tab-position="tabPosition" style="height: 200px;margin: 40px">
+        <el-tab-pane label="基本信息" name="basic"><userDetailsTemp  ref="userDetailsTemp" /></el-tab-pane>
+      </el-tabs>
+    </template>
+  </div>
+</template>  
+<script>
+import userDetailsTemp from './userDetailsTemp1.vue';
+import userBehavior from './userBehavior.vue';
+import userCoursePeriod from './userCoursePeriod.vue';
+export default {
+  name: "userDetailsByNew",
+  props:["data"],
+  components: { userDetailsTemp,userBehavior,userCoursePeriod},
+  data() {
+    return {
+      activeName: 'basic',
+      // 左侧遮罩层
+      leftLoading: true,
+      // 左侧查询参数
+      leftQueryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        hasNextPage: false,
+        scs: 'order_number(desc),training_camp_id(desc)',
+        trainingCampName: null,
+        userId:null,
+      },
+      tabPosition: 'top',
+    }
+  },
+  created() {
+
+  },
+  methods: {
+    handleClick(tab, event) {
+      console.log(tab, event);
+    },
+    getDetails(userId) {
+      this. activeName='basic';
+      setTimeout(() => {
+        this.$refs.userDetailsTemp.getDetails(userId);
+      }, 1);
+      setTimeout(() => {
+        this.$refs.userBehavior.getDetails(userId);
+      }, 1);
+      setTimeout(() => {
+        this.$refs.userCoursePeriod.getDetails(userId);
+      }, 1);
+    },
+  }
+}
+</script>
+<style>
+
+</style>

+ 196 - 0
src/views/store/components/userDetailsTemp1.vue

@@ -0,0 +1,196 @@
+<template>
+  <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
+ 
+   
+
+ 
+
+    <div class="contentx" v-if="item!=null">
+      <div class="desct">
+              <span v-if="patientInfo">
+                {{ patientInfo }}
+              </span>
+        <span v-else>
+                患者信息
+              </span>
+      </div>
+      <userPatietDetails  ref="userPatietDetail" />
+
+    </div>
+
+    <div class="contentx" v-if="item!=null" >
+      <div class="desct">
+        用户地址
+      </div>
+      <userAddDetails  ref="userAddDetail" />
+
+    </div>
+  </div>
+</template>
+
+<script>
+import { listPatient, getPatient, delPatient, addPatient, updatePatient, exportPatient ,getPatientByUserId} from "@/api/store/patient";
+import { listUser, getUser, delUser, addUser, updateUser, exportUser ,getUserAddr} from "@/api/store/user";
+import { getListUserCoupon } from "@/api/store/userCoupon";
+import userStorerDetails from "../components/userStorerDetails.vue";
+import userPatietDetails from "../components/userPatietDetails.vue";
+import userInquiryOrderDetails from "../components/userInquiryOrderDetails.vue";
+import userAddDetails from "../components/userAddDetails.vue";
+import userIntegralDetails from "../components/userIntegralDetails.vue";
+import AddOrderDialog from "../../hisStore/integralOrder/addOrder.vue"; // 导入积分购组件
+
+export default {
+  name: "storedet",
+  props:["data"],
+  components: {
+    userStorerDetails,
+    userInquiryOrderDetails,
+    userPatietDetails,
+    userAddDetails,
+    userIntegralDetails,
+    AddOrderDialog // 注册积分购组件
+  },
+  data() {
+    return {
+      refreshKey: 0, // 每次点击刷新用
+      patientInfo: process.env.VUE_APP_PATIENT_INFO,
+      addr:[],
+      patient:[],
+      userOptions: [],
+      statusOptions: [],
+      sexOptions: [],
+      pOptions: [],
+      item:null,
+      total: 0,
+      loading: true,
+      // 积分购相关
+      integralPurchaseVisible: false,
+      currentUserId: null,
+      // 会员优惠券表格数据
+      userCouponList: [],
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        userId: null,
+        couponId: null,
+      },
+      actName:"10",
+      businessTypeOptions:[],
+      couponStatusOptions:[],
+    }
+  },
+  created() {
+    this.getDicts("sys_user_status").then(response => {
+      this.userOptions = response.data;
+    });
+    this.getDicts("sys_company_status").then(response => {
+      this.statusOptions = response.data;
+    });
+    this.getDicts("sys_patient_status").then(response => {
+      this.pOptions = response.data;
+    });
+    this.getDicts("sys_patient_sex").then(response => {
+      this.sexOptions = response.data;
+    });
+    this.getDicts("sys_coupon_business_type").then(response => {
+      this.businessTypeOptions = response.data;
+    });
+
+    this.getDicts("sys_coupon_status").then(response => {
+      this.couponStatusOptions = response.data;
+    });
+  },
+  methods: {
+    // 积分购相关方法
+    handleIntegralPurchase() {
+      if (this.item && this.item.userId) {
+        this.currentUserId = this.item.userId;
+        this.refreshKey++; // 每次点击都强制刷新
+        this.integralPurchaseVisible = true;
+      } else {
+        this.$message.warning('无法获取用户信息');
+      }
+    },
+
+    handleCloseIntegralPurchase() {
+      this.integralPurchaseVisible = false;
+      this.currentUserId = null;
+    },
+
+    handleClickX(tab, event) {
+      if(tab.name=="10"){
+        this.queryParams.status=null;
+      }else{
+        this.queryParams.status=tab.name;
+      }
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+
+    getList() {
+      this.loading = true;
+      getListUserCoupon(this.queryParams).then(response => {
+        this.userCouponList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+
+    getDetails(orderId) {
+      this.item=null;
+      getUser(orderId).then(response => {
+        this.item = response.data;
+        setTimeout(() => {
+          this.$refs.userDetails.getUserDetails(orderId);
+        }, 1);
+        setTimeout(() => {
+          this.$refs.InquiryDetails.getInquiryDetails(orderId,1);
+        }, 1);
+        setTimeout(() => {
+          this.$refs.userPatietDetail.getPatList(orderId);
+        }, 1);
+        setTimeout(() => {
+          this.$refs.userAddDetail.getAddList(orderId);
+        }, 1);
+        setTimeout(() => {
+          this.$refs.userIntegralDetail.getIntegralLogs(orderId);
+        }, 1);
+      });
+
+      this.patient=null;
+      getPatientByUserId(orderId).then(response => {
+        this.patient = response.data;
+      });
+
+      getUserAddr(orderId).then(response => {
+        this.addr = response.data;
+      });
+
+      this.queryParams.userId=orderId;
+      this.getList();
+    },
+  }
+}
+</script>
+
+<style>
+.contentx{
+  height: 100%;
+  background-color: #fff;
+  padding: 0px 20px 20px;
+  margin: 20px;
+}
+.el-descriptions-item__label.is-bordered-label{
+  font-weight: normal;
+}
+.el-descriptions-item__content {
+  max-width: 150px;
+  min-width: 100px;
+}
+.desct{
+  padding-top: 20px;
+  padding-bottom: 20px;
+  color: #524b4a;
+  font-weight: bold;
+}
+</style>