Browse Source

问题修复12-27

tangning 3 years ago
parent
commit
e7ca409bc2

+ 1 - 1
config/index.js

@@ -13,7 +13,7 @@ module.exports = {
     proxyTable: {
       '/api': {    //将www.exaple.com印射为/apis
         // target: 'https://www.4dkankan.com',  // 接口域名
-        // target: 'http://192.168.0.151:8082', // 博焱接口域名
+        // target: 'http://192.168.0.174:8080', // 博焱接口域名
         target: 'https://test.4dkankan.com', // 接口域名
         secure: false,  // 如果是https接口,需要配置这个参数
         changeOrigin: true,  //是否跨域

+ 1 - 1
config/prod.env.js

@@ -1,5 +1,5 @@
 'use strict'
 module.exports = {
   NODE_ENV: '"production"',
-  GJEDITION: '"international"' //domestic 国内  international 国际版
+  GJEDITION: '"domestic"' //domestic 国内  international 国际版
 }

+ 469 - 0
src/page/appupload/index.vue

@@ -0,0 +1,469 @@
+<template>
+  <div id="device-management">
+    <div class="device-management-body" v-loading.fullscreen.lock="fullscreenLoading">
+      <div v-if="addVisible" class="order-management-body" style="margin-top:0">
+        <!-- 全部 -->
+        <div class="device-management_bottom" style="margin-top:0;padding:60px 20px;">
+          <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px">
+            <el-form-item label="上传服务器" prop='fileServerType'>
+              <el-select v-model="ruleForm.fileServerType" placeholder="请选择">
+                <el-option label="阿里云" value="oss">阿里云</el-option>
+                <el-option label="亚马逊" value="s3">亚马逊</el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="代理商标识" prop='agent'>
+              <el-autocomplete 
+                class="inline-input"
+                v-model="ruleForm.agent"
+                :fetch-suggestions="querySearch"
+                placeholder="请输入内容"
+                @select="handleSelect"
+              ></el-autocomplete>
+            </el-form-item>
+            <el-form-item label="APP类型" prop='appType'>
+              <el-select v-model="ruleForm.appType" placeholder="请选择">
+                <el-option label="IOS" value="IOS">IOS</el-option>
+                <el-option label="Android" value="Android">Android</el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="APP包" prop="fileList">
+              <!-- uploadUrl token:sessionStorage.getItem('token') :on-change="uploadSectionFile"-->
+              <el-upload style="width:340px" class="upload-demo" 
+              :limit='1' :on-exceed="handleExceed" 
+              action=''
+              :on-change="()=>{this.$refs.ruleForm.validateField('fileList')}"
+              :http-request="uploadSectionFile"
+              :file-list="ruleForm.fileList"
+              :on-remove="fileRemove"
+              drag accept='.ipa, .apk' :multiple="false">
+                <i class="el-icon-upload"></i>
+                <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+                <div class="el-upload__tip" slot="tip">
+                  <p>1、支持 .ipa、.apk文件,大小不超过1G</p>
+                  <p>2、文件格式以4DKanKan+_版本号组成</p>
+                </div>
+              </el-upload>
+              <el-progress v-if="completeshow" style="width: 340px;margin-top: 8px"  :percentage="complete" />
+            </el-form-item>
+            <el-form-item label="MD5" prop="md5">
+                <el-input v-model="ruleForm.md5" :disabled="!md5"></el-input>
+                <!-- <el-button style="display:inline-flex" @click.prevent="removeDomain()">校验</el-button> -->
+            </el-form-item>
+            <!-- <el-form-item label="版本信息" prop="fileList">
+              <el-upload
+                class="upload-demo"
+                accept='.json'
+                :action="uploadUrl"
+                :on-change="handleChange"
+                :file-list="fileList">
+                <el-button size="small" type="primary">点击上传</el-button>
+                <div slot="tip" class="el-upload__tip">只能上传josn文件,且不超过10 M</div>
+              </el-upload>
+              <el-progress v-if="completeshow" style="width: 340px;margin-top: 8px"  :percentage="complete" />
+            </el-form-item> -->
+          </el-form>
+          <div slot="footer" class="dialog-footer">
+            <el-button @click="cancel">取 消</el-button>
+            <el-button type="primary" @click="submit">确 定</el-button>
+          </div>
+        </div>
+      </div>
+      <div v-else class="order-management-body">
+        <div class="order-management-inner">
+          <div class="base-info">
+            <span>关键词:</span>
+            <el-input style="width:220px;" @keyup.enter.native="currentPage=1&&_getCameraData()" v-model="searchKey" placeholder="关键词"></el-input>
+            <el-button type="primary" @click="currentPage=1&&_getCameraData()" color='red'>搜索</el-button>
+            <el-button icon="el-icon-plus" type="primary" style="float: right;" @click="showadd" color='red'>新增</el-button>
+          </div>
+        </div>
+        <!-- 全部 -->
+        <div class="device-management_bottom">
+          <div class="order-management-table">
+            <el-table ref="order_table" class='e-table' :data="cameras" style="width: 100%">
+              <el-table-column  label="序号" type="index" width="50" align="center">
+                  <template scope="scope">
+                      <span>{{(currentPage - 1) * pagesize + scope.$index + 1}}</span>
+                  </template>
+              </el-table-column>
+              <el-table-column prop="fileServerType" label="上传服务器">
+              </el-table-column>
+              <el-table-column prop="agent" label="代理商标识">
+              </el-table-column>
+              <el-table-column prop="appType" label="APP类型">
+              </el-table-column>
+              <el-table-column prop="name" label="APP包">
+              </el-table-column>
+              <el-table-column prop="md5" label="MD5">
+              </el-table-column>
+              <el-table-column width="300" prop="createTime" label="上传时间">
+              </el-table-column>
+              <!-- <el-table-column width="300" label="上传时间">
+                <template slot-scope="scope">
+                  <div>{{scope.row.createTime}}</div>
+                </template>
+              </el-table-column> -->
+              
+              <el-table-column label="操作">
+                <template slot-scope="scope">
+                  <!-- <el-button type="text" @click="showDialog(scope.row)" class="edit_btn">编辑</el-button> -->
+                  <el-button type="text" @click="del(scope.row.id)" class="delete_btn">删除</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+          <div class="order-management-pagination">
+            <el-pagination @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="pagesize" layout="total, prev, pager, next, jumper" :total="total">
+            </el-pagination>
+          </div>
+        </div>
+      </div>
+
+    </div>
+  </div>
+</template>
+<script>
+let tempForm = {
+  fileServerType:'',
+  agent:'',
+  appType:'',
+  md5:'',
+  name:'',
+  fileList:[]
+}
+export default {
+  data () {
+    var validateMD5 = (rule, value, callback) => {
+        if (value === '') {
+          callback(new Error('请输入MD5'));
+        } else {
+          this.chenkMd5(value,callback)
+        }
+    }
+    let validateFileUrl =(rule, value, callback)=>{
+          console.log('fileList',value,this.ruleForm)
+          if(!value){
+            return callback(new Error("请上传文件"))
+          }
+          if (this.ruleForm.fileList.length < 1) {//我控制了FileList 长度代表文件个数
+              callback(new Error("请上传文件"))
+          } else {
+              callback()
+          }
+    }
+    return {
+      expands: [],
+      md5:null,
+      complete:0,
+      completeshow:false,
+      expandedArr: [],
+      cameras: [],
+      currentPage: 1,
+      key_input: '',
+      fullscreenLoading: false,
+      searchKey: '',
+      total: 0,
+      uploadUrl: this.$server + '/manager/app/upload',
+      token: sessionStorage.getItem('token'),
+      // expressNum_input: "",
+      searchDate: [],
+      searchOrderNumber: '',
+      searchPhone: '',
+      searchExpressNum: '',
+      hasClickSearch: false,
+      tabIndex: 0,
+      addVisible: false,
+      ruleForm: tempForm,
+      currentImgType: '',
+      rules: {
+        fileList:[{
+          required: true, validator: validateFileUrl, trigger: 'change'
+        }],
+        appType:[
+          { required: true, message: '请选择APP类型', trigger: 'change' }
+        ],
+        agent:[
+          { required: true, message: '请选择或输入代理商', trigger: 'blur' }
+        ],
+        fileServerType:[
+          { required: true, message: '请选择上传服务器', trigger: 'change' }
+        ],
+        companyName: [
+          { required: true, message: '请输入客户名称', trigger: 'blur' }
+        ],
+        md5:[
+          { required: true, message: '请输入MD5', trigger: 'blur' },
+          { validator: validateMD5, trigger: 'blur' }
+          ]
+      },
+      cameraInfo: {
+        wifi: '',
+        type: '',
+        address: '',
+        initPoint: '',
+        orderNum: ''
+      },
+
+      formLabelWidth: '30%',
+      value2: true,
+      currentChildName: '',
+      currentDeviceId: '',
+      currentBalance: '',
+      pagesize: 10,
+      clients: [],
+      restaurants:[]
+    }
+  },
+  watch: {
+    currentPage () {
+      this._getCameraData()
+    }
+  },
+  methods: {
+    async getAgenetList(){
+      let res = await this.$http.post('/manager/app/agenetList',{})
+      let restaurants = []
+      if (res.code === 0) {
+        restaurants = res.data.map(ele => {
+          return {value:ele}
+        })
+      }
+      this.restaurants = restaurants
+    },
+    del (id) {
+      this.$confirm('此操作将删除该条数据, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(async () => {
+          this.fullscreenLoading = true
+          let res = await this.$http.post('/manager/app/delete', {
+            id: id
+          })
+          if (res.code === 0) {
+            this.$message({
+              type: 'success',
+              message: '删除成功!'
+            })
+          } else {
+            this.$message({
+              type: 'error',
+              message: res.msg
+            })
+          }
+          this._getCameraData()
+          this.fullscreenLoading = false
+        })
+        .catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          })
+          this.fullscreenLoading = false
+        })
+    },
+    async _getCameraData () {
+      this.fullscreenLoading = true
+      if (!Number(this.currentPage)) this.currentPage = 1
+      let res = await this.$http.post('/manager/app/list', {
+        pageNum: this.currentPage,
+        pageSize: this.pagesize,
+        keyword: this.searchKey
+      })
+      this.fullscreenLoading = false
+      if (res.code === 0) {
+        let temp = res.data.list
+        for (var i = 0; i < temp.length; i++) {
+          temp[i]['userName'] = temp[i]['userName']
+            ? temp[i]['userName']
+            : '未绑定'
+          temp[i]['activatedTime'] = temp[i]['activatedTime']
+            ? new Date(temp[i]['activatedTime']).format('yyyy-MM-dd hh:mm:ss')
+            : '/'
+        }
+        this.cameras = temp
+        this.total = res.data.total ? res.data.total : this.total
+      }
+    },
+    async chenkMd5 (value,callback) {
+      console.log('value',value == 123456)
+      if(value == this.md5){
+          callback();
+      }else{
+          callback(new Error('MD5错误!请重新输入'));
+      }
+      return true
+    },
+    uploadFile(file, fileList){
+      // this.ruleForm.fileList = fileList
+      console.log('file, fileList)',file, fileList);
+    },
+    handleExceed(files, fileList) {
+        this.$message.warning(`只能选择一个文件上传`);
+    },
+    handleCurrentChange (val) {
+      this.currentPage = val
+    },
+    handleAvatarSuccess (res, file) {
+      this.ruleForm[this.currentImgType] = res.data
+    },
+    beforeAvatarUpload (file) {
+      const isLt2M = file.size / 1024 / 1024 < 5
+
+      if (!isLt2M) {
+        this.$message.error('上传头像图片大小不能超过 5MB!')
+      }
+      return isLt2M
+    },
+    removeDomain () {
+      console.log();
+      this.$refs['ruleForm'].validate('md5')
+    },
+
+    submit () {
+      console.log('submit',this.$refs['ruleForm']);
+      this.$refs['ruleForm'].validate((valid) => {
+        if (valid) {
+        // this.addVisible = true
+          this._editCompany()
+        } else {
+          return false
+        }
+      })
+    },
+    cancel(){
+        this.ruleForm = tempForm
+        this.$refs['ruleForm'].resetFields()
+        this.md5 = null
+        this.addVisible = false
+    },
+    async _editCompany () {
+      let {
+        fileServerType,
+        agent,
+        appType,
+        md5,
+        name,
+      } = this.ruleForm
+
+      this.fullscreenLoading = true
+      let res = await this.$http.post('/manager/app/save', {
+        fileServerType,
+        agent,
+        appType,
+        md5,
+        name,
+      })
+      this.fullscreenLoading = false
+      if (res.code === 0) {
+        this.$alert('该客户信息已成功添加入库', '添加成功', {
+          confirmButtonText: '确定'
+        })
+        this.getAgenetList()
+        this._getCameraData()
+        this.cancel()
+      } else {
+        this.$alert(res.msg, '操作失败', {
+          confirmButtonText: '确定'
+        })
+      }
+    },
+    handleSelect (row) {
+        this.$refs.ruleForm.validateField('agent')
+    },
+    querySearch(queryString, cb) {
+        var restaurants = this.restaurants;
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
+        // 调用 callback 返回建议列表的数据
+        cb(results);
+    },
+    createFilter(queryString) {
+        return (restaurant) => {
+          return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
+        };
+      },
+    showadd(){
+      this.addVisible = true
+    },
+    fileRemove(){
+        this.ruleForm.fileList = []
+        this.ruleForm.md5 = ''
+        this.md5 = null
+    },
+    async uploadSectionFile(params) {
+      const file = params.file,
+        fileType = file.type,
+        isImage = fileType.indexOf("image") != -1,
+        isLt1G = file.size / 1024/1024/1024  < 1;
+      console.log('isLt1G',fileType,params);
+      // 这里常规检验,看项目需求而定
+      // if (!isImage) {
+      //   this.$message.error("只能上传图片格式png、jpg、gif!");
+      //   return;
+      // }
+      if (!isLt1G) {
+        this.fileRemove()
+        this.$message.error("上传文件过大,请重新上传");
+        return;
+      }
+      // 根据后台需求数据格式
+      const form = new FormData();
+      // 文件对象
+      form.append("file", file);
+      // 本例子主要要在请求时添加特定属性,所以要用自己方法覆盖默认的action
+      // form.append("clientType", 'xxx');
+      // 项目封装的请求方法,下面做简单介绍
+      console.log('isLt1G',form,file);
+      this.completeshow = true
+      let res = await this.$http({
+        url: '/manager/app/upload',
+        method: 'post',
+        data: form,
+        processData: false,
+        contentType: false,
+        onUploadProgress: (progressEvent) => {
+          this.complete = ((progressEvent.loaded / progressEvent.total) * 100) | 0
+          console.log('上传 ' + this.complete)
+        },
+      })
+      this.completeshow = false
+      
+      this.complete = 0
+      if (res.code === 0) {
+        this.ruleForm.fileList = [file]
+        this.ruleForm.name = file.name
+        this.md5 = res.data || '0'
+      }
+    } 
+  },
+  created () {
+    this._getCameraData()
+    this.getAgenetList()
+  }
+}
+</script>
+<style lang="css" scoped>
+@import "./style.css";
+</style>
+<style type="text/css">
+.inline-input{
+  width:340px;
+}
+.device-management_bottom{
+
+}
+.el-table__expand-icon > i {
+  display: none !important;
+}
+.dialog-footer{
+  text-align: center;
+}
+.edit_btn span {
+  color: #09e1c0;
+}
+
+.delete_btn span {
+  color: #f56c6c;
+}
+</style>

