bill 5 rokov pred
rodič
commit
3b032d46ff

+ 1 - 1
config/index.js

@@ -13,7 +13,7 @@ module.exports = {
     proxyTable: {},
 
     // Various Dev Server settings
-    host: 'localhost', // can be overwritten by process.env.HOST
+    host: '0.0.0.0', // can be overwritten by process.env.HOST
     port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
     autoOpenBrowser: false,
     errorOverlay: true,

+ 1 - 1
package.json

@@ -16,7 +16,7 @@
   "dependencies": {
     "axios": "^0.19.0",
     "echarts": "^4.2.1",
-    "element-ui": "^2.10.1",
+    "element-ui": "^2.12.0",
     "vue": "^2.5.2",
     "vue-router": "^3.0.1"
   },

BIN
src/assets/images/icon/sys_icon.png


+ 1 - 1
src/main.js

@@ -5,7 +5,7 @@ import Vue from 'vue'
 import App from './App'
 import router from './router'
 import ElementUI from 'element-ui'
-import '@/assets/css/theme/index.css'
+import 'element-ui/lib/theme-chalk/index.css'
 import http, {setHandle} from '@/util/http'
 
 Vue.use(ElementUI)

+ 0 - 2
src/page/device/index.vue

@@ -292,7 +292,6 @@ export default {
       }
     },
     async _modifyPoints () {
-      console.log('------'+this.currentPage+'-----')
       let body = this.form.region
       let points = this.form.point
       let cameraId = this.currentDeviceId
@@ -316,7 +315,6 @@ export default {
             type: 'success',
             message: '充值成功!'
           })
