瀏覽代碼

新增订单管理

shenjj 7 年之前
父節點
當前提交
d1885a6f66
共有 2 個文件被更改,包括 40 次插入10 次删除
  1. 32 7
      pages/mobile/order/details.vue
  2. 8 3
      pages/mobile/order/index.vue

+ 32 - 7
pages/mobile/order/details.vue

@@ -167,9 +167,9 @@
         </div>
         <div class="clearfix">
           <div class="name pull-left">发票信息</div>
-          <div class="pull-right">
+          <div class="pull-right" @click="(orderList.invoicetype === 1205 || orderList.invoicetype === 1206) ? showinvoiceType = true : ''">
             {{(orderList.invoicetype === 1205 || orderList.invoicetype === 1206) ? '查看更多信息' : '暂不开票'}}
-            <img src="/images/mobile/user/icon-right.png" @click="showinvoiceType = true" v-if="orderList.invoicetype === 1205 || orderList.invoicetype === 1206"/>
+            <img src="/images/mobile/user/icon-right.png"  v-if="orderList.invoicetype === 1205 || orderList.invoicetype === 1206"/>
           </div>
         </div>
       </div>
@@ -243,7 +243,7 @@
         <div class="list-btn clearfix">
           <template v-if="vendorType === 'buyer'">
             <div class="sendGoods" v-if="orderList.status === 404" @click="buyerGetGoods(orderList)">确认收货</div>
-            <div class="sendGoods" v-if="!orderList.installmentId && (orderList.status === 503 || orderList.status === 501)" @click="onMind('跳到上传水印地址')">确认付款</div>
+            <div class="sendGoods" v-if="!orderList.installmentId && (orderList.status === 503 || orderList.status === 501)" @click="gotoPay(orderList)">确认付款</div>
             <div class="sendGoods" @click="onMind('此订单为分期付款,请前往【PC】端进行相关操作')" v-if="orderList.installmentId && (orderList.status === 503 || orderList.status === 504 || orderList.status === 524 ) && orderList.installment.status !== 505 && !orderList.againUpload">立即付款</div>
             <div class="" @click="onMind('此订单为分期付款,请前往【PC】端进行相关操作')" v-if="orderList.installmentId && (orderList.status === 503 || orderList.status === 504 || orderList.status === 524 ) && orderList.installment.status !== 505 && orderList.againUpload">重新上传</div>
             <div class="" @click="cancelOrder(orderList)" v-if="orderList.status === 503 || orderList.status === 501 || orderList.status === 502">取消订单</div>
@@ -402,7 +402,7 @@
           status: '', // 物流状态
           peisongShow: false, // 是否显示配送商选择弹窗
           seekKeyword: '',
-          peisongChooseIndex: '', // 配送商选择下标
+          peisongChooseIndex: 0, // 配送商选择下标
           peisongList: [], // 配送商数组
           peisongShowName: '', // 选择完后的配送
           showDeleteAlert: false, // 是否显示删除订单
@@ -434,13 +434,15 @@
           }
         }
         let { data } = await axios.get(`/trade/purchase/purchaseId/${route.query.uuid}`)
+        console.log(data)
         data.data.area = JSON.parse(data.data.jsonAddress)
         data.data.rule = JSON.parse(data.data.jsonRule)
         data.data.paytype = route.query.paytype
         data.data.historyS = JSON.parse(data.data.statushistory)
