Procházet zdrojové kódy

退款快递扭转

yjwang před 6 hodinami
rodič
revize
343b8a343c

+ 8 - 0
src/api/hisStore/storeAfterSales.js

@@ -85,3 +85,11 @@ export function audit2(data) {
   })
 }
 
+// 查询用户寄回快递轨迹
+export function getExpress(id) {
+  return request({
+    url: '/store/store/storeAfterSales/getExpress/' + id,
+    method: 'get'
+  })
+}
+

+ 19 - 0
src/views/components/his/storeAfterSalesDetails.vue

@@ -21,6 +21,7 @@
                </span>
                <div class="operate-button-container"  >
                  <el-button size="mini"  @click="showOrder">查看订单</el-button>
+                 <el-button size="mini" @click="showShipBack()" v-if="item.deliverySn != null">查看寄回物流</el-button>
                  <el-button size="mini" @click="editDelivery()" v-show="item.salesStatus==0&&item.status===1" v-hasPermi="['his:storeAfterSales:edit']">编辑物流</el-button>
                  <el-button size="mini" @click="goAuditing(1)"  v-show="item.status==0 && item.salesStatus==0 " v-hasPermi="['his:storeAfterSales:audit']">平台审核</el-button>
                  <el-button size="mini" @click="depotAuditing(3)"  v-show="item.status==2 && item.salesStatus==0" v-hasPermi="['his:storeAfterSales:depot']">仓库审核</el-button>
@@ -155,6 +156,17 @@
         </el-table-column>
       </el-table>
 </div>
+<el-dialog title="用户寄回快递信息" :visible.sync="ship.open" width="520px" append-to-body>
+  <el-descriptions :column="1" border v-if="item!=null">
+    <el-descriptions-item label="物流公司编码">{{ item.shipperCode }}</el-descriptions-item>
+    <el-descriptions-item label="物流名称">{{ item.deliveryName }}</el-descriptions-item>
+    <el-descriptions-item label="物流单号">{{ item.deliverySn }}</el-descriptions-item>
+    <el-descriptions-item label="商家手机号">{{ item.phoneNumber }}</el-descriptions-item>
+  </el-descriptions>
+  <div slot="footer" class="dialog-footer">
+    <el-button @click="ship.open = false">关 闭</el-button>
+  </div>
+</el-dialog>
 <el-dialog :title="edit.title" :visible.sync="edit.open" width="500px" append-to-body>
   <el-form ref="editForm" :model="editForm" :rules="editRules" label-width="100px">
     <el-form-item label="快递公司" prop="deliveryName">
@@ -195,6 +207,9 @@ import storeOrderDetails from '../his/storeOrderDetails.vue';
           open:false,
           title:"添加物流"
         },
+        ship:{
+          open:false
+        },
         editForm:{
           id:null,
           deliveryName:null,
@@ -360,6 +375,10 @@ import storeOrderDetails from '../his/storeOrderDetails.vue';
         this.editForm.deliverySn = this.item.deliverySn;
       },
 
+      showShipBack(){
+        this.ship.open = true;
+      },
+
       cancel1(){
         this.edit.open = false;
         this.editForm.deliveryName = null;

+ 54 - 1
src/views/hisStore/components/productAfterSalesOrder.vue

@@ -22,6 +22,7 @@
             <el-button size="mini"  v-hasPermi="['store:storeAfterSales:refund']" @click="handleRefund"  v-show="afterSales.salesStatus==0&&afterSales.status===3">财务审核</el-button>
             <el-button size="mini"  v-hasPermi="['store:storeAfterSales:cancel']" @click="cancel"  v-show="afterSales.salesStatus==0">撤销</el-button>
             <el-button size="mini"  @click="showOrder">查看订单</el-button>
+            <el-button size="mini" v-if="afterSales.deliverySn != null" @click="showShipBack">查看寄回物流</el-button>
          </div>
         </div>
         <div style="margin: 20px 0px">
@@ -380,11 +381,42 @@
         <el-button @click="cancel1">取 消</el-button>
       </div>
     </el-dialog>
+    <el-dialog title="用户寄回快递信息" :visible.sync="ship.open" width="720px" append-to-body>
+      <el-descriptions :column="1" border v-if="afterSales!=null">
+        <el-descriptions-item label="物流公司编码">{{ afterSales.shipperCode }}</el-descriptions-item>
+        <el-descriptions-item label="物流名称">{{ afterSales.deliveryName }}</el-descriptions-item>
+        <el-descriptions-item label="物流单号">{{ afterSales.deliverySn }}</el-descriptions-item>
+        <el-descriptions-item label="商家手机号">{{ afterSales.phoneNumber }}</el-descriptions-item>
+      </el-descriptions>
+      <div style="margin-top: 20px; font-weight: bold;">物流流转信息</div>
+      <div v-loading="expressLoading">
+        <el-table v-if="traces && traces.length > 0"
+                  style="margin-top: 10px;width: 100%"
+                  :data="traces" border size="small">
+          <el-table-column label="时间" width="170" align="center">
+            <template slot-scope="scope">{{ scope.row.AcceptTime }}</template>
+          </el-table-column>
+          <el-table-column label="位置" align="center">
+            <template slot-scope="scope">{{ scope.row.Location }}</template>
+          </el-table-column>
+          <el-table-column label="描述" align="center">
+            <template slot-scope="scope">{{ scope.row.AcceptStation }}</template>
+          </el-table-column>
+        </el-table>
+        <div v-else-if="!expressLoading"
+             style="margin-top: 10px; padding: 24px 0; text-align: center; color: #909399;">
+          暂无信息
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="ship.open = false">关 闭</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import {getStoreAfterSales,cancel,refund,audit1,audit2,updateStoreAfterSales} from "@/api/hisStore/storeAfterSales";
+import {getStoreAfterSales,cancel,refund,audit1,audit2,updateStoreAfterSales,getExpress} from "@/api/hisStore/storeAfterSales";
 
 import productOrder from "./productOrder";
 export default {
@@ -404,6 +436,11 @@ export default {
         open:false,
         title:"添加物流"
       },
+      ship:{
+        open:false
+      },
+      traces:[],
+      expressLoading:false,
       addForm:{
         id:null,
         deliveryName:null,
@@ -471,6 +508,22 @@ export default {
       this.addForm.deliveryName = this.afterSales.deliveryName;
       this.addForm.deliverySn = this.afterSales.deliverySn;
     },
+    showShipBack(){
+      this.ship.open = true;
+      this.traces = [];
+      if (this.afterSales && this.afterSales.deliverySn) {
+        this.expressLoading = true;
+        getExpress(this.afterSales.id).then(response => {
+          if (response && response.data && response.data.Traces) {
+            this.traces = response.data.Traces;
+          } else {
+            this.traces = [];
+          }
+        }).finally(() => {
+          this.expressLoading = false;
+        });
+      }
+    },
     showOrder(){
       this.show.open=true;
       const orderId = this.order.id ;