-          console.log('------'+this.currentPage+'-----')
           this._getCameraData()
           this.dialogFormVisible = false
         } else {

+ 94 - 0
src/page/distributor/index.vue

@@ -0,0 +1,94 @@
+<template>
+  <div id="user-query">
+    <div class="user-query-body" v-loading.fullscreen.lock="fullscreenLoading">
+      <div class="order-management-body">
+        <div class="order-management-inner">
+          <div class="base-info">
+            <span>时间段:</span>
+            <el-date-picker size="large" v-model="searchDate" type="daterange" unlink-panels range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions2" value-format="yyyy-MM-dd" align="center">
+            </el-date-picker>
+            <span>关键字:</span>
+            <el-input @keyup.enter.native="handSubmit" ref="idKey" v-model="childName" value="" placeholder="公司名称、地址、备注"></el-input>
+            <el-button type="primary" @click="handSubmit" color='red'>搜索</el-button>
+          </div>
+        </div>
+        <div class="user-query_bottom">
+          <div class="order-management-table">
+            <keep-alive>
+              <router-view class="user-view" :screen="screen" v-if="view === '设备查询'" />
+            </keep-alive>
+            <router-view v-if="view !== '设备查询'" class="user-view" :screen="screen" />
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+
+export default {
+  name: 'user-query',
+  data () {
+    return {
+      pickerOptions2: {
+        shortcuts: [{
+          text: '最近一周',
+          onClick (picker) {
+            const end = new Date()
+            const start = new Date()
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
+            picker.$emit('pick', [start, end])
+          }
+        }, {
+          text: '最近一个月',
+          onClick (picker) {
+            const end = new Date()
+            const start = new Date()
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+            picker.$emit('pick', [start, end])
+          }
+        }, {
+          text: '最近三个月',
+          onClick (picker) {
+            const end = new Date()
+            const start = new Date()
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
+            picker.$emit('pick', [start, end])
+          }
+        }]
+      },
+      childName: '',
+      searchDate: undefined,
+      sumArr: ['', '', '', '', '', '', '', '', '', '', '', ''],
+      screen: {},
+      fullscreenLoading: false
+    }
+  },
+  methods: {
+    handSubmit () {
+      this.screen = {}
+
+      this.screen.date1 = (this.searchDate) ? (this.searchDate[0] + ' 00:00:00') : null
+      this.screen.date2 = (this.searchDate) ? (this.searchDate[1] + ' 23:59:59') : null
+      this.screen.childName = this.childName || null
+
+      if (this.$refs.idKey.currentValue) {
+        this.screen.cameraId = this.$refs.idKey.currentValue
+      }
+      // this.$router.replace({ name: 'user-list' })
+    }
+  },
+  computed: {
+    view () {
+      return this.$route.name
+    }
+  }
+}
+
+</script>
+<style lang="css" scoped>
+@import url('./style.css');
+</style>
+<style type="text/css">
+@import url('./pstyle.css');
+</style>

+ 33 - 0
src/page/distributor/pstyle.css

@@ -0,0 +1,33 @@
+.creamtable td:nth-child(2),
+.creamtable td:nth-child(3),
+.creamtable td:nth-child(4) {
+  background-color: #fdf5e6 !important
+}
+
+.creamtable td:nth-child(5),
+.creamtable td:nth-child(6),
+.creamtable td:nth-child(7),
+.creamtable td:nth-child(8) {
+  background-color: #f0f9eb !important
+}
+
+.creamtable .el-table__footer td:nth-child(9) {
+  color: #999999;
+  text-align: right !important;
+}
+
+.el-table__expand-icon>i {
+  display: none !important;
+}
+
+.normal_btn span {
+  color: #09e1c0
+}
+
+.delete_btn {
+  color: #f56c6c
+}
+
+.error_btn {
+  color: #999
+}

+ 315 - 0
src/page/distributor/query-detail/index.vue

@@ -0,0 +1,315 @@
+<template>
+  <div>
+    <div class="option">
+      <div>
+        <span v-for="_type in types" :key="_type.val" @click="changeType(_type.val)" :class="{active: _type.val === type}">{{_type.text}}</span>
+      </div>
+      <div class="export_btn">
+        <el-button type="primary" @click="_exportExcelForService" color='red'>导出</el-button>
+      </div>
+    </div>
+    <div class="data-show">
+      <el-table :data="users" v-if="type === 0" style="width: 100%" show-summary :summary-method="getSummaries" v-loading="loading" class="table info1">
+        <el-table-column label="时间2">
+          <template slot-scope="scope">
+            <span>
+              {{new Date(scope.row.tradeTime).format('yyyy-MM-dd hh:mm:ss')}}
+            </span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="points" label="充值金额">
+        </el-table-column>
+        <el-table-column prop="points" label="兑换成点数">
+        </el-table-column>
+        <el-table-column label="状态">
+          <template slot-scope="scope">
+            <span>
+              {{scope.row.payStatus === 1 ? '成功': '失败'}}
+            </span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="orderSn" label="订单编号" width="220">
+        </el-table-column>
+        <el-table-column width="60">
+        </el-table-column>
+      </el-table>
+      <el-table :data="users" v-if="type === 1" style="width: 100%" show-summary :summary-method="getSummaries" v-loading="loading" class="table info2">
+        <el-table-column prop="create_time" label="时间">
+          <template slot-scope="scope">
+            <span>
+              {{new Date(scope.row.tradeTime).format('yyyy-MM-dd hh:mm:ss')}}
+            </span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="points" label="消费点数">
+        </el-table-column>
+        <el-table-column prop="orderNum" label="订单编号">
+        </el-table-column>
+        <el-table-column label=" " width="60">
+        </el-table-column>
+      </el-table>
+      <!-- @size-change="handleSizeChange"
+          :current-page="currentPage4" -->
+      <div class="pag-layout" v-if="pag.total">
+        <el-pagination :total="pag.total" :current-page="pag.current" :page-size="10" @current-change="handleCurrentChange" layout="total, prev, pager, next, jumper" class="pag">
+        </el-pagination>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+// import { request, serverName } from 'api/server'
+
+export default {
+  props: ['screen'],
+  data () {
+    return {
+      users: [],
+      pag: { current: 1 },
+      statistics: {
+        result: 0
+      },
+      loading: false,
+      type: 0,
+      types: [
+        { val: 0, text: '充值记录' },
+        { val: 1, text: '消费记录' }
+      ]
+    }
+  },
+  methods: {
+    getSummaries () {
+      if (!this.type) {
+        return [
+          '',
+          this.statistics.result || 0,
+          this.statistics.result || 0,
+          '', '',
+          '总计'
+        ]
+      } else {
+        return [
+          '',
+          this.statistics.result || 0,
+          '',
+          '总计'
+        ]
+      }
+    },
+    changeType (type) {
+      this.type = type
+    },
+    _exportExcelForService () {
+      // let page = this.currentPage;
+      let date1, date2
+      date1 = this.screen.date1 || null
+      date2 = this.screen.date2 || null
+
+      // let key = this.key_input = this.$refs.searchKey.currentValue || "";
+      // let agentName = this.companyKey_input = this.$refs.companyKey.currentValue || null;
+      let cameraId = this.$route.params.id || null
+
+      let fixUrl = ''
+      let type
+      if (~this.type) {
+        type = 1
+        fixUrl = '/excel/manageAgentRecharge.xlsx'
+      } else {
+        type = -1
+        fixUrl = '/excel/manageAgentConsume.xlsx'
+      }
+      this.$confirm('确定当前标签下的记录?', '导出记录', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.fullscreenLoading = true
+        this.$message({
+          type: 'info',
+          message: '正在下载,请稍等'
+        })
+        // let status = this.selectValue;
+        request['exportExcel2']({
+          // key:搜索关键词
+          date1,
+          date2,
+          // agentName,
+          type,
+          cameraId
+        }, 'get').then(res => {
+          if (res === 1) {
+            // window.location.href = "/excel/order.xlsx"
+            // console.log(res)
+            // this.$alert('请选择充值类型', '提示', {
+            //   confirmButtonText: '确定',
+            //   callback: action => {
+
+            //   }
+            // });
+
+            window.open(serverName + fixUrl + '?rnd=' + Math.random())
+            console.log(serverName + fixUrl + '?rnd=' + Math.random())
+            // this.fullscreenLoading = false;
+          } else {
+            this.$alert('导出失败', '提示', {
+              confirmButtonText: '确定'
+
+            })
+          }
+        })
+        this.fullscreenLoading = false
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消导出'
+        })
+        this.fullscreenLoading = false
+      })
+    },
+    async getData () {
+      let params = Object.assign({ pageNum: this.pag.current - 1, cameraId: this.$route.params.id, type: this.type.toString(), pageSize: 10 },
+        this.screen
+      )
+
+      let data = (await this.$http.post('/manager/camera/detailLog', params)).data
+      
+      this.pag = {
+        current: params.pageNum + 1,
+        total: data.total
+      }
+      this.users = data.list
+    },
+    async refresh () {
+      this.loading = true
+      await this.getData()
+      this.loading = false
+    },
+    handleCurrentChange (page) {
+      this.pag.current = page
+      this.refresh()
+    },
+    async loadData () {
+      this.loading = true
+      this.getData()
+
+      this.loading = false
+    },
+    async getStatistics () {
+      let date1, date2
+      let cameraId = this.$route.params.id
+      let status = this.type
+      date1 = this.screen.date1 || null
+      date2 = this.screen.date2 || null
+      let data = (await this.$http.post('/manager/camera/searchCameraDetailStatistics', {
+        type: status,
+        startDate: date1,
+        endDate: date2,
+        cameraId: cameraId
+      })).data
+      this.statistics.result = data.result
+      this.$bus.$emit('title-f', `<p>设备ID:${this.$route.params.rid}<span>当前剩余点数:${data.balance}</span></p>`)
+    },
+    deleteTool () {
+      let tool
+      while ((tool = this.tools.pop())) {
+        this.$emit('rmTool', tool)
+      }
+    }
+  },
+  destroyed () {
+    this.$bus.$emit('title-f', '')
+  },
+  watch: {
+    screen () {
+      this.refresh()
+    },
+    async type () {
+      await this.getStatistics()
+      await this.loadData()
+    },
+    '$route.params.id': function (newVal) {
+      // this.deleteTool()
+      // if (newVal) {
+      //   this.addTool()
+      // }
+    }
+  },
+  async created () {
+    // console.log(this.$route);
+
+    this.tools = []
+    // this.deleteTool()
+    // this.addTool()
+  }, 
+  beforeDestroy () {
+    // this.deleteTool()
+  },
+  async mounted () {
+    this.getStatistics()
+    this.getData()
+  }
+}
+
+</script>
+<style scoped>
+/*@import url('./style.css');*/
+
+.link {
+  color: #09e1c0;
+}
+
+.pag-layout {
+  overflow: hidden;
+  padding: 20px 0 10px;
+}
+
+.pag-layout .pag {
+  float: right;
+}
+
+.data-show {
+  padding-top: 35px;
+}
+
+.option {
+  padding-top: 10px;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.option span {
+  display: inline-block;
+  font-size: 14px;
+  color: #999999;
+  cursor: pointer;
+}
+
+.option span.active {
+  color: #333333;
+  font-weight: bold;
+}
+
+.option span::after {
+  content: '/';
+  display: inline-block;
+  font-size: 14px;
+  color: #999999;
+  font-weight: normal;
+  padding-left: 10px;
+  padding-right: 10px;
+}
+
+.option span:last-child::after {
+  display: none;
+}
+
+</style>
+<style>
+.info1 .el-table__footer td:nth-child(6),
+.info2 .el-table__footer td:nth-child(4) {
+  color: #999999;
+  text-align: right !important;
+}
+
+</style>

+ 396 - 0
src/page/distributor/query-list/index.vue

@@ -0,0 +1,396 @@
+<template>
+  <div class="layout">
+    {{this.pag.current}}
+    <el-table :data="users" style="width: 100%" class="creamtable table" :highlight-current-row="false"  v-loading="loading" :header-cell-class-name="tableHeaderClassName">
+      <el-table-column label="">
+        <el-table-column prop="id" label="序号" class="test">
+        </el-table-column>
+      </el-table-column>
+      <el-table-column label="公司信息">
+        <!-- <el-table-column prop="initPoint" label="期初点数">
+        </el-table-column> -->
+        <el-table-column prop="name" label="公司注册名称">
+        </el-table-column>
+        <el-table-column prop="address" label="公司地址">
+        </el-table-column>
+        <el-table-column label="门店信息">
+          <template slot-scope="scope">
+            <el-button type="success" size="mini" plain>{{scope.row.type === 1 ? '线下' : (scope.row.type === 2 ? '线上' : '无')}}</el-button>
+          </template>
+        </el-table-column>
+      </el-table-column>
+      <el-table-column label="申请人信息">
+        <el-table-column label="姓名">
+          <template slot-scope="scope">
+            {{scope.row.surName}}  {{scope.row.userName}}
+          </template>
+        </el-table-column>
+        <el-table-column prop="post" label="职位">
+        </el-table-column>
+        <el-table-column prop="phone" label="电话">
+        </el-table-column>
+        <el-table-column prop="email" label="电子邮箱">
+        </el-table-column>
+      </el-table-column>
+      <el-table-column prop="state" label="状态">
+        <template slot-scope="scope">
+          <el-switch @change="updateAduitStatus(scope.row.id,scope.row.state)" :value="!!scope.row.state" active-color="#13ce66" inactive-color="#ff4949">
+          </el-switch>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注">
+        <template slot-scope="scope">
+          <div @click="makerClick(scope.row)">
+            <i class="el-icon-s-flag" style="font-size: 20px;" :style="{color: colors[scope.row.noteType - 1]}" v-if="scope.row.noteType"></i>
+            <span v-else>无</span>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="提交日期" width="200">
+        <template slot-scope="scope">
+          <div>{{new Date(scope.row.createTime).format('yyyy-MM-dd hh:mm:ss')}}</div>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div class="pag-layout" v-if="pag.total">
+      <el-pagination :total="pag.total" :current-page="pag.current" :page-size="10" @current-change="handleCurrentChange" layout="total, prev, pager, next, jumper" class="pag">
+      </el-pagination>
+    </div>
+
+    
+    <el-dialog width="750px" title="备注设置" :visible.sync="active">
+      <el-form v-if="active" label-width="80px">
+        <el-form-item label="标记等级" width="100%">
+          <span v-for="(color, i) in colors" :key="i" style="margin-right: 20px;">
+            <el-radio :label="i + 1" v-model="active.noteType">
+              <i class="el-icon-s-flag" style="font-size: 20px;vertical-align: sub;" :style="{color: color}" ></i>
+            </el-radio>
+          </span>
+        </el-form-item>
+        <el-form-item label="备注内容" width="100%">
+          <el-input type="textarea" v-model="active.noteContent" :rows="5"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="active = null">取 消</el-button>
+        <el-button type="primary" @click="updateMaker">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+// import { request, serverName } from 'api/server'
+
+export default {
+  props: ['screen'],
+  data () {
+    return {
+      colors: [
+        '#08e2c0', '#39bafe', '#fce439', '#fda000', '#f96d6c'
+      ],
+      users: [],
+      pag: { current: 1 },
+      loading: true,
+      active: null 
+    }
+  },
+  methods: {
+    async updateAduitStatus (id, state) {
+      let data = (await this.$http.get('/manager/agentAduit/update/active/'+id+'/'+Number(!state)))
+      this.refresh()
+    },
+    async updateMaker () {
+      let data = (await this.$http.post('/manager/agentAduit/update/note', {
+        id: this.active.id,
+        noteContent: this.active.noteContent,
+        noteType: this.active.noteType
+      }));
+      if (data.code === 0) {
+        this.active = null
+        this.refresh()
+      }
+    },
+    makerClick (item) {
+      this.active = item
+    },
+    tableHeaderClassName ({ columnIndex, row }) {
+      console.log(columnIndex, row)
+      if (row.length === 6) {
+        if (columnIndex === 1) {
+          return 'warning-col head-top-col tab-col'
+        } else if (columnIndex === 2) {
+          return 'success-col head-top-col tab-col'
+        } else {
+          return 'head-top-col tab-col'
+        }
+      } else if (columnIndex >= 1 && columnIndex <= 3) {
+        return 'warning-col head-col tab-col'
+      } else if (columnIndex >= 4 && columnIndex <= 7) {
+        return 'success-col head-col tab-col'
+      } else {
+        return 'head-col tab-col'
+      }
+    },
+    _exportExcelForService () {
+      // let page = this.currentPage;
+      let date1, date2
+      date1 = this.screen.date1 || null
+      date2 = this.screen.date2 || null
+
+      let cameraId = this.screen.cameraId || null
+
+      let fixUrl = '/excel/manageAgentCamera.xlsx'
+      let type = 4
+
+      this.$confirm('确定当前标签下的记录?', '导出记录', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.fullscreenLoading = true
+        this.$message({
+          type: 'info',
+          message: '正在下载,请稍等'
+        })
+        // let status = this.selectValue;
+        request['exportExcel']({
+          // key:搜索关键词
+          date1,
+          date2,
+          // agentName,
+          type,
+          cameraId
+        }, 'get').then(res => {
+          if (res === 1) {
+            // window.location.href = "/excel/order.xlsx"
+            // console.log(res)
+            // this.$alert('请选择充值类型', '提示', {
+            //   confirmButtonText: '确定',
+            //   callback: action => {
+
+            //   }
+            // });
+
+            window.open(serverName + fixUrl + '?rnd=' + Math.random())
+            console.log(serverName + fixUrl + '?rnd=' + Math.random())
+            // this.fullscreenLoading = false;
+          } else {
+            this.$alert('导出失败', '提示', {
+              confirmButtonText: '确定'
+
+            })
+          }
+        })
+        this.fullscreenLoading = false
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消导出'
+        })
+        this.fullscreenLoading = false
+      })
+    },
+    goToDetail (name, childName) {
+      this.$router.push({ name: 'user-detail', params: {id: name, rid: childName}})
+    },
+    async getData () {
+      let params = Object.assign(this.screen || {}, { page: this.pag.current })
+      this.fullscreenLoading = true
+      let url = '/manager/agentAduit/list'
+      let method = 'get'
+      if (params.date1 || params.date2 || params.itemName) {
+        url = '/manager/agentAduit/search'
+        method = 'post'
+      }
+      let para = {
+        pageNum: params.page,
+        pageSize: 10,
+        startDate: params.date1,
+        endDate: params.date2,
+        itemName: params.childName,
+        start: "0"
+      }
+      let data
+      if (method === 'get') {
+        let paras = []
+        Object.keys(para).forEach(k => {
+          if (para[k] || typeof para[k] === 'number') {
+            paras.push(`${k}=${para[k]}`)
+          } else {
+            paras.push(`${k}=''`)
+          }
+        })
+
+        para = paras.join('&')
+        
+        data = (await this.$http[method](url + '?' + para, )).data
+      } else {
+        data = (await this.$http[method](url, para)).data
+      }
+
+      
+
+      this.isChild = false
+      this.total = data.total
+
+      this.users = data.list
+      // this.pag.current = params.page + 1
+      this.pag.total = data.total
+    },
+    async getStatistics () {
+      let params = Object.assign(
+        this.screen, {}
+      )
+      let data = (await this.$http.post('/manager/camera/searchStatistics', {
+        startDate: params.date1,
+        endDate: params.date2,
+        childName: params.childName
+      })).data
+
+      Object.keys(data).forEach(k => {
+        this.statistics[k] = data[k]
+      })
+    },
+    async refresh () {
+      this.loading = true
+      await this.getData()
+      this.loading = false
+    },
+    handleCurrentChange (page) {
+      this.pag.current = page
+      this.refresh()
+    }
+  },
+  watch: {
+    screen () {
+      this.pag.current = 1
+      this.refresh()
+    }
+  },
+  async mounted () {
+    this.loading = true
+
+    this.getData()
+    // this.loading = true
+    // let result = await Promise.all([
+    //   this.$http.post('/showSub'),
+    //   this.getData()
+    // ])
+    // this.statistics = result[0]
+    this.loading = false
+  }
+}
+
+</script>
+<style scoped>
+/*@import url('./style.css');*/
+.el-icon-s-flag {
+  cursor: pointer;
+}
+
+.layout {
+  padding: 15px;
+}
+
+.export_btn {
+  float: right;
+  position: relative;
+  top: 40px;
+  z-index: 999;
+}
+
+.link {
+  color: #09e1c0;
+  cursor: pointer;
+}
+
+.pag-layout {
+  overflow: hidden;
+  padding: 20px 0 10px;
+}
+
+.pag-layout .pag {
+  float: right;
+}
+
+.data-show {
+  padding-top: 35px;
+}
+
+.option {
+  padding-top: 10px;
+}
+
+.option span {
+  display: inline-block;
+  font-size: 14px;
+  color: #999999;
+  cursor: pointer;
+}
+
+.option span.active {
+  color: #333333;
+  font-weight: bold;
+}
+
+.option span::after {
+  content: '/';
+  display: inline-block;
+  font-size: 14px;
+  color: #999999;
+  font-weight: normal;
+  padding-left: 10px;
+  padding-right: 10px;
+}
+
+.option span:last-child::after {
+  display: none;
+}
+
+</style>
+<style>
+.head-top-col {
+  color: #333 !important;
+  font-style: italic;
+  border: none !important;
+}
+
+.warning-col {
+  background-color: #fdf5e6 !important
+}
+
+.success-col {
+  background-color: #f0f9eb !important
+}
+
+.creamtable td:nth-child(2),
+.creamtable td:nth-child(3),
+.creamtable td:nth-child(4)
+ {
+  background-color: #fdf5e6 !important
+}
+
+.creamtable td:nth-child(5),
+.creamtable td:nth-child(6),
+.creamtable td:nth-child(7),
+.creamtable td:nth-child(8),
+ {
+  background-color: #f0f9eb !important
+}
+
+.creamtable .el-table__footer td:nth-child(9) {
+  color: #999999;
+  text-align: right !important;
+}
+
+.normal_btn span {
+  color: #09e1c0
+}
+
+.order-management-pagination {
+  padding: 20px 20px 0;
+  position: relative;
+  text-align: right;
+}
+
+</style>