+ 194 - 0
src/page/appupload/style.css

@@ -0,0 +1,194 @@
+.device-management-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 {} */
+
+.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;
+}
+
+.base-info {
+  margin: 20px 0;
+}
+
+.device-management_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;
+}
+
+.device-management_tab {
+  margin: 0 0 20px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.device-management_tab ul {
+  display: inline-block;
+}
+
+.device-management_tab li {
+  display: inline-block;
+  cursor: pointer;
+  color: #999;
+  line-height: 1;
+}
+
+.device-management_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-select {
+  width: 340px!important;
+}
+
+.el-input {
+  width: 340px;
+}
+
+
+
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+  border-color: #409EFF;
+}
+
+.avatar-uploader-icon {
+  font-size: 28px;
+  border: 1px dashed #d9d9d9;
+  color: #8c939d;
+  width: 100px;
+  height: 100px;
+  line-height: 100px;
+  text-align: center;
+}
+.avatar {
+  width: 100px;
+  height: 100px;
+  display: block;
+}

+ 8 - 1
src/page/layout/slide.vue

@@ -37,7 +37,13 @@ export default {
   data () {
     let navs = [
       { text: '首页', link: {name: 'Home'}, top: 14 },
-      { text: '订单管理', link: {name: 'Order'}, top: 42 },
+      { text: '订单管理', link: {name: 'Order'}, 
+        children: [
+          { text: '相机订单', link: {name: 'Order'} },
+          { text: '权益订单', link: {name: 'qyOrder'} },
+          { text: '下载订单', link: {name: 'downloadOrder'} }
+        ],
+      top: 42 },
       // { text: '增值服务', link: {name: 'Added'}, top: 70 },
       // {
       //   text: '代理平台',
@@ -59,6 +65,7 @@ export default {
           { text: '场景管理', link: {name: 'scene'} },
           { text: '反馈消息', link: {name: 'feedback'} },
           // { text: '设备管理', link: {name: 'device'} },
+          { text: 'app管理', link: {name: 'appupload'} },
           { text: '客户管理', link: {name: 'client'} }
         ],
         top: 154

+ 371 - 0
src/page/oderPage/index.vue

@@ -0,0 +1,371 @@
+<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="searchTradeNum" v-model="searchTradeNum" value="" placeholder="交易号"></el-input> -->
+          <div class="base-info">
+            <span>订单号:</span>
+            <el-input @keyup.enter.native="_searchOrderData(1)" ref="searchOrderNumber" v-model="searchOrderNumber" value="" placeholder="订单号"></el-input>
+            <span>手机号:</span>
+            <el-input @keyup.enter.native="_searchOrderData(1)" ref="searchPhone" v-model="searchPhone" value="" placeholder="手机号"></el-input>
+            <span>支付平台交易号:</span>
+            <el-input @keyup.enter.native="_searchOrderData(1)" ref="searchTradeNum" v-model="searchTradeNum" value="" placeholder="支付平台交易号:"></el-input>
+            <el-button type="primary" @click="_searchOrderData(1)" color='red'>筛选</el-button>
+          </div>
+        </div>
+        <div class="order-check_bottom">
+          <div class="order-management-table">
+            <div class="order-check_tab">
+              <ul>
+                <!-- <li v-for="(item,index) in tabs" :key="index" :class="{'order-check_tab_li_active':item.idx==tabIndex}" @click="clickTabItem(item.idx)">{{item.name}}<span v-if="item.idx != 3" style="margin:0 10px;color: #999;font-weight: normal;">/</span></li> -->
+              </ul>
+              <div style="float: right;vertical-align: middle;">
+                <!-- <el-select v-model="selectValue" placeholder="请选择">
+                  <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+                  </el-option>
+                </el-select> -->
+                <el-button type="primary" @click="_exportExcelForOrder" color='red'>导出</el-button>
+              </div>
+            </div>
+            <el-table ref="order_table" @expand-change="_getOrderDetail" class='e-table' :data="orders" style="width: 100%">
+              <el-table-column label="下单时间">
+                <template slot-scope="scope">
+                  <div>{{new Date(scope.row.orderTime).format('yyyy-MM-dd hh:mm:ss')}}</div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="orderSn" label="订单号">
+              </el-table-column>
+              <el-table-column prop="userName" label="手机号/用户名">
+              </el-table-column>
+              <el-table-column v-if="routeName == '下载订单'" prop="num" label="场景下载">
+              </el-table-column>
+              <el-table-column prop="totalAmount" label="订单金额(元)">
+              </el-table-column>
+              <el-table-column prop="paymentTypeName" label="支付方式">
+                <template slot-scope="scope">
+                  <div>{{payMap[scope.row.paymentTypeName]}}</div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="tradeNum" label="支付平台交易号">
+              </el-table-column>
+              <el-table-column prop="orderStatus" label="订单状态">
+                <template slot-scope="scope">
+                  <div>{{paymentStatusMap[scope.row.paymentStatus]}}</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>
+  </div>
+</template>
+
+<script>
+
+export default {
+
+  name: 'order-check',
+
+  data () {
+    return {
+      routeName:'',
+      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: '',
+      searchTradeNum:'',
+      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])
+          }
+        }]
+      }
+    }
+  },
+  watch: {
+    '$route' (to, from) {
+    this.routeName = this.$route.meta.text
+    //to.path即为将要进入的路由
+    this.selectValue = ''
+    this.searchDate = []
+    this.searchOrderNumber = ''
+    this.searchTradeNum = ''
+    this.searchPhone = ''
+    this.searchExpressNum = ''
+    this.currentPage = 1
+    this._searchOrderData(1)
+    }
+  },
+  methods: {
+    handleClick (row) {
+      console.log(this.status)
+
+      console.log(this.selectValue)
+    },
+    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,tradeNum
+      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
+      this.tradeNum = tradeNum = this.searchTradeNum || null
+
+      // console.log(searchDate,searchPhone,searchExpressNum,searchOrderNumber)
+      this.fullscreenLoading = true
+      let status = this.status
+
+      let data = (await this.$http.post(this.geturl('list'), {
+        pageNum: page,
+        type: status,
+        startDate: date1,
+        endDate: date2,
+        orderSn: orderNum,
+        phoneNum: userName,
+        expressNum,
+        tradeNum,
+        pageSize: 10
+      })).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,tradeNum
+      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
+      this.tradeNum = tradeNum = this.searchTradeNum || null
+
+      let data = {
+        'type': this.status,
+        'startDate': date1,
+        'endDate': date2,
+        'orderSn': orderNum,
+        'phoneNum': userName,
+        'expressNum': expressNum,
+        'tradeNum':tradeNum
+      }
+      this.fullscreenLoading = true
+
+      console.error(data)
+      this.$confirm('确定当前标签下的订单记录?', '导出订单', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        let exec = await this.$http({
+          methods: 'get',
+          params: data,
+          url: this.geturl('export'),//'/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
+      })
+    },
+    geturl(name){
+      let urlname = this.$route.name == 'qyOrder'?'incrementOrder':'downloadOrder'
+      let download = {
+        list:`/manager/${urlname}/list`,
+        export:`/manager/${urlname}/export`,
+      }
+      return download[name]
+    },
+    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');
+.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>

+ 166 - 0
src/page/oderPage/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;
+}
+
+.product_info_body {
+  margin-left: 30px;
+  display: flex;
+  margin-top: 20px;
+}
+
+.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;
+}

