Pārlūkot izejas kodu

feat:新增八目转台

jinx 4 gadi atpakaļ
vecāks
revīzija
4372c5b8a1
2 mainītis faili ar 126 papildinājumiem un 104 dzēšanām
  1. 1 0
      src/page/device/index.vue
  2. 125 104
      src/page/turntableCamera/index.vue

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

@@ -90,6 +90,7 @@
               <el-select v-model="ruleForm.type" placeholder="请选择相机类型">
                 <el-option label="四维看看Pro八目相机" value="1"></el-option>
                 <el-option label="四维看看Lite双目相机" value="0"></el-option>
+                <el-option label="四维看看双目转台相机" value="3"></el-option>
               </el-select>
             </el-form-item>
             <el-form-item label="wifi名称" prop="wifi">

+ 125 - 104
src/page/turntableCamera/index.vue

@@ -39,7 +39,7 @@
             </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 @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="10" layout="total, prev, pager, next, jumper" :total="total">
             </el-pagination>
           </div>
         </div>
@@ -72,18 +72,14 @@
 </template>
 
 <script>
-
 export default {
-
   name: 'order-check',
 
   data () {
     return {
       type: 3,
       active: null,
-      colors: [
-        '#08e2c0', '#39bafe', '#fce439', '#fda000', '#f96d6c'
-      ],
+      colors: ['#08e2c0', '#39bafe', '#fce439', '#fda000', '#f96d6c'],
       statusMap: {
         unprocessed: '未处理',
         processed: '已确认',
@@ -91,11 +87,11 @@ export default {
         invalid: '已取消'
       },
       payMap: {
-        '0': '微信',
-        '1': '支付宝',
-        '2': 'paypal',
-        '3': '其他',
-        '4': '货到付款'
+        0: '微信',
+        1: '支付宝',
+        2: 'paypal',
+        3: '其他',
+        4: '货到付款'
       },
       paymentStatusMap: {
         unpaid: '未付款',
@@ -105,43 +101,55 @@ export default {
         partRefund: '部分退款',
         refunded: '全额退款'
       },
-      tabs: [{ name: '全部', idx: -1 }, { name: '未支付', idx: 0 }, { name: '待发货', idx: 1 }, { name: '已发货', idx: 2 }, { name: '已完成', idx: 3 }],
+      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': ''
+        name: '',
+        packageName: '',
+        count: '',
+        amount: '',
+        url: ''
       },
       receive: {
-        'name': '',
-        'phone': '',
-        'address': '',
-        'invoice': '',
-        'expressNum': ''
+        name: '',
+        phone: '',
+        address: '',
+        invoice: '',
+        expressNum: ''
       },
       total: 0,
-      options: [{
-        value: undefined,
-        label: '全部筛选订单'
-      }, {
-        value: 0,
-        label: '未支付筛选订单'
-      }, {
-        value: 1,
-        label: '待发货筛选订单'
-      }, {
-        value: 2,
-        label: '已发货筛选订单'
-      }, {
-        value: 3,
-        label: '已完成筛选订单'
-      }],
+      options: [
+        {
+          value: undefined,
+          label: '全部筛选订单'
+        },
+        {
+          value: 0,
+          label: '未支付筛选订单'
+        },
+        {
+          value: 1,
+          label: '待发货筛选订单'
+        },
+        {
+          value: 2,
+          label: '已发货筛选订单'
+        },
+        {
+          value: 3,
+          label: '已完成筛选订单'
+        }
+      ],
       selectValue: '',
       // expressNum_input: "",
       searchDate: [],
@@ -151,31 +159,35 @@ export default {
       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])
+        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])
+            }
           }
-        }]
+        ]
       }
     }
   },
@@ -185,7 +197,9 @@ export default {
     },
     async updateAduitStatus (id, status) {
       let m = status === 'A' ? 'I' : 'A'
-      let data = (await this.$http.get('/manager/goods/version/update/' + id + '/' + m))
+      let data = await this.$http.get(
+        '/manager/goods/version/update/' + id + '/' + m + '/' + this.type
+      )
       this._searchOrderData(this.currentPage)
     },
     async updateMaker () {
@@ -219,9 +233,7 @@ export default {
       if (pattern.test(expressNum)) {
         this.$alert('快递单号不能为中文', '提示', {
           confirmButtonText: '确定',
-          callback: action => {
-
-          }
+          callback: (action) => {}
         })
       }
 
@@ -240,7 +252,7 @@ export default {
       } else {
         this.$alert('保存失败', '提示', {
           confirmButtonText: '确定',
-          callback: action => {}
+          callback: (action) => {}
         })
       }
 
@@ -283,7 +295,12 @@ export default {
       this.currentPage = 1
       this.status = this.tabIndex === -1 ? null : this.tabIndex
 
-      if (!this.searchDate || this.expressNum || !this.userName || !this.orderNum) {
+      if (
+        !this.searchDate ||
+        this.expressNum ||
+        !this.userName ||
+        !this.orderNum
+      ) {
         this._searchOrderData()
       }
     },
@@ -293,8 +310,8 @@ export default {
       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
+      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
@@ -326,7 +343,7 @@ export default {
       console.log(method, para)
       if (method === 'get') {
         let paras = []
-        Object.keys(para).forEach(k => {
+        Object.keys(para).forEach((k) => {
           if (para[k] || typeof para[k] === 'number') {
             paras.push(`${k}=${para[k]}`)
           } else {
@@ -354,8 +371,8 @@ export default {
       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
+      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
@@ -363,12 +380,12 @@ export default {
       let status = this.status
 
       let data = {
-        'type': this.status,
-        'startDate': date1,
-        'endDate': date2,
-        'orderSn': orderNum,
-        'phoneNum': userName,
-        'expressNum': expressNum
+        type: this.status,
+        startDate: date1,
+        endDate: date2,
+        orderSn: orderNum,
+        phoneNum: userName,
+        expressNum: expressNum
       }
       this.fullscreenLoading = true
 
@@ -377,35 +394,39 @@ export default {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
-      }).then(async () => {
-        let exec = await this.$http({
-          methods: 'get',
-          params: data,
-          url: '/manager/order/export',
-          responseType: 'arraybuffer'
+      })
+        .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
         })
-        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: '已取消导出'
+        .catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消导出'
+          })
+          this.fullscreenLoading = false
         })
-        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)
+      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 => {
+      temp.items = data.orderItems.map((item) => {
         return {
           ...item,
           product: {
@@ -438,11 +459,11 @@ export default {
 </script>
 
 <style scoped>
-@import url('./style.css');
+@import url("./style.css");
 </style>
 
 <style type="text/css">
-.el-table__expand-icon>i {
+.el-table__expand-icon > i {
   display: none !important;
 }
 </style>