+ 160 - 0
src/page/distributor/style.css

@@ -0,0 +1,160 @@
+.user-query-body {
+  width: 100%;
+  float: left;
+  /*  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);*/
+  /*border: 1px solid #ebeef5;*/
+}
+
+.order_check_row {
+  display: flex;
+  width: 100%;
+}
+
+.product_info {
+  width: 50%;
+  flex-direction: column;
+  display: flex;
+  padding: 20px;
+  background: #fff;
+}
+
+.order_info {
+  width: 50%;
+  padding: 20px;
+  margin-left: 20px;
+  background: #fff;
+}
+
+.product_info_title {
+  text-align: left;
+  font-weight: 700;
+  margin-bottom: 20px;
+}
+
+.product_info_body {
+  margin-left: 30px;
+  display: flex;
+}
+
+.product_info_body_img {
+  width: 110px;
+  height: 110px;
+  border: 1px solid #ddd;
+}
+
+.product_img {
+  margin: 5px auto;
+  width: 100px;
+  height: 100px;
+}
+
+.product_info_body_info {
+  margin-left: 50px;
+}
+
+.product_info_body_info_item {
+  line-height: 27px;
+  text-align: left;
+}
+
+.product_info_body_info_item_title {
+  width: 100px;
+  display: inline-block;
+  margin-right: 20px;
+  font-weight: 700;
+}
+
+.order_info_title {
+  text-align: left;
+  font-weight: 700;
+  margin-bottom: 20px;
+}
+
+.order_info_body {
+  margin-left: 30px;
+  text-align: left;
+}
+
+.order_info_body_info_item {
+  line-height: 23px;
+  padding: 10px 0;
+  border-bottom: 1px solid #f5f5f5;
+  text-align: left;
+}
+
+.order_info_body_info_item_title {
+  width: 100px;
+  display: inline-block;
+  margin-right: 20px;
+  font-weight: 700;
+}
+
+.order-management-body {
+  width: 100%;
+  margin: 30px 0 20px 0;
+  float: left;
+}
+
+.order-management-inner {
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  /*border: 1px solid #ebeef5;*/
+  padding: 20px;
+  background: #fff;
+  border-radius: 5px;
+}
+
+.user-query_bottom {
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  /*border: 1px solid #ebeef5;*/
+  margin-top: 30px;
+  background: #fff;
+  border-radius: 5px;
+  padding-bottom: 20px;
+}
+
+.user-query_tab {
+  margin: 0 0 20px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.user-query_tab ul {
+  display: inline-block;
+}
+
+.user-query_tab li {
+  display: inline-block;
+  cursor: pointer;
+  color: #999;
+  line-height: 1;
+}
+
+.user-query_tab_li_active {
+  color: #000 !important;
+  font-weight: bold;
+}
+
+.order-management-table {
+  margin: 0 20px;
+}
+
+.order-management-pagination {
+  padding: 20px 20px 0;
+  position: relative;
+  text-align: right;
+}
+
+.blueColor {
+  color: #409eff
+}
+
+.el-input {
+  width: 220px;
+}

+ 450 - 0
src/page/edition/index.vue

@@ -0,0 +1,450 @@
+<template>
+  <div id="order-check">
+    <div class="order-check-body" v-loading.fullscreen.lock="fullscreenLoading">
+      <div class="order-management-body">
+        <div class="order-management-inner">
+          <span>时间段:</span>
+          <el-date-picker size="large" v-model="searchDate" type="daterange" unlink-panels range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions2" value-format="yyyy-MM-dd" align="center">
+          </el-date-picker>
+          <span>关键字:</span>
+          <el-input @keyup.enter.native="_searchOrderData(1)" ref="searchOrderNumber" v-model="searchOrderNumber" value="" placeholder="留言内容、备注"></el-input>
+          <el-button type="primary" @click="_searchOrderData(1)" color='red'>筛选</el-button>
+
+          <el-button type="success" @click="active = {file: ''}" color='red' style="float: right">上传</el-button>
+        </div>
+        <div class="order-check_bottom">
+          <div class="order-management-table">
+            <el-table ref="order_table" @expand-change="_getOrderDetail" class='e-table' :data="orders" style="width: 100%">
+              <el-table-column prop="id" label="序号">
+              </el-table-column>
+              <!-- <el-table-column prop="name" label="名称">
+              </el-table-column> -->
+              <el-table-column prop="description" label="描述">
+              </el-table-column>
+              <el-table-column prop="version" label="版本">
+              </el-table-column>
+              <el-table-column prop="fileUrl" label="文件地址">
+              </el-table-column>
+              <el-table-column prop="state" label="状态">
+                <template slot-scope="scope">
+                  <el-switch @change="updateAduitStatus(scope.row.id,scope.row.state)" :value="scope.row.status === 'A'" active-color="#13ce66" inactive-color="#ff4949">
+                  </el-switch>
+                </template>
+              </el-table-column>
+              <el-table-column label="发布日期">
+                <template slot-scope="scope">
+                  <div>{{new Date(scope.row.createTime).format('yyyy-MM-dd hh:mm:ss')}}</div>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+          <div class="order-management-pagination">
+            <el-pagination  @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="10" layout="total, prev, pager, next, jumper" :total="total">
+            </el-pagination>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <el-dialog width="750px" title="添加版本" :visible.sync="active">
+      <el-form v-if="active" label-width="80px">
+        <el-form-item label="版本" width="100%">
+          <el-input v-model="active.version"></el-input>
+        </el-form-item>
+        <el-form-item label="描述" width="100%">
+          <el-input type="textarea" v-model="active.description" :rows="5"></el-input>
+        </el-form-item>
+        <el-form-item label="文件" width="100%">
+          <div class="upload-file">
+            <el-button type="primary">文件上传</el-button>
+            <input type="file" @change="active.file = $event.target.value" ref="file">
+            <p>{{active.file}}</p>
+          </div>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="active = null">取 消</el-button>
+        <el-button type="primary" @click="updateMaker">确 定</el-button>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+
+export default {
+
+  name: 'order-check',
+
+  data () {
+    return {
+      active: null,
+      colors: [
+        '#08e2c0', '#39bafe', '#fce439', '#fda000', '#f96d6c'
+      ],
+      statusMap: {
+        unprocessed: '未处理',
+        processed: '已确认',
+        completed: '已完成',
+        invalid: '已取消'
+      },
+      payMap: {
+        '0': '微信',
+        '1': '支付宝',
+        '2': 'paypal',
+        '3': '其他',
+        '4': '货到付款'
+      },
+      paymentStatusMap: {
+        unpaid: '未付款',
+        paid: '已付款',
+        cancel: '已取消',
+        partPayment: '部分支付',
+        partRefund: '部分退款',
+        refunded: '全额退款'
+      },
+      tabs: [{ name: '全部', idx: -1 }, { name: '未支付', idx: 0 }, { name: '待发货', idx: 1 }, { name: '已发货', idx: 2 }, { name: '已完成', idx: 3 }],
+      expandedArr: [],
+      orders: [],
+      currentPage: 1,
+      key_input: '',
+      fullscreenLoading: false,
+      product: {
+        'name': '',
+        'packageName': '',
+        'count': '',
+        'amount': '',
+        'url': ''
+      },
+      receive: {
+        'name': '',
+        'phone': '',
+        'address': '',
+        'invoice': '',
+        'expressNum': ''
+      },
+      total: 0,
+      options: [{
+        value: undefined,
+        label: '全部筛选订单'
+      }, {
+        value: 0,
+        label: '未支付筛选订单'
+      }, {
+        value: 1,
+        label: '待发货筛选订单'
+      }, {
+        value: 2,
+        label: '已发货筛选订单'
+      }, {
+        value: 3,
+        label: '已完成筛选订单'
+      }],
+      selectValue: '',
+      // expressNum_input: "",
+      searchDate: [],
+      searchOrderNumber: '',
+      searchPhone: '',
+      searchExpressNum: '',
+      hasClickSearch: false,
+      tabIndex: -1,
+      pickerOptions2: {
+        shortcuts: [{
+          text: '最近一周',
+          onClick (picker) {
+            const end = new Date()
+            const start = new Date()
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
+            picker.$emit('pick', [start, end])
+          }
+        }, {
+          text: '最近一个月',
+          onClick (picker) {
+            const end = new Date()
+            const start = new Date()
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+            picker.$emit('pick', [start, end])
+          }
+        }, {
+          text: '最近三个月',
+          onClick (picker) {
+            const end = new Date()
+            const start = new Date()
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
+            picker.$emit('pick', [start, end])
+          }
+        }]
+      }
+    }
+  },
+  methods: {
+    makerClick (item) {
+      this.active = item
+    },
+    async updateAduitStatus (id, state) {
+      let m = state === 'A' ? 'I' : 'A';
+      let data = (await this.$http.get('/manager/goods/version/update/'+id+'/'+m))
+      this._searchOrderData(this.currentPage)
+    },
+    async updateMaker () {
+      var formData = new FormData();
+      formData.append('version', this.active.version)
+      formData.append('description', this.active.description)
+      formData.append('file', this.$refs.file.files[0])
+
+      await this.$http({
+        url: '/manager/goods/version/upload',
+        method: 'post',
+        data: formData,
+        processData: false,
+        contentType: false
+      })
+      alert('添加成功')
+
+      this.active = null
+      this._searchOrderData(this.currentPage)
+    },
+    handleClick (row) {
+      console.log(this.status)
+
+      console.log(this.selectValue)
+    },
+    async saveRow (row, item) {
+      let expressNum = item.receive.expressNum
+      var pattern = /^[\u4E00-\u9FA5]{1,5}$/
+
+      if (pattern.test(expressNum)) {
+        this.$alert('快递单号不能为中文', '提示', {
+          confirmButtonText: '确定',
+          callback: action => {
+
+          }
+        });
+      }
+
+      let data = await this.$http.post('/manager/order/confirmDelivery', {
+        orderId: row.id,
+        orderItemIds: item.id,
+        expressName: item.receive.expressName,
+        expressNum: expressNum
+      })
+
+      if (data.code === 0) {
+        this.$message({
+          message: '发货成功!',
+          type: 'success'
+        })
+      } else {
+        this.$alert('保存失败', '提示', {
+          confirmButtonText: '确定',
+          callback: action => {}
+        })
+      }
+
+      // request['saveExpressNum']({
+      //   orderId,
+      //   expressNum
+      // }, 'get').then(res => {
+      //   if (res === 1) {
+      //     // this.$refs.order_table.toggleRowExpansion(row, false)
+      //     row.status = '已发货'
+      //     this.$message({
+      //       message: '发货成功!',
+      //       type: 'success'
+      //     })
+      //   } else {
+      //     this.$alert('保存失败', '提示', {
+      //       confirmButtonText: '确定',
+      //       callback: action => {
+
+      //       }
+      //     })
+      //   }
+      // })
+    },
+    hideRow (row) {
+      this.$refs.order_table.toggleRowExpansion(row, false)
+    },
+    handleCurrentChange (val) {
+      let page = val
+      if (this.total > 0 && !this.hasClickSearch) {
+        this._searchOrderData(page)
+      } else {
+        this._searchOrderData(page)
+      }
+    },
+    clickTabItem (idx) {
+      this.tabIndex = idx
+      this.hasClickSearch = false
+      this.total = 0
+      this.currentPage = 1
+      this.status = this.tabIndex === -1 ? null : this.tabIndex
+
+      if (!this.searchDate || this.expressNum || !this.userName || !this.orderNum) {
+        this._searchOrderData()
+      }
+    },
+
+    async _searchOrderData (page) {
+      this.hasClickSearch = true
+      let date1, date2, userName, expressNum, orderNum
+      this.date1 = this.searchDate ? this.searchDate[0] : null
+      this.date2 = this.searchDate ? this.searchDate[1] : null
+      date1 = this.date1 ? (this.date1 + ' 00:00:00') : null
+      date2 = this.date2 ? (this.date2 + ' 23:59:59') : null
+
+      this.userName = userName = this.searchPhone || null
+      this.expressNum = expressNum = this.searchExpressNum || null
+      this.orderNum = orderNum = this.searchOrderNumber || null
+
+      // console.log(searchDate,searchPhone,searchExpressNum,searchOrderNumber)
+      this.fullscreenLoading = true
+      let status = this.status
+      
+      let para = {
+        pageNum: page - 1,
+        type: status,
+        startDate: date1,
+        endDate: date2,
+        itemName: orderNum || '',
+        // phoneNum: userName,
+        pageSize: 10
+      }
+
+      
+      let url = '/manager/goods/version/list'
+      let method = 'get'
+      let data
+      if (para.startDate || para.endDate || para.itemName) {
+        url = '/manager/goods/version/search'
+        method = 'post'
+      }
+      
+      console.log(method, para)
+      if (method === 'get') {
+        let paras = []
+        Object.keys(para).forEach(k => {
+          if (para[k] || typeof para[k] === 'number') {
+            paras.push(`${k}=${para[k]}`)
+          } else {
+            paras.push(`${k}=''`)
+          }
+        })
+
+        para = paras.join('&')
+        data = (await this.$http[method](url+'?'+para)).data
+      } else {
+        data = (await this.$http[method](url, para)).data
+      }
+
+
+
+
+
+      this.fullscreenLoading = false
+      let temp = data.list
+      for (var i = 0; i < temp.length; i++) {
+        // temp[i]['expressNum_input'] = "";
+        temp[i].items = []
+      }
+      this.orders = temp
+      this.currentPage = page
+      this.total = data.total
+    },
+    _exportExcelForOrder () {
+      let date1, date2, userName, expressNum, orderNum
+      this.date1 = this.searchDate ? this.searchDate[0] : null
+      this.date2 = this.searchDate ? this.searchDate[1] : null
+      date1 = this.date1 ? (this.date1 + ' 00:00:00') : null
+      date2 = this.date2 ? (this.date2 + ' 23:59:59') : null
+
+      this.userName = userName = this.searchPhone || null
+      this.expressNum = expressNum = this.searchExpressNum || null
+      this.orderNum = orderNum = this.searchOrderNumber || null
+      let status = this.status
+
+      let data = {
+        "type": this.status,
+        "startDate": date1,
+        "endDate": date2,
+        "orderSn": orderNum,
+        "phoneNum": userName,
+        "expressNum": expressNum
+      }
+      this.fullscreenLoading = true
+
+      console.error(data)
+      this.$confirm('确定当前标签下的订单记录?', '导出订单', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        let exec = await this.$http({
+          methods: 'get',
+          params: data,
+          url: '/manager/order/export',
+          responseType: 'arraybuffer'
+        })
+        try {
+          let blob = new Blob([exec], {type: 'application/vnd.ms-excel'})
+          let url = URL.createObjectURL(blob)
+          location.href = url
+        } catch (e) {
+          console.error(e)
+        }
+        this.fullscreenLoading = false
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消导出'
+        })
+        this.fullscreenLoading = false
+      })
+    },
+    async _getOrderDetail (row) {
+      this.fullscreenLoading = true
+      let data = (await this.$http.post('/manager/order/detail', {orderId: row.id})).data
+      let temp = this.orders.find(item => item.id === row.id)
+
+      temp.items = data.orderItems.map(item => {
+        return {
+          ...item,
+          product: {
+            url: item.pic,
+            name: item.goodsName,
+            packageName: item.description,
+            count: item.goodsCount,
+            amount: item.goodsPrice
+          },
+          receive: {
+            name: data.shipName,
+            phone: data.shipMobile,
+            address: data.shipAddress,
+            invoice: data.invoice,
+            expressNum: item.expressNum,
+            expressName: item.expressName
+          }
+        }
+      })
+      console.log(temp)
+      this.fullscreenLoading = false
+    }
+  },
+  mounted () {
+    // console.log(window.location.origin)
+    // window.open(window.location.origin+'/main')
+    this._searchOrderData(1)
+  }
+}
+</script>
+
+<style scoped>
+@import url('./style.css');
+</style>
+
+<style type="text/css">
+.el-table__expand-icon>i {
+  display: none !important;
+}
+</style>

