Parcourir la source

1.优化 OrderItem.vue 2.添加发送跑腿

shizhongqi il y a 10 mois
Parent
commit
d75ba8b653

+ 556 - 269
ghsApp/src/admin/home/components/OrderItem.vue

@@ -1,285 +1,450 @@
 <template>
-    <view>
-      <view @click="pageTo({url:'/pagesOrder/detail?id='+item.id})">
-        <view class="order-top_box" style="position:relative;">
+  <view>
+    <view @click="pageTo({ url: '/pagesOrder/detail?id=' + item.id })">
+      <view class="order-top_box">
+        <image
+          class="code-pay-img"
+          v-if="currentStatus == 1 && item.book == 0"
+          @click.stop="
+            pageTo({
+              url: '/admin/billing/toPay',
+              query: {
+                orderId: item.id,
+                orderSn: item.orderSn,
+                actPrice: item.actPrice
+              }
+            })
+          "
+          mode="widthFix"
+          :src="`${constant.imgUrl}/icon/codePay8.png`"
+        ></image>
 
-        <image style="width:105upx;position:absolute;top:80upx;right:12upx;" v-if="currentStatus == 1 && item.book == 0"
-        @click.stop="pageTo({url:'/admin/billing/toPay',query: {orderId:item.id,orderSn:item.orderSn,actPrice:item.actPrice}})"
-         mode="widthFix" :src="`${constant.imgUrl}/icon/codePay8.png`"></image>
-
-        <image style="width: 38upx;height:38upx;border-radius:38upx;" mode="aspectFit" :src="item.customAvatarUrl"></image>
-          <view class="tit"> {{ item.customName || "" }}</view>
-          <view class="other-refund" v-if="item.refund==2">有售后</view>
-          <view class="other-status" v-if="item.debt == 1">赊账</view>
-          <text class="other-book" v-if="item.book == 1" >预订单</text>
-          <text class="other-presell" v-if="item.presell == 1" >预售单</text>
-          <view :class="['status',currentStatus == 4 ? 'buleColor' : currentStatus == 3 ? 'buleColor' : currentStatus == 1 ? 'defColor' : '']">
-            {{currentStatus==1?'待付款':currentStatus==2?'待发货':currentStatus==3?'配送中':currentStatus==4?'已完成':'已取消'}}
-          </view>
+        <image class="avatar" mode="aspectFit" :src="item.customAvatarUrl"></image>
+        <view class="tit"> {{ item.customName || '' }}</view>
+        <view class="other-refund" v-if="item.refund == 2">有售后</view>
+        <view class="other-status" v-if="item.debt == 1">赊账</view>
+        <text class="other-book" v-if="item.book == 1">预订单</text>
+        <text class="other-presell" v-if="item.presell == 1">预售单</text>
+        <view :class="['status', currentStatus == 4 ? 'buleColor' : currentStatus == 3 ? 'buleColor' : currentStatus == 1 ? 'defColor' : '']">
+          {{
+            currentStatus == 1 ? '待付款' : currentStatus == 2 ? '待发货' : currentStatus == 3 ? '配送中' : currentStatus == 4 ? '已完成' : '已取消'
+          }}
         </view>
-        <view class="order-list_info">
+      </view>
+      <view class="order-list_info">
         <view class="order-info_box">
-            <view>编号:</view>
-            <view>{{ item.sendNum }}</view>
+          <view>编号:</view>
+          <view>{{ item.sendNum }}</view>
         </view>
         <view class="order-info_box">
-            <view>创建:</view>
-            <view>
-              {{ item.addTime?item.addTime.substr(5,11):'' }}
-            </view>
-            <view v-if="item.addTime && item.payTime && item.payTime!='0000-00-00 00:00:00' && item.addTime.substr(5,5)!=item.payTime.substr(5,5)" style="flex:1;color:#a29696;display:flex;align-items:center;justify-content:flex-end;font-size:28upx;">
-              账单日期 {{ item.payTime?item.payTime.substr(5,11):'' }}
-            </view>
+          <view>创建:</view>
+          <view>
+            {{ item.addTime ? item.addTime.substr(5, 11) : '' }}
+          </view>
+          <view
+            v-if="item.addTime && item.payTime && item.payTime != '0000-00-00 00:00:00' && item.addTime.substr(5, 5) != item.payTime.substr(5, 5)"
+            class="bill-date"
+          >
+            账单日期 {{ item.payTime ? item.payTime.substr(5, 11) : '' }}
+          </view>
         </view>
         <view class="order-info_box">
-            <view>单号:</view>
-            <view>{{ item.orderSn }}</view>
+          <view>单号:</view>
+          <view>{{ item.orderSn }}</view>
         </view>
         <view class="order-info_box">
-            <view>方式:</view>
-            <view>
-              <text v-if="item.localOrder ==0">{{ item.sendType == 0?'送货上门':item.sendType == 1?'到店自取': item.sendType == 2?'代叫配送':item.sendType == 3 ? item.wlName :item.sendType == 4?'发快递':''}}</text>
-              <text v-else>{{ item.transType == 0 ? '德邦物流' : item.transType == 1 ? '顺丰物流' :item.transType == 2 ? '冷链物流':item.transType == 3 ? '航空物流':item.transType == 4 ? '同城配送':item.transType == 5 ? '到店自取':''}}</text>
-            </view>
+          <view>方式:</view>
+          <view>
+            <text v-if="item.localOrder == 0">{{
+              item.sendType == 0
+                ? '送货上门'
+                : item.sendType == 1
+                ? '到店自取'
+                : item.sendType == 2
+                ? '代叫配送'
+                : item.sendType == 3
+                ? item.wlName
+                : item.sendType == 4
+                ? '发快递'
+                : ''
+            }}</text>
+            <text v-else>{{
+              item.transType == 0
+                ? '德邦物流'
+                : item.transType == 1
+                ? '顺丰物流'
+                : item.transType == 2
+                ? '冷链物流'
+                : item.transType == 3
+                ? '航空物流'
+                : item.transType == 4
+                ? '同城配送'
+                : item.transType == 5
+                ? '到店自取'
+                : ''
+            }}</text>
+          </view>
         </view>
         <view class="order-info_box">
-            <view>开单:</view>
-            <view v-if="item.shopAdminId > 0">{{ item.shopAdminName}}</view>
-            <view v-else>{{item.customShopAdminName}}</view>
+          <view>开单:</view>
+          <view v-if="item.shopAdminId > 0">{{ item.shopAdminName }}</view>
+          <view v-else>{{ item.customShopAdminName }}</view>
         </view>
         <view class="order-info_box">
-            <view>数量:</view>
-            <view v-if="item.smallNum > 0">{{ `${item.bigNum}/${item.smallNum}` }}</view>
-            <view v-else>{{ item.bigNum }}</view>
-            <view class="price">
-            <view v-if="item.orderPrice == item.actPrice">¥{{ item.orderPrice ? parseFloat(item.orderPrice):0 }}</view>
+          <view>数量:</view>
+          <view v-if="item.smallNum > 0">{{ `${item.bigNum}/${item.smallNum}` }}</view>
+          <view v-else>{{ item.bigNum }}</view>
+          <view class="price">
+            <view v-if="item.orderPrice == item.actPrice">¥{{ item.orderPrice ? parseFloat(item.orderPrice) : 0 }}</view>
             <view v-else>
-              <text style="text-decoration: line-through;color:#847676;">¥{{ item.orderPrice ? parseFloat(item.orderPrice):0 }}</text>
-              <text style="margin-left:10upx;">¥{{ item.actPrice ? parseFloat(item.actPrice):0 }}</text>
+              <text class="price-original">¥{{ item.orderPrice ? parseFloat(item.orderPrice) : 0 }}</text>
+              <text class="price-discount">¥{{ item.actPrice ? parseFloat(item.actPrice) : 0 }}</text>
             </view>
             <i class="iconfont iconxiangyou"></i>
