Selaa lähdekoodia

Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_his_scrm_adminUI

xgb 3 viikkoa sitten
vanhempi
commit
ff2971d6ef

+ 40 - 0
.env.prod-hat

@@ -0,0 +1,40 @@
+# 页面标题
+VUE_APP_TITLE =互联网医院管理系统
+# 首页菜单标题
+VUE_APP_TITLE_INDEX =恒安图管理系统
+# 公司名称
+VUE_APP_COMPANY_NAME =重庆云联融智科技有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =渝ICP备2024031984号-1
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/hat.png
+# 存储桶配置
+VUE_APP_OBS_ACCESS_KEY_ID = K2UTJGIN7UTZJR2XMXYG
+# 存储桶配置
+VUE_APP_OBS_SECRET_ACCESS_KEY = sbyeNJLbcYmH6copxeFP9pAoksM4NIT9Zw4x0SRX
+# 存储桶配置
+VUE_APP_OBS_SERVER = https://obs.cn-north-4.myhuaweicloud.com
+# 存储桶配置
+VUE_APP_OBS_BUCKET = hat-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = hat-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://hattcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://hatobs.ylrztop.com
+
+# 开发环境配置
+ENV = 'development'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 2
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 39 - 0
.env.prod-knt

@@ -0,0 +1,39 @@
+# 页面标题
+VUE_APP_TITLE = 康年堂SCRM管理系统
+# 首页菜单标题
+VUE_APP_TITLE_INDEX = 康年堂
+# 公司名称
+VUE_APP_COMPANY_NAME = 陕西康年堂医药连锁有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD = 陕ICP备2023011686号-5
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/knt.jpg
+# 存储桶配置
+VUE_APP_OBS_ACCESS_KEY_ID = K2UTJGIN7UTZJR2XMXYG
+# 存储桶配置
+VUE_APP_OBS_SECRET_ACCESS_KEY = sbyeNJLbcYmH6copxeFP9pAoksM4NIT9Zw4x0SRX
+# 存储桶配置
+VUE_APP_OBS_SERVER = https://obs.cn-north-4.myhuaweicloud.com
+# 存储桶配置
+VUE_APP_OBS_BUCKET = jnmy-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = jnmy-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://jnmytcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://jnmyobs.ylrztop.com
+# 生产环境配置
+ENV = 'production'
+
+#FS管理系统/生产环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 2 - 0
package.json

@@ -18,6 +18,7 @@
     "build:prod-sxjz": "vue-cli-service build --mode prod-sxjz",
     "build:prod-xfk": "vue-cli-service build --mode prod-xfk",
     "build:prod-jnmy": "vue-cli-service build --mode prod-jnmy",
+    "build:prod-knt": "vue-cli-service build --mode prod-knt",
     "build:prod-hdt": "vue-cli-service build --mode prod-hdt",
     "build:prod-yzt": "vue-cli-service build --mode prod-yzt",
     "build:prod-fcky": "vue-cli-service build --mode prod-fcky",
@@ -40,6 +41,7 @@
     "build:prod-syysy": "vue-cli-service build --mode prod-syysy",
     "build:prod-hyt": "vue-cli-service build --mode prod-hyt",
     "build:prod-hst": "vue-cli-service build --mode prod-hst",
+    "build:prod-hat": "vue-cli-service build --mode prod-hat",
     "preview": "node build/index.js --preview",
     "lint": "eslint --ext .js,.vue src"
   },

+ 16 - 0
src/api/company/statistics.js

@@ -39,6 +39,14 @@ export function packageOrder(query) {
     params: query
   })
 }