+ 183 - 0
src/page/edition/style.css

@@ -0,0 +1,183 @@
+.order-check-body {
+  width: 100%;
+  float: left;
+  /*  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);*/
+  /*border: 1px solid #ebeef5;*/
+}
+
+.upload-file {
+  position: relative;
+  display: inline-block;
+  overflow: hidden;
+}
+
+.upload-file input {
+  position: absolute;
+  z-index: 1;
+  cursor: pointer;
+  opacity: 0;
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 100%;
+}
+
+.order_check_row {
+  display: flex;
+  width: 100%;
+}
+
+.product_info {
+  width: 50%;
+  flex-direction: column;
+  display: flex;
+  padding: 20px;
+  background: #fff;
+}
+
+.order_info {
+  width: 50%;
+  padding: 20px;
+  margin-left: 20px;
+  background: #fff;
+}
+
+.product_info_title {
+  text-align: left;
+  font-weight: 700;
+  margin-bottom: 20px;
+}
+
+.product_info_body {
+  margin-left: 30px;
+  display: flex;
+}
+
+.product_info_body_img {
+  width: 110px;
+  height: 110px;
+  border: 1px solid #ddd;
+}
+
+.product_img {
+  margin: 5px auto;
+  width: 100px;
+  height: 100px;
+}
+
+.product_info_body_info {
+  margin-left: 50px;
+}
+
+.product_info_body_info_item {
+  line-height: 27px;
+  text-align: left;
+}
+
+.product_info_body_info_item_title {
+  width: 100px;
+  display: inline-block;
+  margin-right: 20px;
+  font-weight: 700;
+}
+
+.order_info_title {
+  text-align: left;
+  font-weight: 700;
+  margin-bottom: 20px;
+}
+
+.order_info_body {
+  margin-left: 30px;
+  text-align: left;
+}
+
+.order_info_body_info_item {
+  line-height: 23px;
+  padding: 10px 0;
+  border-bottom: 1px solid #f5f5f5;
+  text-align: left;
+}
+
+.order_info_body_info_item_title {
+  width: 100px;
+  display: inline-block;
+  margin-right: 20px;
+  font-weight: 700;
+  vertical-align: top;
+}
+
+.fix-order_info_body_info_item_content {
+  width: 70%;
+  display: inline-block;
+}
+
+.order-management-body {
+  width: 100%;
+  margin: 30px 0 20px 0;
+  float: left;
+}
+
+.order-management-inner {
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  /*border: 1px solid #ebeef5;*/
+  padding: 30px 20px;
+  background: #fff;
+  border-radius: 5px;
+}
+
+.base-info {
+  margin: 20px 0;
+}
+
+.order-check_bottom {
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  /*border: 1px solid #ebeef5;*/
+  margin-top: 30px;
+  background: #fff;
+  border-radius: 5px;
+  padding: 20px 0;
+}
+
+.order-check_tab {
+  margin: 0 0 20px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.order-check_tab ul {
+  display: inline-block;
+}
+
+.order-check_tab li {
+  display: inline-block;
+  cursor: pointer;
+  color: #999;
+  line-height: 1;
+}
+
+.order-check_tab_li_active {
+  color: #000 !important;
+  font-weight: bold;
+}
+
+.order-management-table {
+  margin: 0 20px;
+}
+
+.order-management-pagination {
+  padding: 20px 20px 0;
+  position: relative;
+  text-align: right;
+}
+
+.el-input {
+  width: 220px;
+}

+ 6 - 2
src/page/layout/slide.vue

@@ -8,7 +8,7 @@
 
         <router-link tag="div" :to="nav.link" :key="i" v-if="!nav.children">
           <el-menu-item :index="i+''" style="padding-left: 49px;">
-            <i class="iconfonts i-fix" :style="{backgroundPosition: '0px -'+(actice_idx-1===i?nav.top+14:nav.top)+'px'}"></i>
+            <i class="iconfonts i-fix" :style="{backgroundPosition: '0px -'+(Number(actice_idx)===i?nav.top + 14:nav.top)+'px'}"></i>
             <span slot="title">{{nav.text}}</span>
           </el-menu-item>
         </router-link>
@@ -60,7 +60,10 @@ export default {
         ],
         top: 154
       },
