yuhongqi пре 2 недеља
родитељ
комит
6d4937433a

+ 48 - 0
src/api/live/liveOrder.js

@@ -99,3 +99,51 @@ export function tuiOrder(data) {
     data: data
   })
 }
+
+export function getExpressByDeliverId(param) {
+  return request({
+    url: '/live/liveOrder/getExpressByDeliverId',
+    method: 'post',
+    data: param
+  })
+}
+
+/**
+ * 根据订单获取物流信息
+ * @param orderId
+ * @returns {*}
+ */
+export function getByOrderId(orderId){
+  return request({
+    url: '/live/liveOrder/getByOrderId/'+orderId,
+    method: 'get'
+  })
+}
+export function bindCustomer(data) {
+  return request({
+    url: '/live/liveOrder/bindCustomer',
+    method: 'post',
+    data: data
+  })
+}
+// 查询订单详细
+export function getLiveOrderAll(id) {
+  return request({
+    url: '/live/liveOrder/' + id,
+    method: 'get'
+  })
+}
+// 查询订单详细
+export function getLiveOrderAddress(id) {
+  return request({
+    url: '/live/liveOrder/queryAddress/' + id,
+    method: 'get'
+  })
+}
+// 查询电话
+export function getUserPhone(id) {
+  return request({
+    url: '/live/liveOrder/queryPhone/' + id,
+    method: 'get'
+  })
+}

+ 25 - 23
src/views/live/components/productAfterSalesOrder.vue

@@ -70,33 +70,33 @@
         </div>
         <el-descriptions   :column="4" border  >
             <el-descriptions-item label="收货人"  >
-                <span v-if="afterSales!=null">
-                  {{afterSales.consignee}}
-                </span>
-            </el-descriptions-item>
-            <el-descriptions-item label="收货人"  >
-                <span v-if="afterSales!=null">
-                  {{afterSales.consignee}}
+                <span v-if="order!=null">
+                  {{order.userName}}
                 </span>
             </el-descriptions-item>
+<!--            <el-descriptions-item label="收货人"  >-->
+<!--                <span v-if="order!=null">-->
+<!--                  {{order.userName}}-->
+<!--                </span>-->
+<!--            </el-descriptions-item>-->
             <el-descriptions-item label="手机号码"  >
-                <span v-if="afterSales!=null">
-                  {{afterSales.phoneNumber}}
+                <span v-if="order!=null">
+                  {{order.userPhone}}
                 </span>
             </el-descriptions-item>
             <el-descriptions-item label="收货地址"  >
-                <span v-if="afterSales!=null">
-                  {{afterSales.address}}
+                <span v-if="order!=null">
+                  {{order.userAddress}}
                 </span>
             </el-descriptions-item>
             <el-descriptions-item label="快递公司"  >
-                <span v-if="afterSales!=null">
-                  {{afterSales.deliveryName}}
+                <span v-if="order!=null">
+                  {{order.deliveryName}}
                 </span>
             </el-descriptions-item>
             <el-descriptions-item label="运单号"  >
-                <span v-if="afterSales!=null">
-                  {{afterSales.deliverySn}}
+                <span v-if="order!=null">
+                  {{order.deliverySn}}
                 </span>
             </el-descriptions-item>
         </el-descriptions>
