Explorar o código

Merge branch 'dev' of http://172.16.100.139/new-business/drp-web into dev

002390 hai 1 ano
pai
achega
a3a376b4d1

+ 8 - 0
src/api/business/ehr/pm/kanban.js

@@ -19,4 +19,12 @@ export function importData(data) {
       'Content-Type': 'multipart/form-data'
     }
   })
+}
+
+// 删除看板数据
+export function delKanban(id) {
+  return request({
+    url: '/ehr/pm/kanban/' + id,
+    method: 'delete'
+  })
 }

+ 1 - 1
src/permission.js

@@ -8,7 +8,7 @@ import { isRelogin } from '@/utils/request'
 
 NProgress.configure({ showSpinner: false })
 
-const whiteList = ['/login', '/register', '/test01', '/ehrentrance', '/business/ehr/ehrpm-entrance', '/canteenAddFood', '/canteenAddMenu', '/menuScreen', '/foodScreen', '/business/wms/historical-route', '/business/SupAtttachment', '/business/purchase/form/transferOrder/bipPull-entrance', '/contractDetail']
+const whiteList = ['/login', '/register', '/test01', '/ehrentrance', '/business/ehr/ehrpm-entrance', '/canteenAddFood', '/canteenAddMenu', '/menuScreen', '/foodScreen', '/business/wms/historical-route', '/business/SupAtttachment', '/business/purchase/form/transferOrder/bipPull-entrance', '/contractDetail', '/spdAddQuestion']
 
 router.beforeEach((to, from, next) => {
   NProgress.start()

+ 5 - 0
src/router/index.js

@@ -97,6 +97,11 @@ export const constantRoutes = [
     hidden: true
   },
   {
+    path: '/spdAddQuestion',
+    component: () => import('@/views/spdAddQuestion/add'),
+    hidden: true
+  },
+  {
     path: '/business/purchase/form/transferOrder/bipPull-entrance',
     component: () => import('@/views/purchase/transferOrder/bipPull/bipPull-entrance'),
     hidden: true

+ 13 - 1
src/store/modules/user.js

@@ -14,7 +14,9 @@ const user = {
     deptId: '',
     deptName: '',
     orgId: '',
-    orgName: ''
+    orgName: '',
+    adminDept: '',
+    adminDeptName: ''
   },
 
   mutations: {
@@ -51,6 +53,12 @@ const user = {
     ORGNAME: (state, orgName) => {
       state.orgName = orgName
     },
+    ADMINDEPT: (state, adminDept) => {
+      state.adminDept = adminDept
+    },
+    ADMINDEPTNAME: (state, adminDeptName) => {
+      state.adminDeptName = adminDeptName
+    },
   },
 
   actions: {
@@ -75,7 +83,9 @@ const user = {
     GetInfo({ commit, state }) {
       return new Promise((resolve, reject) => {
         getInfo().then(res => {
+          console.log("res",res);
           const user = res.user
+          console.log("user",user);
           const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
           if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
             commit('SET_ROLES', res.roles)
@@ -92,6 +102,8 @@ const user = {
           commit('DEPTNAME', user.deptName)
           commit('ORGID', user.orgId)
           commit('ORGNAME', user.orgName)
+          commit('ADMINDEPT', user.adminDept)
+          commit('ADMINDEPTNAME', user.adminDeptName)
           resolve(res)
         }).catch(error => {
           reject(error)

+ 736 - 680
src/views/WMS/historical-route/index.vue

@@ -2,84 +2,99 @@
   <div id="print">
     <el-tabs v-model="activeName" type="border-card" stretch @tab-click="handleClick">
       <el-tab-pane label="温湿度信息" name="first">
-        <div id="body" :style="{width: width - 300 + 'px'}">
+        <div id="body" :style="{width: width - 100 + 'px'}">
           <!--导出按钮-->
           <el-button class="OutCss" v-print="'#print'" type="primary">导出</el-button>
           <el-timeline>
             <!-- 数据表 -->
-            <h2 v-if="isCarData">车辆温湿度列表</h2>
+            <h2 v-if="isCarData">订单温度列表</h2>
             <div v-for="(item, index) in dataCar">
-              <h2>
-                ============================================================================================================================
-              </h2>
               <el-descriptions>
-                <el-descriptions-item label="订单编号">{{item[0].billCode}}</el-descriptions-item>
-                <el-descriptions-item label="车牌号">{{item[0].measuringPointName}}</el-descriptions-item>
-                <el-descriptions-item label="探头">{{item[0].measuringPointAddr}}</el-descriptions-item>
-                <el-descriptions-item label="开始时间">{{item[0].hisDate}}</el-descriptions-item>
-                <el-descriptions-item label="结束时间">{{item[item.length - 1].end}}</el-descriptions-item>
+                <el-descriptions-item label="客户名称" v-if="bill">{{ carMessage.customerName }}</el-descriptions-item>
+                <el-descriptions-item label="发运订单编号" v-if="bill">{{
+                    carMessage.wmsBillCode
+                  }}
+                </el-descriptions-item>
+                <el-descriptions-item label="收货地址" v-if="bill">{{
+                    carMessage.customerAddress
+                  }}
+                </el-descriptions-item>
+                <el-descriptions-item label="联系人" v-if="bill">{{ carMessage.customerContact }}</el-descriptions-item>
+                <el-descriptions-item label="联系电话" v-if="bill">{{ carMessage.customerTel }}</el-descriptions-item>
+                <el-descriptions-item label="配送订单编号">{{ item[0].billCode }}</el-descriptions-item>
+                <el-descriptions-item label="车牌号">{{ item[0].measuringPointName }}</el-descriptions-item>
+                <el-descriptions-item label="开始时间">{{ item[0].hisDate }}</el-descriptions-item>
+                <el-descriptions-item label="结束时间">{{ item[item.length - 1].end }}</el-descriptions-item>
+                <el-descriptions-item label="探头">{{ item[0].measuringPointAddr }}</el-descriptions-item>
               </el-descriptions>
               <el-table :data="item" stripe border style="width: 97%">
-                <el-table-column prop="temperature" label="温度" align="center" min-width="80" />
-                <el-table-column prop="hisDate" label="时间点" align="center" min-width="200" />
-                <el-table-column prop="temperature1" label="温度" align="center" min-width="80" />
-                <el-table-column prop="hisDate1" label="时间点" align="center" min-width="200" />
-                <el-table-column prop="temperature2" label="温度" align="center" min-width="80" />
-                <el-table-column prop="hisDate2" label="时间点" align="center" min-width="200" />
-                <el-table-column prop="temperature3" label="温度" align="center" min-width="80" />
-                <el-table-column prop="hisDate3" label="时间点" align="center" min-width="200" />
-                <el-table-column prop="temperature4" label="温度" align="center" min-width="80" />
-                <el-table-column prop="hisDate4" label="时间点" align="center" min-width="200" />
+                <el-table-column prop="temperature" label="温度" align="center" min-width="60"/>
+                <el-table-column prop="hisDate" label="时间点" align="center" min-width="160"/>
+                <el-table-column prop="temperature1" label="温度" align="center" min-width="60"/>
+                <el-table-column prop="hisDate1" label="时间点" align="center" min-width="160"/>
+                <el-table-column prop="temperature2" label="温度" align="center" min-width="60"/>
+                <el-table-column prop="hisDate2" label="时间点" align="center" min-width="160"/>
+                <el-table-column prop="temperature3" label="温度" align="center" min-width="60"/>
+                <el-table-column prop="hisDate3" label="时间点" align="center" min-width="160"/>
+                <el-table-column prop="temperature4" label="温度" align="center" min-width="60"/>
+                <el-table-column prop="hisDate4" label="时间点" align="center" min-width="160"/>
               </el-table>
-              <template></template>
+              <br>
+              <br>
             </div>
-            <h2 v-if="isBoxData">保温箱温湿度列表</h2>
             <div v-for="(item, index) in dataBox">
-              <h2>
-                ============================================================================================================================
-              </h2>
               <el-descriptions>
-                <el-descriptions-item label="订单编号">{{item[0].billCode}}</el-descriptions-item>
-                <el-descriptions-item label="保温箱号">{{item[0].measuringPointName}}</el-descriptions-item>
-                <el-descriptions-item label="探头">{{item[0].measuringPointAddr}}</el-descriptions-item>
-                <el-descriptions-item label="开始时间">{{item[0].hisDate}}</el-descriptions-item>
-                <el-descriptions-item label="结束时间">{{item[item.length - 1].end}}</el-descriptions-item>
+                <el-descriptions-item label="客户名称" v-if="bill">{{ carMessage.customerName }}</el-descriptions-item>
+                <el-descriptions-item label="发运订单编号" v-if="bill">{{
+                    carMessage.wmsBillCode
+                  }}
+                </el-descriptions-item>
+                <el-descriptions-item label="收货地址" v-if="bill">{{
+                    carMessage.customerAddress
+                  }}
+                </el-descriptions-item>
+                <el-descriptions-item label="联系人" v-if="bill">{{ carMessage.customerContact }}</el-descriptions-item>
+                <el-descriptions-item label="联系电话" v-if="bill">{{ carMessage.customerTel }}</el-descriptions-item>
+                <el-descriptions-item label="配送订单编号">{{ item[0].billCode }}</el-descriptions-item>
+                <el-descriptions-item label="保温箱号">{{ item[0].measuringPointName }}</el-descriptions-item>
+                <el-descriptions-item label="开始时间">{{ item[0].hisDate }}</el-descriptions-item>
+                <el-descriptions-item label="结束时间">{{ item[item.length - 1].end }}</el-descriptions-item>
+                <el-descriptions-item label="探头">{{ item[0].measuringPointAddr }}</el-descriptions-item>
               </el-descriptions>
               <el-table :data="item" stripe border style="width: 97%">
-                <el-table-column prop="temperature" label="温度" align="center" min-width="80" />
-                <el-table-column prop="hisDate" label="时间点" align="center" min-width="200" />
-                <el-table-column prop="temperature1" label="温度" align="center" min-width="80" />
-                <el-table-column prop="hisDate1" label="时间点" align="center" min-width="200" />
-                <el-table-column prop="temperature2" label="温度" align="center" min-width="80" />
-                <el-table-column prop="hisDate2" label="时间点" align="center" min-width="200" />
-                <el-table-column prop="temperature3" label="温度" align="center" min-width="80" />
-                <el-table-column prop="hisDate3" label="时间点" align="center" min-width="200" />
-                <el-table-column prop="temperature4" label="温度" align="center" min-width="80" />
-                <el-table-column prop="hisDate4" label="时间点" align="center" min-width="200" />
+                <el-table-column prop="temperature" label="温度" align="center" min-width="60"/>
+                <el-table-column prop="hisDate" label="时间点" align="center" min-width="160"/>
+                <el-table-column prop="temperature1" label="温度" align="center" min-width="60"/>
+                <el-table-column prop="hisDate1" label="时间点" align="center" min-width="160"/>
+                <el-table-column prop="temperature2" label="温度" align="center" min-width="60"/>
+                <el-table-column prop="hisDate2" label="时间点" align="center" min-width="160"/>
+                <el-table-column prop="temperature3" label="温度" align="center" min-width="60"/>
+                <el-table-column prop="hisDate3" label="时间点" align="center" min-width="160"/>
+                <el-table-column prop="temperature4" label="温度" align="center" min-width="60"/>
+                <el-table-column prop="hisDate4" label="时间点" align="center" min-width="160"/>
               </el-table>
+              <br>
+              <br>
             </div>
           </el-timeline>
         </div>
-        <br>
         <div id="body" :style="{width: width - 300 + 'px'}">
-          <el-timeline>
-            <h2>订单温度折线图</h2>
-            <div class="echart" id="mychart" :style="myChartStyle"></div>
-          </el-timeline>
+          <h2>订单温度折线图</h2>
+          <div class="echart" id="mychart" :style="myChartStyle"></div>
         </div>
       </el-tab-pane>
       <el-tab-pane label="运输信息" name="second">
-        <div id="body" :style="{width: width - 300 + 'px'}">
+        <div id="body" :style="{width: width - 100 + 'px'}">
           <!-- 单据信息 -->
           <el-timeline>
             <el-timeline>
               <el-descriptions>
-                <el-descriptions-item label="订单编号">{{this.basicData.billCode}}</el-descriptions-item>
-                <el-descriptions-item label="车牌号">{{this.basicData.plateNumber}}</el-descriptions-item>
+                <el-descriptions-item label="配送订单编号">{{ basicData.billCode }}</el-descriptions-item>
+                <el-descriptions-item label="车牌号">{{ basicData.plateNumber }}</el-descriptions-item>
               </el-descriptions>
               <el-descriptions>
-                <el-descriptions-item label="开始时间">{{this.basicData.startTime}}</el-descriptions-item>
-                <el-descriptions-item label="结束时间">{{this.basicData.endTime}}</el-descriptions-item>
+                <el-descriptions-item label="开始时间">{{ basicData.startTime }}</el-descriptions-item>
+                <el-descriptions-item label="结束时间">{{ basicData.endTime }}</el-descriptions-item>
               </el-descriptions>
             </el-timeline>
           </el-timeline>
@@ -92,14 +107,14 @@
             <br>
             <h2>订单温湿度列表</h2>
             <el-table :data="tableData1" height="200" style="width: 97%">
-              <el-table-column prop="maxTemperature" label="温度最大值" align="center" min-width="100" />
-              <el-table-column prop="avgTemperature" label="温度平均值" align="center" min-width="100" />
-              <el-table-column prop="minTemperature" label="温度最小值" align="center" min-width="100" />
-              <el-table-column prop="maxHumidity" label="湿度最大值" align="center" min-width="100" />
-              <el-table-column prop="avgHumidity" label="湿度平均值" align="center" min-width="100" />
-              <el-table-column prop="minHumidity" label="湿度最小值" align="center" min-width="100" />
-              <el-table-column prop="startTime" label="开始时间" align="center" min-width="250" />
-              <el-table-column prop="endTime" label="结束时间" align="center" min-width="250" />
+              <el-table-column prop="maxTemperature" label="温度最大值" align="center" min-width="100"/>
+              <el-table-column prop="avgTemperature" label="温度平均值" align="center" min-width="100"/>
+              <el-table-column prop="minTemperature" label="温度最小值" align="center" min-width="100"/>
+              <el-table-column prop="maxHumidity" label="湿度最大值" align="center" min-width="100"/>
+              <el-table-column prop="avgHumidity" label="湿度平均值" align="center" min-width="100"/>
+              <el-table-column prop="minHumidity" label="湿度最小值" align="center" min-width="100"/>
+              <el-table-column prop="startTime" label="开始时间" align="center" min-width="250"/>
+              <el-table-column prop="endTime" label="结束时间" align="center" min-width="250"/>
             </el-table>
           </el-timeline>
         </div>
@@ -110,146 +125,271 @@
 </template>
 
 <script>
-  import AMapLoader from '@amap/amap-jsapi-loader'
-  window._AMapSecurityConfig = {
-    securityJsCode: '8e23904a0cf421675353f31fd1fc213c'
-  }
-  import historyApi from '@/api/WMS/historical-route'
-  import * as echarts from "echarts";
+import AMapLoader from '@amap/amap-jsapi-loader'
+import historyApi from '@/api/WMS/historical-route'
+import * as echarts from 'echarts'
 
-  export default {
-    data() {
-      return {
-        width: document.documentElement.clientWidth - 10,
-        param: this.$route.query,
-        basicData: {
-          billCode: "",
-          plateNumber: "",
-          startTime: "",
-          endTime: ""
-        },
-        //标签页
-        activeName: 'first',
-        //地图对象
-        map: null,
-        //图表
-        myChart: {},
-        xData: [], //横坐标
-        temperatureData: [], //温度数据
-        humidityData: [], //湿度数据
-        myChartStyle: {
-          float: "left",
-          width: "100%",
-          height: "400px"
-        }, //图表样式
-        //运输信息表单数据
-        tableData1: [],
-        //运输信息表单数据准备
-        modelData1: [{
-          maxTemperature: "",
-          avgTemperature: "",
-          minTemperature: "",
-          maxHumidity: "",
-          avgHumidity: "",
-          minHumidity: "",
-          startTime: "",
-          endTime: ""
+window._AMapSecurityConfig = {
+  securityJsCode: '8e23904a0cf421675353f31fd1fc213c'
+}
+
+export default {
+  data() {
+    return {
+      width: document.documentElement.clientWidth - 10,
+      basicData: {
+        billCode: '',
+        plateNumber: '',
+        startTime: '',
+        endTime: '',
+        wmsBillCode: '',
+        customerName: '',
+        customerAddress: '',
+        customerContact: '',
+        customerTel: ''
+      },
+      //标签页
+      activeName: 'first',
+      //地图对象
+      map: null,
+      //图表
+      myChart: {},
+      xData: [], //横坐标
+      temperatureData: [], //温度数据
+      humidityData: [], //湿度数据
+      myChartStyle: {
+        float: 'left',
+        width: '100%',
+        height: '400px'
+      },
+      //运输信息表单数据
+      tableData1: [],
+      //运输信息表单数据准备
+      modelData1:
+        [{
+          maxTemperature: '',
+          avgTemperature: '',
+          minTemperature: '',
+          maxHumidity: '',
+          avgHumidity: '',
+          minHumidity: '',
+          startTime: '',
+          endTime: ''
         }],
-        //温湿度信息表单数据
-        tableData2: [],
-        resData: [],
-        carMessage: {
-          billCode: "",
-          plateNumber: "",
-          boxCode: [],
-          startTime: "",
-          endTime: ""
-        },
-        option: {},
-        //表单各值
-        maxT: 0,
-        maxH: 0,
-        minT: 0,
-        minH: 0,
-        aggT: 0,
-        aggH: 0,
-        avgT: 0,
-        avgH: 0,
-        dataCar: [],
-        dataBox: [],
-        dataMerge: [],
-        isCarData: false,
-        isBoxData: false,
-      };
-    },
-    mounted() {
-      //DOM初始化完成进行地图初始化
-      this.initMap();
-    },
-    created() {
-      //把传参中的保温箱转换成数组
-      this.carMessage = this.$route.query;
-      if (this.carMessage.boxCode != null) {
-        this.carMessage.boxCode = this.$route.query.boxCode.split(',');
-      }
-      console.log(this.carMessage, 'this.carMessage')
-      // 获取总数据
-      this.merge(this.carMessage);
-    },
-    methods: {
-      //通过传参查询数据
-      handleGeocodeRepo(data) {
-        historyApi.queryAddress(data).then(res => {
-          console.log(res, 'res-----------------');
-          if (res.code == 200) {
-            // 表格中分列展示数据
-            this.listSplitting(res.data.car, res.data.box);
-            console.log(this.dataCar, 'this.dataCar');
-            //定义路线数组
-            let path = [];
-            //筛选含经纬度的数组
-            let latitudeLongitude = [];
-            let count = 0;
-            for (let i = 0; i < this.dataMerge.length; i++) {
-              if (this.dataMerge[i].gpsLatitude != 0 && this.dataMerge[i].gpsLongitude != 0) {
-                latitudeLongitude[count++] = this.dataMerge[i];
-              }
+      //温湿度信息表单数据
+      tableData2:
+        [],
+      resData:
+        [],
+      carMessage:
+        {
+          billCode: '',
+          plateNumber:
+            '',
+          boxCode:
+            [],
+          startTime:
+            '',
+          endTime:
+            '',
+          wmsBillCode:
+            '',
+          customerName:
+            '',
+          customerAddress:
+            '',
+          customerContact:
+            '',
+          customerTel:
+            ''
+        }
+      ,
+      option: {}
+      ,
+      //表单各值
+      maxT: 0,
+      maxH:
+        0,
+      minT:
+        0,
+      minH:
+        0,
+      aggT:
+        0,
+      aggH:
+        0,
+      avgT:
+        0,
+      avgH:
+        0,
+      dataCar:
+        [],
+      dataBox:
+        [],
+      dataMerge:
+        [],
+      isCarData:
+        false,
+      isBoxData:
+        false,
+      bill:
+        false
+    }
+  },
+  mounted() {
+    // DOM初始化完成进行地图初始化
+    this.initMap()
+  },
+  created() {
+    // 把传参中的保温箱转换成数组
+    this.carMessage = this.$route.query
+    if (this.carMessage.boxCode != null) {
+      this.carMessage.boxCode = this.$route.query.boxCode.split(',')
+    }
+    console.log(this.carMessage, 'this.carMessage')
+    // 获取总数据
+    this.merge(this.carMessage)
+    // 判读属于配送单跟踪还是订单跟踪
+    this.checkout()
+  },
+  methods: {
+    // 通过传参查询数据
+    handleGeocodeRepo(data) {
+      historyApi.queryAddress(data).then(res => {
+        console.log(res, 'res-----------------')
+        if (res.code === 200) {
+          // 表格中分列展示数据
+          this.listSplitting(res.data.car, res.data.box)
+          console.log(this.dataCar, 'this.dataCar')
+          //定义路线数组
+          let path = []
+          //筛选含经纬度的数组
+          let latitudeLongitude = []
+          let count = 0
+          for (let i = 0; i < this.dataMerge.length; i++) {
+            if (this.dataMerge[i].gpsLatitude !== 0 && this.dataMerge[i].gpsLongitude !== 0) {
+              latitudeLongitude[count++] = this.dataMerge[i]
             }
-            //定义整数递增值,并且绘制初始路径
-            if (latitudeLongitude.length >= 14) {
-              this.increment = Math.trunc(latitudeLongitude.length / 14);
-              for (let i = 0; i < latitudeLongitude.length; i = i + this.increment) {
-                path.push([latitudeLongitude[i].gpsLongitude, latitudeLongitude[i].gpsLatitude]);
-              }
-            } else {
-              for (let i = 0; i < latitudeLongitude.length; i++) {
-                path.push([latitudeLongitude[i].gpsLongitude, latitudeLongitude[i].gpsLatitude]);
-              }
+          }
+          // 定义整数递增值,并且绘制初始路径
+          if (latitudeLongitude.length >= 14) {
+            this.increment = Math.trunc(latitudeLongitude.length / 14)
+            for (let i = 0; i < latitudeLongitude.length; i = i + this.increment) {
+              path.push([latitudeLongitude[i].gpsLongitude, latitudeLongitude[i].gpsLatitude])
             }
-            //计算各值
-            this.calculate(this.dataMerge);
-            //对订单温湿度列表进行赋值
-            this.assignmentTable1(this.dataMerge);
-            //提取探头种类数量
-            let probeSum = [];
-            let probe = [];
+          } else {
             for (let i = 0; i < latitudeLongitude.length; i++) {
-              probeSum[i] = latitudeLongitude[i].measuringPointAddr;
+              path.push([latitudeLongitude[i].gpsLongitude, latitudeLongitude[i].gpsLatitude])
+            }
+          }
+          // 计算各值
+          this.calculate(this.dataMerge)
+          // 对订单温湿度列表进行赋值
+          this.assignmentTable1(this.dataMerge)
+          // 提取探头种类数量
+          let probeSum = []
+          let probe = []
+          for (let i = 0; i < latitudeLongitude.length; i++) {
+            probeSum[i] = latitudeLongitude[i].measuringPointAddr
+          }
+          probe = Array.from(new Set(probeSum))
+          // 车辆温度数组
+          let c, d
+          this.initEcharts()
+          for (let i = 0; i < probe.length; i++) {
+            let carForm = {
+              name: this.carMessage.plateNumber + '/' + probe[i],
+              data: [],
+              type: 'line',
+              smooth: true,
+              showSymbol: false,
+              label: {
+                show: true,
+                position: 'top',
+                textStyle: {
+                  fontSize: 12
+                }
+              },
+              markArea: {
+                itemStyle: {
+                  color: 'rgba(255, 0, 0)'
+                },
+                data: [
+                  [{
+                    name: '冷藏温度警戒线',
+                    yAxis: '8'
+                  },
+                    {
+                      yAxis: '8.1'
+                    }
+                  ],
+                  [{
+                    yAxis: '2'
+                  },
+                    {
+                      yAxis: '1.9'
+                    }
+                  ],
+                  // -0.5这条只用来做下方的提示文本
+                  [{
+                    name: '冷藏温度警戒线',
+                    yAxis: '-0.5'
+                  },
+                    {
+                      yAxis: '-0.5'
+                    }
+                  ],
+                  [{
+                    yAxis: '-15'
+                  },
+                    {
+                      name: '冷冻温度警戒线',
+                      yAxis: '-14.9'
+                    }
+                  ],
+                  [{
+                    yAxis: '-25'
+                  },
+                    {
+                      yAxis: '-25.1'
+                    }
+                  ],
+                  // -27.5这条只用来做下方的提示文本
+                  [{
+                    name: '冷冻温度警戒线',
+                    yAxis: '-27.5'
+                  },
+                    {
+                      yAxis: '-27.5'
+                    }
+                  ]
+                ]
+              }
+            }
+            // count = 0;
+            for (let j = 0; j < latitudeLongitude.length; j++) {
+              if (carForm.name.indexOf(latitudeLongitude[j].measuringPointAddr) !== -1) {
+                c = latitudeLongitude[j].hisDate
+                d = latitudeLongitude[j].temperature
+                carForm.data.push([c, d])
+              }
             }
-            probe = Array.from(new Set(probeSum));
-            //车辆温度数组
-            let c, d;
-            this.initEcharts();
-            for (let i = 0; i < probe.length; i++) {
-              let carForm = {
-                name: this.carMessage.plateNumber + '/' + probe[i],
+            this.option.series.push(carForm)
+            this.option.legend.data.push(carForm.name)
+          }
+          // 筛选保温箱的数组
+          if (this.carMessage.boxCode != null) {
+            let e, f
+            for (let i = 0; i < this.carMessage.boxCode.length; i++) {
+              let boxForm = {
+                name: this.carMessage.boxCode[i],
                 data: [],
-                type: "line",
+                type: 'line',
                 smooth: true,
                 showSymbol: false,
                 label: {
                   show: true,
-                  position: "top",
+                  position: 'top',
                   textStyle: {
                     fontSize: 12
                   }
@@ -260,49 +400,49 @@
                   },
                   data: [
                     [{
-                        name: '冷藏温度警戒线',
-                        yAxis: '8'
-                      },
+                      name: '冷藏温度警戒线',
+                      yAxis: '8'
+                    },
                       {
                         yAxis: '8.1'
                       }
                     ],
                     [{
-                        yAxis: '2'
-                      },
+                      yAxis: '2'
+                    },
                       {
                         yAxis: '1.9'
                       }
                     ],
                     // -0.5这条只用来做下方的提示文本
                     [{
-                        name: '冷藏温度警戒线',
-                        yAxis: '-0.5'
-                      },
+                      name: '冷藏温度警戒线',
+                      yAxis: '-0.5'
+                    },
                       {
                         yAxis: '-0.5'
                       }
                     ],
                     [{
-                        yAxis: '-15'
-                      },
+                      yAxis: '-15'
+                    },
                       {
                         name: '冷冻温度警戒线',
                         yAxis: '-14.9'
                       }
                     ],
                     [{
-                        yAxis: '-25'
-                      },
+                      yAxis: '-25'
+                    },
                       {
                         yAxis: '-25.1'
                       }
                     ],
                     // -27.5这条只用来做下方的提示文本
                     [{
-                        name: '冷冻温度警戒线',
-                        yAxis: '-27.5'
-                      },
+                      name: '冷冻温度警戒线',
+                      yAxis: '-27.5'
+                    },
                       {
                         yAxis: '-27.5'
                       }
@@ -311,533 +451,449 @@
                 }
               }
               // count = 0;
-              for (let j = 0; j < latitudeLongitude.length; j++) {
-                if (carForm.name.indexOf(latitudeLongitude[j].measuringPointAddr) != -1) {
-                  c = latitudeLongitude[j].hisDate;
-                  d = latitudeLongitude[j].temperature;
-                  carForm.data.push([c, d]);
+              for (let j = 0; j < this.dataMerge.length; j++) {
+                if (boxForm.name === this.dataMerge[j].measuringPointName) {
+                  e = this.dataMerge[j].hisDate
+                  f = this.dataMerge[j].temperature
+                  boxForm.data.push([e, f])
                 }
               }
-              this.option.series.push(carForm);
-              this.option.legend.data.push(carForm.name);
+              this.option.series.push(boxForm)
+              this.option.legend.data.push(boxForm.name)
             }
-            //筛选保温箱的数组
-            if (this.carMessage.boxCode != null) {
-              let e, f;
-              for (let i = 0; i < this.carMessage.boxCode.length; i++) {
-                let boxForm = {
-                  name: this.carMessage.boxCode[i],
-                  data: [],
-                  type: "line",
-                  smooth: true,
-                  showSymbol: false,
-                  label: {
-                    show: true,
-                    position: "top",
-                    textStyle: {
-                      fontSize: 12
-                    }
-                  },
-                  markArea: {
-                    itemStyle: {
-                      color: 'rgba(255, 0, 0)'
-                    },
-                    data: [
-                      [{
-                          name: '冷藏温度警戒线',
-                          yAxis: '8'
-                        },
-                        {
-                          yAxis: '8.1'
-                        }
-                      ],
-                      [{
-                          yAxis: '2'
-                        },
-                        {
-                          yAxis: '1.9'
-                        }
-                      ],
-                      // -0.5这条只用来做下方的提示文本
-                      [{
-                          name: '冷藏温度警戒线',
-                          yAxis: '-0.5'
-                        },
-                        {
-                          yAxis: '-0.5'
-                        }
-                      ],
-                      [{
-                          yAxis: '-15'
-                        },
-                        {
-                          name: '冷冻温度警戒线',
-                          yAxis: '-14.9'
-                        }
-                      ],
-                      [{
-                          yAxis: '-25'
-                        },
-                        {
-                          yAxis: '-25.1'
-                        }
-                      ],
-                      // -27.5这条只用来做下方的提示文本
-                      [{
-                          name: '冷冻温度警戒线',
-                          yAxis: '-27.5'
-                        },
-                        {
-                          yAxis: '-27.5'
-                        }
-                      ]
-                    ]
-                  }
-                }
-                // count = 0;
-                for (let j = 0; j < this.dataMerge.length; j++) {
-                  if (boxForm.name == this.dataMerge[j].measuringPointName) {
-                    e = this.dataMerge[j].hisDate;
-                    f = this.dataMerge[j].temperature;
-                    boxForm.data.push([e, f]);
-                  }
-                }
-                this.option.series.push(boxForm);
-                this.option.legend.data.push(boxForm.name);
+          }
+          // 如果车辆温度数组为空,则其它数组前移一位
+          for (let i = 1; ;) {
+            if (this.option.series[0].data.length === 0) {
+              for (let j = 0; j < this.option.series.length - i; j++) {
+                this.option.series[j] = this.option.series[j + 1]
+                this.option.legend.data[j] = this.option.legend.data[j + 1]
               }
+              this.option.series[this.option.series.length - i] = ''
+              this.option.legend.data[this.option.series.length - i++] = ''
             }
-            //如果车辆温度数组为空,则其它数组前移一位
-            for (let i = 1;;) {
-              if (this.option.series[0].data.length == 0) {
-                for (let j = 0; j < this.option.series.length - i; j++) {
-                  this.option.series[j] = this.option.series[j + 1];
-                  this.option.legend.data[j] = this.option.legend.data[j + 1];
-                }
-                this.option.series[this.option.series.length - i] = '';
-                this.option.legend.data[this.option.series.length - i++] = '';
-              }
-              if (this.option.series[0].data.length != 0) {
-                break;
-              }
+            if (this.option.series[0].data.length !== 0) {
+              break
             }
-            this.windowSize();
-            //对基础数据进行赋值
-            this.basicData.billCode = this.carMessage.billCode;
-            this.basicData.plateNumber = this.carMessage.plateNumber;
-            this.basicData.startTime = this.xData[0];
-            this.basicData.endTime = this.xData[this.xData.length - 1];
-            //基本地图加载
-            this.loadMap(path);
           }
-        })
-      },
-      handleClick(tab, event) {
-        console.log(tab, event);
-        this.handleGeocodeRepo(this.carMessage);
-      },
-      //地图初始化
-      initMap() {
-        AMapLoader.load({
-            //申请好的Web端开发者Key,首次调用 load 时必填
-            key: 'f953210b2d5276ffbf5a2bc01ef80f55',
-            //指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
-            version: '2.0',
-            //需要使用的的插件列表,如比例尺'AMap.Scale'等
-            plugins: ['']
-          })
-          .then(AMap => {
-            this.map = new AMap.Map('container', {
-              //设置地图容器id
-              //是否为3D地图模式
-              viewMode: '3D',
-              //初始化地图级别
-              zoom: 13,
-              //初始化地图中心点位置
-              center: [112.976376, 28.195318]
-            })
-          })
-          .catch(e => {
-            console.log(e)
-          })
-      },
-      //基本地图加载
-      loadMap(path) {
-        var map, route;
-        map = new AMap.Map("container", {
-          resizeEnable: true
-        });
-        map.plugin("AMap.DragRoute", function () {
-          //构造拖拽导航类
-          route = new AMap.DragRoute(map, path, AMap.DrivingPolicy.LEAST_FEE);
-          //查询导航路径并开启拖拽导航
-          route.search();
-        });
-      },
-      //图表属性赋值
-      initEcharts() {
-        this.option = {
-          tooltip: {
-            trigger: 'axis',
-            axisPointer: {
-              type: 'cross'
-            }
-          },
-          grid: {
-            x: 30,
-            y: 30,
-            x2: 20,
-            y2: 18,
-            borderWidth: 1,
-          },
-          toolbox: {
-            //保存图
-            // show: true,
-            // feature: {
-            //   saveAsImage: {}
-            // }
-          },
-          xAxis: {
-            type: 'category',
-            boundaryGap: false,
-            data: this.xData
-          },
-          //图例
-          legend: {
-            data: [],
-            // bottom: "0%"
-          },
-          yAxis: {
-            name: '温度',
-            // Y轴最大值
-            max: 10,
-            // Y轴最大值
-            min: -30,
-            splitNumber: 2,
-            // 最小刻度间隔
-            minInterval: 2,
-            // 最大刻度间隔
-            maxInterval: 5,
-            // 间隔值
-            interval: 2,
-            scale: true
-          },
-          //加上dataZoom可实现缩放
-          dataZoom: [{
-              //x轴
-              type: 'slider',
-              xAxisIndex: 0,
-
-            },
-            {
-              //x轴
-              type: 'inside',
-              xAxisIndex: 0,
-              /**
-               * 如何触发缩放。可选值为:true:表示不按任何功能键,鼠标滚轮能触发缩放。false:表示鼠标滚轮不能触发缩放。
-               * 'shift':表示按住 shift和鼠标滚轮能触发缩放。
-               * 'ctrl':表示按住 ctrl 和鼠标滚轮能触发缩放。'alt':表示按住 alt 和鼠标滚轮能触发缩放。
-               */
-              zoomOnMouseWheel: 'true',
-            },
-          ],
-          /**
-           * series中的参数:
-           * smooth:是否曲线,showSymbol:是否显示数据和数据点
-           */
-          series: [],
+          this.windowSize()
+          // 对基础数据进行赋值
+          this.basicData.billCode = this.carMessage.billCode
+          this.basicData.plateNumber = this.carMessage.plateNumber
+          this.basicData.startTime = this.xData[0]
+          this.basicData.endTime = this.xData[this.xData.length - 1]
+          // 基本地图加载
+          this.loadMap(path)
         }
-      },
-      //渲染图表
-      windowSize() {
-        this.myChart = echarts.init(document.getElementById("mychart"));
-        this.myChart.setOption(this.option);
-        window.addEventListener("resize", () => {
-          this.myChart.resize();
-        });
-      },
-      //计算各值
-      calculate(array) {
-        //数组中的温度湿度的字符串转成浮点
-        for (let i = 0; i < array.length; i++) {
-          array[i].temperature = parseFloat(array[i].temperature);
-          array[i].humidity = parseFloat(array[i].humidity);
-        }
-        //定义初始值
-        this.maxT = array[0].temperature;
-        this.maxH = array[0].humidity;
-        this.minT = array[0].temperature;
-        this.minH = array[0].humidity;
-        this.aggT = 0;
-        this.aggH = 0;
-        let x = [];
-        for (let i = 0; i < array.length; i++) {
-          //对X轴的时间进行赋值
-          x[i] = array[i].hisDate;
-          //对Y轴的温度进行赋值
-          // this.temperatureData[i] = array[i].temperature;
-          //温度最大值
-          if (array[i].temperature > this.maxT) {
-            this.maxT = array[i].temperature;
-          }
-          //湿度最大值
-          if (array[i].humidity > this.maxH) {
-            this.maxH = array[i].humidity;
-          }
-          //温度最小值
-          if (array[i].temperature < this.minT) {
-            this.minT = array[i].temperature
+      })
+    },
+    handleClick(tab, event) {
+      console.log(tab, event)
+      this.handleGeocodeRepo(this.carMessage)
+    },
+    // 地图初始化
+    initMap() {
+      AMapLoader.load({
+        // 申请好的Web端开发者Key,首次调用 load 时必填
+        key: 'f953210b2d5276ffbf5a2bc01ef80f55',
+        // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
+        version: '2.0',
+        // 需要使用的的插件列表,如比例尺'AMap.Scale'等
+        plugins: ['']
+      })
+        .then(AMap => {
+          this.map = new AMap.Map('container', {
+            // 设置地图容器id
+            // 是否为3D地图模式
+            viewMode: '3D',
+            // 初始化地图级别
+            zoom: 13,
+            // 初始化地图中心点位置
+            center: [112.976376, 28.195318]
+          })
+        })
+        .catch(e => {
+          console.log(e)
+        })
+    },
+    // 基本地图加载
+    loadMap(path) {
+      var map, route
+      map = new AMap.Map('container', {
+        resizeEnable: true
+      })
+      map.plugin('AMap.DragRoute', function() {
+        // 构造拖拽导航类
+        route = new AMap.DragRoute(map, path, AMap.DrivingPolicy.LEAST_FEE)
+        // 查询导航路径并开启拖拽导航
+        route.search()
+      })
+    },
+    // 图表属性赋值
+    initEcharts() {
+      this.option = {
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'cross'
           }
-          //湿度最小值
-          if (array[i].humidity < this.minH) {
-            this.minH = array[i].humidity
+        },
+        grid: {
+          x: 30,
+          y: 30,
+          x2: 20,
+          y2: 18,
+          borderWidth: 1
+        },
+        toolbox: {
+          // 保存图
+          // show: true,
+          // feature: {
+          //   saveAsImage: {}
+          // }
+        },
+        xAxis: {
+          type: 'category',
+          boundaryGap: false,
+          data: this.xData
+        },
+        // 图例
+        legend: {
+          data: []
+          // bottom: "0%"
+        },
+        yAxis: {
+          name: '温度',
+          // Y轴最大值
+          max: 10,
+          // Y轴最大值
+          min: -30,
+          splitNumber: 2,
+          // 最小刻度间隔
+          minInterval: 2,
+          // 最大刻度间隔
+          maxInterval: 5,
+          // 间隔值
+          interval: 2,
+          scale: true
+        },
+        // 加上dataZoom可实现缩放
+        dataZoom: [{
+          // x轴
+          type: 'slider',
+          xAxisIndex: 0
+
+        },
+          {
+            // x轴
+            type: 'inside',
+            xAxisIndex: 0,
+            /**
+             * 如何触发缩放。可选值为:true:表示不按任何功能键,鼠标滚轮能触发缩放。false:表示鼠标滚轮不能触发缩放。
+             * 'shift':表示按住 shift和鼠标滚轮能触发缩放。
+             * 'ctrl':表示按住 ctrl 和鼠标滚轮能触发缩放。'alt':表示按住 alt 和鼠标滚轮能触发缩放。
+             */
+            zoomOnMouseWheel: 'true'
           }
-          //温湿度合计值
-          this.aggT += array[i].temperature;
-          this.aggH += array[i].humidity;
+        ],
+        /**
+         * series中的参数:
+         * smooth:是否曲线,showSymbol:是否显示数据和数据点
+         */
+        series: []
+      }
+    },
+    // 渲染图表
+    windowSize() {
+      this.myChart = echarts.init(document.getElementById('mychart'))
+      this.myChart.setOption(this.option)
+      window.addEventListener('resize', () => {
+        this.myChart.resize()
+      })
+    },
+    // 计算各值
+    calculate(array) {
+      // 数组中的温度湿度的字符串转成浮点
+      for (let i = 0; i < array.length; i++) {
+        array[i].temperature = parseFloat(array[i].temperature)
+        array[i].humidity = parseFloat(array[i].humidity)
+      }
+      // 定义初始值
+      this.maxT = array[0].temperature
+      this.maxH = array[0].humidity
+      this.minT = array[0].temperature
+      this.minH = array[0].humidity
+      this.aggT = 0
+      this.aggH = 0
+      let x = []
+      for (let i = 0; i < array.length; i++) {
+        // 对X轴的时间进行赋值
+        x[i] = array[i].hisDate
+        //对Y轴的温度进行赋值
+        // this.temperatureData[i] = array[i].temperature;
+        //温度最大值
+        if (array[i].temperature > this.maxT) {
+          this.maxT = array[i].temperature
         }
-        //x数组去重
-        x = Array.from(new Set(x));
-        let xSort = [];
-        for (let i = 0; i < x.length; i++) {
-          xSort[i] = new Date(x[i]);
+        //湿度最大值
+        if (array[i].humidity > this.maxH) {
+          this.maxH = array[i].humidity
         }
-        xSort.sort(function (a, b) {
-          return a - b;
-        })
-        for (let i = 0; i < xSort.length; i++) {
-          x[i] = this.formatDateTime(xSort[i], 'yyyy-MM-dd HH:mm:ss');
+        //温度最小值
+        if (array[i].temperature < this.minT) {
+          this.minT = array[i].temperature
         }
-        this.xData = x;
-        //温湿度平均值
-        this.avgT = this.aggT / array.length;
-        this.avgH = this.aggH / array.length;
-      },
-      //对订单温湿度列表进行赋值
-      assignmentTable1(array) {
-        this.modelData1[0].maxTemperature = this.maxT;
-        this.modelData1[0].maxHumidity = this.maxH;
-        this.modelData1[0].minTemperature = this.minT;
-        this.modelData1[0].minHumidity = this.minH;
-        this.modelData1[0].avgTemperature = this.avgT.toFixed(2);
-        this.modelData1[0].avgHumidity = this.avgH.toFixed(1);
-        this.modelData1[0].startTime = array[0].hisDate;
-        this.modelData1[0].endTime = array[array.length - 1].hisDate;
-        this.tableData1 = this.modelData1;
-      },
-      merge(data) {
-        historyApi.getMerge(data).then(res => {
-          if (res.code == 200) {
-            this.dataMerge = res.data;
-            console.log(this.dataMerge, 'dataMerge')
-            if (res.data == undefined || res.data == null || res.data == '') {
-              this.$modal.msgError("温度&经纬度数据为空!");
-              return;
-            }
-            // 获取分组数据
-            this.handleGeocodeRepo(this.carMessage);
+        //湿度最小值
+        if (array[i].humidity < this.minH) {
+          this.minH = array[i].humidity
+        }
+        //温湿度合计值
+        this.aggT += array[i].temperature
+        this.aggH += array[i].humidity
+      }
+      //x数组去重
+      x = Array.from(new Set(x))
+      let xSort = []
+      for (let i = 0; i < x.length; i++) {
+        xSort[i] = new Date(x[i])
+      }
+      xSort.sort(function(a, b) {
+        return a - b
+      })
+      for (let i = 0; i < xSort.length; i++) {
+        x[i] = this.formatDateTime(xSort[i], 'yyyy-MM-dd HH:mm:ss')
+      }
+      this.xData = x
+      //温湿度平均值
+      this.avgT = this.aggT / array.length
+      this.avgH = this.aggH / array.length
+    },
+    //对订单温湿度列表进行赋值
+    assignmentTable1(array) {
+      this.modelData1[0].maxTemperature = this.maxT
+      this.modelData1[0].maxHumidity = this.maxH
+      this.modelData1[0].minTemperature = this.minT
+      this.modelData1[0].minHumidity = this.minH
+      this.modelData1[0].avgTemperature = this.avgT.toFixed(2)
+      this.modelData1[0].avgHumidity = this.avgH.toFixed(1)
+      this.modelData1[0].startTime = array[0].hisDate
+      this.modelData1[0].endTime = array[array.length - 1].hisDate
+      this.tableData1 = this.modelData1
+    },
+    merge(data) {
+      historyApi.getMerge(data).then(res => {
+        if (res.code === 200) {
+          this.dataMerge = res.data
+          console.log(this.dataMerge, 'dataMerge')
+          if (res.data === undefined || res.data == null || res.data === '') {
+            this.$modal.msgError('温度&经纬度数据为空!')
+            return
           }
-        })
-      },
-      // 表格数据分列展示
-      listSplitting(dataCar, dataBox) {
-        let differenceValueCar;
-        let arr2 = [];
-        if (dataCar != null && dataCar != '') {
-          this.isCarData = true;
-          for (let i = 0; i < dataCar.length; i++) {
-            let arr3 = [];
-            // 向上取整差值
-            differenceValueCar = Math.ceil(dataCar[i].length / 5);
-            for (let j = 0; j < dataCar[i].length; j++) {
-              if (j == differenceValueCar) {
-                for (let z = 0; z < differenceValueCar; z++) {
-                  if (j + z < dataCar[i].length) {
-                    dataCar[i][z].temperature1 = dataCar[i][j + z].temperature;
-                    dataCar[i][z].hisDate1 = dataCar[i][j + z].hisDate;
-                  }
+          // 获取分组数据
+          this.handleGeocodeRepo(this.carMessage)
+        }
+      })
+    },
+    // 表格数据分列展示
+    listSplitting(dataCar, dataBox) {
+      let differenceValueCar
+      let arr2 = []
+      if (dataCar != null && dataCar !== '') {
+        this.isCarData = true
+        for (let i = 0; i < dataCar.length; i++) {
+          let arr3 = []
+          // 向上取整差值
+          differenceValueCar = Math.ceil(dataCar[i].length / 5)
+          for (let j = 0; j < dataCar[i].length; j++) {
+            if (j === differenceValueCar) {
+              for (let z = 0; z < differenceValueCar; z++) {
+                if (j + z < dataCar[i].length) {
+                  dataCar[i][z].temperature1 = dataCar[i][j + z].temperature
+                  dataCar[i][z].hisDate1 = dataCar[i][j + z].hisDate
                 }
               }
-              if (j == differenceValueCar * 2) {
-                for (let z = 0; z < differenceValueCar; z++) {
-                  if (j + z < dataCar[i].length) {
-                    dataCar[i][z].temperature2 = dataCar[i][j + z].temperature;
-                    dataCar[i][z].hisDate2 = dataCar[i][j + z].hisDate;
-                  }
+            }
+            if (j === differenceValueCar * 2) {
+              for (let z = 0; z < differenceValueCar; z++) {
+                if (j + z < dataCar[i].length) {
+                  dataCar[i][z].temperature2 = dataCar[i][j + z].temperature
+                  dataCar[i][z].hisDate2 = dataCar[i][j + z].hisDate
                 }
               }
-              if (j == differenceValueCar * 3) {
-                for (let z = 0; z < differenceValueCar; z++) {
-                  if (j + z < dataCar[i].length) {
-                    dataCar[i][z].temperature3 = dataCar[i][j + z].temperature;
-                    dataCar[i][z].hisDate3 = dataCar[i][j + z].hisDate;
-                  }
+            }
+            if (j === differenceValueCar * 3) {
+              for (let z = 0; z < differenceValueCar; z++) {
+                if (j + z < dataCar[i].length) {
+                  dataCar[i][z].temperature3 = dataCar[i][j + z].temperature
+                  dataCar[i][z].hisDate3 = dataCar[i][j + z].hisDate
                 }
               }
-              if (j == differenceValueCar * 4) {
-                for (let z = 0; z < differenceValueCar; z++) {
-                  if (j + z < dataCar[i].length) {
-                    dataCar[i][z].temperature4 = dataCar[i][j + z].temperature;
-                    dataCar[i][z].hisDate4 = dataCar[i][j + z].hisDate;
-                  }
+            }
+            if (j === differenceValueCar * 4) {
+              for (let z = 0; z < differenceValueCar; z++) {
+                if (j + z < dataCar[i].length) {
+                  dataCar[i][z].temperature4 = dataCar[i][j + z].temperature
+                  dataCar[i][z].hisDate4 = dataCar[i][j + z].hisDate
                 }
               }
-              if (j < differenceValueCar) {
-                arr3.push(dataCar[i][j]);
-                console.log(arr3, 'arr3')
-              }
             }
-            arr2.push(arr3);
-            this.queryEnd(arr2[i], differenceValueCar);
+            if (j < differenceValueCar) {
+              arr3.push(dataCar[i][j])
+              console.log(arr3, 'arr3')
+            }
           }
+          arr2.push(arr3)
+          this.queryEnd(arr2[i], differenceValueCar)
         }
-        this.dataCar = arr2;
-        let differenceValueBox;
-        let arr = [];
-        if (dataBox != null && dataBox != '') {
-          this.isBoxData = true;
-          for (let i = 0; i < dataBox.length; i++) {
-            let arr1 = [];
-            // 向上取整差值
-            differenceValueBox = Math.ceil(dataBox[i].length / 5);
-            for (let j = 0; j < dataBox[i].length; j++) {
-              if (j == differenceValueBox) {
-                for (let z = 0; z < differenceValueBox; z++) {
-                  dataBox[i][z].temperature1 = dataBox[i][j + z].temperature;
-                  dataBox[i][z].hisDate1 = dataBox[i][j + z].hisDate;
-                }
+      }
+      this.dataCar = arr2
+      let differenceValueBox
+      let arr = []
+      if (dataBox != null && dataBox !== '') {
+        this.isBoxData = true
+        for (let i = 0; i < dataBox.length; i++) {
+          let arr1 = []
+          // 向上取整差值
+          differenceValueBox = Math.ceil(dataBox[i].length / 5)
+          for (let j = 0; j < dataBox[i].length; j++) {
+            if (j === differenceValueBox) {
+              for (let z = 0; z < differenceValueBox; z++) {
+                dataBox[i][z].temperature1 = dataBox[i][j + z].temperature
+                dataBox[i][z].hisDate1 = dataBox[i][j + z].hisDate
               }
-              if (j == differenceValueBox * 2) {
-                for (let z = 0; z < differenceValueBox; z++) {
-                  dataBox[i][z].temperature2 = dataBox[i][j + z].temperature;
-                  dataBox[i][z].hisDate2 = dataBox[i][j + z].hisDate;
-                }
+            }
+            if (j === differenceValueBox * 2) {
+              for (let z = 0; z < differenceValueBox; z++) {
+                dataBox[i][z].temperature2 = dataBox[i][j + z].temperature
+                dataBox[i][z].hisDate2 = dataBox[i][j + z].hisDate
               }
-              if (j == differenceValueBox * 3) {
-                for (let z = 0; z < differenceValueBox; z++) {
-                  dataBox[i][z].temperature3 = dataBox[i][j + z].temperature;
-                  dataBox[i][z].hisDate3 = dataBox[i][j + z].hisDate;
-                }
+            }
+            if (j === differenceValueBox * 3) {
+              for (let z = 0; z < differenceValueBox; z++) {
+                dataBox[i][z].temperature3 = dataBox[i][j + z].temperature
+                dataBox[i][z].hisDate3 = dataBox[i][j + z].hisDate
               }
-              if (j == differenceValueBox * 4) {
-                for (let z = 0; z < differenceValueBox; z++) {
-                  if (j + z < dataBox[i].length) {
-                    dataBox[i][z].temperature4 = dataBox[i][j + z].temperature;
-                    dataBox[i][z].hisDate4 = dataBox[i][j + z].hisDate;
-                  }
+            }
+            if (j === differenceValueBox * 4) {
+              for (let z = 0; z < differenceValueBox; z++) {
+                if (j + z < dataBox[i].length) {
+                  dataBox[i][z].temperature4 = dataBox[i][j + z].temperature
+                  dataBox[i][z].hisDate4 = dataBox[i][j + z].hisDate
                 }
               }
-              if (j < differenceValueBox) {
-                arr1.push(dataBox[i][j]);
-              }
             }
-            arr.push(arr1);
-            console.log(arr, 'arr')
-            this.queryEnd(arr[i], differenceValueBox);
-          }
-        }
-        this.dataBox = arr;
-      },
-      // 查找结束时间
-      queryEnd(arr, differenceValue) {
-        for (let j = differenceValue - 1; j >= 0; j--) {
-          if (arr[j].hisDate4 != null && arr[j].hisDate4 != '' && arr[j].hisDate4 != undefined) {
-            arr[differenceValue - 1].end = arr[j].hisDate4;
-            return;
+            if (j < differenceValueBox) {
+              arr1.push(dataBox[i][j])
+            }
           }
+          arr.push(arr1)
+          console.log(arr, 'arr')
+          this.queryEnd(arr[i], differenceValueBox)
         }
-        for (let j = differenceValue - 1; j >= 0; j--) {
-          if (arr[j].hisDate3 != null && arr[j].hisDate3 != '' && arr[j].hisDate3 != undefined) {
-            arr[differenceValue - 1].end = arr[j].hisDate3;
-            return;
-          }
+      }
+      this.dataBox = arr
+    },
+    // 查找结束时间
+    queryEnd(arr, differenceValue) {
+      for (let j = differenceValue - 1; j >= 0; j--) {
+        if (arr[j].hisDate4 != null && arr[j].hisDate4 !== '' && arr[j].hisDate4 !== undefined) {
+          arr[differenceValue - 1].end = arr[j].hisDate4
+          return
         }
-        for (let j = differenceValue - 1; j >= 0; j--) {
-          if (arr[j].hisDate2 != null && arr[j].hisDate2 != '' && arr[j].hisDate2 != undefined) {
-            arr[differenceValue - 1].end = arr[j].hisDate2;
-            return;
-          }
+      }
+      for (let j = differenceValue - 1; j >= 0; j--) {
+        if (arr[j].hisDate3 != null && arr[j].hisDate3 !== '' && arr[j].hisDate3 !== undefined) {
+          arr[differenceValue - 1].end = arr[j].hisDate3
+          return
         }
-        for (let j = differenceValue - 1; j >= 0; j--) {
-          if (arr[j].hisDate1 != null && arr[j].hisDate1 != '' && arr[j].hisDate1 != undefined) {
-            arr[differenceValue - 1].end = arr[j].hisDate1;
-            return;
-          }
+      }
+      for (let j = differenceValue - 1; j >= 0; j--) {
+        if (arr[j].hisDate2 != null && arr[j].hisDate2 !== '' && arr[j].hisDate2 !== undefined) {
+          arr[differenceValue - 1].end = arr[j].hisDate2
+          return
         }
-        for (let j = differenceValue - 1; j >= 0; j--) {
-          if (arr[j].hisDate != null && arr[j].hisDate != '' && arr[j].hisDate != undefined) {
-            arr[differenceValue - 1].end = arr[j].hisDate;
-            return;
-          }
+      }
+      for (let j = differenceValue - 1; j >= 0; j--) {
+        if (arr[j].hisDate1 != null && arr[j].hisDate1 !== '' && arr[j].hisDate1 !== undefined) {
+          arr[differenceValue - 1].end = arr[j].hisDate1
+          return
         }
-      },
-      //获取当前时间
-      getCurrentTime() {
-        let date = new Date();
-        return date;
-      },
-      //日期名称格式化
-      formatDateTime(date, format) {
-        const o = {
-          'M+': date.getMonth() + 1, // 月份
-          'd+': date.getDate(), // 日
-          'h+': date.getHours() % 12 === 0 ? 12 : date.getHours() % 12, // 小时
-          'H+': date.getHours(), // 小时
-          'm+': date.getMinutes(), // 分
-          's+': date.getSeconds(), // 秒
-          'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
-          S: date.getMilliseconds(), // 毫秒
-          a: date.getHours() < 12 ? '上午' : '下午', // 上午/下午
-          A: date.getHours() < 12 ? 'AM' : 'PM', // AM/PM
-        };
-        if (/(y+)/.test(format)) {
-          format = format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
+      }
+      for (let j = differenceValue - 1; j >= 0; j--) {
+        if (arr[j].hisDate != null && arr[j].hisDate !== '' && arr[j].hisDate !== undefined) {
+          arr[differenceValue - 1].end = arr[j].hisDate
+          return
         }
-        for (let k in o) {
-          if (new RegExp('(' + k + ')').test(format)) {
-            format = format.replace(
-              RegExp.$1,
-              RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length)
-            );
-          }
+      }
+    },
+    //日期名称格式化
+    formatDateTime(date, format) {
+      const o = {
+        'M+': date.getMonth() + 1, // 月份
+        'd+': date.getDate(), // 日
+        'h+': date.getHours() % 12 === 0 ? 12 : date.getHours() % 12, // 小时
+        'H+': date.getHours(), // 小时
+        'm+': date.getMinutes(), // 分
+        's+': date.getSeconds(), // 秒
+        'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
+        S: date.getMilliseconds(), // 毫秒
+        a: date.getHours() < 12 ? '上午' : '下午', // 上午/下午
+        A: date.getHours() < 12 ? 'AM' : 'PM' // AM/PM
+      }
+      if (/(y+)/.test(format)) {
+        format = format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
+      }
+      for (let k in o) {
+        if (new RegExp('(' + k + ')').test(format)) {
+          format = format.replace(
+            RegExp.$1,
+            RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length)
+          )
         }
-        return format;
-      },
+      }
+      return format
+    },
+    // 判读属于配送单跟踪还是订单跟踪
+    checkout() {
+      if (!(this.carMessage.customerName === undefined || this.carMessage.customerName === null || this.carMessage.customerName === '')) {
+        this.bill = true
+      }
     }
-  };
+  }
+}
 
 </script>
 
 <style scoped>
-  #container {
-    padding: 100px;
-    margin: 10px;
-    width: 1000;
-    height: 800px;
-  }
+#container {
+  padding: 100px;
+  margin: 10px;
+  height: 800px;
+}
 
-  .OutCss {
-    float: right;
-  }
+.OutCss {
+  float: right;
+}
 
-  #body {
-    /* padding: 0px 200px 0px 200px; */
-    margin: 0 auto;
+#body {
+  /* padding: 0px 200px 0px 200px; */
+  margin: 0 auto;
 
-  }
+}
 
-  @media print {
-    @page {
-      margin: 0;
-      size: portrait;
-      /* size: A4 landscape; size: landscape横向,size: portrait;纵向,如果不设置,则页面有横向和纵向的选择框 */
-    }
+@media print {
+  @page {
+    margin: 0;
+    size: portrait;
+    /* size: A4 landscape; size: landscape横向,size: portrait;纵向,如果不设置,则页面有横向和纵向的选择框 */
+  }
 
-    #body {
-      /* margin: 20cm; */
-      margin: 0 auto;
-      /* 打印时缩放,防止页面溢出 */
-      zoom: 0.4;
-    }
+  #body {
+    /* margin: 20cm; */
+    margin: 0 auto;
+    /* 打印时缩放,防止页面溢出 */
+    zoom: 0.4;
   }
+}
 
 </style>

+ 19 - 1
src/views/business/ehr/pm/kanban/kanban.vue

@@ -56,6 +56,11 @@
         <el-table-column label="综合得分" align="center" prop="mark" />
         <el-table-column label="等级" align="center" prop="grade" />
         <el-table-column label="绩效系数" align="center" prop="coefficient" />
+        <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button size="mini" type="text" @click="btnDel(scope.row)">删除</el-button>
+          </template>
+        </el-table-column>
       </el-table>
       <div class="paginationClass">
         <pagination
@@ -71,7 +76,7 @@
 </template>
 
 <script>
-import { listKanban,importData} from "@/api/business/ehr/pm/kanban";
+import { listKanban,importData,delKanban} from "@/api/business/ehr/pm/kanban";
 import { listDept} from "@/api/business/ehr/ehr/dept";
 
 export default {
@@ -206,6 +211,19 @@ export default {
     btnBack(){
       this.$router.back();
     },
+    //删除
+    btnDel(item){
+      let that = this;
+      this.$modal.confirm('确认要删除员工【' + item.staffName + '】的数据吗?').then(async function() {
+        that.loading = true;
+        return await delKanban(item.id);
+      }).then(() => {
+        that.getList();
+        that.$modal.msgSuccess("操作成功");
+      }).catch(() => {
+        that.loading = false;
+      });
+    }
   }
 };
 </script>

+ 2 - 2
src/views/business/spd/bo/basic/behaviorList.vue

@@ -453,8 +453,8 @@ export default {
       this.form.type = '0';
       this.form.staff = this.$store.state.user.id;
       this.form.staffName = this.$store.state.user.nickName;
-      this.form.dept = this.$store.state.user.deptId;
-      this.form.deptName = this.$store.state.user.deptName;
+      this.form.dept = this.$store.state.user.adminDept;
+      this.form.deptName = this.$store.state.user.adminDeptName;
       this.form.salesOrg = this.$store.state.user.orgId;
       this.form.salesOrgName = this.$store.state.user.orgName;
       this.form.time = new Date();

+ 19 - 71
src/views/business/spd/bo/basic/bobehaviorList.vue

@@ -11,16 +11,8 @@
     </div>
     <el-table size="mini" v-loading="loading" :data="behaviorList">
       <el-table-column label="序号" align="center" type="index" width="50" fixed/>
-      <el-table-column label="负责人" align="center" prop="staffName" />
-      <el-table-column label="行动日期" align="center" prop="time" />
-      <el-form-item label="行动日期" prop="time">
-        <el-date-picker clearable
-          v-model="form.time"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="请选择行动日期">
-        </el-date-picker>
-      </el-form-item>
+      <el-table-column label="跟进人" align="center" prop="createByName" />
+      <el-table-column label="跟进日期" align="center" prop="time" />
       <el-table-column label="联系人" align="center" prop="linkmanName" />
       <el-table-column label="拜访效果" align="center" prop="result" >
         <template slot-scope="scope">
@@ -34,18 +26,11 @@
       </el-table-column>
       <el-table-column show-overflow-tooltip label="协助内容" align="center" prop="assistContent" />
       <el-table-column show-overflow-tooltip label="洽谈内容" align="center" prop="content" />
-      <el-table-column label="行动类型" align="center" prop="type">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.mk_bo_behavior_type" :value="scope.row.type"/>
-        </template>
-      </el-table-column>
       <el-table-column label="拜访目的" align="center" prop="purpose">
         <template slot-scope="scope">
             <dict-tag :options="dict.type.mk_bo_behavior_goal" :value="scope.row.purpose"/>
         </template>
       </el-table-column>
-      <el-table-column show-overflow-tooltip label="销售组织" align="center" prop="salesOrgName"/>
-      <el-table-column show-overflow-tooltip label="部门" align="center" prop="deptName"/>
       <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -155,35 +140,6 @@
             </el-form-item>
           </el-col>
         </el-row>
-        <el-row>
-          <el-col :span="8">
-            <el-form-item label="销售区域" prop="marketingAreaName">
-              <dr-popover-select v-model="form.marketingAreaName" title="销售区域" type="MK_SALESAREA_PARAM" :dataMapping="{
-                  marketingArea: 'id',
-                  marketingAreaName: 'name',
-                }" :source.sync="form"
-              >
-              </dr-popover-select>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col  :span="8">
-            <el-form-item label="销售组织" prop="salesOrgName">
-              <el-input v-model="form.salesOrgName" readonly/>
-            </el-form-item>
-          </el-col>
-          <el-col  :span="8">
-             <el-form-item label="部门" prop="deptName">
-              <el-input v-model="form.deptName" readonly/>
-            </el-form-item>
-          </el-col>
-          <el-col  :span="8">
-            <el-form-item label="负责人" prop="staffName">
-              <el-input v-model="form.staffName" readonly/>
-            </el-form-item>
-          </el-col>
-        </el-row>
         <el-divider content-position="left">
           <dev style="width: 50px; height: 40px; font-size: 18px">跟进内容</dev>
         </el-divider>
@@ -221,25 +177,21 @@
             <dev style="width: 50px; height: 40px; font-size: 18px">其它信息</dev>
           </el-divider>
           <el-row>
-            <el-col :span="6">
+            <el-col :span="8">
+              <el-form-item label="部门" prop="deptName">
+                <el-input v-model="form.deptName" readonly/>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
               <el-form-item label="创建人">
                 <el-input v-model="form.createByName" readonly></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="6">
+            <el-col :span="8">
               <el-form-item label="创建时间">
                 <el-input v-model="form.createTime" readonly></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="6">
-              <el-form-item label="修改人">
-                <el-input v-model="form.updateByName" readonly></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item label="修改时间">
-                <el-input v-model="form.updateTime" readonly></el-input>
-              </el-form-item>
             </el-col>
           </el-row>
         </div>
@@ -253,15 +205,13 @@
 </template>
 
 <script>
-import { listBehavior, getBehavior, addBehavior, updateBehavior } from "@/api/business/spd/bo/behavior";
-import ContactRef from '@/views/business/spd/bo/refer/contact/index.vue';
-import SaleaeaRef from '@/views/business/spd/bo/refer/saleaea/index.vue';
+import {getBehavior, addBehavior, updateBehavior } from "@/api/business/spd/bo/behavior";
+import {listBehavior} from "@/api/business/spd/bo/basic";
 
 export default {
   name: "bobehaviorList",
   props:["bo","boAuthority"],
   dicts: ['mk_bo_behavior_res','mk_bo_behavior_type','sys_yes_no','mk_bo_behavior_goal'],
-  components: {ContactRef,SaleaeaRef},
   data() {
     return {
       dialogImageUrl: '',
@@ -332,7 +282,7 @@ export default {
   },
   created() {
     //组件创建时初始化查询参数
-    this.queryParams.bo = this.bo.id;
+    this.queryParams.id = this.bo.id;
     let params = {"post":this.boAuthority.post};
     this.queryParams.params = params;
     //查询
@@ -416,14 +366,9 @@ export default {
       this.resetForm("queryForm");
       this.handleQuery();
     },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
-    },
     /** 新增按钮操作 */
     handleAdd() {
+      console.log("this.$store.state.user",this.$store.state.user);
       this.fileList = [];
       this.reset();
       this.operatingState = "Insert";
@@ -435,10 +380,13 @@ export default {
       this.form.type = '0';
       this.form.staff = this.$store.state.user.id;
       this.form.staffName = this.$store.state.user.nickName;
-      this.form.dept = this.$store.state.user.deptId;
-      this.form.deptName = this.$store.state.user.deptName;
+      this.form.dept = this.$store.state.user.adminDept;
+      this.form.deptName = this.$store.state.user.adminDeptName;
       this.form.salesOrg = this.$store.state.user.orgId;
       this.form.salesOrgName = this.$store.state.user.orgName;
+      this.form.createBy = this.$store.state.user.name;
+      this.form.createByName = this.$store.state.user.nickName;
+      this.form.createTime = new Date().Format("yyyy-MM-dd HH:mm:ss");
       this.form.time = new Date();
       this.open = true;
       this.title = "商机跟进";
@@ -446,7 +394,7 @@ export default {
     /** 查看按钮操作 */
     handleBrowse(row) {
       this.reset();
-      const id = row.id || this.ids
+      const id = row.id;
       getBehavior(id).then(response => {
         this.form = response.data;
         this.fileList = this.form.behaviorPs;

+ 0 - 4
src/views/business/spd/bo/basic/bocontactList.vue

@@ -11,7 +11,6 @@
     </div>
     <el-table size="mini" v-loading="loading" :data="contactList">
       <el-table-column label="序号" align="center" type="index" width="50" fixed/>
-      <el-table-column label="编号" align="center" prop="code" width="250"/>
       <el-table-column label="姓名" align="center" prop="name" />
       <el-table-column label="性别" align="center" prop="gander" >
         <template slot-scope="scope">
@@ -20,7 +19,6 @@
       </el-table-column>
       <el-table-column label="联系电话" align="center" prop="telephone" show-overflow-tooltip/>
       <el-table-column label="微信" align="center" prop="mail" />
-      <el-table-column label="所属客户" align="center" prop="customerName" show-overflow-tooltip/>
       <el-table-column label="所属科室" align="center" prop="sectionName" />
       <el-table-column label="职务" align="center" prop="position" >
         <template slot-scope="scope">
@@ -32,8 +30,6 @@
           <dict-tag :options="dict.type.mk_bo_power" :value="scope.row.power"/>
         </template>
       </el-table-column>
-      <el-table-column width="200" show-overflow-tooltip label="兴趣爱好" align="center" prop="hobby" />
-      <el-table-column width="200" show-overflow-tooltip label="家庭地址" align="center" prop="address" />
       <el-table-column label="状态" align="center" prop="state" >
         <template slot-scope="scope">
           <dict-tag :options="dict.type.mk_bo_contact_state" :value="scope.row.state"/>

+ 15 - 13
src/views/business/spd/bo/basic/bopojpsnList.vue

@@ -54,7 +54,7 @@
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-if="bo.winningState == 0 && bo.principal == $store.state.user.name"
+            v-if="scope.row.post != '0' && bo.winningState == 0 && bo.principal == $store.state.user.name"
             >删除</el-button
           >
         </template>
@@ -72,18 +72,20 @@
     <!-- 添加或修改项目成员对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-popover-select-v2 
-          size="mini" 
-          v-model="form.staffName" 
-          title="员工" 
-          valueKey="name"
-          referName="CONTACTS_PARAM" 
-          :dataMapping="{staff:'id',staffName: 'name'}"
-          :source.sync="form"
-        >
-        </el-popover-select-v2>
+        <el-form-item label="项目成员" prop="staffName">
+          <el-popover-select-v2
+            v-model="form.staffName"
+            title="员工"                                   
+            valueKey="name"
+            referName="CONTACTS_PARAM"
+            :dataMapping="{staff:'id',staffName: 'name'}"
+            :source.sync="form"
+            style="width:220px"
+          >
+          </el-popover-select-v2>
+        </el-form-item>
         <el-form-item label="项目岗位" prop="post">
-          <el-select v-model="form.post" placeholder="请选择项目岗位" disabled>
+          <el-select v-model="form.post" disabled>
             <el-option
               v-for="dict in dict.type.mk_bo_pojpsn_post"
               :key="dict.value"
@@ -121,7 +123,7 @@ export default {
   name: "pojpsnList",
   props: ["source", "bo","boAuthority"],
   dicts: ["mk_bo_pojpsn_post",],
-  components: { StaffRef },
+  components: { StaffRef,ElPopoverSelectV2: () => import("@/components/popover-select-v2/index.vue") },
   data() {
     return {
       // 遮罩层

+ 30 - 75
src/views/business/spd/bo/basic/taskList.vue → src/views/business/spd/bo/basic/botaskList.vue

@@ -9,19 +9,10 @@
           @click="handleAdd"
           >新增</el-button>
     </div>
-    <el-table size="mini" v-loading="loading" :data="taskList" @selection-change="handleSelectionChange">
+    <el-table size="mini" v-loading="loading" :data="taskList" >
       <el-table-column label="序号" type="index" width="50" align="center" fixed/>
-      <el-table-column label="商机阶段" align="center" prop="boStageName"/>
-      <el-table-column width="150" show-overflow-tooltip label="任务编码" align="center" prop="code" />
       <el-table-column width="200" show-overflow-tooltip label="任务名称" align="center" prop="name" />
-      <el-table-column label="任务类型" align="center" prop="type">
-        <template slot-scope="scope">
-          <dict-tag
-            :options="dict.type.mk_bo_tasktype"
-            :value="scope.row.type"
-          />
-        </template>
-      </el-table-column>
+      <el-table-column width="500" show-overflow-tooltip label="任务内容" align="center" prop="content" />
       <el-table-column label="任务状态" align="center" prop="state">
         <template slot-scope="scope">
           <dict-tag
@@ -30,27 +21,18 @@
           />
         </template>
       </el-table-column>
-      <el-table-column label="联系人" align="center" prop="linkmanName" />
-      <el-table-column
-        width="200" 
-        show-overflow-tooltip
-        label="销售组织名称"
-        align="center"
-        prop="salesOrgName"
-      />
-      <el-table-column width="200" show-overflow-tooltip label="部门名称" align="center" prop="deptName" />
-      <el-table-column label="负责人名称" align="center" prop="staffName" />
-      <el-table-column
-        label="截止时间"
-        align="center"
-        prop="deadlineTime"
-        width="180"
-      >
+      <el-table-column label="负责人" align="center" prop="staffName" />
+      <el-table-column label="开始时间" align="center" prop="startTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.startTime, "{y}-{m}-{d}") }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="截止时间" align="center" prop="deadlineTime" width="100">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.deadlineTime, "{y}-{m}-{d}") }}</span>
         </template>
       </el-table-column>
-      <el-table-column width="200" show-overflow-tooltip label="任务内容" align="center" prop="content" />
+      <el-table-column label="创建人" align="center" prop="createByName" />
       <el-table-column
         width="250"
         label="操作"
@@ -222,33 +204,19 @@
               </dr-popover-select>
             </el-form-item>
           </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="8">
-            <el-form-item label="销售组织" prop="salesOrgName">
-              <el-input
-                v-model="form.salesOrgName"
-                readonly
-              />
-            </el-form-item>
-          </el-col>
-          <el-col :span="8">
-            <el-form-item label="部门" prop="deptName">
-              <el-input
-                v-model="form.deptName"
-                readonly
-              />
-            </el-form-item>
-          </el-col>
           <el-col :span="8">
             <el-form-item label="负责人" prop="staffName">
-              <el-input v-model="form.staffName">
-                <el-button
-                  slot="append"
-                  icon="el-icon-more"
-                  @click="refereStaff"
-                ></el-button>
-              </el-input>
+              <dr-popover-select
+                v-model="form.staffName"
+                title="联系人选择"
+                type="CONTACTS_PARAM"
+                :dataMapping="{
+                  staff: 'code',
+                  staffName: 'name',
+                }"
+                :source.sync="form"
+              >
+              </dr-popover-select>
             </el-form-item>
           </el-col>
         </el-row>
@@ -318,12 +286,6 @@
         <el-button size="mini" @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-    <!-- 员工参照 -->
-    <StaffRef
-      ref="staffSelect"
-      @doSubmit="staffSelectionsToInput"
-      :single="true"
-    />
   </div>
 </template>
 
@@ -337,7 +299,6 @@ import {
 } from "@/api/business/spd/bo/task";
 import {listTask} from "@/api/business/spd/bo/basic";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import StaffRef from "@/views/business/spd/bo/refer/staff/index.vue";
 import BehaviorList from "./behaviorList.vue";
 
 export default {
@@ -345,19 +306,12 @@ export default {
   props: ["bo", "boAuthority"],
   dicts: ["mk_bo_taskstate", "mk_bo_tasktype", "mk_bo_stage"],
   components: {
-    StaffRef,
     BehaviorList,
   },
   data() {
     return {
       // 遮罩层
       loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
       // 显示搜索条件
       showSearch: true,
       // 总条数
@@ -524,12 +478,6 @@ export default {
       this.resetForm("queryForm");
       this.handleQuery();
     },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.id);
-      this.single = selection.length !== 1;
-      this.multiple = !selection.length;
-    },
     /** 新增按钮操作 */
     handleAdd() {
       this.operatingState = "Insert";
@@ -541,6 +489,13 @@ export default {
       this.form.customerName = this.bo.customerName;
       this.form.startTime = new Date();
       this.form.state = "0";
+      this.form.dept = this.$store.state.user.adminDept;
+      this.form.deptName = this.$store.state.user.adminDeptName;
+      this.form.salesOrg = this.$store.state.user.orgId;
+      this.form.salesOrgName = this.$store.state.user.orgName;
+      this.form.createBy = this.$store.state.user.name;
+      this.form.createByName = this.$store.state.user.nickName;
+      this.form.createTime = new Date().Format("yyyy-MM-dd HH:mm:ss");
       this.open = true;
       this.title = "添加任务";
     },
@@ -548,7 +503,7 @@ export default {
     handleUpdate(row) {
       this.operatingState = "Update";
       this.reset();
-      const id = row.id || this.ids;
+      const id = row.id;
       getTask(id).then((response) => {
         this.form = response.data;
         this.open = true;
@@ -559,7 +514,7 @@ export default {
     /** 查看按钮操作 */
     handleBrowse(row) {
       this.reset();
-      const id = row.id || this.ids;
+      const id = row.id;
       getTask(id).then((response) => {
         this.form = response.data;
         this.open = true;

+ 31 - 13
src/views/business/spd/bo/basic/details.vue

@@ -15,11 +15,11 @@
       <div style="float: right; padding: 3px 0; display:flex;justify-content:space-between" type="text">
         <el-button size="mini" plain @click="handleBack">返回</el-button>
         <el-button type="info" plain size="mini" @click="handleWinningState('1', '关闭')"
-          v-if="(showClose && this.form.basic.winningState == 0) && form.basic.principal == $store.state.user.name">关闭</el-button>
+          v-if="(showClose && this.form.basic.winningState == 0) && '0'.includes(boAuthority.post)">关闭</el-button>
         <el-button type="info" plain size="mini" @click="handleWinningState('2', '丢单')"
-          v-if="(showLose && this.form.basic.winningState == 0) && form.basic.principal == $store.state.user.name">丢单</el-button>
+          v-if="(showLose && this.form.basic.winningState == 0) && '0'.includes(boAuthority.post)">丢单</el-button>
         <el-button type="info" plain size="mini" @click="handleWinningState('3', '赢单')"
-          v-if="(showWin && this.form.basic.winningState == 0) && form.basic.principal == $store.state.user.name">赢单</el-button>
+          v-if="(showWin && this.form.basic.winningState == 0) && '0'.includes(boAuthority.post)">赢单</el-button>
         <el-button type="info" plain size="mini" @click="allocation()"
           v-if="this.form.basic.winningState == 0 && form.basic.principal == $store.state.user.name">分配</el-button>
       </div>
@@ -60,22 +60,34 @@
       <el-descriptions-item label="赢单率">
         {{ form.basic.winningRate }}
       </el-descriptions-item>
-      <el-descriptions-item label="商机状态:" style="margin-left:27px">
-        <div v-for="dict in dict.type.mk_bo_state" v-if="form.basic.boState == dict.value">
-          <div>{{ dict.label }}</div>
-        </div>
-      </el-descriptions-item>
-      <el-descriptions-item label="赢丢单状态:">
+      <el-descriptions-item label="赢丢单状态">
         <div v-for="dict in dict.type.mk_bo_winstate" v-if="form.basic.winningState == dict.value">
           {{ dict.label }}
         </div>
       </el-descriptions-item>
+      <el-descriptions-item label="最近跟进">
+        {{form.basic.recentlyFollowup ? form.basic.recentlyFollowup : "暂无跟进"}}
+      </el-descriptions-item>
     </el-descriptions>
     <el-descriptions :column="1">
       <el-descriptions-item label="商机内容">
         {{ form.basic.boContent }}
       </el-descriptions-item>
     </el-descriptions>
+    <el-descriptions :column="4" v-if="form.basic.winningState != '0'">
+      <el-descriptions-item :label="winningStateTitle + '原因'">
+        {{ form.basic.winningStateCause }}
+      </el-descriptions-item>
+      <el-descriptions-item :label="winningStateTitle + '备注'">
+        {{ form.basic.winningStateRemark }}
+      </el-descriptions-item>
+      <el-descriptions-item :label="winningStateTitle + '日期'">
+        {{new Date(form.basic.winningStateDate).Format("yyyy-MM-dd")}}
+      </el-descriptions-item>
+      <el-descriptions-item :label="winningStateTitle + '金额'">
+        {{ form.basic.winningStateMoney }}
+      </el-descriptions-item>
+    </el-descriptions>
     <!-- 主多页签 -->
     <el-tabs v-model="masterTabs" @tab-click="tabsSwitch">
       <!-- 项目流程页签 -->
@@ -215,7 +227,7 @@ import {
 } from "@/api/business/spd/bo/basic";
 import { getBoNodeListByType } from "@/api/business/spd/bo/boNode";
 import { getPsnPost } from "@/api/business/spd/bo/authority";
-import TaskList from "./taskList.vue";
+import TaskList from "./botaskList.vue";
 import ContactList from "./bocontactList.vue";
 import AccessoryList from "../basic/accessoryList.vue";
 import FileTemplate from "../filetemplate/botabs.vue";
@@ -303,7 +315,7 @@ export default {
       //营收总额
       totalRevenue: "***营收总额",
       //预估额
-      estimate: "***预估额(万元)",
+      estimate: "***预估额(万元)"
     };
   },
   watch: {
@@ -456,7 +468,7 @@ export default {
           this.showClose = false;
           this.showLose = false;
           this.showWin = false;
-          if (curNode < auditNode) {
+          if (curNode != auditNode) {
             this.showClose = true;
           }
           if (curNode > auditNode) {
@@ -480,6 +492,12 @@ export default {
     //加载基础数据
     getBasic(this.$route.params.id).then((response) => {
       this.form.basic = response.data;
+      //设置应丢关单标题
+      switch(this.form.basic.winningState){
+        case "1" : this.winningStateTitle = "关闭";break;
+        case "2" : this.winningStateTitle = "丢单";break;
+        case "3" : this.winningStateTitle = "赢单";break;
+      }
       //加载权限数据
       getPsnPost(this.form.basic.id).then((response) => {
         this.boAuthority = response.data;
@@ -506,7 +524,7 @@ export default {
         this.showClose = false;
         this.showLose = false;
         this.showWin = false;
-        if (curNode < auditNode) {
+        if (curNode != auditNode) {
           this.showClose = true;
         }
         if (curNode > auditNode) {

+ 31 - 165
src/views/business/spd/bo/basic/index.vue

@@ -117,9 +117,7 @@
     <el-table
       v-loading="loading"
       :data="basicList"
-      @selection-change="handleSelectionChange"
       @cell-dblclick="enterDetails"
-      :height="height"
       size="mini"
     >
       <el-table-column
@@ -134,19 +132,12 @@
           <dict-tag :options="dict.type.mk_bo_type" :value="scope.row.boType" />
         </template>
       </el-table-column>
-      <el-table-column label="商机状态" width="150" align="center" prop="boState">
-        <template slot-scope="scope">
-          <dict-tag
-            :options="dict.type.mk_bo_state"
-            :value="scope.row.boState"
-          />
-        </template>
-      </el-table-column>
-      <el-table-column label="商机来源" width="150" align="center" prop="boSource">
+      <el-table-column label="赢单率" width="150" align="center" prop="winningRate" />
+      <el-table-column label="赢单率状态" width="150" align="center" prop="winningState">
         <template slot-scope="scope">
           <dict-tag
-            :options="dict.type.mk_bo_source"
-            :value="scope.row.boSource"
+            :options="dict.type.mk_bo_winstate"
+            :value="scope.row.winningState"
           />
         </template>
       </el-table-column>
@@ -158,31 +149,17 @@
         align="center"
         prop="hosDiscreetValue"
       />
-      <el-table-column label="赢单率" width="150" align="center" prop="winningRate" />
-      <el-table-column label="赢单率状态" width="150" align="center" prop="winningState">
+      <el-table-column label="商机来源" width="150" align="center" prop="boSource">
         <template slot-scope="scope">
           <dict-tag
-            :options="dict.type.mk_bo_winstate"
-            :value="scope.row.winningState"
+            :options="dict.type.mk_bo_source"
+            :value="scope.row.boSource"
           />
         </template>
       </el-table-column>
-      <el-table-column
-        width="150"
-        label="销售区域"
-        align="center"
-        prop="marketingAreaName"
-      />
-      <el-table-column
-        width="150"
-        show-overflow-tooltip
-        label="销售组织"
-        align="center"
-        prop="marketingOrganizingName"
-      />
-      <el-table-column label="部门" width="150" align="center" prop="deptName" />
+      <el-table-column show-overflow-tooltip label="部门" width="150" align="center" prop="deptName" />
       <el-table-column label="商机负责人" width="150" align="center" prop="principalName" />
-      <el-table-column label="创建人" width="150" align="center" prop="createBy" />
+      <el-table-column label="创建人" width="150" align="center" prop="createByName" />
       <el-table-column label="创建时间" width="150" align="center" prop="createTime" />
       <el-table-column
         label="操作"
@@ -230,6 +207,7 @@
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
+      class="paginationClass"
     />
 
     <!-- 添加或修改商机基础信息对话框 -->
@@ -275,21 +253,14 @@
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item
-              label="推荐人"
-              prop="referrerName"
-              v-show="form.boSource == '2'"
-              :rules="
-                form.boSource == '2' ? rules.referrer : [{ require: false }]
-              "
-            >
-              <el-input v-model="form.referrerName">
-                <el-button
-                  slot="append"
-                  icon="el-icon-more"
-                  @click="refereStaff"
-                ></el-button>
-              </el-input>
+            <el-form-item label="推荐人" prop="referrerName" v-show="form.boSource == '2'" :rules="form.boSource == '2' ? rules.referrer : [{ require: false }]">
+              <dr-popover-select 
+                  :disabled="this.operatingState == 'Update'"
+                  v-model="form.referrerName" title="推荐人" type="CONTACTS_PARAM" :dataMapping="{
+                  referrer: 'id',
+                  referrerName: 'name',
+                }" :source.sync="form">
+              </dr-popover-select>
             </el-form-item>
           </el-col>
         </el-row>
@@ -318,17 +289,6 @@
                   customerName: 'name',
                 }" :source.sync="form">
               </dr-popover-select>
-              <!-- <el-input
-                v-model="form.customerName"
-                :disabled="this.operatingState == 'Update'"
-              >
-                <el-button
-                  slot="append"
-                  icon="el-icon-more"
-                  @click="refereCustomer"
-                  :disabled="this.operatingState == 'Update'"
-                ></el-button>
-              </el-input> -->
             </el-form-item>
           </el-col>
           <el-col :span="8">
@@ -383,15 +343,7 @@
         <el-row>
           <el-col :span="6">
             <el-form-item label="销售区域" prop="marketingAreaName">
-              <el-input
-                v-model="form.marketingAreaName"
-                placeholder="请输入销售区域"
-              >
-                <el-button
-                  slot="append"
-                  icon="el-icon-more"
-                  @click="refereSaleaea"
-                ></el-button>
+              <el-input v-model="form.marketingAreaName" readonly>
               </el-input>
             </el-form-item>
           </el-col>
@@ -427,33 +379,6 @@
         <el-button size="mini" @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-
-    <!-- 客户参照 -->
-    <CustomerRef
-      ref="customerSelect"
-      @doSubmit="customerSelectionsToInput"
-      :single="true"
-    />
-    <!-- 销售区域参照 -->
-    <SaleaeaRef
-      ref="saleaeaSelect"
-      @doSubmit="saleaeaSelectionsToInput"
-      :single="true"
-    />
-    <!-- 组织参照 -->
-    <OrgRef ref="orgSelect" @doSubmit="orgSelectionsToInput" :single="true" />
-    <!-- 部门参照 -->
-    <DeptRef
-      ref="deptSelect"
-      @doSubmit="deptSelectionsToInput"
-      :single="true"
-    />
-    <!-- 员工参照 -->
-    <StaffRef
-      ref="staffSelect"
-      @doSubmit="staffSelectionsToInput"
-      :single="true"
-    />
   </div>
 </template>
 
@@ -615,8 +540,6 @@ export default {
           }
         }]
       },
-      //表格高度
-      height: "200px",
     };
   },
   watch: {
@@ -657,7 +580,6 @@ export default {
     }
   },
   created() {
-    this.height = window.innerHeight - 250 + 'px';
     this.getList();
   },
   methods: {
@@ -746,22 +668,17 @@ export default {
       this.resetForm("queryForm");
       this.handleQuery();
     },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.id);
-      this.single = selection.length !== 1;
-      this.multiple = !selection.length;
-    },
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
       this.open = true;
       this.operatingState = "Insert";
-      const { id, name, orgId, deptId, nickName, deptName, orgName } = this.$store.state.user;
+      console.log("this.$store.state.user",this.$store.state.user);
+      const { id, name, orgId, adminDept, nickName, adminDeptName, orgName } = this.$store.state.user;
       this.form.principal = name;
       this.form.principalName = nickName;
-      this.form.dept = deptId;
-      this.form.deptName = deptName;
+      this.form.dept = adminDept;
+      this.form.deptName = adminDeptName;
       this.form.marketingOrganizing = orgId;
       this.form.marketingOrganizingName = orgName;
       this.title = "添加商机基础信息";
@@ -831,16 +748,6 @@ export default {
         })
         .catch(() => {});
     },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download(
-        "system/basic/export",
-        {
-          ...this.queryParams,
-        },
-        `basic_${new Date().getTime()}.xlsx`
-      );
-    },
     //选择医院营收总额后
     totalHosRevenueChange(value) {
       switch (value) {
@@ -880,52 +787,6 @@ export default {
         this.mk_bo_stage = [];
       }
     },
-    // 触发客户参照列表
-    refereCustomer() {
-      this.$refs.customerSelect.init();
-    },
-    //客户参照列表选择后
-    customerSelectionsToInput(selections) {
-      this.form.customer = selections[0].id;
-      this.form.customerName = selections[0].name;
-    },
-    // 触发销售区域参照列表
-    refereSaleaea() {
-      this.$refs.saleaeaSelect.init();
-    },
-    //销售区域参照列表选择后
-    saleaeaSelectionsToInput(selections) {
-      this.form.marketingArea = selections[0].id;
-      this.form.marketingAreaName = selections[0].name;
-    },
-    // 触发组织参照列表
-    refereOrg() {
-      this.$refs.orgSelect.init();
-    },
-    //组织参照列表选择后
-    orgSelectionsToInput(selections) {
-      this.form.marketingOrganizing = selections[0].deptId;
-      this.form.marketingOrganizingName = selections[0].deptName;
-    },
-    // 触发部门参照列表
-    refereDept() {
-      this.$refs.deptSelect.init();
-    },
-    //部门参照列表选择后
-    deptSelectionsToInput(selections) {
-      this.form.dept = selections[0].deptId;
-      this.form.deptName = selections[0].deptName;
-    },
-    // 触发员工参照列表
-    refereStaff() {
-      this.$refs.staffSelect.init();
-    },
-    //员工参照列表选择后
-    staffSelectionsToInput(selections) {
-      this.form.referrer = selections[0].userId;
-      this.form.referrerName = selections[0].nickName;
-      console.log("this.form", this.form);
-    },
   },
 };
 </script>
@@ -945,8 +806,13 @@ export default {
 .lines {
   margin-top: 0;
 }
-.el-pagination {
-  margin-top: 10px;
-  text-align: right;
+.paginationClass {
+  z-index: 500;
+  position: fixed;
+  bottom: 10px;
+  right: 10px;
+  width: 100%;
+  line-height: var(--footer-height);
+  color: #fff;
 }
 </style>

+ 3 - 3
src/views/business/spd/bo/basic/process.vue

@@ -9,14 +9,14 @@
         type="primary"
         size="mini"
         @click="submitOa"
-        v-if="showSubmit && form.winningState == 0 && form.principal == $store.state.user.name"
+        v-if="showSubmit && form.winningState == 0 && '0'.includes(boAuthority.post)"
         >提交</el-button>
         <el-button
         type="primary"
         size="mini"
         @click="next"
         v-show="!isUpdate"
-        v-if="(showNext && form.winningState == 0) && form.principal == $store.state.user.name"
+        v-if="(showNext && form.winningState == 0) && '0'.includes(boAuthority.post)"
         >变更为下一阶段</el-button>
     </div>
     <el-divider content-position="left" style="font-size: 30px">
@@ -1415,7 +1415,7 @@
     <!-- 编辑按钮组 -->
     <dev>
       <el-row type="flex" class="row-bg" justify="end">
-        <el-col :span="2" v-show="!isUpdate && showStage.code == form.boStage && form.winningState == 0" v-if="form.principal == $store.state.user.name">
+        <el-col :span="2" v-show="!isUpdate && showStage.code == form.boStage && form.winningState == 0" v-if="'0'.includes(boAuthority.post)">
           <div class="grid-content bg-purple">
             <el-button type="primary" size="mini"
               @click="modifyButton"

+ 11 - 1
src/views/business/spd/bo/behavior/index.vue

@@ -64,7 +64,7 @@
         @click="handleExport"
       >导出</el-button>
     </div>
-    <el-table v-loading="loading" :data="behaviorList" height="700px">
+    <el-table v-loading="loading" :data="behaviorList">
       <el-table-column label="负责人" align="center" prop="staffName" />
       <el-table-column label="行动日期" align="center" prop="time" />
       <el-form-item label="行动日期" prop="time">
@@ -119,6 +119,7 @@
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
+      class="paginationClass"
     />
     <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
       <el-form size="mini" ref="form" :model="form" :rules="rules" label-width="80px" :disabled="this.operatingState == 'Browse'">
@@ -555,4 +556,13 @@ export default {
   display: flex;
   justify-content: flex-end;
 }
+.paginationClass {
+  z-index: 500;
+  position: fixed;
+  bottom: 10px;
+  right: 10px;
+  width: 100%;
+  line-height: var(--footer-height);
+  color: #fff;
+}
 </style>

+ 11 - 1
src/views/business/spd/bo/contact/index.vue

@@ -44,7 +44,7 @@
         :fileSize="2"
       ></BatchImport>
     </div>
-    <el-table size="mini" v-loading="loading" :data="contactList" height="700px">
+    <el-table size="mini" v-loading="loading" :data="contactList">
       <el-table-column width="200" label="编号" align="center" prop="code" />
       <el-table-column show-overflow-tooltip label="姓名" align="center" prop="name" />
       <el-table-column label="性别" align="center" prop="gander" >
@@ -103,6 +103,7 @@
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
+      class="paginationClass"
     />
 
     <!-- 添加或修改联系人管理对话框 -->
@@ -640,4 +641,13 @@ export default {
   display: flex;
   justify-content: flex-end;
 }
+.paginationClass {
+  z-index: 500;
+  position: fixed;
+  bottom: 10px;
+  right: 10px;
+  width: 100%;
+  line-height: var(--footer-height);
+  color: #fff;
+}
 </style>

+ 5 - 5
src/views/business/spd/bo/plan/add.vue

@@ -252,8 +252,8 @@
           planName: '',
           charger: this.$store.state.user.id,
           chargerName: this.$store.state.user.nickName,
-          dept: this.$store.state.user.deptId,
-          deptName: this.$store.state.user.deptName,
+          dept: this.$store.state.user.adminDept,
+          deptName: this.$store.state.user.adminDeptName,
           startDate: this.getNextWeek(1),
           deadlineTime: this.getNextWeek(7),
           type: '0',
@@ -339,9 +339,9 @@
         this.basicForm.state = 0
         //复制之后执行人和部门变为当前账号所有者
         this.basicForm.charger = this.$store.state.user.id,
-          this.basicForm.chargerName = this.$store.state.user.nickName
-        this.basicForm.dept = this.$store.state.user.deptId
-        this.basicForm.deptName = this.$store.state.user.deptName
+        this.basicForm.chargerName = this.$store.state.user.nickName
+        this.basicForm.dept = this.$store.state.user.adminDept
+        this.basicForm.deptName = this.$store.state.user.adminDeptName
         if (this.basicForm.chargerName) {
           this.reBackRefer('CONTACTS_PARAM', this.basicForm.chargerName)
         }

+ 90 - 22
src/views/business/spd/bo/statement/index.vue

@@ -25,13 +25,10 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="商机来源" prop="boSource">
-        <el-select
-          v-model="queryParams.boSource"
-          clearable
-        >
+      <el-form-item label="赢单状态" prop="winningState">
+        <el-select v-model="queryParams.winningState" placeholder="" clearable>
           <el-option
-            v-for="dict in dict.type.mk_bo_source"
+            v-for="dict in dict.type.mk_bo_winstate"
             :key="dict.value"
             :label="dict.label"
             :value="dict.value"
@@ -46,10 +43,19 @@
     </el-form>
     <el-tabs v-model="activeName" @tab-click="handleClick">
       <el-tab-pane label="SPD商机" name="0">
-        <el-table size="mini" :data="boList" v-loading="loading" @cell-dblclick="toBo" :height="height">
+        <el-table size="mini" :data="boList" v-loading="loading" @cell-dblclick="toBo">
           <el-table-column width="300" show-overflow-tooltip label="商机名称" align="center" prop="boName" />
-          <el-table-column label="部门" align="center" prop="deptName" />
+          <el-table-column label="赢单率状态" align="center" prop="winningState">
+            <template slot-scope="scope">
+              <dict-tag
+                :options="dict.type.mk_bo_winstate"
+                :value="scope.row.winningState"
+              />
+            </template>
+          </el-table-column>
+          <el-table-column show-overflow-tooltip label="部门" align="center" prop="deptName" />
           <el-table-column label="商机预估值(万元)" align="center" prop="hosDiscreetValue"/>
+          <el-table-column width="300" show-overflow-tooltip label="商机内容" align="center" prop="boContent"/>
           <el-table-column label="创建日期" align="center" prop="createTime" >
             <template slot-scope="scope">
               {{new Date(scope.row.createTime).Format("yyyy-MM-dd")}}
@@ -106,10 +112,19 @@
         </el-table>
       </el-tab-pane>
       <el-tab-pane label="耗材集采商机" name="1">
-        <el-table size="mini" :data="boList" v-loading="loading" @cell-dblclick="toBo" :height="height">
+        <el-table size="mini" :data="boList" v-loading="loading" @cell-dblclick="toBo">
           <el-table-column width="300" show-overflow-tooltip label="商机名称" align="center" prop="boName" />
-          <el-table-column label="部门" align="center" prop="deptName" />
+          <el-table-column label="赢单率状态" align="center" prop="winningState">
+            <template slot-scope="scope">
+              <dict-tag
+                :options="dict.type.mk_bo_winstate"
+                :value="scope.row.winningState"
+              />
+            </template>
+          </el-table-column>
+          <el-table-column show-overflow-tooltip label="部门" align="center" prop="deptName" />
           <el-table-column label="商机预估值(万元)" align="center" prop="hosDiscreetValue"/>
+          <el-table-column width="300" show-overflow-tooltip label="商机内容" align="center" prop="boContent"/>
           <el-table-column label="创建日期" align="center" prop="createTime" >
             <template slot-scope="scope">
               {{new Date(scope.row.createTime).Format("yyyy-MM-dd")}}
@@ -174,10 +189,19 @@
         </el-table>
       </el-tab-pane>
       <el-tab-pane label="医疗耗材商机" name="2">
-        <el-table size="mini" :data="boList" v-loading="loading" @cell-dblclick="toBo" :height="height">
+        <el-table size="mini" :data="boList" v-loading="loading" @cell-dblclick="toBo">
           <el-table-column width="300" show-overflow-tooltip label="商机名称" align="center" prop="boName" />
-          <el-table-column label="部门" align="center" prop="deptName" />
-          <el-table-column width="100" label="商机预估值(万元)" align="center" prop="hosDiscreetValue"/>
+          <el-table-column label="赢单率状态" align="center" prop="winningState">
+            <template slot-scope="scope">
+              <dict-tag
+                :options="dict.type.mk_bo_winstate"
+                :value="scope.row.winningState"
+              />
+            </template>
+          </el-table-column>
+          <el-table-column show-overflow-tooltip label="部门" align="center" prop="deptName" />
+          <el-table-column label="商机预估值(万元)" align="center" prop="hosDiscreetValue"/>
+          <el-table-column width="200" show-overflow-tooltip label="商机内容" align="center" prop="boContent"/>
           <el-table-column label="创建日期" align="center" prop="createTime" >
             <template slot-scope="scope">
               {{new Date(scope.row.createTime).Format("yyyy-MM-dd")}}
@@ -258,10 +282,19 @@
         </el-table>
       </el-tab-pane>
       <el-tab-pane label="医疗设备商机" name="3">
-        <el-table size="mini" :data="boList" v-loading="loading" @cell-dblclick="toBo" :height="height">
+        <el-table size="mini" :data="boList" v-loading="loading" @cell-dblclick="toBo">
           <el-table-column width="300" show-overflow-tooltip label="商机名称" align="center" prop="boName" />
-          <el-table-column label="部门" align="center" prop="deptName" />
+          <el-table-column label="赢单率状态" align="center" prop="winningState">
+            <template slot-scope="scope">
+              <dict-tag
+                :options="dict.type.mk_bo_winstate"
+                :value="scope.row.winningState"
+              />
+            </template>
+          </el-table-column>
+          <el-table-column show-overflow-tooltip label="部门" align="center" prop="deptName" />
           <el-table-column label="商机预估值(万元)" align="center" prop="hosDiscreetValue"/>
+          <el-table-column width="300" show-overflow-tooltip label="商机内容" align="center" prop="boContent"/>
           <el-table-column label="创建日期" align="center" prop="createTime" >
             <template slot-scope="scope">
               {{new Date(scope.row.createTime).Format("yyyy-MM-dd")}}
@@ -326,10 +359,19 @@
         </el-table>
       </el-tab-pane>
       <el-tab-pane label="军队医疗设备商机" name="4">
-        <el-table size="mini" :data="boList" v-loading="loading" @cell-dblclick="toBo" :height="height">
+        <el-table size="mini" :data="boList" v-loading="loading" @cell-dblclick="toBo">
           <el-table-column width="300" show-overflow-tooltip label="商机名称" align="center" prop="boName" />
-          <el-table-column label="部门" align="center" prop="deptName" />
+          <el-table-column label="赢单率状态" align="center" prop="winningState">
+            <template slot-scope="scope">
+              <dict-tag
+                :options="dict.type.mk_bo_winstate"
+                :value="scope.row.winningState"
+              />
+            </template>
+          </el-table-column>
+          <el-table-column show-overflow-tooltip label="部门" align="center" prop="deptName" />
           <el-table-column label="商机预估值(万元)" align="center" prop="hosDiscreetValue"/>
+          <el-table-column width="300" show-overflow-tooltip label="商机内容" align="center" prop="boContent"/>
           <el-table-column label="创建日期" align="center" prop="createTime" >
             <template slot-scope="scope">
               {{new Date(scope.row.createTime).Format("yyyy-MM-dd")}}
@@ -394,10 +436,19 @@
         </el-table>
       </el-tab-pane>
       <el-tab-pane label="工程商机" name="5">
-        <el-table size="mini" :data="boList" v-loading="loading" @cell-dblclick="toBo" :height="height">
+        <el-table size="mini" :data="boList" v-loading="loading" @cell-dblclick="toBo">
           <el-table-column width="300" show-overflow-tooltip label="商机名称" align="center" prop="boName" />
-          <el-table-column label="部门" align="center" prop="deptName" />
+          <el-table-column label="赢单率状态" align="center" prop="winningState">
+            <template slot-scope="scope">
+              <dict-tag
+                :options="dict.type.mk_bo_winstate"
+                :value="scope.row.winningState"
+              />
+            </template>
+          </el-table-column>
+          <el-table-column show-overflow-tooltip label="部门" align="center" prop="deptName" />
           <el-table-column label="商机预估值(万元)" align="center" prop="hosDiscreetValue"/>
+          <el-table-column width="300" show-overflow-tooltip label="商机内容" align="center" prop="boContent"/>
           <el-table-column label="创建日期" align="center" prop="createTime" >
             <template slot-scope="scope">
               {{new Date(scope.row.createTime).Format("yyyy-MM-dd")}}
@@ -469,6 +520,7 @@
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
+      class="paginationClass"
     />
   </div>
 </template>
@@ -483,6 +535,7 @@ export default {
   dicts: [
     "mk_bo_type",
     "mk_bo_source",
+    "mk_bo_winstate"
   ],
   data() {
     return {
@@ -507,14 +560,12 @@ export default {
       //分页参数
       total:0,
       loading: true,
-      //表格高度
-      height: "200px",
       //阶段列表
       mk_bo_stage: [],
     };
   },
   created() {
-    this.height = window.innerHeight - 250 + "px"
+    this.queryParams.winningState = '0';
     var e = {
       name: '0',
     }
@@ -576,3 +627,20 @@ export default {
   }
 };
 </script>
+
+<style lang="scss" scoped>
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+.paginationClass {
+  z-index: 500;
+  position: fixed;
+  bottom: 10px;
+  right: 10px;
+  width: 100%;
+  line-height: var(--footer-height);
+  color: #fff;
+}
+</style>

+ 11 - 1
src/views/business/spd/bo/task/index.vue

@@ -96,10 +96,10 @@
     </div>
 
     <el-table
+      size="mini"
       v-loading="loading"
       :data="taskList"
       @selection-change="handleSelectionChange"
-      height="700px"
     >
       <el-table-column label="序号" type="index" width="50" align="center" fixed/>
       <el-table-column width="150" label="任务编码" align="center" prop="code" />
@@ -200,6 +200,7 @@
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
+      class="paginationClass"
     />
 
     <!-- 添加或修改任务对话框 -->
@@ -706,4 +707,13 @@ export default {
   display: flex;
   justify-content: flex-end;
 }
+.paginationClass {
+  z-index: 500;
+  position: fixed;
+  bottom: 10px;
+  right: 10px;
+  width: 100%;
+  line-height: var(--footer-height);
+  color: #fff;
+}
 </style>

+ 211 - 0
src/views/spdAddQuestion/add.vue

@@ -0,0 +1,211 @@
+<template>
+  <div id="spdAdd">
+    <div style="padding:0 0 30px 10px;" v-if="!control">
+      <span>新增问题</span>
+      <el-form :model="basicForm" :rules="basicRules" ref="basic" label-position="left" label-width="auto">
+        <el-row :gutter="10">
+          <el-col :span="23">
+            <el-form-item label="所属医院:" prop="hospital">
+              <el-select ref="select" size="mini" clearable filterable remote v-model="basicForm.hospital" :remote-method="remoteMethod"
+               @hook:mounted="cancalReadOnly"
+              @visible-change="cancalReadOnly" 
+              placeholder="请输入关键词">
+                <el-option
+                  v-for="item in yyoptions"
+                  :key="item.code"
+                  :label="item.name"
+                  :value="item.name">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="23">
+            <el-form-item label="所属科室:" prop="department">
+              <el-input size="mini" v-model="basicForm.department">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="23">
+            <el-form-item label="所属人员:" prop="person">
+              <el-input size="mini" v-model="basicForm.person">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="23">
+            <el-form-item label="联系方式:" prop="contactInfo">
+              <el-input size="mini" v-model="basicForm.contactInfo">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="23">
+            <el-form-item label="问题分类:" prop="problemClassification">
+              <el-select size="mini" v-model="basicForm.problemClassification" placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.label">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="23">
+            <el-form-item label="问题描述:" prop="problemDescription">
+              <el-input type="textarea" :rows="4" size="mini" v-model="basicForm.problemDescription">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="23">
+            <el-form-item label="问题图片:" prop="">
+              <el-upload
+                :action="uploadImgUrl"
+                :headers="headers"
+                :file-list="basicForm.problemPicture"
+                list-type="picture"
+                :on-success="successUpload"
+                :on-preview="handlePictureCardPreview"
+                :on-remove="handleRemove">
+                <i class="el-icon-plus"></i>
+              </el-upload>
+              <el-dialog :visible.sync="dialogVisible">
+                <img width="100%" :src="dialogImageUrl" alt="">
+              </el-dialog>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+      <div style="text-align: center;">
+        <el-button style="width: 150px;" type="primary" size="mini" @click="submitForm('basic')">提 交</el-button>
+      </div>
+    </div>
+
+    <Indexs @update-data="updateData" v-if="control"/>
+  </div>
+</template>
+
+<script>
+import { getToken } from "@/utils/auth";
+import { addQuestion } from "./api";
+import { getRefer } from '@/api/purchase/basic'
+export default {
+  components: {
+    Indexs: () => import("./index.vue"),
+  },
+  data() {
+    return {
+      control: true,
+      basicForm: {
+        hospital:'',
+        department:'',
+        person:'',
+        contactInfo:'',
+        problemClassification:'',
+        problemDescription:'',
+        problemPicture:[]
+      },
+      yyoptions: [],
+      options: [
+        {value: 1, label: '硬件问题'},
+        {value: 2, label: '系统操作'},
+        {value: 3, label: '服务问题'},
+        {value: 4, label: '保供问题'},
+        {value: 5, label: '其他'}
+      ],
+      basicRules:{
+        hospital:[{required: true, message: '请选择所属医院', trigger: 'blur'}],
+        department:[{required: true, message: '请填写科室', trigger: 'blur'}],
+        person:[{required: true, message: '请填写人员', trigger: 'blur'}],
+        contactInfo:[{required: true, message: '请填写联系方式', trigger: 'blur'}],
+        problemDescription:[{required: true, message: '请填写问题描述', trigger: 'blur'}],
+        problemClassification:[{required: true, message: '请选择问题分类', trigger: 'change'}],
+      },
+      dialogImageUrl: '',
+      dialogVisible: false,
+      uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
+      headers: {
+        Authorization: "Bearer " + getToken(),
+      },
+    }
+  },
+  methods: {
+    successUpload(resp, file, fileList) {
+      console.log(fileList)
+      this.basicForm.problemPicture = fileList.map((item) => {
+        return item.url
+      })
+    },
+    handleRemove(file, fileList) {
+      console.log(fileList)
+      this.basicForm.problemPicture = fileList.map((item) => {
+        return item.url
+      })
+    },
+    handlePictureCardPreview(file) {
+      this.dialogImageUrl = file.url;
+      this.dialogVisible = true;
+    },
+    remoteMethod(query) {
+      console.log(query)
+      if(query != '') {
+        let params = {isPage: false, type: 'CUSTOMER_PARAM', name: '客户参照', search: query}
+        getRefer(params).then(res => {
+          if(res.code === 200) {
+            this.yyoptions = res.rows
+          }
+        })
+      } else {
+        this.yyoptions = []
+      }
+    },
+    submitForm(formName) {
+      console.log(this.basicForm)
+      this.$refs[formName].validate((valid) => {
+        if(valid) {
+          addQuestion(this.basicForm).then(res => {
+            if (res.code === 200) {
+              this.$modal.notifySuccess("新增成功");
+              this.control = true
+              this.basicForm = {
+                hospital:'',
+                department:'',
+                person:'',
+                contactInfo:'',
+                problemClassification:'',
+                problemDescription:'',
+                problemPicture:[]
+              }
+            }
+          }).catch(err => {
+
+          })
+        } else {
+          return false
+        }
+      })
+    },
+    updateData(val) {
+      this.control = val
+    },
+    cancalReadOnly(onOff) {
+      this.$nextTick(() => {
+        if (!onOff) {
+          const { select } = this.$refs;
+          const input = select.$el.querySelector('.el-input__inner');
+          input.removeAttribute('readonly');
+        }
+      });
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 10 - 0
src/views/spdAddQuestion/api.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 新增
+export function addQuestion(data) {
+  return request({
+    url: `/spd/problemCollection/add`,
+    method: 'post',
+    data: data
+  })
+}

+ 27 - 0
src/views/spdAddQuestion/index.vue

@@ -0,0 +1,27 @@
+<template>
+  <div id="spdIndex">
+    <div style="padding:0 0 30px 10px;">
+      <span>新增问题</span>
+      <div style="text-align: center;">
+        <el-button style="width: 150px;" type="primary" size="mini" @click="add()">新 增</el-button>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data () {
+    return {}
+  },
+  methods: {
+    add() {
+      this.$emit('update-data', false)
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+  
+</style>