-      { text: '数据统计', link: {name: 'Statistics'}, top: 42 }
+      { text: '经销商申请', link: {name: 'distributor-list'}, top: 98 },
+      { text: '留言管理', link: {name: 'leaving'}, top: 182 },
+      { text: '版本管理', link: {name: 'edition'}, top: 182 },
+      { text: '数据统计', link: {name: 'Statistics'}, top: 210 }
       // ,
       // {
       //   text: 'BBS',
@@ -81,6 +84,7 @@ export default {
   },
   methods: {
     handleSelect (key) {
+      console.log(key)
       this.actice_idx = key
     },
     openNotice () {

+ 441 - 0
src/page/leaving/index.vue

@@ -0,0 +1,441 @@
+<template>
+  <div id="order-check">
+    <div class="order-check-body" v-loading.fullscreen.lock="fullscreenLoading">
+      <div class="order-management-body">
+        <div class="order-management-inner">
+          <span>时间段:</span>
+          <el-date-picker size="large" v-model="searchDate" type="daterange" unlink-panels range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions2" value-format="yyyy-MM-dd" align="center">
+          </el-date-picker>
+          <span>关键字:</span>
+          <el-input @keyup.enter.native="_searchOrderData(1)" ref="searchOrderNumber" v-model="searchOrderNumber" value="" placeholder="留言内容、备注"></el-input>
+          <el-button type="primary" @click="_searchOrderData(1)" color='red'>筛选</el-button>
+        </div>
+        <div class="order-check_bottom">
+          <div class="order-management-table">
+            <el-table ref="order_table" @expand-change="_getOrderDetail" class='e-table' :data="orders" style="width: 100%">
+              <el-table-column prop="id" label="序号">
+              </el-table-column>
+              <el-table-column prop="contact" label="联系方式">
+              </el-table-column>
+              <el-table-column prop="content" label="留言内容">
+              </el-table-column>
+              <el-table-column prop="state" label="状态">
+                <template slot-scope="scope">
+                  <el-switch @change="updateAduitStatus(scope.row.id,scope.row.state)" :value="!!scope.row.state" active-color="#13ce66" inactive-color="#ff4949">
+                  </el-switch>
+                </template>
+              </el-table-column>
+              <el-table-column prop="totalAmount" label="备注">
+                <template slot-scope="scope">
+                  <div @click="makerClick(scope.row)">
+                    <i class="el-icon-s-flag" style="font-size: 20px;" :style="{color: colors[scope.row.noteType - 1]}" v-if="scope.row.noteType"></i>
+                    <span v-else>无</span>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="提交日期">
+                <template slot-scope="scope">
+                  <div>{{new Date(scope.row.createTime).format('yyyy-MM-dd hh:mm:ss')}}</div>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+          <div class="order-management-pagination">
+            <el-pagination  @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="10" layout="total, prev, pager, next, jumper" :total="total">
+            </el-pagination>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <el-dialog width="750px" title="备注设置" :visible.sync="active">
+      <el-form v-if="active" label-width="80px">
+        <el-form-item label="标记等级" width="100%">
+          <span v-for="(color, i) in colors" :key="i" style="margin-right: 20px;">
+            <el-radio :label="i + 1" v-model="active.noteType">
+              <i class="el-icon-s-flag" style="font-size: 20px;vertical-align: sub;" :style="{color: color}" ></i>
+            </el-radio>
+          </span>
+        </el-form-item>
+        <el-form-item label="备注内容" width="100%">
+          <el-input type="textarea" v-model="active.noteContent" :rows="5"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="active = null">取 消</el-button>
+        <el-button type="primary" @click="updateMaker">确 定</el-button>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+
+export default {
+
+  name: 'order-check',
+
+  data () {
+    return {
+      active: null,
+      colors: [
+        '#08e2c0', '#39bafe', '#fce439', '#fda000', '#f96d6c'
+      ],
+      statusMap: {
+        unprocessed: '未处理',
+        processed: '已确认',
+        completed: '已完成',
+        invalid: '已取消'
+      },
+      payMap: {
+        '0': '微信',
+        '1': '支付宝',
+        '2': 'paypal',
+        '3': '其他',
+        '4': '货到付款'
+      },
+      paymentStatusMap: {
+        unpaid: '未付款',
+        paid: '已付款',
+        cancel: '已取消',
+        partPayment: '部分支付',
+        partRefund: '部分退款',
+        refunded: '全额退款'
+      },
+      tabs: [{ name: '全部', idx: -1 }, { name: '未支付', idx: 0 }, { name: '待发货', idx: 1 }, { name: '已发货', idx: 2 }, { name: '已完成', idx: 3 }],
+      expandedArr: [],
+      orders: [],
+      currentPage: 1,
+      key_input: '',
+      fullscreenLoading: false,
+      product: {
+        'name': '',
+        'packageName': '',
+        'count': '',
+        'amount': '',
+        'url': ''
+      },
+      receive: {
+        'name': '',
+        'phone': '',
+        'address': '',
+        'invoice': '',
+        'expressNum': ''
+      },
+      total: 0,
+      options: [{
+        value: undefined,
+        label: '全部筛选订单'
+      }, {
+        value: 0,
+        label: '未支付筛选订单'
+      }, {
+        value: 1,
+        label: '待发货筛选订单'
+      }, {
+        value: 2,
+        label: '已发货筛选订单'
+      }, {
+        value: 3,
+        label: '已完成筛选订单'
+      }],
+      selectValue: '',
+      // expressNum_input: "",
+      searchDate: [],
+      searchOrderNumber: '',
+      searchPhone: '',
+      searchExpressNum: '',
+      hasClickSearch: false,
+      tabIndex: -1,
+      pickerOptions2: {
+        shortcuts: [{
+          text: '最近一周',
+          onClick (picker) {
+            const end = new Date()
+            const start = new Date()
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
+            picker.$emit('pick', [start, end])
+          }
+        }, {
+          text: '最近一个月',
+          onClick (picker) {
+            const end = new Date()
+            const start = new Date()
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+            picker.$emit('pick', [start, end])
+          }
+        }, {
+          text: '最近三个月',
+          onClick (picker) {
+            const end = new Date()
+            const start = new Date()
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
+            picker.$emit('pick', [start, end])
+          }
+        }]
+      }
+    }
+  },
+  methods: {
+    makerClick (item) {
+      this.active = item
+    },
+    async updateAduitStatus (id, state) {
+      let data = (await this.$http.get('/manager/intercomMessage/update/active/'+id+'/'+Number(!state)))
+      this._searchOrderData(this.currentPage)
+    },
+    async updateMaker () {
+      let data = (await this.$http.post('/manager/intercomMessage/update/note', {
+        id: this.active.id,
+        noteContent: this.active.noteContent,
+        noteType: this.active.noteType
+      }));
+      if (data.code === 0) {
+        this.active = null
+        this._searchOrderData(this.currentPage)
+      }
+    },
+    handleClick (row) {
+      console.log(this.status)
+
+      console.log(this.selectValue)
+    },
+    async saveRow (row, item) {
+      let expressNum = item.receive.expressNum
+      var pattern = /^[\u4E00-\u9FA5]{1,5}$/
+
+      if (pattern.test(expressNum)) {
+        this.$alert('快递单号不能为中文', '提示', {
+          confirmButtonText: '确定',
+          callback: action => {
+
+          }
+        });
+      }
+
+      let data = await this.$http.post('/manager/order/confirmDelivery', {
+        orderId: row.id,
+        orderItemIds: item.id,
+        expressName: item.receive.expressName,
+        expressNum: expressNum
+      })
+
+      if (data.code === 0) {
+        this.$message({
+          message: '发货成功!',
+          type: 'success'
+        })
+      } else {
+        this.$alert('保存失败', '提示', {
+          confirmButtonText: '确定',
+          callback: action => {}
+        })
+      }
+
+      // request['saveExpressNum']({
+      //   orderId,
+      //   expressNum
+      // }, 'get').then(res => {
+      //   if (res === 1) {
+      //     // this.$refs.order_table.toggleRowExpansion(row, false)
+      //     row.status = '已发货'
+      //     this.$message({
+      //       message: '发货成功!',
+      //       type: 'success'
+      //     })
+      //   } else {
+      //     this.$alert('保存失败', '提示', {
+      //       confirmButtonText: '确定',
+      //       callback: action => {
+
+      //       }
+      //     })
+      //   }
+      // })
+    },
+    hideRow (row) {
+      this.$refs.order_table.toggleRowExpansion(row, false)
+    },
+    handleCurrentChange (val) {
+      let page = val
+      if (this.total > 0 && !this.hasClickSearch) {
+        this._searchOrderData(page)
+      } else {
+        this._searchOrderData(page)
+      }
+    },
+    clickTabItem (idx) {
+      this.tabIndex = idx
+      this.hasClickSearch = false
+      this.total = 0
+      this.currentPage = 1
+      this.status = this.tabIndex === -1 ? null : this.tabIndex
+
+      if (!this.searchDate || this.expressNum || !this.userName || !this.orderNum) {
+        this._searchOrderData()
+      }
+    },
+
+    async _searchOrderData (page) {
+      this.hasClickSearch = true
+      let date1, date2, userName, expressNum, orderNum
+      this.date1 = this.searchDate ? this.searchDate[0] : null
+      this.date2 = this.searchDate ? this.searchDate[1] : null
+      date1 = this.date1 ? (this.date1 + ' 00:00:00') : null
+      date2 = this.date2 ? (this.date2 + ' 23:59:59') : null
+
+      this.userName = userName = this.searchPhone || null
+      this.expressNum = expressNum = this.searchExpressNum || null
+      this.orderNum = orderNum = this.searchOrderNumber || null
+
+      // console.log(searchDate,searchPhone,searchExpressNum,searchOrderNumber)
+      this.fullscreenLoading = true
+      let status = this.status
+      
+      let para = {
+        pageNum: page - 1,
+        type: status,
+        startDate: date1,
+        endDate: date2,
+        itemName: orderNum || '',
+        // phoneNum: userName,
+        pageSize: 10
+      }
+
+      
+      let url = '/manager/intercomMessage/list'
+      let method = 'get'
+      let data
+      if (para.startDate || para.endDate || para.itemName) {
+        url = '/manager/intercomMessage/search'
+        method = 'post'
+      }
+      
+      console.log(method, para)
+      if (method === 'get') {
+        let paras = []
+        Object.keys(para).forEach(k => {
+          if (para[k] || typeof para[k] === 'number') {
+            paras.push(`${k}=${para[k]}`)
+          } else {
+            paras.push(`${k}=''`)
+          }
+        })
+
+        para = paras.join('&')
+        data = (await this.$http[method](url+'?'+para)).data
+      } else {
+        data = (await this.$http[method](url, para)).data
+      }
+
+
+
+
+
+      this.fullscreenLoading = false
+      let temp = data.list
+      for (var i = 0; i < temp.length; i++) {
+        // temp[i]['expressNum_input'] = "";
+        temp[i].items = []
+      }
+      this.orders = temp
+      this.currentPage = page
+      this.total = data.total
+    },
+    _exportExcelForOrder () {
+      let date1, date2, userName, expressNum, orderNum
+      this.date1 = this.searchDate ? this.searchDate[0] : null
+      this.date2 = this.searchDate ? this.searchDate[1] : null
+      date1 = this.date1 ? (this.date1 + ' 00:00:00') : null
+      date2 = this.date2 ? (this.date2 + ' 23:59:59') : null
+
+      this.userName = userName = this.searchPhone || null
+      this.expressNum = expressNum = this.searchExpressNum || null
+      this.orderNum = orderNum = this.searchOrderNumber || null
+      let status = this.status
+
+      let data = {
+        "type": this.status,
+        "startDate": date1,
+        "endDate": date2,
+        "orderSn": orderNum,
+        "phoneNum": userName,
+        "expressNum": expressNum
+      }
+      this.fullscreenLoading = true
+
+      console.error(data)
+      this.$confirm('确定当前标签下的订单记录?', '导出订单', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        let exec = await this.$http({
+          methods: 'get',
+          params: data,
+          url: '/manager/order/export',
+          responseType: 'arraybuffer'
+        })
+        try {
+          let blob = new Blob([exec], {type: 'application/vnd.ms-excel'})
+          let url = URL.createObjectURL(blob)
+          location.href = url
+        } catch (e) {
+          console.error(e)
+        }
+        this.fullscreenLoading = false
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消导出'
+        })
+        this.fullscreenLoading = false
+      })
+    },
+    async _getOrderDetail (row) {
+      this.fullscreenLoading = true
+      let data = (await this.$http.post('/manager/order/detail', {orderId: row.id})).data
+      let temp = this.orders.find(item => item.id === row.id)
+
+      temp.items = data.orderItems.map(item => {
+        return {
+          ...item,
+          product: {
+            url: item.pic,
+            name: item.goodsName,
+            packageName: item.description,
+            count: item.goodsCount,
+            amount: item.goodsPrice
+          },
+          receive: {
+            name: data.shipName,
+            phone: data.shipMobile,
+            address: data.shipAddress,
+            invoice: data.invoice,
+            expressNum: item.expressNum,
+            expressName: item.expressName
+          }
+        }
+      })
+      console.log(temp)
+      this.fullscreenLoading = false
+    }
+  },
+  mounted () {
+    // console.log(window.location.origin)
+    // window.open(window.location.origin+'/main')
+    this._searchOrderData(1)
+  }
+}
+</script>
+
+<style scoped>
+@import url('./style.css');
+</style>
+
+<style type="text/css">
+.el-table__expand-icon>i {
+  display: none !important;
+}
+</style>