-            </view>
+          </view>
         </view>
         <view class="order-info_box" v-if="!$util.isEmpty(item.remark)">
-            <view style="color:red;font-weight:bold;">备注:</view>
-            <view style="color:red;font-weight:bold;">{{ item.remark }}</view>
-        </view>
-        <view v-if="item.sameTimeIdsNum && item.sameTimeIdsNum>1" style="text-align: center;color:white;
-        margin-top:20upx;font-size:32upx;background-color:#3780a5ad;padding-top:7upx;padding-bottom:7upx;"
-        @click.stop="pageTo({url:'/admin/order/itemOrder?ids='+item.sameTimeIds})">
-          本客户共有{{item.sameTimeIdsNum}}个订单,可合并发货
+          <view class="remark-label">备注:</view>
+          <view class="remark-text">{{ item.remark }}</view>
         </view>
+        <view
+          v-if="item.sameTimeIdsNum && item.sameTimeIdsNum > 1"
+          class="merge-tips"
+          @click.stop="pageTo({ url: '/admin/order/itemOrder?ids=' + item.sameTimeIds })"
+        >
+          本客户共有{{ item.sameTimeIdsNum }}个订单,可合并发货
         </view>
-        <view class="list-bottom">
-            <view class="list-button">
-                <view><button @click.stop="shareOrder(item)" open-type="share" class="admin-button-com bule">分享</button> </view>
-                <block v-if="currentStatus == 2">
-                  <block v-if="item.book == 0">
-                    <view><button @click.stop="directFh(item)" class="admin-button-com bule">发货</button> </view>
-                  </block>
-                  <block v-else>
-                    <view><button @click.stop="confirmFh(item)" class="admin-button-com bule">确认发货</button> </view>
-                  </block>
-                </block>
-                <block v-else>
-                  <view><button disabled="true" class="admin-button-com bule active">发货</button> </view>
-                </block>
-                <view v-if="currentStatus == 1">
-                  <button disabled="true" class="admin-button-com bule active">打印(${item.printNum})</button>
-                </view>
-                <view v-else>
-                  <button @click.stop="printOrder(item)" class="admin-button-com bule">打印<text>({{item.printNum}})</text></button>
-                </view>
-                <view>
-                  <button @click.stop="openMore(item)" class="admin-button-com bule">更多</button>
-                </view>
-            </view>
+      </view>
+      <view class="list-bottom">
+        <view class="list-button">
+          <view><button @click.stop="shareOrder(item)" open-type="share" class="admin-button-com bule">分享</button> </view>
+          <block v-if="currentStatus == 2">
+            <block v-if="item.book == 0">
+              <view><button @click.stop="directFh(item)" class="admin-button-com bule">发货</button> </view>
+            </block>
+            <block v-else>
+              <view><button @click.stop="confirmFh(item)" class="admin-button-com bule">确认发货</button> </view>
+            </block>
+          </block>
+          <block v-else>
+            <view><button disabled="true" class="admin-button-com bule active">发货</button> </view>
+          </block>
+          <view v-if="currentStatus == 1">
+            <button disabled="true" class="admin-button-com bule active">打印(${item.printNum})</button>
+          </view>
+          <view v-else>
+            <button @click.stop="printOrder(item)" class="admin-button-com bule">
+              打印<text>({{ item.printNum }})</text>
+            </button>
+          </view>
+          <view>
+            <button @click.stop="openMore(item)" class="admin-button-com bule">更多</button>
+          </view>
         </view>
+      </view>
+    </view>
 
+    <uni-popup ref="morePopup" background-color="#fff" type="center" :animation="true" class="class-popup-style">
+      <view class="more-popup-body">
+        <view class="text-center"><button class="admin-button-com" @click="addExpress(item)">顺丰下单</button></view>
+        <view class="text-center"><button class="admin-button-com" @click="cancelExpress(item)">取消顺丰订单</button></view>
+        <view class="text-center"><button class="admin-button-com" @click="fillNoFh(item)">填单发货</button></view>
+        <view class="text-center"><button class="admin-button-com" @click="sim(item)">模拟</button></view>
+        <block v-if="item.sendStatus == -1">
+          <view class="text-center"><button class="admin-button-com" @click="callExpress(item)">呼叫跑腿</button></view>
+        </block>
+        <block v-else-if="item.sendStatus == 0 || item.sendStatus == 1 || item.sendStatus == 4 || item.sendStatus == 5">
+          <view class="text-center"><button class="admin-button-com" @click="cancelExpressOrder(item)">取消跑腿</button></view>
+        </block>
+        <block v-else-if="item.sendStatus == 3">
+          <view class="text-center"><button class="admin-button-com" @click="callExpress(item)">重叫跑腿</button></view>
+        </block>
+        <view class="text-center"><button class="admin-button-com default" @click="closeMore">取消</button></view>
       </view>
+    </uni-popup>
 
-      <uni-popup ref="morePopup" background-color="#fff" type="center" :animation="true" class="class-popup-style">
-        <view style="padding:50upx 40upx;width:70vw;">
-          <view style="text-align: center;"><button class="admin-button-com" style="margin:0 auto 30upx auto;width:240upx;height:80upx;line-height: 80upx;font-size:29upx;" @click="addExpress(item)">顺丰下单</button></view>
-          <view style="text-align: center;"><button class="admin-button-com" style="margin:0 auto 30upx auto;width:240upx;height:80upx;line-height: 80upx;font-size:29upx;" @click="cancelExpress(item)">取消顺丰订单</button></view>
-          <view style="text-align: center;"><button class="admin-button-com" style="margin:0 auto 30upx auto;width:240upx;height:80upx;line-height: 80upx;font-size:29upx;" @click="fillNoFh(item)">填单发货</button></view>
-          <view style="text-align: center;"><button class="admin-button-com" style="margin:0 auto 30upx auto;width:240upx;height:80upx;line-height: 80upx;font-size:29upx;" @click="sim(item)">模拟</button></view>
-          <view style="text-align: center;"><button class="admin-button-com default" @click="closeMore" style="margin:10upx auto 0 auto;width:240upx;height:80upx;line-height: 80upx;font-size:29upx;">取消</button></view>
+    <!-- 新增物流下单弹窗 -->
+    <uni-popup ref="expressAddressRef" background-color="#fff" type="center" :animation="true" class="class-popup-style" :mask-click="false">
+      <view class="express-popup-body">
+        <view class="popup-title">发货信息</view>
+        <view class="form-vertical">
+          <view class="form-row">
+            <view class="form-label">包裹数量:</view>
+            <input class="input-control" type="number" v-model="wlPackageNum" placeholder="请输入包裹数量" />
+          </view>
+          <view class="form-row">
+            <view class="form-label">重量(kg):</view>
+            <input class="input-control" type="digit" v-model="wlWeight" placeholder="请输入重量" />
+          </view>
+          <view class="form-row">
+            <view class="form-label">长度(cm):</view>
+            <input class="input-control" type="number" v-model="wlLength" placeholder="请输入长度" />
+          </view>
+          <view class="form-row">
+            <view class="form-label">宽度(cm):</view>
+            <input class="input-control" type="number" v-model="wlWidth" placeholder="请输入宽度" />
+          </view>
+          <view class="form-row">
+            <view class="form-label">高度(cm):</view>
+            <input class="input-control" type="number" v-model="wlHeight" placeholder="请输入高度" />
+          </view>
+          <view class="form-row">
+            <view class="form-label">城市:</view>
+            <view class="form-value">{{ receiverCity }}</view>
+          </view>
+          <view class="form-row">
+            <view class="form-label">地址:</view>
+            <view class="form-value">{{ receiverAddress }}{{ receiverFloor }}</view>
+          </view>
+          <view class="form-row">
+            <view class="form-label">姓名:</view>
+            <view class="form-value">{{ receiverName }}</view>
+          </view>
+          <view class="form-row">
+            <view class="form-label">电话:</view>
+            <view class="form-value">{{ receiverMobile }}</view>
+          </view>
         </view>