+        let invoiceAddress = data.data.invoiceAddress ? JSON.parse(data.data.invoiceAddress) : ''
         return {
           orderList: data.data,
-          invoiceAddress: JSON.parse(data.data.invoiceAddress)
+          invoiceAddress: invoiceAddress
         }
       },
       computed: {
@@ -480,6 +482,11 @@
         }
       },
       methods: {
+        // 确认付款
+        gotoPay(item) {
+          let id = EncryptionFilter(item.orderid)
+          this.$router.push(`/mobile/center/user/doPay/${id}`)
+        },
         // 店铺详情页
         toShopdetails(item) {
           this.$router.push(`/mobile/shop/${item.storeid}`)
@@ -537,7 +544,6 @@
         },
         // 发货
         sendGoods(item) {
-          this._id
           this.sendGoodstype = 'add'
           if (item.inid) {
             this._id = EncryptionFilter(item.inid)
@@ -561,11 +567,14 @@
         },
         // 选择配送商
         choosePeisong() {
+          this.seekKeyword = ''
           if (this.peisongList.length > 0) {
+            this.peisongList = this.AllpeisongList.slice()
             this.peisongShow = true
             return
           }
           this.$http.get('/trade/distributor/selected').then(res => {
+            this.AllpeisongList = res.data
             this.peisongList = res.data
             this.peisongList.splice(0, 0, {
               companyName: '请选择配送商'
@@ -764,7 +773,23 @@
         },
         // 搜索
         searchSeek() {
-          this.seekKeyword
+          let _arr = this.AllpeisongList.slice()
+          let addrPatt = /^[\u4e00-\u9fa5]+$/
+          if (addrPatt.test(this.seekKeyword) && this.seekKeyword.length > 0) {
+            this.peisongList = []
+            this.peisongList = _arr.filter((data) => {
+              if (data.companyName.indexOf(this.seekKeyword) >= 0) {
+                return data
+              }
+            })
+            this.peisongList.splice(0, 0, {
+              companyName: '请选择配送商'
+            })
+          } else if (this.seekKeyword === '' || !this.seekKeyword) {
+            this.peisongList = _arr
+          }
+          this.peisongChooseIndex = 0
+          this.peisongChooseItem = {companyName: '请选择配送商'}
         },
         // 获取物流提交信息
         getLogisticsInfo(_type) {

+ 8 - 3
pages/mobile/order/index.vue

@@ -87,7 +87,7 @@
         <div class="list-btn clearfix">
           <template v-if="vendorType === 'buyer'">
             <div class="pull-right sendGoods" v-if="item.status === 404" @click="buyerGetGoods(item)">确认收货</div>
-            <div class="pull-right sendGoods" v-if="!item.installmentId && (item.status === 503 || item.status === 501)" @click="onMind('跳到上传水印地址')">确认付款</div>
+            <div class="pull-right sendGoods" v-if="!item.installmentId && (item.status === 503 || item.status === 501)" @click="gotoPay(item)">确认付款</div>
             <div class="pull-right" @click="lookOrderDetail(item)">订单详情</div>
             <div class="pull-right sendGoods" @click="onMind('此订单为分期付款,请前往【PC】端进行相关操作')" v-if="item.installmentId && (item.status === 503 || item.status === 504 || item.status === 524 ) && item.installment.status !== 505 && !item.againUpload">立即付款</div>
             <div class="pull-right" @click="onMind('此订单为分期付款,请前往【PC】端进行相关操作')" v-if="item.installmentId && (item.status === 503 || item.status === 504 || item.status === 524 ) && item.installment.status !== 505 && item.againUpload">重新上传</div>
@@ -324,6 +324,11 @@
       }
     },
     methods: {
+      // 确认付款
+      gotoPay(item) {
+        let id = EncryptionFilter(item.orderid)
+        this.$router.push(`/mobile/center/user/doPay/${id}`)
+      },
       // 店铺详情页
       toShopdetails(item) {
         this.$router.push(`/mobile/shop/${item.storeid}`)
@@ -435,7 +440,6 @@
       },
       // 发货
       sendGoods(item) {
-        this._id
         this.sendGoodstype = 'add'
         if (item.inid) {
           this._id = EncryptionFilter(item.inid)
@@ -729,6 +733,7 @@
         if (this.vendorType === 'buyer') {
           id = EncryptionFilter(item.orderid)
         }
+        console.log(`/mobile/order/details?uuid=${id}&type=${this.vendorType}&paytype=${item.paytype}`)
         this.$router.push(`/mobile/order/details?uuid=${id}&type=${this.vendorType}&paytype=${item.paytype}`)
       },
       // 买家确认收货
@@ -803,7 +808,7 @@
 .order-wrapper {
   background: #f1f3f6;
   margin: 0.88rem 0 0.98rem 0;
-  height: calc(100vh - 0.88rem - 0.98rem);
+  height: calc(100vh - 0.88rem - 0.96rem);
   overflow-y: scroll;
   padding-bottom: 0.2rem;
   .order-nav {