+ 166 - 0
src/page/leaving/style.css

@@ -0,0 +1,166 @@
+.order-check-body {
+  width: 100%;
+  float: left;
+  /*  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);*/
+  /*border: 1px solid #ebeef5;*/
+}
+
+.order_check_row {
+  display: flex;
+  width: 100%;
+}
+
+.product_info {
+  width: 50%;
+  flex-direction: column;
+  display: flex;
+  padding: 20px;
+  background: #fff;
+}
+
+.order_info {
+  width: 50%;
+  padding: 20px;
+  margin-left: 20px;
+  background: #fff;
+}
+
+.product_info_title {
+  text-align: left;
+  font-weight: 700;
+  margin-bottom: 20px;
+}
+
+.product_info_body {
+  margin-left: 30px;
+  display: flex;
+}
+
+.product_info_body_img {
+  width: 110px;
+  height: 110px;
+  border: 1px solid #ddd;
+}
+
+.product_img {
+  margin: 5px auto;
+  width: 100px;
+  height: 100px;
+}
+
+.product_info_body_info {
+  margin-left: 50px;
+}
+
+.product_info_body_info_item {
+  line-height: 27px;
+  text-align: left;
+}
+
+.product_info_body_info_item_title {
+  width: 100px;
+  display: inline-block;
+  margin-right: 20px;
+  font-weight: 700;
+}
+
+.order_info_title {
+  text-align: left;
+  font-weight: 700;
+  margin-bottom: 20px;
+}
+
+.order_info_body {
+  margin-left: 30px;
+  text-align: left;
+}
+
+.order_info_body_info_item {
+  line-height: 23px;
+  padding: 10px 0;
+  border-bottom: 1px solid #f5f5f5;
+  text-align: left;
+}
+
+.order_info_body_info_item_title {
+  width: 100px;
+  display: inline-block;
+  margin-right: 20px;
+  font-weight: 700;
+  vertical-align: top;
+}
+
+.fix-order_info_body_info_item_content {
+  width: 70%;
+  display: inline-block;
+}
+
+.order-management-body {
+  width: 100%;
+  margin: 30px 0 20px 0;
+  float: left;
+}
+
+.order-management-inner {
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  /*border: 1px solid #ebeef5;*/
+  padding: 30px 20px;
+  background: #fff;
+  border-radius: 5px;
+}
+
+.base-info {
+  margin: 20px 0;
+}
+
+.order-check_bottom {
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  /*border: 1px solid #ebeef5;*/
+  margin-top: 30px;
+  background: #fff;
+  border-radius: 5px;
+  padding: 20px 0;
+}
+
+.order-check_tab {
+  margin: 0 0 20px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.order-check_tab ul {
+  display: inline-block;
+}
+
+.order-check_tab li {
+  display: inline-block;
+  cursor: pointer;
+  color: #999;
+  line-height: 1;
+}
+
+.order-check_tab_li_active {
+  color: #000 !important;
+  font-weight: bold;
+}
+
+.order-management-table {
+  margin: 0 20px;
+}
+
+.order-management-pagination {
+  padding: 20px 20px 0;
+  position: relative;
+  text-align: right;
+}
+
+.el-input {
+  width: 220px;
+}

+ 39 - 21
src/page/order/index.vue

@@ -54,12 +54,13 @@
               </el-table-column>
               <el-table-column type="expand" prop="operation" label="操作" width="150">
                 <template slot-scope="scope">
-                  <div class="order_check_row" v-for="(item, i) in scope.row.items" :key="i">
+                  
+                  <div class="order_check_row">
                     <div class="product_info">
                       <div class="product_info_title">
                         商品信息
                       </div>
-                      <div class="product_info_body">
+                      <div class="product_info_body" v-for="(item, i) in scope.row.items" :key="i">
                         <div class="product_info_body_img">
                           <img :src="item.product.url" class="product_img">
                         </div>
@@ -70,14 +71,14 @@
                           </div>
                           <div class="product_info_body_info_item">
                             <span class="product_info_body_info_item_title">套餐</span>
-                            <span class="product_info_body_info_item_content">{{item.product.packageName}}</span>
+                            <span class="product_info_body_info_item_content" v-html="item.product.packageName"></span>
                           </div>
                           <div class="product_info_body_info_item">
                             <span class="product_info_body_info_item_title">数量</span>
                             <span class="product_info_body_info_item_content">{{item.product.count}}</span>
                           </div>
                           <div class="product_info_body_info_item">
-                            <span class="product_info_body_info_item_title">订单金额</span>
+                            <span class="product_info_body_info_item_title">商品单价</span>
                             <span class="product_info_body_info_item_content">{{item.product.amount}}</span>
                           </div>
                         </div>
@@ -87,48 +88,48 @@
                       <div class="order_info_title">
                         下单信息
                       </div>
-                      <div class="order_info_body">
+                      <div class="order_info_body" v-if="scope.row.items.length">
                         <div class="order_info_body_info">
                           <div class="order_info_body_info_item">
                             <span class="order_info_body_info_item_title">顾客姓名</span>
-                            <span class="order_info_body_info_item_content">{{item.receive.name}}</span>
+                            <span class="order_info_body_info_item_content">{{scope.row.items[0].receive.name}}</span>
                           </div>
                           <div class="order_info_body_info_item">
                             <span class="order_info_body_info_item_title">电话</span>
-                            <span class="order_info_body_info_item_content">{{item.receive.phone}}</span>
+                            <span class="order_info_body_info_item_content">{{scope.row.items[0].receive.phone}}</span>
                           </div>
                           <div class="order_info_body_info_item">
                             <span class="order_info_body_info_item_title">收货地址</span>
-                            <span class="order_info_body_info_item_content">{{item.receive.address}}</span>
+                            <span class="order_info_body_info_item_content">{{scope.row.items[0].receive.address}}</span>
                           </div>
                           <div class="order_info_body_info_item">
                             <span class="order_info_body_info_item_title">发票</span>
-                            <span class="order_info_body_info_item_content fix-order_info_body_info_item_content">{{item.receive.invoice||'不需要发票'}}</span>
+                            <span class="order_info_body_info_item_content fix-order_info_body_info_item_content">{{scope.row.items[0].receive.invoice||'不需要发票'}}</span>
                           </div>
                           <div class="order_info_body_info_item" v-if="scope.row.paymentStatus != 'unpaid'">
                             <span class="order_info_body_info_item_title">快递类别</span>
                             <span class="order_info_body_info_item_content">
                               <el-input
-                                v-model="item.receive.expressName" maxlength="12" placeholder="请输入12位顺丰快单号" 
-                                type="text" v-if="item.shippingStatus != 'shipped'">
+                                v-model="scope.row.items[0].receive.expressName" maxlength="15" placeholder="请输入15位顺丰快单号" 
+                                type="text" v-if="scope.row.items[0].shippingStatus != 'shipped'">
                               </el-input>
-                              {{item.shippingStatus == 'shipped'?item.receive.expressName:""}}
+                              {{scope.row.items[0].shippingStatus == 'shipped'?scope.row.items[0].receive.expressName:""}}
                             </span>
                           </div>
                           <div class="order_info_body_info_item" v-if="scope.row.paymentStatus != 'unpaid'">
                             <span class="order_info_body_info_item_title">快递单号</span>
                             <span class="order_info_body_info_item_content">
                               <el-input
-                                v-model="item.receive.expressNum" maxlength="12" placeholder="请输入12位顺丰快单号" 
-                                type="text" v-if="item.shippingStatus != 'shipped'">
+                                v-model="scope.row.items[0].receive.expressNum" maxlength="15" placeholder="请输入15位顺丰快单号" 
+                                type="text" v-if="scope.row.items[0].shippingStatus != 'shipped'">
                               </el-input>
-                              {{item.shippingStatus == 'shipped'?item.receive.expressNum:""}}
+                              {{scope.row.items[0].shippingStatus == 'shipped'?scope.row.items[0].receive.expressNum:""}}
                             </span>
                           </div>
 
-                          <div class="order_info_body_info_item" v-if="scope.row.paymentStatus != 'unpaid'&& item.shippingStatus != 'shipped'">
+                          <div class="order_info_body_info_item" v-if="scope.row.paymentStatus != 'unpaid'&& scope.row.items[0].shippingStatus != 'shipped'">
                             <span class="order_info_body_info_item_title"></span>
-                            <span class="order_info_body_info_item_content"><el-button @click="saveRow(scope.row, item)" type="primary">保存</el-button><el-button @click="hideRow(scope.row)">取消</el-button></span>
+                            <span class="order_info_body_info_item_content"><el-button @click="saveRow(scope.row, scope.row.items)" type="primary">保存</el-button><el-button @click="hideRow(scope.row)">取消</el-button></span>
                           </div>
                         </div>
                       </div>
@@ -258,7 +259,9 @@ export default {
 
       console.log(this.selectValue)
     },
-    async saveRow (row, item) {
+    async saveRow (row, items) {
+      let item = items[0]
+      let orderItemIds = items.map(item => item.id).join(',')
       let expressNum = item.receive.expressNum
       var pattern = /^[\u4E00-\u9FA5]{1,5}$/
 
@@ -273,7 +276,7 @@ export default {
 
       let data = await this.$http.post('/manager/order/confirmDelivery', {
         orderId: row.id,
-        orderItemIds: item.id,
+        orderItemIds: orderItemIds,
         expressName: item.receive.expressName,
         expressNum: expressNum
       })
@@ -351,7 +354,7 @@ export default {
       let status = this.status
 
       let data = (await this.$http.post('/manager/order/list', {
-        pageNum: page - 1,
+        pageNum: page,
         type: status,
         startDate: date1,
         endDate: date2,
@@ -453,17 +456,32 @@ export default {
   mounted () {
     // console.log(window.location.origin)
     // window.open(window.location.origin+'/main')
-    this._searchOrderData(10)
+    this._searchOrderData(1)
   }
 }
 </script>
 
 <style scoped>
 @import url('./style.css');
+.el-icon-s-flag {
+  cursor: pointer;
+}
+
 </style>
 
 <style type="text/css">
+.el-table__expand-icon--expanded {
+  transform: rotate(0) !important;
+}
 .el-table__expand-icon>i {
   display: none !important;
 }
+
+
+
+.el-table__expand-icon:after {
+  content: "\8BE6\7EC6";
+  color: #09e1c0;
+  cursor: pointer;
+}
 </style>

+ 1 - 1
src/page/order/style.css

@@ -30,12 +30,12 @@
 .product_info_title {
   text-align: left;
   font-weight: 700;
-  margin-bottom: 20px;
 }
 
 .product_info_body {
   margin-left: 30px;
   display: flex;
+  margin-top: 20px;
 }
 
 .product_info_body_img {

+ 25 - 0
src/router/index.js

@@ -65,6 +65,31 @@ export default new Router({
           ]
         },
         {
+          path: '/distributor',
+          name: 'Distributor',
+          component: require('@/page/distributor').default,
+          meta: { text: '经销商申请' },
+          children: [
+            {
+              path: '/',
+              name: 'distributor-list',
+              component: require('@/page/distributor/query-list').default
+            }
+          ]
+        },
+        {
+          path: '/leaving',
+          name: 'leaving',
+          component: require('@/page/leaving').default,
+          meta: { text: '留言管理' }
+        },
+        {
+          path: '/edition',
+          name: 'edition',
+          component: require('@/page/edition').default,
+          meta: { text: '版本管理' }
+        },
+        {
           path: '/',
           name: 'Temp-scene',
           component: require('@/page/layout/temp').default,

+ 6 - 3
src/util/http.js

@@ -1,9 +1,11 @@
 import axios from 'axios'
 
 // 配置请求域名
-axios.defaults.baseURL = 'https://test.4dkankan.com/api'
-// axios.defaults.baseURL = 'http://192.168.0.10:8080/api'
-
+// axios.defaults.baseURL = 'https://pro.4dkankan.com/api'
+// axios.defaults.baseURL = 'https://test.4dkankan.com/api'
+// axios.defaults.baseURL = '/apid'
+// axios.defaults.baseURL = '/api'
+axios.defaults.baseURL = 'http://192.168.0.10:8080/api'
 
 axios.interceptors.request.use(function (config) {
   config.headers['Content-Type'] = 'application/json;charset=UTF-8'
@@ -32,6 +34,7 @@ const notLogins = ['/sso/manager/login']
 
 function setHandle (router) {
   axios.interceptors.request.use(function (config) {
+    console.log(config)
     if ((!config.headers.token && !config.headers.common.token) && !~notLogins.indexOf(config.url)) {
       router.replace('login')
       return false