+
+export function afterSalesOrder(query) {
+  return request({
+    url: '/company/statistics/afterSalesOrder',
+    method: 'get',
+    params: query
+  })
+}
 export function inquiryOrder(query) {
   return request({
     url: '/company/statistics/inquiryOrder',
@@ -62,6 +70,14 @@ export function exportPackageOrder(query) {
     params: query
   })
 }
+
+export function exportAfterSalesOrder(query) {
+  return request({
+    url: '/company/statistics/exportAfterSalesOrder',
+    method: 'get',
+    params: query
+  })
+}
 export function exportInquiryOrder(query) {
   return request({
     url: '/company/statistics/exportInquiryOrder',

BIN
src/assets/logo/hat.png


BIN
src/assets/logo/knt.jpg


+ 2 - 2
src/store/modules/user.js

@@ -10,7 +10,7 @@ const user = {
     roles: [],
     permissions: [],
     isAdmin: false,
-    medicalMallConfig: {medicalMall: false,statics: false,audit:false,resource:false,stores:false}
+    medicalMallConfig: {medicalMall: false,statics: false,audit:false,resource:false,stores:true}
   },
 
   mutations: {
@@ -74,7 +74,7 @@ const user = {
           commit('SET_AVATAR', avatar)
           commit('SET_USER', user)
           commit('SET_ISADMIN', res.isAdmin)
-          console.log(res.medicalMallConfig)
+          console.log("res.medicalMallConfig",res.medicalMallConfig)
           commit('SET_MEDICALMALL', res.medicalMallConfig)
           resolve(res)
         }).catch(error => {

+ 352 - 0
src/views/his/statistics/afterSalesOrder.vue

@@ -0,0 +1,352 @@
+<template>
+    <div class="app-container">
+        <div class="app-content">
+             <div class="title">
+               售后订单统计
+            </div>
+           <el-form class="search-form" :inline="true" >
+            <el-form-item >
+              <el-select v-model="value" placeholder="请选择日期">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item >
+              <treeselect :clearable="false"  v-model="deptId"  :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
+            </el-form-item>
+            <el-form-item>
+              <el-select filterable v-model="userIds" placeholder="请选择员工" clearable size="small">
+                  <el-option
+                    v-for="item in users"
+                    :key="item.userId"
+                    :label="item.nickName"
+                    :value="item.userId">
+                  </el-option>
+                </el-select>
+            </el-form-item>
+           <el-form-item label="下单日期" prop="createTime">
+                    <el-date-picker clearable size="small" style="width: 205.4px"
+                      v-model="dateRange"
+                      type="daterange"
+                      value-format="yyyy-MM-dd"
+                      start-placeholder="开始日期" end-placeholder="结束日期"
+                      >
+                    </el-date-picker>
+            </el-form-item>
+            <el-form-item>
+                <el-button type="cyan" icon="el-icon-search"   @click="afterSalesOrder">搜索</el-button>
+            </el-form-item>
+          </el-form>
+           <div class="data-box">
+              <div class="echart-box">
+                <div id="echart-customer"></div>
+              </div>
+              <div class="table-box">
+                    <el-button class="export" size="small"  @click="handleExport" >导出</el-button>
+                    <el-table
+                    :data="list"
+                    border
+                    :summary-method="getSummaries"
+                    show-summary
+                    max-height="500"
+                    style="width: 100%;">
+                    <el-table-column
+                      prop="nickName"
+                      label="员工姓名">
+                    </el-table-column>
+                    <el-table-column
+                      prop="orderCount"
+                      label="订单数">
+                    </el-table-column>
+                    <el-table-column
+                      prop="payPrice"
+                      label="订单金额">
+                    </el-table-column>
+  
+                  </el-table>
+              </div>
+          </div>
+        </div>
+  
+      </div>
+  </template>
+  
+  <script>
+  import { afterSalesOrder,exportAfterSalesOrder } from "@/api/company/statistics";
+  import { getUserListByDeptId} from "@/api/company/companyUser";
+  import echarts from 'echarts'
+  import resize from '../../dashboard/mixins/resize'
+  import { treeselect } from "@/api/company/companyDept";
+  import Treeselect from "@riophae/vue-treeselect";
+  import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+  
+  export default {
+  name: 'Index',
+  mixins: [resize],
+  components: { Treeselect },
+  watch: {
+  // 监听deptId
+  'deptId': 'currDeptChange'
+  },
+  data() {
+  return {
+   deptOptions:[],
+   deptId:undefined,
+   userIds:undefined,
+   users:[],
+   dateRange:[],
+   chart: null,
+   options: [{
+      value: '1',
+      label: '今天'
+    }, {
+      value: '2',
+      label: '昨天'
+    }, {
+      value: '3',
+      label: '本周'
+    }, {
+      value: '4',
+      label: '上周'
+    }, {
+      value: '5',
+      label: '本月'
+    }
+    , {
+      value: '6',
+      label: '上月'
+    }
+    , {
+      value: '7',
+      label: '本季度'
+    }
+    , {
+      value: '8',
+      label: '上季度'
+    }
+    , {
+      value: '9',
+      label: '本年'
+    }
+    , {
+      value: '10',
+      label: '上年'
+    }],
+    value: '5',
+    list:[],
+    dates:[],
+    orderCount:[],
+    payPrice:[],
+  
+  }
+  },
+  created() {
+  this.getTreeselect();
+  },
+  methods: {
+    currDeptChange(val){
+    console.log(val)
+    this.deptId=val;
+    this.getUserListByDeptId();
+  },
+  /** 查询部门下拉树结构 */
+  getTreeselect() {
+  var that=this;
+  treeselect().then((response) => {
+    this.deptOptions = response.data;
+    console.log(this.deptOptions)
+    if(response.data!=null&&response.data.length>0){
+      this.deptId=response.data[0].id;
+      that.afterSalesOrder()
+    }
+  });
+  },
+  handleExport(){
+    var data;
+    if(this.userIds!=undefined){
+        data={type:this.value,userIds:this.userIds+"",deptId:this.deptId}
+    }
+    else{
+        data={type:this.value,deptId:this.deptId}
+    }
+    if(this.dateRange){
+        data.startTime = this.dateRange[0];
+        data.endTime = this.dateRange[1];
+      }
+    exportAfterSalesOrder(data).then((response) => {
+        console.log(response)
+       this.download(response.msg);
+    });
+  
+  },
+  getUserListByDeptId() {
+    this.userIds=undefined;
+    var data={deptId:this.deptId};
+    getUserListByDeptId(data).then(response => {
+      this.users = response.data;
+  
+    });
+  },
+  afterSalesOrder(){
+      var data;
+      if(this.userIds!=undefined){
+          data={type:this.value,userIds:this.userIds+"",deptId:this.deptId}
+      }
+      else{
+          data={type:this.value,deptId:this.deptId}
+      }
+      if(this.dateRange){
+        data.startTime = this.dateRange[0];
+        data.endTime = this.dateRange[1];
+      }
+      afterSalesOrder(data).then((response) => {
+       this.list=response.list;
+       this.dates=response.dates;
+       this.orderCount=response.orderCount;
+       this.payPrice=response.payPrice;
+        setTimeout(() => {
+          this.initEchart();
+        }, 500);
+    });
+  },
+  initEchart(){
+    var option = {
+      tooltip: {
+          trigger: 'axis',
+          axisPointer: {            // 坐标轴指示器,坐标轴触发有效
+              type: 'shadow'        // 默认为直线,可选为:'line' | 'shadow'
+          }
+      },
+      legend: {
+          data: ['订单数', '订单金额' ]
+      },
+      grid: {
+          left: '3%',
+          right: '4%',
+          bottom: '3%',
+          containLabel: true
+      },
+      xAxis: [
+          {
+              type: 'category',
+              data: this.dates
+          }
+      ],
+      yAxis: [
+          {
+              type: 'value',
+              axisLabel:{
+                formatter:'{value}'
+              }
+          }
+      ],
+      series: [
+          {
+  
+              name: '订单数',
+              type: 'line',
+              emphasis: {
+                  focus: 'series'
+              },
+              data: this.orderCount
+          },
+          {
+  
+              name: '订单金额',
+              type: 'line',
+              emphasis: {
+                  focus: 'series'
+              },
+              data: this.payPrice
+          }
+  
+      ]
+    };
+    this.chart=echarts.init(document.getElementById("echart-customer"));
+    this.chart.setOption(option,true);
+  },
+   getSummaries(param) {
+    const { columns, data } = param;
+    const sums = [];
+    columns.forEach((column, index) => {
+      if (index === 0) {
+        sums[index] = '总计';
+        return;
+      }
+      const values = data.map(item => Number(item[column.property]));
+      if (!values.every(value => isNaN(value))) {
+        const total = values.reduce((prev, curr) => {
+          const value = Number(curr);
+          return !isNaN(value) ? prev + curr : prev;
+        }, 0);
+        sums[index] = total.toFixed(2);
+      } else {
+        sums[index] = '';
+      }
+    });
+  
+    return sums;
+  }
+  }
+  }
+  </script>
+  
+  <style lang="scss" scoped>
+  .app-container{
+  border: 1px solid #e6e6e6;
+  padding: 12px;
+  
+  .app-content{
+  background-color: white;
+  .title{
+    padding: 20px 30px 0px 30px;
+    font-size: 18px;
+    font-weight: bold;
+    color: black;
+  
+  }
+  .search-form{
+    margin: 20px 30px 0px 30px;
+  }
+  .data-box{
+    padding: 30px;
+    background-color:  rgb(255, 255, 255);
+    height: 100%;
+  
+    .echart-box{
+      margin: 0 auto;
+      text-align: center;
+    }
+    .el-select{
+      margin: 5px 10px;
+    }
+    .table-box{
+      margin-top: 15px;
+      .export{
+        float: right;
+        margin: 10px 0px;
+      }
+    }
+  }
+  }
+  }
+  #echart-customer{
+  width:100%;
+  height:320px
+  }
+  .vue-treeselect{
+  width: 217px;
+  height: 36px;
+  }
+  
+  </style>
+  <style>
+  .vue-treeselect__control{
+  display: block;
+  }
+  </style>
+  

+ 2 - 1
src/views/hisStore/storeProduct/index.vue

@@ -951,7 +951,8 @@ export default {
   data() {
     return {
       isMedicalMall: this.$store.state.user.medicalMallConfig.medicalMall,
-      isStores: this.$store.state.user.medicalMallConfig.stores,
+      // isStores: this.$store.state.user.medicalMallConfig.stores,
+      isStores: true,
       companyId: null,
       storeId: null,
       isAudit: null,