Kaynağa Gözat

增加轨迹

shish 1 yıl önce
ebeveyn
işleme
52c7ba498d

+ 4 - 0
ghsApp/src/api/express/index.js

@@ -10,4 +10,8 @@ export const cancelExpressOrder = data => {
 
 
 export const testUpdate = data => {
 export const testUpdate = data => {
     return https.get('/express/test-update', data)
     return https.get('/express/test-update', data)
+}
+
+export const getCgExpressTrack = data => {
+	return https.get('/express/get-cg-express-track', data)
 }
 }

+ 24 - 1
ghsApp/src/pagesOrder/detail.vue

@@ -164,6 +164,12 @@
 					</view>
 					</view>
 				</view>
 				</view>
 
 
+				<view style="border:1upx solid green;width:97%;margin-left:6upx;color:green;padding:2upx;border-radius: 8upx;">
+					<view v-for="(name, tIndex) in trackList" :key="tIndex">
+					{{ tIndex+1 }}、{{ name }}
+					</view>
+				</view>
+
 				<view v-if="detailInfo.status==1" class="order-info_box">
 				<view v-if="detailInfo.status==1" class="order-info_box">
 					<view>过期时间:</view>
 					<view>过期时间:</view>
 					<view>{{detailInfo.deadline?detailInfo.deadline.substr(5,11):''}}</view>
 					<view>{{detailInfo.deadline?detailInfo.deadline.substr(5,11):''}}</view>
@@ -489,6 +495,7 @@ import { delItem,updateRemarkItemFn } from "@/api/order-item";
 import { getAllStaff } from "@/api/shop-admin"
 import { getAllStaff } from "@/api/shop-admin"
 import ModalModule from "@/components/plugin/modal"
 import ModalModule from "@/components/plugin/modal"
 import MxDatePicker from '@/components/mx-datepicker/mx-datepicker.vue';
 import MxDatePicker from '@/components/mx-datepicker/mx-datepicker.vue';
+import { getCgExpressTrack } from "@/api/express"
 export default {
 export default {
 	name: "orderDetail",
 	name: "orderDetail",
 	components: {
 	components: {
@@ -529,7 +536,8 @@ export default {
 			fhLabelShow:false,
 			fhLabelShow:false,
 			payDate:'',
 			payDate:'',
 			currentItem:[],
 			currentItem:[],
-			staffListData:[]
+			staffListData:[],
+			trackList:[]
 		};
 		};
 	},
 	},
 	onPullDownRefresh() {
 	onPullDownRefresh() {
@@ -1179,6 +1187,21 @@ export default {
 						selectJobId:this.selectJobId
 						selectJobId:this.selectJobId
 					});
 					});
 				}
 				}
+
+				let that = this
+				if (!this.$util.isEmpty(this.detailInfo.fhWlSn)){
+				//获取运单轨迹
+				getCgExpressTrack({id:this.option.id}).then(result=>{ 
+					that.trackList = []
+					if(!that.$util.isEmpty(result.data.path_item_list) && this.$util.isArray(result.data.path_item_list)){
+					result.data.path_item_list.forEach(function(item){
+						that.trackList.push(item.action_msg)
+					})
+					}
+				})
+				}
+
+
 			} catch {
 			} catch {
 			} finally {
 			} finally {
 				this.loading = false;
 				this.loading = false;

+ 15 - 4
hdApp/src/pagesPurchase/purDetails.vue

@@ -33,6 +33,11 @@
 						<button @click="copyWl(detailInfo.fhWlNo)" class="admin-button-com default">复制单号</button>
 						<button @click="copyWl(detailInfo.fhWlNo)" class="admin-button-com default">复制单号</button>
 					</view>
 					</view>
         </view>
         </view>
+        <view style="border:1upx solid green;width:97%;margin-left:6upx;color:green;padding:2upx;border-radius: 8upx;">
+          <view v-for="(name, tIndex) in trackList" :key="tIndex">
+           {{ tIndex+1 }}、{{ name }}
+          </view>
+        </view>
       </view>
       </view>
 
 
       <view class="bills-info_box content-box">
       <view class="bills-info_box content-box">
@@ -359,7 +364,8 @@ export default {
       settlePrice:0,
       settlePrice:0,
       //登录状态 0未登录 1登录仅用到了采购 2登录用到完整功能
       //登录状态 0未登录 1登录仅用到了采购 2登录用到完整功能
       loginStyle :0,
       loginStyle :0,
-      afterSale:1
+      afterSale:1,
+      trackList:[]
     };
     };
   },
   },
   onShareAppMessage(res) {
   onShareAppMessage(res) {
@@ -538,12 +544,17 @@ export default {
         that.settlePrice = parseFloat(that.settlePrice.toFixed(2))
         that.settlePrice = parseFloat(that.settlePrice.toFixed(2))
         that.afterSale = res.data.afterSale
         that.afterSale = res.data.afterSale
         that.$forceUpdate()
         that.$forceUpdate()
-
         if (!this.$util.isEmpty(that.detailInfo.fhWlSn)){
         if (!this.$util.isEmpty(that.detailInfo.fhWlSn)){
           //获取运单轨迹
           //获取运单轨迹
-          //getCgExpressTrack({id:id}).then(res=>{ })
+          getCgExpressTrack({id:id}).then(result=>{ 
+            that.trackList = []
+            if(!that.$util.isEmpty(result.data.path_item_list) && this.$util.isArray(result.data.path_item_list)){
+              result.data.path_item_list.forEach(function(item){
+                  that.trackList.push(item.action_msg)
+              })
+            }
+          })
         }
         }
-
       })
       })
     },
     },
     toPay () {
     toPay () {