+ 13 - 4
src/page/order/index.vue

@@ -6,6 +6,9 @@
           <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="searchTradeNum" v-model="searchTradeNum" value="" placeholder="交易号"></el-input>
+          
           <div class="base-info">
             <span>订单号:</span>
             <el-input @keyup.enter.native="_searchOrderData(1)" ref="searchOrderNumber" v-model="searchOrderNumber" value="" placeholder="订单号"></el-input>
@@ -47,6 +50,8 @@
                   <div>{{payMap[scope.row.paymentTypeName]}}</div>
                 </template>
               </el-table-column>
+              <el-table-column prop="tradeNum" label="支付平台交易号">
+              </el-table-column>
               <el-table-column prop="orderStatus" label="订单状态">
                 <template slot-scope="scope">
                   <div>{{paymentStatusMap[scope.row.paymentStatus]}}</div>
@@ -220,6 +225,7 @@ export default {
       // expressNum_input: "",
       searchDate: [],
       searchOrderNumber: '',
+      searchTradeNum:'',
       searchPhone: '',
       searchExpressNum: '',
       hasClickSearch: false,
@@ -346,7 +352,7 @@ export default {
 
     async _searchOrderData (page) {
       this.hasClickSearch = true
-      let date1, date2, userName, expressNum, orderNum
+      let date1, date2, userName, expressNum, orderNum,tradeNum
       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
@@ -355,7 +361,7 @@ export default {
       this.userName = userName = this.searchPhone || null
       this.expressNum = expressNum = this.searchExpressNum || null
       this.orderNum = orderNum = this.searchOrderNumber || null
-
+      this.tradeNum = tradeNum = this.searchTradeNum || null
       // console.log(searchDate,searchPhone,searchExpressNum,searchOrderNumber)
       this.fullscreenLoading = true
       let status = this.status
@@ -368,6 +374,7 @@ export default {
         orderSn: orderNum,
         phoneNum: userName,
         expressNum,
+        tradeNum,
         pageSize: 10
       })).data
 
@@ -382,7 +389,7 @@ export default {
       this.total = data.total
     },
     _exportExcelForOrder () {
-      let date1, date2, userName, expressNum, orderNum
+      let date1, date2, userName, expressNum, orderNum,tradeNum
       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
@@ -391,6 +398,7 @@ export default {
       this.userName = userName = this.searchPhone || null
       this.expressNum = expressNum = this.searchExpressNum || null
       this.orderNum = orderNum = this.searchOrderNumber || null
+      this.tradeNum = tradeNum = this.searchTradeNum || null
 
       let data = {
         'type': this.status,
@@ -398,7 +406,8 @@ export default {
         'endDate': date2,
         'orderSn': orderNum,
         'phoneNum': userName,
-        'expressNum': expressNum
+        'expressNum': expressNum,
+        'tradeNum':tradeNum
       }
       this.fullscreenLoading = true
 

+ 19 - 1
src/router/index.js

@@ -25,7 +25,19 @@ export default new Router({
           path: '/order',
           name: 'Order',
           component: require('@/page/order').default,
-          meta: {text: '订单管理'}
+          meta: {text: '相机订单'}
+        },
+        {
+          path: '/qyOrder',
+          name: 'qyOrder',
+          component: require('@/page/oderPage').default,
+          meta: {text: '权益订单'}
+        },
+        {
+          path: '/downloadOrder',
+          name: 'downloadOrder',
+          component: require('@/page/oderPage').default,
+          meta: {text: '下载订单'}
         },
         {
           path: '/feedback',
@@ -46,6 +58,12 @@ export default new Router({
           meta: {text: '客户管理'}
         },
         {
+          path: '/appupload',
+          name: 'appupload',
+          component: require('@/page/appupload').default,
+          meta: {text: 'app管理'}
+        },
+        {
           path: '/invoice',
           name: 'invoice',
           component: require('@/page/invoice').default,