-      </uni-popup>
+        <view class="popup-actions">
+          <button class="admin-button-com default" @click="closeExpressPop">取消</button>
+          <button class="admin-button-com bule" @click="modifyAddress(item)">修改地址</button>
+          <button class="admin-button-com bule" @click="confirmAddExpress(item)">提交</button>
+        </view>
+      </view>
+    </uni-popup>
 
-      <!-- 新增物流下单弹窗 -->
-      <uni-popup ref="expressAddressRef" background-color="#fff" type="center" :animation="true" class="class-popup-style" :mask-click="false">
-        <view style="padding:40upx 50upx;width:96vw;">
-          <view style="font-size:32upx;font-weight:bold;text-align:center;margin-bottom:30upx;">发货信息</view>
-          <view style="display:flex;flex-direction:column;gap:18upx;">
-            <view style="display:flex;align-items:center;">
-              <view style="width:135upx;color:#888;font-size:28upx;white-space:nowrap;">包裹数量:</view>
-              <input style="flex:1;font-size:28upx;border:1px solid #eee;padding:0 12upx;border-radius:8upx;height:60upx;line-height:60upx;" type="number" v-model="wlPackageNum" placeholder="请输入包裹数量" />
-            </view>
-            <view style="display:flex;align-items:center;">
-              <view style="width:135upx;color:#888;font-size:28upx;white-space:nowrap;">重量(kg):</view>
-              <input style="flex:1;font-size:28upx;border:1px solid #eee;padding:0 12upx;border-radius:8upx;height:60upx;line-height:60upx;" type="digit" v-model="wlWeight" placeholder="请输入重量" />
-            </view>
-            <view style="display:flex;align-items:center;">
-              <view style="width:135upx;color:#888;font-size:28upx;white-space:nowrap;">长度(cm):</view>
-              <input style="flex:1;font-size:28upx;border:1px solid #eee;padding:0 12upx;border-radius:8upx;height:60upx;line-height:60upx;" type="number" v-model="wlLength" placeholder="请输入长度" />
-            </view>
-            <view style="display:flex;align-items:center;">
-              <view style="width:135upx;color:#888;font-size:28upx;white-space:nowrap;">宽度(cm):</view>
-              <input style="flex:1;font-size:28upx;border:1px solid #eee;padding:0 12upx;border-radius:8upx;height:60upx;line-height:60upx;" type="number" v-model="wlWidth" placeholder="请输入宽度" />
-            </view>
-            <view style="display:flex;align-items:center;">
-              <view style="width:135upx;color:#888;font-size:28upx;white-space:nowrap;">高度(cm):</view>
-              <input style="flex:1;font-size:28upx;border:1px solid #eee;padding:0 12upx;border-radius:8upx;height:60upx;line-height:60upx;" type="number" v-model="wlHeight" placeholder="请输入高度" />
-            </view>
-            <view style="display:flex;align-items:center;">
-              <view style="width:135upx;color:#888;font-size:28upx;">城市:</view>
-              <view style="flex:1;font-size:28upx;">{{ receiverCity }}</view>
-            </view>
-            <view style="display:flex;align-items:center;">
-              <view style="width:135upx;color:#888;font-size:28upx;">地址:</view>
-              <view style="flex:1;font-size:28upx;">{{ receiverAddress }}{{ receiverFloor }}</view>
-            </view>
-            <view style="display:flex;align-items:center;">
-              <view style="width:135upx;color:#888;font-size:28upx;">姓名:</view>
-              <view style="flex:1;font-size:28upx;">{{ receiverName }}</view>
-            </view>
-            <view style="display:flex;align-items:center;">
-              <view style="width:135upx;color:#888;font-size:28upx;">电话:</view>
-              <view style="flex:1;font-size:28upx;">{{ receiverMobile }}</view>
-            </view>
+    <!-- 跑腿弹窗 -->
+    <uni-popup ref="callExpressRef" background-color="#fff" type="center" :animation="true" class="class-popup-style" :mask-click="false">
+      <view class="call-express-popup-body">
+        <view class="popup-title">发货信息</view>
+        <view class="form-vertical">
+          <view class="form-row">
+            <view class="form-label">包裹数量:</view>
+            <input class="input-control" type="number" v-model="callExpressData.packageNum" placeholder="请输入包裹数量" />
+          </view>
+          <view class="form-row">
+            <view class="form-label">重量(kg):</view>
+            <input class="input-control" type="digit" v-model="callExpressData.weight" placeholder="请输入重量" />
           </view>
-          <view style="display:flex;justify-content:space-around;margin-top:40upx;">
-            <button class="admin-button-com default" style="width:160upx;" @click="closeExpressPop">取消</button>
-            <button class="admin-button-com bule" style="width:160upx;" @click="modifyAddress(item)">修改地址</button>
-            <button class="admin-button-com bule" style="width:160upx;" @click="confirmAddExpress(item)">提交</button>
+          <view class="form-row">
+            <view class="form-label">姓名:</view>
+            <view class="form-value">{{ callExpressData.user_name }}</view>
+          </view>
+          <view class="form-row">
+            <view class="form-label">电话:</view>
+            <view class="form-value">{{ callExpressData.user_phone }}</view>
+          </view>
+          <view class="form-row">
+            <view class="form-label">订单号:</view>
+            <view class="form-value">{{ callExpressData.orderSn }}</view>
+          </view>
+          <view class="form-row">
+            <view class="form-label">地址:</view>
+            <view class="form-value">{{ callExpressData.fullAddress }}{{ callExpressData.floor }}</view>
           </view>
         </view>
-      </uni-popup>
-
-    </view>
+        <view class="popup-actions">
+          <button class="admin-button-com default" @click="closeCallExpressPop">取消</button>
+          <button class="admin-button-com bule" @click="modifyAddress(item)">修改地址</button>
+          <button class="admin-button-com bule" @click="confirmCallExpress(item)">提交</button>
+        </view>
+      </view>
+    </uni-popup>
+  </view>
 </template>
 <script>