@@ -289,11 +289,11 @@ export default {
     submitForm() {
       var id=this.afterSales.id;
       this.addForm.id = id;
-      updateStoreAfterSales(this.addForm).then(response => {
+      updateLiveAfterSales(this.addForm).then(response => {
               if (response.code === 200) {
                 this.msgSuccess("编辑成功");
                 this.add.open = false;
-                this.getStoreAfterSales(id);
+                this.getLiveAfterSales(id);
               }
             });
     },
@@ -307,7 +307,7 @@ export default {
     },
     showOrder(){
       this.show.open=true;
-      const orderId = this.order.id ;
+      const orderId = this.order.orderId ;
       setTimeout(() => {
         this.$refs.productOrder.getOrder(orderId);
       }, 500);
@@ -324,7 +324,7 @@ export default {
            audit(this.form).then(response => {
               if (response.code === 200) {
                 this.audit.open = false;
-                this.getStoreAfterSales(this.afterSales.id);
+                this.getLiveAfterSales(this.afterSales.id);
                 this.msgSuccess("操作成功");
               }
             });
@@ -341,7 +341,7 @@ export default {
           var data={salesId:id}
           return cancel(data);
         }).then(() => {
-          this.getStoreAfterSales(id);
+          this.getLiveAfterSales(id);
           this.msgSuccess("操作成功");
         }).catch(function() {});
     },
@@ -356,12 +356,14 @@ export default {
           console.log(data)
           return refund(data);
         }).then(() => {
-          this.getStoreAfterSales(id);
+          this.getLiveAfterSales(id);
           this.msgSuccess("操作成功");
         }).catch(function() {});
     },
-    getStoreAfterSales(id){
-        getStoreAfterSales(id).then(response => {
+    getLiveAfterSales(id){
+      getLiveAfterSales(id).then(response => {
+        console.log(response)
+        console.log(123)
             this.afterSales = response.afterSales;
             this.logs = response.logs;
             this.items = response.items;

+ 28 - 33
src/views/live/components/productOrder.vue

@@ -17,7 +17,7 @@
         </span>
 
         <div class="operate-button-container" >
-          <el-button size="mini" @click="handleCertificates()"  v-hasPermi="['store:storeOrder:uploadCredentials']" >上传凭证</el-button>
+<!--          <el-button size="mini" @click="handleCertificates()"  v-hasPermi="['store:storeOrder:uploadCredentials']" >上传凭证</el-button>-->
           <el-button size="mini" @click="handleEditAddress()" v-if="order.status==0||order.status==1"  v-hasPermi="['store:storeOrder:editAddress']" >修改收货地址</el-button>
           <el-button size="mini" @click="handleBindCustomer()"  v-hasPermi="['store:storeOrder:bindCustomer']" >关联客户</el-button>
           <el-button size="mini" @click="editOrder()"  v-hasPermi="['store:storeOrder:edit']" >修改订单</el-button>
@@ -59,7 +59,7 @@
 
             <el-descriptions-item label="收货人"  >
                 <span v-if="order!=null ">
-                  {{order.realName }}
+                  {{order.userName }}
                 </span>
             </el-descriptions-item>
             <el-descriptions-item label="手机号码"  >
@@ -262,16 +262,16 @@
                 ¥{{order.payPostage.toFixed(2)}}
               </span>
           </el-descriptions-item>
-          <el-descriptions-item label="优惠券"  >
-              <span v-if="order!=null">
-                ¥{{order.couponPrice.toFixed(2)}}
-              </span>
-          </el-descriptions-item>
-          <el-descriptions-item label="积分抵扣"  >
-              <span v-if="order!=null">
-                ¥{{order.deductionPrice.toFixed(2)}}
-              </span>
-          </el-descriptions-item>
+<!--          <el-descriptions-item label="优惠券"  >-->
+<!--              <span v-if="order!=null">-->
+<!--                ¥{{order.couponPrice.toFixed(2)}}-->
+<!--              </span>-->
+<!--          </el-descriptions-item>-->
+<!--          <el-descriptions-item label="积分抵扣"  >-->
+<!--              <span v-if="order!=null">-->
+<!--                ¥{{order.deductionPrice.toFixed(2)}}-->
+<!--              </span>-->
+<!--          </el-descriptions-item>-->
           <el-descriptions-item label="实付金额"  >
               <span v-if="order!=null">
                 ¥{{order.payMoney.toFixed(2)}}
@@ -524,18 +524,13 @@ import ImageUpload from '@/components/ImageUpload'
 import Material from '@/components/Material'
 import {
   bindCustomer,
-  getExpress,
-  listStoreOrder,
-  getStoreOrder,
-  delStoreOrder,
-  addStoreOrder,
-  updateStoreOrder,
-  exportStoreOrder,
+  getLiveOrderAll,
   uploadCredentials,
-  getStoreOrderAddress,
+  updateLiveOrder,
+  getLiveOrderAddress,
   getUserPhone,
   getByOrderId, getExpressByDeliverId
-} from "@/api/store/storeOrder";
+} from "@/api/live/liveOrder";
 import {getAllList} from "@/api/store/city";
 import customerDetails from '../../crm/components/customerDetails.vue';
 import addSms from '../../crm/components/addSms.vue';
@@ -679,7 +674,7 @@ export default {
   methods: {
     getExpressList(){
       getByOrderId(this.orderId).then(res=>{
-        this.deliverList = res.data;
+        this.deliverList.push(res.data);
       })
     },
     closeSms(){
@@ -694,14 +689,14 @@ export default {
 
     },
     handlePhone(){
-      const id = this.order.id;
+      const id = this.order.orderId;
         getUserPhone(id).then(response =>{
           this.order.userPhone = response.userPhone;
         })
       },
     handleAddress(){
-      const id = this.order.id;
-      getStoreOrderAddress(id).then(response =>{
+      const id = this.order.orderId;
+      getLiveOrderAddress(id).then(response =>{
           this.order.userAddress = response.address;
       })
     },
@@ -760,7 +755,7 @@ export default {
               if (response.code === 200) {
                 this.msgSuccess("上传成功");
                 this.certificateDialig.open = false;
-                this.getOrder(this.order.id);
+                this.getOrder(this.order.orderId);
               }
             });
     },
@@ -814,7 +809,7 @@ export default {
     },
     handleEditAddress() {
         this.getCityList();
-        this.editAddressForm.id=this.order.id;
+        this.editAddressForm.id=this.order.orderId;
         this.editAddressForm.realName=this.order.realName;
         this.editAddressForm.userPhone=this.order.userPhone;
         var address=this.order.userAddress.split(' ')
@@ -847,11 +842,11 @@ export default {
       this.$refs["editAddressForm"].validate(valid => {
         if (valid) {
            this.editAddressForm.userAddress=this.editAddressForm.province+" "+this.editAddressForm.city+" "+this.editAddressForm.district+" "+this.editAddressForm.detail;
-            updateStoreOrder(this.editAddressForm).then(response => {
+            updateLiveOrder(this.editAddressForm).then(response => {
               if (response.code === 200) {
                 this.msgSuccess("修改成功");
                 this.editAddress.open = false;
-                this.getOrder(this.order.id);
+                this.getOrder(this.order.orderId);
               }
             });
         }
@@ -875,7 +870,7 @@ export default {
               if (response.code === 200) {
                 this.msgSuccess("修改成功");
                 this.editUser.open = false;
-                this.getOrder(this.order.id);
+                this.getOrder(this.order.orderId);
               }
             });
         }
@@ -888,7 +883,7 @@ export default {
             if (response.code === 200) {
               this.msgSuccess("操作成功");
               this.edit.open = false;
-              this.getOrder(this.order.id);
+              this.getOrder(this.order.orderId);
             }
           });
 
@@ -898,7 +893,7 @@ export default {
     editOrder(){
         this.edit.open=true;
         this.editForm.mark=this.order.mark
-        this.editForm.id=this.order.id;
+        this.editForm.id=this.order.orderId;
         if(this.order.orderType!=null){
           this.editForm.orderType=this.order.orderType.toString();
         }
@@ -909,7 +904,7 @@ export default {
     getOrder(orderId){
         this.orderId=orderId;
         this.certificates = null;
-        getStoreOrder(orderId).then(response => {
+        getLiveOrderAll(orderId).then(response => {
             this.order = response.order;
             if(response.order.certificates != null){
               this.certificates = response.order.certificates;

+ 1 - 1
src/views/live/liveAfteraSales/index.vue

@@ -301,7 +301,7 @@ export default {
       this.title="售后订单"
       this.open=true;
       setTimeout(() => {
-        this.$refs.afterSalesOrder.getStoreAfterSales(row.id);
+        this.$refs.afterSalesOrder.getLiveAfterSales(row.id);
       }, 200);
     },
     /** 查询售后记录列表 */