-import { getUserDet } from "@/api/member";
-import { createExpressOrder,cancelExpressOrder,testUpdate } from "@/api/express";
+import { getUserDet } from '@/api/member';
+import { createExpressOrder, cancelExpressOrder as cancelSFExpressOrder } from '@/api/express';
+import { createCallExpressOrder as apiCreateCallExpressOrder, cancelExpressOrder as apiCancelCallExpressOrder } from '@/api/shop/shop-express.js';
 export default {
-	name: "OrderItem",
-	components: {
-	},
-	props: {
-	  item: {
-			required: true
-		},
-	   isScanEnv:{
-			type: Boolean,
-			default: false
-	  }
-	},
-	data() {
-		return {
-      currentStatus:0,
+  name: 'OrderItem',
+  components: {},
+  props: {
+    item: {
+      required: true
+    },
+    isScanEnv: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      currentStatus: 0,
       wlPackageNum: 1,
       wlWeight: '',
-      wlLength:100,
+      wlLength: 100,
       wlWidth: 70,
       wlHeight: 50,
       receiverCity: '',
       receiverAddress: '',
-      receiverFloor:'',
-      receiverName:'',
-      receiverMobile:'',
+      receiverFloor: '',
+      receiverName: '',
+      receiverMobile: '',
+      callExpressData: {}
     };
-	},
-	mounted(){
-		if(this.item.status){
-      this.currentStatus = this.item.status
-		}
-	},
-	methods: {
-    modifyAddress(item){
-      this.closeExpressPop()
-      this.$util.pageTo({url: "/pagesClient/member/modify?id="+item.customId+"&name="+item.customName})
+  },
+  mounted() {
+    if (this.item.status) {
+      this.currentStatus = this.item.status;
+    }
+  },
+  methods: {
+    modifyAddress(item) {
+      this.closeExpressPop();
+      this.$util.pageTo({
+        url: '/pagesClient/member/modify?id=' + item.customId + '&name=' + item.customName
+      });
     },
-    shareOrder(info){
-      this.$emit('shareOrder',info)
+    shareOrder(info) {
+      this.$emit('shareOrder', info);
     },
-    directFh(info){
-			this.$emit('directFh', info)
+    updateFiled(info) {
+      this.$emit('listendUpdateFiled', info);
     },
-    confirmFh(info){
-      this.$util.pageTo({url: "/pagesOrder/arrival?id="+info.id})
+    directFh(info) {
+      this.$emit('directFh', info);
     },
-    fillNoFh(info){
-      this.closeMore()
-			this.$emit('fillNoFh', info)
+    confirmFh(info) {
+      this.$util.pageTo({ url: '/pagesOrder/arrival?id=' + info.id });
     },
-		printOrder(item) {
-      let that = this
-      if(item.printNum && Number(item.printNum)>0){
-        this.$util.confirmModal({content:'请检查是否发过货,确认补打?'},() => {
-          that.$emit('printOrder', item)
-        })
-      }else{
-        that.$emit('printOrder', item)
+    fillNoFh(info) {
+      this.closeMore();
+      this.$emit('fillNoFh', info);
+    },
+    printOrder(item) {
+      let that = this;
+      if (item.printNum && Number(item.printNum) > 0) {
+        this.$util.confirmModal({ content: '请检查是否发过货,确认补打?' }, () => {
+          that.$emit('printOrder', item);
+        });
+      } else {
+        that.$emit('printOrder', item);
       }
-		},
+    },
     openMore(item) {
       this.$refs.morePopup.open('center');
     },
     closeMore() {
       this.$refs.morePopup.close();
     },
-    sim(item){
+    sim(item) {
       //testUpdate({id:item.id}).then(res=>{ })
     },
+    callExpress(item) {
+      this.closeMore();
+      this.callExpressData = {
+        orderId: item.id,
+        orderSn: item.orderSn,
+        weight: Number(item.weight),
+        packageNum: item.smallNum > 0 ? item.bigNum / item.smallNum : item.bigNum,
+        user_name: item.customName,
+        user_phone: item.customMobile,
+        user_lng: item.long,
+        user_lat: item.lat,
+        note: item.remark,
+        fullAddress: item.fullAddress,
+        floor: item.floor
+      };
+      this.$refs.callExpressRef.open('center');
+    },
     addExpress(item) {
-      this.closeMore()
-      getUserDet({id:item.customId}).then(res=>{
-        if(res.code == 1){
-          this.receiverCity = res.data.city
-          this.receiverAddress = res.data.address
-          this.receiverFloor = res.data.floor
-          this.receiverName = res.data.name
-          this.receiverMobile = res.data.mobile
+      this.closeMore();
+      getUserDet({ id: item.customId }).then((res) => {
+        if (res.code == 1) {
+          this.receiverCity = res.data.city;
+          this.receiverAddress = res.data.address;
+          this.receiverFloor = res.data.floor;
+          this.receiverName = res.data.name;
+          this.receiverMobile = res.data.mobile;
         }
-      })
+      });
       this.$refs.expressAddressRef.open('center');
     },
-    cancelExpress(item){
-      this.$util.confirmModal({content:'确认取消?'},() => {
-        cancelExpressOrder({id:item.id}).then(res=>{
-          if(res.code == 1){
-            this.$msg(res.msg)
-            this.closeMore()
+    cancelExpress(item) {
+      this.$util.confirmModal({ content: '确认取消?' }, () => {
+        cancelSFExpressOrder({ id: item.id }).then((res) => {
+          if (res.code == 1) {
+            this.$msg(res.msg);
+            this.closeMore();
+          }
+        });
+      });
+    },
+    // 跑腿取消
+    cancelExpressOrder(item) {
+      this.$util.confirmModal({ content: '确认取消跑腿?' }, () => {
+        apiCancelCallExpressOrder({ orderId: item.id }).then((res) => {
+          if (res.code == 1) {
+            // item.sendStatus = 3;
+            // this.$emit('listendUpdateField', { id: item.id, key: 'sendStatus', value: 3 });
+            this.updateFiled({ id: item.id, key: 'sendStatus', value: 3 });
+            this.$msg(res.msg);
+            this.closeMore();
+          }
+        });
+      });
+    },
+    closeCallExpressPop() {
+      this.$refs.callExpressRef.close();
+    },
+    confirmCallExpress(item) {
+      console.log(item);
+      this.$util.confirmModal({ content: '确认提交?' }, () => {
+        const data = {
+          orderId: item.id,
+          weight: Number(item.weight),
+          packageNum: item.smallNum > 0 ? item.bigNum / item.smallNum : item.bigNum,
+          user_name: item.customName,
+          user_phone: item.customMobile,
+          user_address: item.fullAddress + item.floor,
+          user_lng: item.long,
+          user_lat: item.lat,
+          note: item.remark
+        };
+        //处理表单数据
+        apiCreateCallExpressOrder(data).then((res) => {
+          if (res.code == 1) {
+            // item.sendStatus = 0;
+            // this.$emit('listendUpdateField', { id: item.id, key: 'sendStatus', value: 0 });
+            this.updateFiled({ id: item.id, key: 'sendStatus', value: 0 });
+            this.$msg(res.msg);
+            this.closeCallExpressPop();
           }
-        })
-      })
+        });
+      });
     },
     closeExpressPop() {
       this.$refs.expressAddressRef.close();
     },
     confirmAddExpress(item) {
-        if(Number(this.wlWeight)<=0){
-          this.$msg('请填写重量')
-          return false
-        }
-        this.$util.confirmModal({content:'确认提交?'},() => {
-          createExpressOrder({id:item.id,weight:Number(this.wlWeight),length:this.wlLength,width:this.wlWidth,height:this.wlHeight,packageNum:this.wlPackageNum}).then(res=>{
-            if(res.code == 1){
-              this.$msg(res.msg)
-              this.closeExpressPop()
-            }
-          })
-        })
-    },
-	}
+      if (Number(this.wlWeight) <= 0) {
+        this.$msg('请填写重量');
+        return false;
+      }
+      this.$util.confirmModal({ content: '确认提交?' }, () => {
+        createExpressOrder({
+          id: item.id,
+          weight: Number(this.wlWeight),
+          length: this.wlLength,
+          width: this.wlWidth,
+          height: this.wlHeight,
+          packageNum: this.wlPackageNum
+        }).then((res) => {
+          if (res.code == 1) {
+            this.$msg(res.msg);
+            this.closeExpressPop();
+          }
+        });
+      });
+    }
+  }
 };
 </script>
 
 <style lang="scss" scoped>
-.class-popup-style{
-	z-index:999999;
+.class-popup-style {
+  z-index: 999999;
 }
 .admin-button-com {
   width: 140upx;
@@ -294,38 +459,39 @@ export default {
 }
 .list-top,
 .list-bottom {
-    padding: 15upx 30upx;
-    border-bottom: 1upx solid $borderColor;
-    color: $fontColor3;
-    .freight-text {
-        margin-right: 60upx;
-    }
+  padding: 15upx 30upx;
+  border-bottom: 1upx solid $borderColor;
+  color: $fontColor3;
+  .freight-text {
+    margin-right: 60upx;
+  }
 }
 .list-bottom {
-    & > div {
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-    }
-    .list-button {
-        width: 100%;
-        display: flex;
-        flex-wrap: wrap;
-        justify-content: space-around;
-        align-items: center;
-        .admin-button-com {
-            margin: 0 6upx 12upx 6upx;
-            min-width: 90upx;
-            max-width: 140upx;
-            flex: none;
-            box-sizing: border-box;
-        }
+  & > div {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+  }
+  .list-button {
+    width: 100%;
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-around;
+    align-items: center;
+    .admin-button-com {
+      margin: 0 6upx 12upx 6upx;
+      min-width: 90upx;
+      max-width: 140upx;
+      flex: none;
+      box-sizing: border-box;
     }
+  }
 }
 .order-top_box {
   display: flex;
   align-items: center;
   padding: 20upx 30upx 20upx;
+  position: relative;
   & > .tit {
     flex: 8;
     color: #333333;
@@ -333,49 +499,49 @@ export default {
     font-weight: 650;
     margin-left: 15upx;
   }
-  & > .other-presell{
+  & > .other-presell {
     text-align: center;
     color: white;
-    border:2upx solid #059240;
-    border-radius:30upx;
-    padding:5upx 10upx;
-    font-size:20upx;
-    background:#059240;
-    margin-right:20upx;
-    width:auto;
+    border: 2upx solid #059240;
+    border-radius: 30upx;
+    padding: 5upx 10upx;
+    font-size: 20upx;
+    background: #059240;
+    margin-right: 20upx;
+    width: auto;
   }
-  & > .other-book{
+  & > .other-book {
     text-align: center;
     color: white;
-    border:2upx solid #657cac;
-    border-radius:30upx;
-    padding:5upx 10upx;
-    font-size:20upx;
-    background:#657cac;
-    margin-right:20upx;
-    width:auto;
+    border: 2upx solid #657cac;
+    border-radius: 30upx;
+    padding: 5upx 10upx;
+    font-size: 20upx;
+    background: #657cac;
+    margin-right: 20upx;
+    width: auto;
   }
-  & > .other-refund{
+  & > .other-refund {
     text-align: center;
     color: white;
     background-color: #0e7ed8;
-    border:2upx solid #0e7ed8;
-    border-radius:30upx;
-    padding:5upx 12upx;
-    font-size:20upx;
-    margin-right:20upx;
-    width:auto;
+    border: 2upx solid #0e7ed8;
+    border-radius: 30upx;
+    padding: 5upx 12upx;
+    font-size: 20upx;
+    margin-right: 20upx;
+    width: auto;
   }
-  & > .other-status{
+  & > .other-status {
     text-align: center;
     color: white;
     background-color: #ff2842;
-    border:2upx solid red;
-    border-radius:30upx;
-    padding:5upx 12upx;
-    font-size:20upx;
-    margin-right:20upx;
-    width:auto;
+    border: 2upx solid red;
+    border-radius: 30upx;
+    padding: 5upx 12upx;
+    font-size: 20upx;
+    margin-right: 20upx;
+    width: auto;
   }
   & > .status {
     flex: 2;
@@ -390,6 +556,127 @@ export default {
   }
 }
 
+.code-pay-img {
+  width: 105upx;
+  position: absolute;
+  top: 80upx;
+  right: 12upx;
+}
+
+.avatar {
+  width: 38upx;
+  height: 38upx;
+  border-radius: 38upx;
+}
+
+.bill-date {
+  flex: 1;
+  color: #a29696;
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+  font-size: 28upx;
+}
+
+.price-original {
+  text-decoration: line-through;
+  color: #847676;
+}
+
+.price-discount {
+  margin-left: 10upx;
+}
+
+.remark-label,
+.remark-text {
+  color: red;
+  font-weight: bold;
+}
+
+.merge-tips {
+  text-align: center;
+  color: white;
+  margin-top: 20upx;
+  font-size: 32upx;
+  background-color: #3780a5ad;
+  padding-top: 7upx;
+  padding-bottom: 7upx;
+}
+
+.text-center {
+  text-align: center;
+}
+
+.more-popup-body {
+  padding: 50upx 40upx;
+  width: 70vw;
+  .admin-button-com {
+    margin: 0 auto 30upx auto;
+    width: 240upx;
+    height: 80upx;
+    line-height: 80upx;
+    font-size: 29upx;
+  }
+  .text-center:last-child .admin-button-com {
+    margin: 10upx auto 0 auto;
+  }
+}
+
+.express-popup-body,
+.call-express-popup-body {
+  padding: 40upx 50upx;
+  width: 96vw;
+}
+
+.popup-title {
+  font-size: 32upx;
+  font-weight: bold;
+  text-align: center;
+  margin-bottom: 30upx;
+}
+
+.form-vertical {
+  display: flex;
+  flex-direction: column;
+  gap: 18upx;
+}
+
+.form-row {
+  display: flex;
+  align-items: center;
+}
+
+.form-label {
+  width: 135upx;
+  color: #888;
+  font-size: 28upx;
+  white-space: nowrap;
+}
+
+.input-control {
+  flex: 1;
+  font-size: 28upx;
+  border: 1px solid #eee;
+  padding: 0 12upx;
+  border-radius: 8upx;
+  height: 60upx;
+  line-height: 60upx;
+}
+
+.form-value {
+  flex: 1;
+  font-size: 28upx;
+}
+
+.popup-actions {
+  display: flex;
+  justify-content: space-around;
+  margin-top: 40upx;
+  .admin-button-com {
+    width: 160upx;
+  }
+}
+
 .order-list_info {
   padding: 10upx 30upx 30upx;
   border-bottom: 1upx solid #eeeeee;
@@ -441,4 +728,4 @@ input:-ms-input-placeholder {
 input::-ms-input-placeholder {
   line-height: 60upx;
 }
-</style>
+</style>

+ 284 - 258
ghsApp/src/admin/home/order.vue

@@ -1,36 +1,33 @@
 <template>
   <view class="app-main app-content">
-
-    <view style="position:fixed;top:100upx;background-color:white;z-index:999999;height:auto;font-size:33upx;color:#333333;width:100%;">
-    <view style="width:80%;border:1upx solid #CCCCCC;margin:0 auto;padding:10upx 0 0 20upx;overflow: scroll;" v-if="showSearch">
-      <block v-if="!$util.isEmpty(searchList)">
-        <block v-for="(item, index) in searchList" :key="index">
-          <view style="margin-bottom:30upx;" @click="getCustom(item)">
-            <view style="font-size:37upx;margin-bottom:10upx;">{{item.name}}</view>
-            <view style="font-size:29upx;">
-              {{item.visitTime?item.visitTime.substr(5,11):''}}
-                <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 10000" style="margin-left:20upx;color:green;">没有下过单</text>
-                <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 7" style="margin-left:20upx;color:green;">超1周未下单</text>
-                <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 30" style="margin-left:20upx;color:green;">超1个月未下单</text>
-                <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 180" style="margin-left:20upx;color:green;">超半年未下单</text>
-                <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 365" style="margin-left:20upx;color:green;">超1年未下单</text>
+    <view style="position: fixed; top: 100upx; background-color: white; z-index: 999999; height: auto; font-size: 33upx; color: #333333; width: 100%">
+      <view style="width: 80%; border: 1upx solid #cccccc; margin: 0 auto; padding: 10upx 0 0 20upx; overflow: scroll" v-if="showSearch">
+        <block v-if="!$util.isEmpty(searchList)">
+          <block v-for="(item, index) in searchList" :key="index">
+            <view style="margin-bottom: 30upx" @click="getCustom(item)">
+              <view style="font-size: 37upx; margin-bottom: 10upx">{{ item.name }}</view>
+              <view style="font-size: 29upx">
+                {{ item.visitTime ? item.visitTime.substr(5, 11) : '' }}
+                <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 10000" style="margin-left: 20upx; color: green">没有下过单</text>
+                <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 7" style="margin-left: 20upx; color: green">超1周未下单</text>
+                <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 30" style="margin-left: 20upx; color: green">超1个月未下单</text>
+                <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 180" style="margin-left: 20upx; color: green">超半年未下单</text>
+                <text v-if="item.overTimeUnExpend && item.overTimeUnExpend == 365" style="margin-left: 20upx; color: green">超1年未下单</text>
+              </view>
             </view>
-          </view>
+          </block>
         </block>
-      </block>
-    </view>
+      </view>
     </view>
 
     <view class="input-wrap_box">
-
       <view class="select-dn_bx">
-        <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName='时间' />
+        <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName="时间" />
       </view>
-      <view> <AppSearchModule placeholder="这里搜索" @input="searchFn"/> </view>
+      <view> <AppSearchModule placeholder="这里搜索" @input="searchFn" /> </view>
       <view>
-        <button class="admin-button-com big" style="width:120upx;margin-left:16upx;" @click="getMore()">更多</button>
+        <button class="admin-button-com big" style="width: 120upx; margin-left: 16upx" @click="getMore()">更多</button>
       </view>
-
     </view>
     <view class="app-tabs">
       <app-tabs :tabs="tabs" :isFixed="false" :top="50" :currentTab="tabIndex" :height="100" @change="change" itemWidth="20%" />
@@ -38,10 +35,17 @@
     <div class="list-wrap">
       <block v-if="!$util.isEmpty(list.data)">
         <div class="list" v-for="(item, index) in list.data" :key="index">
-
-          <OrderItem :ref="`orderRef${item.id}`" :item="item" :isScanEnv="isScanEnv" @printOrder="printOrder" @directFh="directFh" @fillNoFh="fillNoFh" @shareOrder="shareOrder">
+          <OrderItem
+            :ref="`orderRef${item.id}`"
+            :item="item"
+            :isScanEnv="isScanEnv"
+            @printOrder="printOrder"
+            @directFh="directFh"
+            @fillNoFh="fillNoFh"
+            @shareOrder="shareOrder"
+            @listendUpdateFiled="onUpdateItemField"
+          >
           </OrderItem>
-
         </div>
       </block>
       <block v-else>
@@ -49,53 +53,64 @@
       </block>
     </div>
 
-		<modal-module :show="fhLabelShow" @click="fhConfirm" :maskClosable="true" title="物流信息" padding="30rpx 30rpx" >
+    <modal-module :show="fhLabelShow" @click="fhConfirm" :maskClosable="true" title="物流信息" padding="30rpx 30rpx">
       <template v-slot:content>
         <div class="app-modal-input-wrap">
           <div class="inp-list-line">
             <div class="line-label">物流名称</div>
             <div class="line-input">
-            <input type="text" v-model="fhWl" @focus="fhWl=''" class="inp-input" />
+              <input type="text" v-model="fhWl" @focus="fhWl = ''" class="inp-input" />
             </div>
           </div>
           <div class="inp-list-line">
             <div class="line-label">物流单号</div>
             <div class="line-input">
-            <input type="text" v-model="fhWlNo" :focus="fhWlFocus" @focus="fhWlNo=''" class="inp-input" />
+              <input type="text" v-model="fhWlNo" :focus="fhWlFocus" @focus="fhWlNo = ''" class="inp-input" />
             </div>
           </div>
         </div>
       </template>
-		</modal-module>
+    </modal-module>
 
     <NotLogin></NotLogin>
 
-		<uni-popup ref="rightShowMore" background-color="#fff" type="center" :animation="true" class="class-popup-style">
-			<view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
-				<view style="width:100vw;"><button @click="clearSearch()">清空搜索</button></view>
-        <view style="width:100vw;margin-top:20upx;"><button @click="printWlList()">打印物流列表</button></view>
-				<view style="width:100vw;margin-top:35upx;"><button @click="closeMore()">取消</button></view>
-			</view>
-		</uni-popup>
-
+    <uni-popup ref="rightShowMore" background-color="#fff" type="center" :animation="true" class="class-popup-style">
+      <view
+        style="
+          display: flex;
+          width: 100vw;
+          padding: 20upx 20upx 40upx 20upx;
+          height: auto;
+          justify-content: space-between;
+          align-items: center;
+          flex-wrap: wrap;
+          max-height: 100vh;
+          overflow: auto;
+        "
+      >
+        <view style="width: 100vw"><button @click="clearSearch()">清空搜索</button></view>
+        <view style="width: 100vw; margin-top: 20upx"><button @click="printWlList()">打印物流列表</button></view>
+        <view style="width: 100vw; margin-top: 35upx"><button @click="closeMore()">取消</button></view>
+      </view>
+    </uni-popup>
   </view>
 </template>
 <script>
-import AppTabs from "@/components/plugin/tabs";
-import NotLogin from "@/components/not-login";
-import AppWrapperEmpty from "@/components/app-wrapper-empty";
-import ModalModule from "@/components/plugin/modal";
-import { list } from "@/mixins";
-import { mapGetters } from "vuex";
-import { getListB,cloudPrintOrder,orderFh} from "@/api/order";
-import AppSearchModule from "@/components/module/app-search";
-import DropShopSelect from "@/components/module/shopSelect";
-import OrderItem from "./components/OrderItem";
-import DateSelect from "@/components/module/dateSelect";
-import { IMGHOST } from '@/config'
-import { getList } from "@/api/member";
+import AppTabs from '@/components/plugin/tabs';
+import NotLogin from '@/components/not-login';
+import AppWrapperEmpty from '@/components/app-wrapper-empty';
+import ModalModule from '@/components/plugin/modal';
+import { list } from '@/mixins';
+import { mapGetters } from 'vuex';
+import { getListB, cloudPrintOrder, orderFh } from '@/api/order';
+import AppSearchModule from '@/components/module/app-search';
+import DropShopSelect from '@/components/module/shopSelect';
+import OrderItem from './components/OrderItem';
+import DateSelect from '@/components/module/dateSelect';
+import { IMGHOST } from '@/config';
+import { getList } from '@/api/member';
 export default {
-  name: "order",
+  name: 'order',
   components: {
     AppTabs,
     AppWrapperEmpty,
@@ -107,76 +122,76 @@ export default {
     NotLogin
   },
   mixins: [list],
-  computed: { 
-    ...mapGetters(["getLoginInfo", "getDictionariesInfo"]),
-    ...mapGetters({dictInfo:"getDictionariesInfo" }),
+  computed: {
+    ...mapGetters(['getLoginInfo', 'getDictionariesInfo']),
+    ...mapGetters({ dictInfo: 'getDictionariesInfo' })
   },
   data() {
     return {
-      fhWlInfo:[],
-      fhWlNo:'',
-      fhWl:'顺丰',
-      fhWlFocus:false,
-      fhLabelShow:false,
-      isScanEnv:false,
-    	orderId:'',
+      fhWlInfo: [],
+      fhWlNo: '',
+      fhWl: '顺丰',
+      fhWlFocus: false,
+      fhLabelShow: false,
+      isScanEnv: false,
+      orderId: '',
       isShow: false, //是否显选择时间段
       customizationTime: [], //时间段
-      customizationTimeType: "", //时间段
+      customizationTimeType: '', //时间段
       tabIndex: 0,
       tabs: [
         {
-          name: "全部",
+          name: '全部',
           value: 0,
-          id: 0,
+          id: 0
         },
         {
-          name: "待付款",
+          name: '待付款',
           value: 0,
-          id: 1,
+          id: 1
         },
         {
-          name: "待发货",
+          name: '待发货',
           value: 0,
-          id: 2,
+          id: 2
         },
         {
-          name: "配送中",
+          name: '配送中',
           value: 0,
-          id: 3,
+          id: 3
         },
         {
-          name: "已完成",
+          name: '已完成',
           value: 0,
-          id: 4,
-        },
+          id: 4
+        }
       ],
-      selectItemId: "",
+      selectItemId: '',
       operateIndex: null,
       operateData: {},
       // 免发货
       freeShipModal: false,
       classifyForm: {
-        categoryId: "",
-        usageId: "",
+        categoryId: '',
+        usageId: ''
       },
-      searchType:0,
-      searchTypeName:'客户',
-      searchTime:'',
-      startTime:'',
-      endTime:'',
-      fromDetail:{status:1},
-      currentInfo:{},
-      currentTitle:'',
-      searchList:[],
-      showSearch:false,
-      customId:0
+      searchType: 0,
+      searchTypeName: '客户',
+      searchTime: '',
+      startTime: '',
+      endTime: '',
+      fromDetail: { status: 1 },
+      currentInfo: {},
+      currentTitle: '',
+      searchList: [],
+      showSearch: false,
+      customId: 0
     };
   },
   onPullDownRefresh() {
     this.resetList();
-    this.getOrderList()
-    uni.stopPullDownRefresh()
+    this.getOrderList();
+    uni.stopPullDownRefresh();
   },
   onReachBottom() {
     if (!this.list.finished) {
@@ -187,197 +202,199 @@ export default {
       uni.stopPullDownRefresh();
     }
   },
-  mounted() {
-  },
+  mounted() {},
   onLoad() {
-    let tabIndex = uni.getStorageSync("switchTabQuery") || null;
+    let tabIndex = uni.getStorageSync('switchTabQuery') || null;
     if (tabIndex) {
-      uni.removeStorageSync("switchTabQuery");
+      uni.removeStorageSync('switchTabQuery');
       this.tabIndex = parseInt(tabIndex.tabIndex);
     }
     // #ifdef APP-PLUS
-    if(this.$util.isScanEnv()){
-      this.isScanEnv = true
+    if (this.$util.isScanEnv()) {
+      this.isScanEnv = true;
     }
-	  //#endif
+    //#endif
   },
   onShow() {
     //从订单详情页过来则不需要刷新
-    if(this.fromDetail.status == 1){
-      this.fromDetail.status = 0
-    }else{
-      this.resetList()
-      this.init()
+    if (this.fromDetail.status == 1) {
+      this.fromDetail.status = 0;
+    } else {
+      this.resetList();
+      this.init();
     }
   },
-	onShareAppMessage(res) {
-    this.fromDetail.status = 1
-		console.log("pagesOrder/showOrder?id="+this.currentInfo.purchaseId)
-		return {
-			title: this.currentTitle,
-			desc: "",
-			imageUrl: IMGHOST+'/custom/order_share.jpg',
-			path: "pagesOrder/showOrder?id="+this.currentInfo.purchaseId,
-		}
-	},
+  onShareAppMessage(res) {
+    this.fromDetail.status = 1;
+    console.log('pagesOrder/showOrder?id=' + this.currentInfo.purchaseId);
+    return {
+      title: this.currentTitle,
+      desc: '',
+      imageUrl: IMGHOST + '/custom/order_share.jpg',
+      path: 'pagesOrder/showOrder?id=' + this.currentInfo.purchaseId
+    };
+  },
   methods: {
-    directFh(info){
-      let that = this
-      that.$util.confirmModal({content:'确认发货?'},() => {
-          orderFh({id:info.id,fhType:0}).then(res=>{
-            if(res.code == 1){
-              that.$refs[`orderRef${info.id}`][0].currentStatus = 3
-              that.$msg('发货成功')
-            }
-          })
-      })
+    directFh(info) {
+      let that = this;
+      that.$util.confirmModal({ content: '确认发货?' }, () => {
+        orderFh({ id: info.id, fhType: 0 }).then((res) => {
+          if (res.code == 1) {
+            that.$refs[`orderRef${info.id}`][0].currentStatus = 3;
+            that.$msg('发货成功');
+          }
+        });
+      });
     },
-    shareOrder(info){
-      this.currentInfo = info
-      this.fromDetail.status = 1
-			console.log("pagesOrder/showOrder?id="+info.purchaseId)
-			let that = this
-			let miniOriginalId = that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.ghs ? that.dictInfo.miniOriginalId.current.ghs : ''
-      let actPrice = info.actPrice ? parseFloat(info.actPrice) : 0
-      let customName = info.customName ? info.customName : ''
-      let title = customName+' '+info.addTime.substr(5,11)+' ¥'+actPrice
-      if(info.payTime!='0000-00-00 00:00:00'){
-        title = customName+' '+info.payTime.substr(5,11)+' ¥'+actPrice
+    shareOrder(info) {
+      this.currentInfo = info;
+      this.fromDetail.status = 1;
+      console.log('pagesOrder/showOrder?id=' + info.purchaseId);
+      let that = this;
+      let miniOriginalId =
+        that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.ghs
+          ? that.dictInfo.miniOriginalId.current.ghs
+          : '';
+      let actPrice = info.actPrice ? parseFloat(info.actPrice) : 0;
+      let customName = info.customName ? info.customName : '';
+      let title = customName + ' ' + info.addTime.substr(5, 11) + ' ¥' + actPrice;
+      if (info.payTime != '0000-00-00 00:00:00') {
+        title = customName + ' ' + info.payTime.substr(5, 11) + ' ¥' + actPrice;
       }
-      if(info.tkPrice && Number(info.tkPrice)>0){
-          title = title+' 已退¥'+parseFloat(info.tkPrice)
-			}
-      this.currentTitle = title
+      if (info.tkPrice && Number(info.tkPrice) > 0) {
+        title = title + ' 已退¥' + parseFloat(info.tkPrice);
+      }
+      this.currentTitle = title;
       // #ifdef APP-PLUS
-			uni.share({
-				provider: "weixin", //分享服务提供商(即weixin|qq|sinaweibo)
-				scene: 'WXSceneSession', //场景,可取值参考下面说明。
-				type: 5, //分享形式
-				title: title, //分享内容的标题
-				summary: '暂无', //分享内容的摘要
-				imageUrl: IMGHOST+'/custom/order_share.jpg',//图片一定要有,不然会分享失败
-				miniProgram: {
-					id: miniOriginalId,//小程序原始id,发起分享的 App 与小程序属于同一微信开放平台账号
-					path: "pagesOrder/showOrder?id="+info.purchaseId,
-					type: 0,// 0-正式版; 1-测试版; 2-体验版
-					webUrl: 'https://www.wixhb.com'
-				},
-				success: function(res) {
-					console.log(res)
-				},
-				fail: function(err) {
-					console.log(err)
-				}
-			})
+      uni.share({
+        provider: 'weixin', //分享服务提供商(即weixin|qq|sinaweibo)
+        scene: 'WXSceneSession', //场景,可取值参考下面说明。
+        type: 5, //分享形式
+        title: title, //分享内容的标题
+        summary: '暂无', //分享内容的摘要
+        imageUrl: IMGHOST + '/custom/order_share.jpg', //图片一定要有,不然会分享失败
+        miniProgram: {
+          id: miniOriginalId, //小程序原始id,发起分享的 App 与小程序属于同一微信开放平台账号
+          path: 'pagesOrder/showOrder?id=' + info.purchaseId,
+          type: 0, // 0-正式版; 1-测试版; 2-体验版
+          webUrl: 'https://www.wixhb.com'
+        },
+        success: function (res) {
+          console.log(res);
+        },
+        fail: function (err) {
+          console.log(err);
+        }
+      });
       // #endif
     },
     //这个有多处要同步修改,关键词:fh_express_pop
-    fillNoFh(info){
-      let that = this
-      this.fhLabelShow = true
-      this.fhWlInfo = info
-			setTimeout(x => {
-				this.$nextTick(() => {
-          that.fhWlFocus = true
-        })
-			}, 200)
+    fillNoFh(info) {
+      let that = this;
+      this.fhLabelShow = true;
+      this.fhWlInfo = info;
+      setTimeout((x) => {
+        this.$nextTick(() => {
+          that.fhWlFocus = true;
+        });
+      }, 200);
     },
-    fhConfirm(val){
-      let that = this
-			if (val.index == 0) {
-				that.fhLabelShow = false
-				that.fhWlFocus = false
-        that.fhWlNo = ''
-				return
-			}
-      if (this.$util.isEmpty(this.fhWl)){
-        that.$msg('请填写物流名称')
-        return false
+    fhConfirm(val) {
+      let that = this;
+      if (val.index == 0) {
+        that.fhLabelShow = false;
+        that.fhWlFocus = false;
+        that.fhWlNo = '';
+        return;
       }
-      if (this.$util.isEmpty(this.fhWlNo)){
-        that.$msg('请填写物流单号')
-        return false
+      if (this.$util.isEmpty(this.fhWl)) {
+        that.$msg('请填写物流名称');
+        return false;
+      }
+      if (this.$util.isEmpty(this.fhWlNo)) {
+        that.$msg('请填写物流单号');
+        return false;
       }
-      let id = that.fhWlInfo.id ? that.fhWlInfo.id : 0
-      that.$util.confirmModal({content:'确认发货?'},() => {
-          orderFh({id:id,fhType:1,fhWl:that.fhWl,fhWlNo:that.fhWlNo}).then(res=>{
-            if(res.code == 1){
-              that.$refs[`orderRef${id}`][0].currentStatus = 3
-              that.fhLabelShow = false
-              that.fhWlFocus = false
-              that.fhWlNo = ''
-              that.$msg('发货成功')
-            }
-          })
-      })
+      let id = that.fhWlInfo.id ? that.fhWlInfo.id : 0;
+      that.$util.confirmModal({ content: '确认发货?' }, () => {
+        orderFh({ id: id, fhType: 1, fhWl: that.fhWl, fhWlNo: that.fhWlNo }).then((res) => {
+          if (res.code == 1) {
+            that.$refs[`orderRef${id}`][0].currentStatus = 3;
+            that.fhLabelShow = false;
+            that.fhWlFocus = false;
+            that.fhWlNo = '';
+            that.$msg('发货成功');
+          }
+        });
+      });
     },
-    init(){
-      this.getOrderList()
+    init() {
+      this.getOrderList();
     },
-    printOrder(item){
-      let that = this
-      uni.showLoading({title: '打印中...'});
-      cloudPrintOrder({id:item.id}).then((res) => {
-        uni.hideLoading()
-        if(res.code == 1){
-          if(res.data.hasNoPrint == 1){
-            that.$util.confirmModal({content:'请先设置打印机'},() => {
-              that.$util.pageTo({url: "/admin/shop/print"})
-            })
-          }else{
-            item.printNum++
+    printOrder(item) {
+      let that = this;
+      uni.showLoading({ title: '打印中...' });
+      cloudPrintOrder({ id: item.id }).then((res) => {
+        uni.hideLoading();
+        if (res.code == 1) {
+          if (res.data.hasNoPrint == 1) {
+            that.$util.confirmModal({ content: '请先设置打印机' }, () => {
+              that.$util.pageTo({ url: '/admin/shop/print' });
+            });
+          } else {
+            item.printNum++;
           }
         }
-      })
+      });
     },
     selectDateFn(val) {
-      this.searchTime = val.searchTime
-      this.startTime = val.startTime
-      this.endTime = val.endTime
+      this.searchTime = val.searchTime;
+      this.startTime = val.startTime;
+      this.endTime = val.endTime;
       this.resetList();
       this.getOrderList();
     },
     searchFn(e) {
-      let that = this
-      if(that.$util.isEmpty(e)){
-        that.showSearch = false
-        that.searchList = []     
-      }else{
-        getList({ page:1,name:e}).then((res) => {
-            if (!that.$util.isEmpty(res.data) && !that.$util.isEmpty(res.data.list)){
-              that.showSearch = true
-              that.searchList = res.data.list
-            }else{
-              that.showSearch = false
-              that.searchList = []
-            }
-        })
+      let that = this;
+      if (that.$util.isEmpty(e)) {
+        that.showSearch = false;
+        that.searchList = [];
+      } else {
+        getList({ page: 1, name: e }).then((res) => {
+          if (!that.$util.isEmpty(res.data) && !that.$util.isEmpty(res.data.list)) {
+            that.showSearch = true;
+            that.searchList = res.data.list;
+          } else {
+            that.showSearch = false;
+            that.searchList = [];
+          }
+        });
       }
     },
-    clearSearch(){
-      this.closeMore()
-      this.customId = 0
-      this.searchTime = ''
-      this.startTime = ''
-      this.endTime = ''
-      this.resetList()
-      this.getOrderList()
+    clearSearch() {
+      this.closeMore();
+      this.customId = 0;
+      this.searchTime = '';
+      this.startTime = '';
+      this.endTime = '';
+      this.resetList();
+      this.getOrderList();
     },
-    getMore(){
-			this.$refs.rightShowMore.open('top')
+    getMore() {
+      this.$refs.rightShowMore.open('top');
     },
-    closeMore(){
-      this.$refs.rightShowMore.close()
+    closeMore() {
+      this.$refs.rightShowMore.close();
     },
-    printWlList(){
-      this.closeMore()
-      this.$util.pageTo({url: "/pagesOrder/printWlList"})
+    printWlList() {
+      this.closeMore();
+      this.$util.pageTo({ url: '/pagesOrder/printWlList' });
     },
-    getCustom(item){
-      this.showSearch = false
-      this.customId = item.id
-      this.resetList()
-      this.getOrderList()
+    getCustom(item) {
+      this.showSearch = false;
+      this.customId = item.id;
+      this.resetList();
+      this.getOrderList();
     },
     getOrderList() {
       return getListB({
@@ -386,12 +403,12 @@ export default {
         endTime: this.endTime,
         status: this.tabs[this.tabIndex].id,
         page: this.list.page,
-        searchType:this.searchType,
-        customId:this.customId
+        searchType: this.searchType,
+        customId: this.customId
       }).then((res) => {
         this.completes(res);
-        if (this.$util.isEmpty(res.data)){
-          return false
+        if (this.$util.isEmpty(res.data)) {
+          return false;
         }
         this.tabs[this.tabIndex].value = res.data.totalNum;
       });
@@ -412,7 +429,16 @@ export default {
     classifyOrder(id) {
       this.currentOrderId = id;
     },
-  },
+    onUpdateItemField({ id, key, value }) {
+      const index = this.list.data.findIndex(it => it.id === id);
+      if (index !== -1) {
+        // 确保响应式(数组/对象的嵌套字段)
+        this.$set(this.list.data[index], key, value);
+        // 若需要强制替换对象触发更深层渲染,可用:
+        // this.$set(this.list.data, index, { ...this.list.data[index], [key]: value });
+      }
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>
@@ -427,17 +453,17 @@ export default {
     border: 1upx solid #ccc;
   }
 }
-page{
-	width: 750upx;
-	overflow: hidden;
+page {
+  width: 750upx;
+  overflow: hidden;
 }
 .app-content {
   padding-top: 100upx;
   padding-bottom: 1upx;
-	overflow: hidden;
+  overflow: hidden;
   .select-dn_bx {
     padding-left: 14upx;
-    padding-right:10upx;
+    padding-right: 10upx;
   }
   .app-tabs {
     position: fixed;
@@ -446,9 +472,9 @@ page{
       width: 100%;
     }
     /* 收银台cashier屏幕大于1000px */
-    @media screen and (min-width:1100px) {
+    @media screen and (min-width: 1100px) {
       width: 40%;
-    }    
+    }
     z-index: 9;
   }
   .input-wrap_box {
@@ -461,9 +487,9 @@ page{
       width: 100%;
     }
     /* 收银台cashier屏幕大于1000px */
-    @media screen and (min-width:1100px) {
+    @media screen and (min-width: 1100px) {
       width: 40%;
-    }    
+    }
     height: 100upx;
     display: flex;
     align-items: center;
@@ -514,4 +540,4 @@ page{
     }
   }
 }
-</style>
+</style>

+ 4 - 4
ghsApp/src/api/shop/shop-express.js

@@ -33,21 +33,21 @@ export const getStoreFee = data => {
 }
 
 /**
- * 创建快递订单
+ * 创建跑腿订单
  */
-export const createExpressOrder = data => {
+export const createCallExpressOrder = data => {
 	return https.post('/intra-city/create-order', data)
 }
 
 /**
- * 取消快递订单
+ * 取消跑腿订单
  */
 export const cancelExpressOrder = data => {
 	return https.post('/intra-city/cancel-order', data)
 }
 
 /**
- * 查询快递订单
+ * 查询跑腿订单
  */
 export const getExpressOrder = data => {
 	return https.post('/intra-city/get-order', data)