shish 1 day ago
parent
commit
dc41de67b8

+ 1648 - 0
ghsApp/src/admin/billing/affirmForward.vue

@@ -0,0 +1,1648 @@
+<template>
+  <view class="app-content">
+    <view class="affirm-page">
+      <view class="affirm-view overscroll">
+        <form>
+          <view class="module-com">
+            <view class="commodity-view">
+              <view class="commodity-list">
+                <template v-if="!$util.isEmpty(selectList)">
+                  <view class="commodity-item" v-for="(item, index) in selectList" :key="index">
+                    <!-- #ifdef APP-PLUS -->
+                    <image class="item-icon" :src="item.cover" />
+                    <!-- #endif -->
+                    <!-- #ifdef MP-WEIXIN -->
+                    <image class="item-icon" :src="item.cover" />
+                    <!-- #endif -->
+                    <view class="item-info">
+                      <view class="info-line">
+                        <text class="item-name" @click.stop="goItemDetail(item)">
+                          <text class="limit-buy-tag" v-if="Number(item.limitBuy) > 0">限购{{ item.limitBuy }}份</text>
+                          {{ item.name || '' }}
+                          <text v-if="item.variety && item.variety == 1" class="show-color"></text>
+                        </text>
+                        <text class="item-price">
+                          <text class="unit">¥</text>
+                          
+                          <text class="price" v-if="item.bigCount > 0">{{ parseFloat((Number(item.bigCount) * Number(item.userPrice)).toFixed(2)) }}</text>
+                          <text class="price" v-else>{{ parseFloat((Number(item.smallCount) * Number(item.userPrice)).toFixed(2)) }}</text>
+
+                        </text>
+                      </view>
+
+                      <view style="text-align: right; position: relative">
+                        <text style="position: absolute; right: 300upx; top: 2upx; font-size: 28upx; color: #3385ff; font-weight: bold">¥{{ parseFloat(item.userPrice) || 0 }}</text>
+                        <view class="open-bx">
+                          <i class="iconfont iconjian" @click="reduceItemFn(item)" v-if="item.bigCount > 0 || item.smallCount > 0"></i>
+                          <text class="num" @click="showAddModelFn(item)">
+                            <text v-if="item.bigCount > 0" style="font-size: 26upx; font-weight: bold; color: #3385ff">{{ item.bigCount }}</text>
+                            <text v-if="item.smallCount > 0" style="font-size: 26upx">{{ item.smallCount }}</text>
+                          </text>
+                          <i class="iconfont iconzeng" @click="addItemFn(item)"></i>
+                        </view>
+                      </view>
+                    </view>
+                  </view>
+                </template>
+              </view>
+              <view class="summary-bar">
+                <view class="operate-view" v-if="isScanEnv" @click="removeFromSave(option.customId)">
+                  <text class="iconfont iconshanchu1"></text>清除花材
+                </view>
+                <view class="operate-view" v-else @click="gobackEvent" style="font-size: 32upx; font-weight: bold"
+                  ><text class="iconfont icongouwuche" style="margin-right: 5upx"></text>返回修改</view
+                >
+                <view class="describe-view">
+                  <text>合计 ¥{{ allPrice }}</text>
+                  <text>,{{ selectList.length }}种</text>
+                  <text v-if="Number(totalItemNum.big) > 0">,{{ totalItemNum.big ? parseFloat(totalItemNum.big) : 0 }}扎</text>
+                  <text v-if="Number(totalItemNum.small) > 0">,{{ totalItemNum.small ? parseFloat(totalItemNum.small) : 0 }}支</text>
+                  <text>,{{ allCount.weight }}公斤</text>
+                </view>
+              </view>
+            </view>
+          </view>
+
+          <modal-module
+            :show="isAddModel"
+            @cancel="addItemModelHidden"
+            @click="confirmAddItemModel"
+            :title="customData.name"
+            color="#333"
+            :size="32"
+            padding="30rpx 30rpx"
+          >
+            <template slot="customContent">
+              <view class="select-cmd_bx" v-if="customData">
+                <view class="kc">
+                  <text class="unit_price">库存 {{ parseFloat(customData.stock) }}</text>
+                  <text class="unit_price"> ¥{{ parseFloat(customData.price) }}</text>
+                </view>
+
+                <view class="num_bx">
+                  <input
+                    style="width: 430upx"
+                    v-model="customData.userPrice"
+                    @focus="customData.userPrice = null"
+                    type="digit"
+                    placeholder="单价"
+                    :disabled="false"
+                  />
+                  <text style="font-size: 35upx; font-weight: bold; color: #666666">元</text>
+                </view>
+
+                <view class="num_bx">
+                  <!-- #ifdef APP-PLUS -->
+                  <input style="width: 430upx" v-model="customData.bigCount" v-if="globalUnitType == 0" type="digit" />
+                  <text style="font-size: 35upx; font-weight: bold; color: #666666" v-if="globalUnitType == 0">扎</text>
+                  <input style="width: 430upx" v-model="customData.smallCount" v-if="globalUnitType == 1" type="digit" />
+                  <text style="font-size: 35upx; font-weight: bold; color: #666666" v-if="globalUnitType == 1">支</text>
+                  <!-- #endif -->
+
+                  <!-- #ifdef MP-WEIXIN -->
+                  <input style="width: 430upx" v-model="customData.bigCount" v-if="globalUnitType == 0" :focus="isAddInputFocus" type="digit" />
+                  <text style="font-size: 35upx; font-weight: bold; color: #666666" v-if="globalUnitType == 0">扎</text>
+                  <input style="width: 430upx" v-model="customData.smallCount" v-if="globalUnitType == 1" :focus="isAddInputFocus" type="digit" />
+                  <text style="font-size: 35upx; font-weight: bold; color: #666666" v-if="globalUnitType == 1">支</text>
+                  <!-- #endif -->
+
+                  <image
+                    @click="switchGlobalUnitType"
+                    :src="`${constant.imgUrl}/icon/switch/switch128.png`"
+                    style="width: 86upx; height: 86upx; position: relative; top: -60upx; right: 0upx"
+                    mode="widthFix"
+                  ></image>
+                </view>
+              </view>
+            </template>
+          </modal-module>
+
+          <view class="module-com input-line-wrap">
+            <view class="">
+              <tui-list-cell class="line-cell" :hover="false" :arrow="false">
+                <view class="tui-title">客户</view>
+                <view class="tui-input">{{ form.customName }}</view>
+              </tui-list-cell>
+
+              <!-- 退款方式:按钮选择,默认全部未选中 -->
+              <tui-list-cell class="line-cell" :hover="false" :arrow="false">
+                <view class="tui-title">退款方式</view>
+                <button
+                  v-for="(item, index) in payWayList"
+                  :key="index"
+                  class="admin-button-com big pay-way-btn"
+                  :class="form.payWay === item.id ? 'blue' : 'default'"
+                  @click="selectPayWay(item.id)"
+                >{{ item.name }}</button>
+              </tui-list-cell>
+
+
+              <tui-list-cell class="line-cell" :hover="false" :arrow="false">
+                <view class="tui-title">打印小票</view>
+                <button @click="form.needPrint = 1" class="admin-button-com big" :class="form.needPrint == 1 ? 'blue' : 'default'" style="width:140upx;">打印</button>
+                <button @tap="form.needPrint = 2" class="admin-button-com big" :class="form.needPrint == 2 ? 'blue' : 'default'" style="width:140upx;">不打印</button>
+              </tui-list-cell>
+
+              <tui-list-cell class="line-cell" :hover="false" :arrow="false">
+                <view class="tui-title">
+                  <text>合计金额</text>
+                </view>
+                <text style="color: #3385ff; width: 170upx">¥{{ parseFloat(finalPrice) }}</text>
+              </tui-list-cell>
+
+              <tui-list-cell class="line-cell" :hover="false" :arrow="false">
+                <view v-if="form.hasPay == 2" class="tui-title">应收金额</view>
+                <view v-else class="tui-title">实收金额</view>
+                <input style="border: 1upx solid #eee; color: #3385ff; width: 170upx; height: 70upx;text-align: left;" type="digit" @focus="modifyPrice = ''" v-model="modifyPrice" placeholder-class="tui-placeholder" />
+                <text v-if="modifyPrice > 0 && modifyPrice > finalPrice" style="font-size: 28upx; margin-left: 20upx; color: red" >人工资材费 ¥{{ parseFloat((modifyPrice - finalPrice).toFixed(2)) }}</text>
+                <text v-if="modifyPrice > 0 && modifyPrice < finalPrice" style="font-size: 28upx; margin-left: 20upx; color: green">优惠 ¥{{ parseFloat((finalPrice - modifyPrice).toFixed(2)) }}</text>
+              </tui-list-cell>
+
+              <tui-list-cell class="line-cell" :hover="false" :arrow="false">
+                <view class="tui-title">备注</view>
+                <textarea style="height:80upx; z-index:-1" v-model="form.remark" placeholder-class="remark-class" placeholder="..." />
+              </tui-list-cell>
+            </view>
+          </view>
+        </form>
+      </view>
+
+      <view class="under-bar">
+        <view class="price-view">
+          <text class="price-title">
+            <text></text>
+          </text>
+          <text class="price-number"><text class="large">¥{{ modifyPrice }}</text></text>
+        </view>
+        <text style="font-size: 30upx; right: 100upx">
+          当前在
+          <text style="font-weight: bold; color: red; margin-left: 5upx; font-size: 32upx">{{ currentShop.shopName }}</text></text>
+        <button class="admin-button-com blue big" :disabled="formSubmitting" @click="confirmSubmit">
+          {{ formSubmitting ? '提交中…' : '提交' }}
+        </button>
+      </view>
+
+      <view
+        v-if="isScanEnv"
+        @click="changeGet"
+        style="
+          width: 125upx;
+          height: 125upx;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          font-size: 60upx;
+          background: #3385ff;
+          color: white;
+          z-index: 9999;
+          position: fixed;
+          bottom: 230upx;
+          right: 40upx;
+          border-radius: 60upx;
+        "
+        >{{ calc == 'add' ? '+' : '-' }}</view
+      >
+
+      <uni-popup ref="diffPriceRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
+        <view
+          style="
+            display: flex;
+            padding: 40upx 20upx 20upx 20upx;
+            height: auto;
+            justify-content: space-between;
+            align-items: center;
+            flex-wrap: wrap;
+            max-height: 100vh;
+            overflow: auto;
+          "
+        >
+          <block v-if="!$util.isEmpty(diffPriceList)">
+            <view v-for="(item, index) in diffPriceList" :key="index" style="font-size: 32upx; color: red; font-weight: bold; margin-top: 10upx">
+              <text>{{ item.name }}</text>
+              <text style="margin-left: 25upx">系统售价 ¥{{ item.price ? parseFloat(item.price) : 0 }}</text>
+              <text style="margin-left: 25upx">您开价 ¥{{ item.kdPrice ? parseFloat(item.kdPrice) : 0 }}</text>
+            </view>
+          </block>
+          <view style="margin-top: 20upx; font-size: 28upx; font-weight: bold">
+            <view>以上花材,开单价和系统售价不一样,确认提交吗?</view>
+          </view>
+          <view style="text-align: center; margin-top: 30upx; width: 100%">
+            <button class="admin-button-com big default" @click="returnCheck()">返回修改</button>
+            <button style="margin-left: 20upx" :disabled="formSubmitting" @click="diffPriceConfirm()" class="admin-button-com big blue">
+              {{ formSubmitting ? '提交中…' : '确认提交' }}
+            </button>
+          </view>
+        </view>
+      </uni-popup>
+
+      <uni-popup ref="staffRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
+        <view style="max-height: 80vh; overflow: scroll">
+          <view style="margin-left: 30upx; margin-top: 19upx; font-size: 27upx; font-weight: bold">请选择:</view>
+          <view style=" display: flex; padding: 20upx; height: auto; justify-content: flex-start; align-items: center; flex-wrap: wrap; max-height: 100vh; overflow: auto; " >
+            <view v-for="(item, index) in staffList" :key="index" style="margin-bottom: 20upx; margin-left: 3upx">
+              <button class="admin-button-com staff-btn" @click.stop="getCurrentStaff(item)" :class="{ selected: form.getStaffId === item.id }" >
+                {{ item.name }}
+              </button>
+            </view>
+          </view>
+          <view style="text-align: center; padding: 10upx 0 10upx 0">
+            <button class="admin-button-com big blue" style="width:180upx;" @click="cancelCurrentStaff()">取消</button>
+          </view>
+        </view>
+      </uni-popup>
+
+      <uni-popup ref="wlRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
+        <view style="max-height: 80vh; overflow: scroll">
+          <view style="margin-left: 30upx; margin-top: 19upx; font-size: 27upx; font-weight: bold">请选择物流:</view>
+          <view style=" display: flex; padding: 20upx; height: auto; justify-content: flex-start; align-items: center; flex-wrap: wrap; max-height: 100vh; overflow: auto; " >
+            <view v-for="(item, index) in wlList" :key="index" style="margin-bottom: 20upx; margin-left: 3upx">
+              <button class="admin-button-com staff-btn" @click.stop="selectWl(item)" :class="{ selected: form.wlName === item.name }" >
+                {{ item.name }}
+              </button>
+            </view>
+          </view>
+          <view style="text-align: center; padding: 10upx 0 10upx 0">
+            <button class="admin-button-com big blue" style="width:180upx;" @click="addWlItem()">新增</button>
+            <button class="admin-button-com big blue" style="width:180upx;" @click="cancelWlSelect()">取消</button>
+          </view>
+        </view>
+      </uni-popup>
+
+      <!-- 蒙板 -->
+      <view v-if="showPicker" class="date-picker-mask" @click="showPicker = false"></view>
+
+      <mx-date-picker :show="showPicker" format="yyyy-mm-dd" type="date" :value="defaultPickerDate" :show-tips="true" @confirm="confirmPicker" @cancel="showPicker = false" />
+
+      <!-- 取件时间选择器 -->
+      <TimePicker ref="timePicker" :bottomOffset="80" @confirm="handleTimeConfirm" />
+
+    </view>
+  </view>
+</template>
+
+<script>
+import TuiListCell from '@/components/plugin/list-cell';
+import productMins from '@/mixins/product';
+const formUtil = require('@/utils/formValidation.js');
+import MxDatePicker from '@/components/mx-datepicker/mx-datepicker.vue';
+import ModalModule from '@/components/plugin/modal';
+import TimePicker from '@/components/plugin/TimePicker';
+import WeightInput from '@/components/delivery-input/weight-input.vue';
+import RemarkInput from '@/components/delivery-input/remark-input.vue';
+import { createOrder, updateOrder } from '@/api/order/index';
+import { getAllStaff } from '@/api/shop-admin';
+import { getAllWl } from '@/api/shop'
+import { mapActions, mapGetters } from 'vuex';
+import { getUserDet } from '@/api/member';
+import { getStaffInfo } from '@/api/staff';
+import { quickOrderAllDeliveryQuotes } from '@/api/express/delivery';
+import dayjs from 'dayjs';
+
+export default {
+  name: 'affirm',
+  components: {
+    TuiListCell,
+    ModalModule,
+    MxDatePicker,
+    TimePicker,
+    WeightInput,
+    RemarkInput
+  },
+  mixins: [productMins],
+  data() {
+    return {
+      deliveryQuotes: [], // 跑腿平台报价列表
+      selectedDeliveryIndex: -1,
+      selectedDeliveryData: null,
+      showDistance: 0,
+      pickupTime: {
+        label: '立即取件',
+        value: dayjs().format('YYYY-MM-DD HH:mm')
+      },
+      defaultPickerDate: '',
+      showPicker: false,
+      pickerType: '', // 'history' 或 'sendDate'
+      discountValue: 0,
+      customDiscount: '',
+      staffList: [],
+      wlList: [],
+      payWayList: [
+        { name: '微信', id: 0 },
+        { name: '支付宝', id: 1 },
+        { name: '现金', id: 4 },
+        { name: '银行卡', id: 5 }
+      ],
+      form: {
+        shopId: '',
+        shopName: '',
+        sendType: 0,
+        transType: 0,
+        sendDate: '', // 保留以防 API 需要
+        sendTimeWant: '',
+        historyDate: '',
+        sendCost: '', //系统默认运费
+        customSendCost: 0, //自设置的运费
+        customId: '',
+        packCost: '',
+        product: '',
+        remark: '',
+        payWay: -1, // 退款方式默认未选
+        needPrint: 1, //订单生成时打印订单1需要2不需要
+        hasPay: 0,
+        getStaffId: 0,
+        getStaffName: '',
+        dealPrice: 0,
+        wlName: '',
+        reductionRule: 0,
+        callErrand: 0, //现在呼叫 0 晚点呼叫 1
+        weight: 1,
+        deliveryRemark: '',
+      },
+      showCustomer: false,
+      customInfo: { discount: 1 },
+      isUpdateAddress: false,
+      customData: { bigCount: 0, smallCount: 0, userPrice: 0 },
+      isAddModel: false,
+      modifyPrice: '',
+      isScanEnv: false,
+      calc: 'add',
+      diffPriceList: [],
+      currentShop: { default: 0 },
+      openIntraCity: 0,
+      hcFreeKm: 0,  //跑腿免费公里数
+      hcMap: [],    //花材满减规则
+      book: 0,
+      selectStaff: { id: '', name: '' },
+      hasFinance: 0,    
+      // 重量输入防抖定时器
+      weightDebounceTimer: null,
+      /** 开单提交中,防止连点/重复请求 */
+      formSubmitting: false,
+    };
+  },
+  onLoad(option) {
+    this.option = option;
+    this.book = option.book ? option.book : 0;
+    this.kdType = option.kdType;
+    let that = this;
+    this.initMerchantInfo().then((data) => {
+      uni.setNavigationBarTitle({ title: data.name });
+      that.currentShop = data.shopInfo;
+      that.openIntraCity = data.openIntraCity;
+      that.hcFreeKm = data.hcFreeKm;
+      try {
+        that.hcMap = typeof data.hcMap === 'string' ? JSON.parse(data.hcMap) : data.hcMap;
+      } catch (e) {
+        that.hcMap = [];
+      }
+    });
+
+    //默认送货
+    this.setSendType(0);
+    this.setTransType(4);
+
+    if (Number(option.customId) > 0) {
+      this.form.customId = option.customId;
+      // let that = this;
+      // getUserDet({ id: option.customId }).then((res) => {
+      //   that.form.customName = res.data.name;
+      //   that.customInfo = res.data;
+      //   that.form.wlName = res.data.wlName ? res.data.wlName : '';
+      //   that.$forceUpdate();
+      // });
+      this.getCustomDetail();
+
+      //用于混入product的已选中花材!!!!!
+      this.selectJobId = option.customId;
+      this.selectJobType = 'bill';
+    }
+
+    //默认欠款是首选项
+    this.form.hasPay = 2;
+
+    //我要花义乌店,快捷开单,收款方式,默认扫码
+    if(Number(option.customId) == 151776) {
+      this.form.hasPay = 0
+    }
+
+    // #ifdef APP-PLUS
+    if (this.$util.isScanEnv()) {
+      this.isScanEnv = true;
+    }
+    //#endif
+
+    // 不主动加载花材,避免影响性能。有执行 takeItem 时会自动加载花材。
+    this.listenScanItem();
+
+    getStaffInfo().then((res) => {
+      if (res.code == 1) {
+        let staffInfo = res.data.staff ? res.data.staff : [];
+        this.hasFinance = staffInfo.finance ? staffInfo.finance : 0;
+      }
+    });
+  },
+  onShow() {
+    if (!this.$util.isEmpty(uni.getStorageSync('newClient'))) {
+      this.showCustomer = true;
+    }
+
+    //获取所有在职员工
+    getAllStaff().then((res) => {
+      if (res.code == 1) {
+        this.staffList = res.data.list;
+      }
+    });
+
+    //源花汇开单默认不要打印小票
+    if (this.getLoginInfo.shopId == 10649) {
+      this.form.needPrint = 2;
+    }
+
+    // 同步selectStaff和form
+    if (this.form.getStaffId && this.form.getStaffName) {
+      this.selectStaff.id = this.form.getStaffId;
+      this.selectStaff.name = this.form.getStaffName;
+    }
+
+    //获取跑腿平台报价
+    if (this.openIntraCity == 1 && this.form.sendType == 2) {
+      if(this.isUpdateAddress){
+        this.getCustomDetail().then(() => {
+          this.getDeliveryQuotes()
+        });
+      }else{
+        this.getDeliveryQuotes();
+      }
+    }
+  },
+  onUnload() {
+    uni.removeStorageSync('newClient');
+    uni.$off('listenGetScanCode');
+
+    // 页面卸载时清除定时器
+    if (this.weightDebounceTimer) {
+      clearTimeout(this.weightDebounceTimer);
+      this.weightDebounceTimer = null;
+    }
+  },
+  computed: {
+    ...mapGetters(['getMerchantInfo', 'getMyShopInfo', 'getLoginInfo']),
+    displayPackCost() {
+      if (this.currentShop.pfLevel && this.currentShop.pfLevel == 1) {
+        return true;
+      }
+      return false;
+    },
+    displaySendCost() {
+      if (this.form.sendType == 2) {
+        return true;
+      }
+      if (this.currentShop.pfLevel && this.currentShop.pfLevel == 1) {
+        return true;
+      }
+      return false;
+    },
+    totalItemNum() {
+      let big = 0;
+      let small = 0;
+      if (!this.$util.isEmpty(this.selectList)) {
+        for (const ele of this.selectList) {
+          if (Number(ele.bigCount) > 0) {
+            big = Number(big) + Number(ele.bigCount);
+            big = big.toFixed(0);
+          }
+          if (Number(ele.smallCount)) {
+            small = Number(small) + Number(ele.smallCount);
+            small = small.toFixed(0);
+          }
+        }
+      }
+      return { big: big, small: small };
+    },
+    finalPrice() {
+      let totalPrice = this.allPrice.toFixed(2);
+      let finalPrice = Number(totalPrice);
+      
+      // 跑腿费逻辑
+      if (this.form.sendType == 2) {
+        const sendCost = Number(this.form.sendCost);
+        if (this.form.reductionRule == 0) {
+          finalPrice = Number(finalPrice) + sendCost;
+        } else if (this.form.reductionRule == 1) {
+          // 花材满减
+          if (this.isHcMapRule()) {
+             // 满足条件免运费,不加 sendCost
+             finalPrice = Number(finalPrice) + Number(this.form.customSendCost);
+          } else {
+             finalPrice = Number(finalPrice) + sendCost;
+          }
+        }
+      } else if (this.displaySendCost == true) {
+        // 其他配送方式
+        finalPrice = Number(finalPrice) + Number(this.form.sendCost);
+      }
+
+      if (this.displayPackCost == true) {
+        finalPrice = Number(finalPrice) + Number(this.form.packCost);
+      }
+      finalPrice = Number(finalPrice).toFixed(2);
+      let currentPrice = parseFloat(finalPrice);
+      this.modifyPrice = currentPrice;
+      return currentPrice;
+    },
+    customNetBalance() {
+      const balance = Number(this.customInfo && this.customInfo.balance != null ? this.customInfo.balance : 0);
+      return isNaN(balance) ? 0 : balance;
+    }
+  },
+  watch: {
+    // 监听重量变化
+    'form.weight'(newVal, oldVal) {
+      // 清除之前的定时器
+      if (this.weightDebounceTimer) {
+        clearTimeout(this.weightDebounceTimer);
+        this.weightDebounceTimer = null;
+      }
+      
+      // 如果有运力列表且值变化了,清空运力列表
+      if (this.deliveryQuotes.length > 0) {
+        this.clearDeliveryList();
+      }
+      
+      // 设置新的定时器,1秒后自动加载运力
+      this.weightDebounceTimer = setTimeout(() => {
+        // 只有当重量值有效时才自动加载
+        if (newVal && Number(newVal) > 0 && this.form.sendType == 2) {
+          this.handleLoadDelivery();
+        }
+      }, 1000);
+    },
+    // 监听取件时间变化
+    pickupTime: {
+      handler(newVal, oldVal) {
+        if (this.deliveryQuotes.length > 0) {
+          this.clearDeliveryList();
+        }
+        if (this.form.sendType == 2) {
+          this.getDeliveryQuotes();
+        }
+      },
+      deep: true
+    },
+    // 监听备注变化
+    'form.deliveryRemark'(newVal, oldVal) {
+      if (this.deliveryQuotes.length > 0) {
+        this.clearDeliveryList();
+      }
+      if (this.form.sendType == 2) {
+        this.getDeliveryQuotes();
+      }
+    },
+    modifyPrice() {
+      this.syncPayWayByBalance();
+    },
+    customNetBalance() {
+      this.syncPayWayByBalance();
+    }
+  },
+  methods: {
+    init() {},
+    ...mapActions(['initMerchantInfo']),
+    bindHistoryDateChange() {
+      this.pickerType = 'history';
+      this.showPicker = true;
+    },
+    bindDateChange() {
+      this.pickerType = 'sendDate';
+      this.showPicker = true;
+    },
+    confirmPicker(e) {
+      if (this.pickerType === 'history') {
+        this.form.historyDate = e.value;
+      } else if (this.pickerType === 'sendDate') {
+        this.form.sendTimeWant = e.value;
+      }
+      this.showPicker = false;
+    },
+    showDiscount() {
+      this.$refs.discountRef.open('center');
+    },
+    setDiscount(num) {
+      this.discountValue = Number(num);
+      let price = Number(this.finalPrice) * Number(num);
+      price = parseFloat(price.toFixed(2));
+      this.modifyPrice = price;
+      this.customDiscount = '';
+      this.$refs.discountRef.close();
+    },
+    setCustomDiscount() {
+      const value = parseFloat(this.customDiscount);
+      if (isNaN(value) || value < 0 || value > 1) {
+        this.$msg('请输入0到1之间的有效折扣值');
+        return;
+      }
+      this.setDiscount(value);
+    },
+    cancelDiscount() {
+      this.customDiscount = '';
+      this.$refs.discountRef.close();
+    },
+    beginScan() {
+      uni.scanCode({
+        scanType: ['barCode'],
+        success: (res) => {
+          this.takeItem(res.result);
+        }
+      });
+    },
+    changeGet() {
+      this.calc = this.calc == 'add' ? 'sub' : 'add';
+    },
+    reduceItemFn(item) {
+      if (item && item.variety == 1 && this.selectJobType == 'bill') {
+        this.$msg('多颜色花材,请返回修改');
+        return false;
+      }
+      this.kdType = 'HIT';
+      this.replaceItemFn(item, 0, 'sub');
+    },
+    addItemFn(item) {
+      if (item && item.variety == 1 && this.selectJobType == 'bill') {
+        this.$msg('多颜色花材,请返回修改');
+        return false;
+      }
+      this.kdType = 'HIT';
+      this.replaceItemFn(item, 0, 'add');
+    },
+    /** 选择退款方式(按钮形式) */
+    selectPayWay(id) {
+      this.form.payWay = id;
+    },
+    selectHasPay(type) {
+      if (type == 2 && Number(this.customNetBalance) >= Number(this.modifyPrice)) {
+        this.$msg('余额充足,请用余额支付');
+        this.form.hasPay = 4;
+        return;
+      }
+      if (type == 4 && Number(this.customNetBalance) < Number(this.modifyPrice)) {
+        this.$msg('余额不足,无法余额支付');
+        return;
+      }
+      this.form.hasPay = type;
+    },
+    syncPayWayByBalance() {
+      if (Number(this.modifyPrice) <= 0) {
+        return;
+      }
+      if (Number(this.customNetBalance) >= Number(this.modifyPrice) && this.form.hasPay == 2) {
+        this.form.hasPay = 4;
+      }
+    },
+    setTransType(type) {
+      this.form.transType = type;
+    },
+    setSendType(type) {
+      this.form.sendType = type;
+      if (type !== 2) {
+        this.form.sendCost = '';
+        this.deliveryQuotes = [];
+        this.selectedDeliveryIndex = -1;
+        this.selectedDeliveryData = null;
+      } else {
+        if (this.openIntraCity == 1 && this.deliveryQuotes.length == 0) {
+          this.getDeliveryQuotes();
+        }
+      }
+    },
+    diffPriceConfirm() {
+      this.form.dealPrice = 1;
+      this.formSubmit();
+    },
+    confirmSubmit() {
+      let self = this;
+      let rules = [
+        {
+          name: 'customId',
+          rule: ['required'],
+          msg: ['请选择客户']
+        }
+      ];
+      let hasError = formUtil.validation(this.form, rules);
+      if (hasError) {
+        this.$msg(hasError);
+        return false;
+      }
+      // 退款方式改为按钮后默认未选,提交前必须点选
+      if (this.form.payWay === -1 || this.form.payWay === '' || this.form.payWay === null || this.form.payWay === undefined) {
+        this.$msg('请选择退款方式');
+        return false;
+      }
+      let name = '确认提交';
+      if (this.form.hasPay == 0) {
+        name = '确认扫码?';
+      } else if (this.form.hasPay == 1) {
+        name = '确认线下已付?';
+      } else if (this.form.hasPay == 2) {
+        name = '确认挂账?';
+      } else if (this.form.hasPay == 4) {
+        name = '确认余额支付?';
+      } else {
+        name = '确认提交';
+      }
+
+      if (this.form.sendType == 3) {
+        if (this.$util.isEmpty(this.form.wlName)) {
+          this.$msg('请填写物流');
+          return false;
+        }
+      }
+
+      self.$util.confirmModal({ content: name }, () => {
+        self.formSubmit();
+      });
+    },
+    async formSubmit() {
+      if (this.formSubmitting) {
+        return false;
+      }
+      this.formSubmitting = true;
+      let that = this;
+      try {
+        let formData = this.form;
+        const product = this.selectList.map((ele) => {
+          return {
+            productId: ele.id,
+            bigNum: ele.bigCount,
+            smallNum: ele.smallCount,
+            classId: ele.classId,
+            itemId: ele.itemId,
+            price: ele.userPrice,
+            remark: ele.remark
+          };
+        });
+        formData.product = JSON.stringify(product);
+        if (!this.getMerchantInfo) {
+          await this.initMerchantInfo();
+        }
+        formData.shopId = this.getMerchantInfo.id;
+        if (Number(this.modifyPrice) <= 0) {
+          this.$msg('收款金额必须大于0');
+          return false;
+        }
+
+        let Fn = createOrder;
+        let book = this.book;
+        let params = { ...formData, modifyPrice: this.modifyPrice, newVersion: 1, book: book };
+
+        // 如果选择了跑腿配送并且有选中的平台数据,则添加配送平台信息
+        if (this.form.sendType == 2 && this.selectedDeliveryData) {
+          params.deliveryPlatform = this.selectedDeliveryData.en_name; // 平台名称
+          params.deliveryPrice = this.selectedDeliveryData.priceNumber; // 报价金额
+          params.deliveryDistance = this.showDistance; // 配送距离
+          params.deliveryBracketContent = this.selectedDeliveryData.bracketContent; // 配送平台括号里的内容
+          params.deliveryAllParams = this.selectedDeliveryData; // 配送平台所有参数
+          if (this.form.callErrand == 1) {
+            params.pickupTime = this.pickupTime.value;
+          }
+        }
+
+        if (this.form.callErrand == 1) {
+          if (this.$util.isEmpty(this.customInfo.long) || this.$util.isEmpty(this.customInfo.lat) || this.$util.isEmpty(this.customInfo.address)) {
+            this.$msg('客户地址不完整,不支持直接发跑腿');
+            return false;
+          }
+        }
+
+        if (this.option && this.option.orderId && this.option.orderId > 0) {
+          Fn = updateOrder;
+          params = { ...params, id: this.option.orderId };
+        }
+
+        if (book == 1) {
+          if (this.form.hasPay != 2) {
+            this.$msg('预订单只能选择挂账');
+            return false;
+          }
+          if (Number(this.form.sendCost) > 0) {
+            this.$msg('预订单不能填写运费');
+            return false;
+          }
+        }
+
+        if (this.form.hasPay == 4 && Number(this.customNetBalance) < Number(this.modifyPrice)) {
+          this.$msg('余额不足');
+          return false;
+        }
+        if (this.form.hasPay == 2 && Number(this.customNetBalance) >= Number(this.modifyPrice)) {
+          this.$msg('余额充足,请用余额支付');
+          return false;
+        }
+
+        //多颜色
+        let xj = null;
+        if (this.option && this.option.customId) {
+          xj = uni.getStorageSync('xj' + this.option.customId);
+        }
+        params = { ...params, xj: JSON.stringify(xj) };
+
+        //株数
+        let treeData = null;
+        if (this.option && this.option.customId) {
+          treeData = uni.getStorageSync('tree' + this.option.customId);
+          if (!this.$util.isEmpty(treeData)) {
+            treeData = treeData.map((treeItem) => {
+              let list = treeItem.list ? treeItem.list.filter((item) => {
+                return !this.$util.isEmpty(item.num) && Number(item.num) > 0;
+              }) : [];
+              return { ...treeItem, list: list };
+            }).filter((treeItem) => {
+              return !this.$util.isEmpty(treeItem.list);
+            });
+          }
+        }
+        params = { ...params, treeData: JSON.stringify(treeData) };
+
+        let pendingMsg = '';
+        uni.showLoading({ mask: true });
+        try {
+          // hideError:避免 luch-request 在 showLoading 期间 showToast 被挡住;错误在 finally hideLoading 后统一提示
+          const res = await Fn(params, { hideError: true });
+          if (!res || typeof res !== 'object') {
+            pendingMsg = '提交失败,请重试';
+          } else if (res.code == 1) {
+            if (res.data.respondType && res.data.respondType == 'priceError') {
+              that.diffPriceList = res.data.diff;
+              that.$refs.diffPriceRef.open('bottom');
+              return;
+            }
+
+            this.removeFromSaveDirect();
+
+            if (res.data && res.data.id) {
+              const {
+                data: { id, orderSn, actPrice }
+              } = res;
+              if (this.form.hasPay == 0) {
+                this.$util.pageTo({ url: '/admin/billing/toPay', type: 2, query: { orderId: id, orderSn: orderSn, actPrice: actPrice } });
+              } else {
+                this.$util.pageTo({ url: '/admin/billing/result', type: 2, query: { orderId: id, orderSn: orderSn, title: '开单成功' } });
+              }
+            } else {
+              pendingMsg = '提交失败';
+            }
+          } else if (res.msg) {
+            pendingMsg = res.msg;
+          } else {
+            pendingMsg = '提交失败';
+          }
+        } catch (err) {
+          pendingMsg = '提交失败,请重试';
+        } finally {
+          uni.hideLoading();
+          if (pendingMsg) {
+            this.$msg(pendingMsg);
+          }
+        }
+      } finally {
+        this.formSubmitting = false;
+      }
+    },
+    returnCheck() {
+      this.$refs.diffPriceRef.close();
+    },
+    goItemDetail(item) {
+      if (!item || !item.id) {
+        return;
+      }
+      this.$util.pageTo({ url: '/admin/item/detail?id=' + item.id });
+    },
+    gobackEvent() {
+      let customId = this.option && this.option.customId ? this.option.customId : 0;
+      let customName = this.option && this.option.customName ? this.option.customName : '';
+      this.$util.pageTo({ url: '/admin/billing/index2?customId=' + customId + '&customName=' + customName + '&forward=1', type: 2 });
+    },
+    changeStaff() {
+      this.$refs.staffRef.open('center');
+    },
+    getCurrentStaff(item) {
+      this.form.getStaffId = item.id;
+      this.form.getStaffName = item.name;
+      this.selectStaff.id = item.id;
+      this.selectStaff.name = item.name;
+      this.$refs.staffRef.close();
+    },
+    cancelCurrentStaff() {
+      this.form.getStaffId = 0;
+      this.form.getStaffName = '';
+      this.selectStaff.id = '';
+      this.selectStaff.name = '';
+      this.$refs.staffRef.close();
+    },
+    getMyWl() {
+      getAllWl().then((res) => {
+        if (res.code == 1) {
+          this.wlList = res.data && res.data.list ? res.data.list : [];
+          this.$refs.wlRef.open('center');
+        } else {
+          this.$msg('获取物流列表失败');
+        }
+      })
+    },
+    selectWl(item) {
+      this.form.wlName = item.name;
+      this.$refs.wlRef.close();
+    },
+	addWlItem(){
+		this.cancelWlSelect();
+		this.$util.pageTo({ url: '/admin/shop/wl',});
+	},
+    cancelWlSelect() {
+      this.$refs.wlRef.close();
+    },
+    checkMapRule(type) {
+      const distanceInMeters = Number(this.showDistance) || 0;
+      const freeKm = type === 'hc' ? this.hcFreeKm : 0; // 只处理花材
+      const freeKmInMeters = (Number(freeKm) || 0) * 1000;
+      if (distanceInMeters < freeKmInMeters) {
+        return true;
+      }
+      let map = type === 'hc' ? this.hcMap : [];
+      if (map && Array.isArray(map) && map.length > 0) {
+        const flowerCount = this.totalItemNum.big || 0; // 使用 big 扎数
+        const flowerPrice = this.allPrice || 0;
+        for (const rule of map) {
+          const ruleNum = Number(rule.num) || 0;
+          const rulePrice = Number(rule.price) || 0;
+          const ruleDistance = (Number(rule.distance) || 0) * 1000;
+          if (flowerCount >= ruleNum && flowerPrice >= rulePrice && distanceInMeters <= ruleDistance) {
+            return true;
+          }
+        }
+      }
+      return false;
+    },
+    isHcMapRule() {
+      return this.checkMapRule('hc');
+    },
+    getDeliveryQuotes() {
+      //如果客户地址缺少经度、纬度和address,任何一个,则不要请求后端询价接口
+      if (this.$util.isEmpty(this.customInfo.long) || this.$util.isEmpty(this.customInfo.lat) || this.$util.isEmpty(this.customInfo.address)) {
+        return;
+      }
+      
+      this.deliveryQuotes = [];
+      this.selectedDeliveryIndex = -1;
+      this.selectedDeliveryData = null;
+
+      quickOrderAllDeliveryQuotes({
+        totalPrice: this.allPrice,
+        weight: this.form.weight,
+        remark: this.form.deliveryRemark,
+        customId: this.option.customId,
+        pickupTime: this.pickupTime.value
+      })
+        .then((res) => {
+          if (res.code == 1 && res.data && res.data.deliveryList) {
+            // 处理报价数据
+            this.deliveryQuotes = res.data.deliveryList
+              .filter((item) => item.isAble !== false)
+              .map((item) => {
+                // 价格从分转换为元
+                const price = item.price ? (item.price / 100).toFixed(1) : '0.0';
+
+                // 提取平台名称(去掉括号内的内容)
+                let displayName = item.name || '';
+                let bracketContent = '';
+                if (displayName && displayName.indexOf('(') !== -1) {
+                  const parts = displayName.split('(');
+                  if (parts.length > 1) {
+                    displayName = parts[0].trim();
+                    bracketContent = parts[1].replace(')', '');
+                  }
+                }
+
+                //滴滴特殊处理,括号里的内容作为类型
+                if (item.en_name == 'didi' && bracketContent != '') {
+                  item.type = bracketContent;
+                }
+
+                return {
+                  ...item,
+                  displayName: displayName,
+                  priceText: price,
+                  priceNumber: parseFloat(price),
+                  bracketContent: bracketContent
+                };
+              });
+
+            // 自动选中第一个可用的报价
+            const firstAvailableIndex = this.deliveryQuotes.findIndex((item) => item.isAble);
+            if (firstAvailableIndex !== -1) {
+              this.selectDelivery(this.deliveryQuotes[firstAvailableIndex], firstAvailableIndex);
+            }
+          } else {
+            uni.showToast({ title: '暂无跑腿可用', icon: 'none' });
+          }
+        })
+        .catch((err) => {
+          this.$msg('获取跑腿平台报价失败');
+          console.log('获取跑腿平台报价失败:', err);
+          this.deliveryQuotes = [];
+        });
+    },
+    selectDelivery(item, index) {
+      this.selectedDeliveryIndex = index;
+      this.selectedDeliveryData = item;
+      this.form.sendCost = item.priceNumber;
+      this.showDistance = item.distance || 0;
+    },
+    openTimePicker() {
+      this.$refs.timePicker.open();
+    },
+    handleTimeConfirm(time) {
+      this.pickupTime = time;
+    },
+    getCustomDetail() {
+      let that = this;
+      return getUserDet({ id: that.option.customId }).then((res) => {
+        that.form.customName = res.data.name;
+        that.customInfo = res.data;
+        that.form.wlName = res.data.wlName ? res.data.wlName : '';
+        that.syncPayWayByBalance();
+        that.$forceUpdate();
+      });
+    },
+    updateCustomAddress(){
+      this.isUpdateAddress = true;
+      this.$util.pageTo({ url: '/pagesClient/member/modify?id='+this.customInfo.id+'&name='+this.customInfo.name })
+    },
+    handleLoadDelivery() {
+      // 校验重量是否填写
+      if (!this.form.weight || Number(this.form .weight) <= 0) {
+        this.$msg('请先填写货物重量');
+        return;
+      }
+      // 执行加载运力
+      this.getDeliveryQuotes();
+    },
+    // 清空运力列表
+    clearDeliveryList() {
+      this.deliveryQuotes = [];
+      this.selectedDeliveryIndex = -1;
+      this.selectedDeliveryData = null;
+    },
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.admin-button-com {
+  margin-right: 30upx;
+}
+.pay-way-btn {
+  margin-right: 12upx;
+  width: 128upx;
+  padding-left: 0;
+  padding-right: 0;
+  box-sizing: border-box;
+  &:last-child {
+    margin-right: 0;
+  }
+}
+.checkbox-row-call {
+  display: flex;
+  align-items: center;
+  padding: 20upx 0;
+  cursor: pointer;
+  .checkbox-input {
+    margin-right: 4upx;
+  }
+  .checkbox-label {
+    font-size: 38upx;
+    color: #333333;
+    line-height: 28upx;
+  }
+}
+.affirm-page {
+  position: relative;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+
+  .affirm-view {
+    flex: 1;
+    margin-bottom: 90upx;
+    padding: 20upx;
+    background-color: #f0f2f6;
+
+    .commodity-view {
+      display: flex;
+      flex-direction: column;
+      .commodity-list {
+        padding: 20upx;
+        .commodity-item {
+          display: flex;
+          margin-bottom: 20upx;
+          .item-icon {
+            flex-shrink: 0;
+            width: 140upx;
+            height: 140upx;
+          }
+          .item-info {
+            display: flex;
+            flex-direction: column;
+            justify-content: center;
+            flex: 1;
+            margin-left: 20upx;
+            .info-line {
+              margin-bottom: 20upx;
+              display: flex;
+              justify-content: space-between;
+              align-items: flex-end;
+              .item-name {
+                font-size: 28upx;
+                font-weight: bold;
+                .limit-buy-tag {
+                  font-size: 22upx;
+                  border: 1upx solid red;
+                  color: #ffffff;
+                  background-color: red;
+                  margin-right: 5upx;
+                  padding-left: 5upx;
+                  padding-right: 5upx;
+                }
+                .show-color {
+                  display: inline-block;
+                  width: 25upx;
+                  height: 25upx;
+                  background-color: rgb(9, 199, 9);
+                  border-radius: 15upx;
+                  border: none;
+                  margin-left: 16upx;
+                }
+              }
+              .item-price {
+                color: #333;
+                font-size: 22upx;
+                .price {
+                  font-size: 32upx;
+                  font-weight: bold;
+                }
+              }
+            }
+
+            & .open-bx {
+              align-items: center;
+              & .iconfont {
+                color: #3385ff;
+                font-size: 50upx;
+              }
+
+              & > .num {
+                display: inline-block;
+                width: 120upx;
+                height: 45upx;
+                text-align: center;
+                margin: 0 8upx;
+                color: #868686;
+                border-radius: 22upx;
+                background-color: #f5f5f5;
+                padding: 3upx 0;
+                font-size: 25upx;
+              }
+            }
+          }
+        }
+      }
+      .summary-bar {
+        padding: 0 20upx;
+        height: 90upx;
+        display: flex;
+
+        align-items: center;
+        justify-content: space-between;
+        border-top: 1upx solid #eeeeee;
+        .operate-view {
+          display: flex;
+          align-items: center;
+          color: #3385ff;
+          font-size: 26upx;
+          .iconfont {
+            margin-right: 20upx;
+            font-size: 40upx;
+          }
+        }
+        .describe-view {
+          display: flex;
+          align-items: center;
+          color: #333;
+          font-size: 26upx;
+          font-weight: bold;
+          .price {
+            margin-left: 8upx;
+            color: red;
+          }
+        }
+      }
+    }
+
+    .module-com {
+      background-color: #fff;
+      margin-bottom: 20upx;
+      border-radius: 10upx;
+      overflow: hidden;
+    }
+  }
+  .under-bar {
+    z-index: 99999;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 0 10upx;
+    position: fixed;
+    bottom: 0;
+    @media screen and (max-width: 1100px) {
+      width: 100%;
+    }
+    height: 100upx;
+    background-color: #fff;
+    box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
+    .price-view {
+      display: flex;
+      align-items: center;
+      font-size: 24upx;
+      .price-title {
+        color: #333;
+      }
+      .price-number {
+        margin: 0 8upx;
+        color: #ff2842;
+        .large {
+          font-size: 34upx;
+          font-weight: bold;
+        }
+      }
+    }
+    .admin-button-com {
+      width: 200upx;
+    }
+  }
+  .select-cmd_bx {
+    & .kc {
+      color: #999999;
+      font-size: 28upx;
+      font-weight: 400;
+      margin-bottom: 40upx;
+      text-align: center;
+      margin-top: 30upx;
+      .unit_price {
+        padding-right: 25upx;
+      }
+    }
+    & .num_bx {
+      display: flex;
+      align-items: center;
+      margin-bottom: 40upx;
+      & > input {
+        width: 212upx;
+        height: 80upx;
+        border: 1upx solid #dddddd;
+        border-radius: 4upx;
+        text-align: center;
+        margin-right: 24upx;
+        font-size: 40upx;
+      }
+    }
+  }
+}
+.class-popup-style {
+  z-index: 99999;
+}
+.remark-class {
+  z-index: 0;
+}
+.warning-price {
+  color: red;
+}
+.normal-price {
+  color: #c1acac;
+}
+.staff-btn {
+  min-width: 160upx;
+  padding: 0 27upx;
+  height: 80upx;
+  font-size: 40upx;
+  font-weight: bold;
+  margin: 8upx 8upx 0 0;
+  border-radius: 16upx;
+  background: #f0f2f6;
+  color: #333;
+  border: 2upx solid #e0e0e0;
+  transition: none;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.staff-btn.selected,
+.staff-btn:active {
+  background: #f0f2f6;
+  color: #333;
+  border-color: #e0e0e0;
+}
+
+/* 日期选择器蒙板 */
+.date-picker-mask {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background-color: rgba(0, 0, 0, 0.5);
+  z-index: 99;
+  animation: fadeIn 0.3s ease-in-out;
+}
+
+@keyframes fadeIn {
+  from {
+    opacity: 0;
+  }
+  to {
+    opacity: 1;
+  }
+}
+
+@keyframes fadeOut {
+  from {
+    opacity: 1;
+  }
+  to {
+    opacity: 0;
+  }
+}
+
+/* 跑腿平台报价样式 */
+.delivery-quotes-container {
+  width: 100%;
+  margin-top: 10upx;
+}
+
+.delivery-quotes-grid {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 10upx;
+  padding: 0;
+  width: 100%;
+}
+
+.delivery-quote-item {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  flex: 0 0 calc(33% - 7upx);
+  width: calc(33% - 7upx);
+  min-height: 140upx;
+  padding: 12upx 10upx;
+  margin-bottom: 5upx;
+  background: #FFFFFF;
+  border: 2upx solid #DDDDDD;
+  border-radius: 8upx;
+  box-sizing: border-box;
+  transition: all 0.3s;
+  
+  // 当只有1-2项时使用固定宽度
+  &.fixed-width {
+    flex: 0 0 220upx;
+    width: 220upx;
+  }
+  
+  .platform-name {
+    font-size: 24upx;
+    color: #333;
+    font-weight: bold;
+    margin-bottom: 8upx;
+    text-align: center;
+    line-height: 1.3;
+    max-width: 100%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    line-clamp: 2;
+    -webkit-box-orient: vertical;
+    word-break: break-all;
+  }
+  
+  .platform-price {
+    font-size: 25upx;
+    color: #333;
+    font-weight: bold;
+    margin-bottom: 4upx;
+  }
+  
+  .platform-type {
+    font-size: 19upx;
+    color: #868686;
+    margin-top: 4upx;
+    text-align: center;
+    line-height: 1.3;
+    max-width: 100%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    line-clamp: 2;
+    -webkit-box-orient: vertical;
+    word-break: break-all;
+  }
+  
+  // 选中状态
+  &.active {
+    background: #3385ff;
+    border-color: #3385ff;
+    
+    .platform-name,
+    .platform-price {
+      color: #FFFFFF;
+    }
+    
+    .platform-type {
+      color: rgba(255, 255, 255, 0.85);
+    }
+  }
+  
+  // 不可用状态
+  &.disabled {
+    opacity: 0.5;
+    background: #F5F5F5;
+    
+    .platform-name,
+    .platform-price,
+    .platform-type {
+      color: #CCCCCC;
+    }
+  }
+}
+
+.delivery-section {
+    border: 4upx solid #80B3FF;
+    margin: 8upx 20upx;
+    border-radius: 8upx;
+}
+.empty-quotes-view {
+    height: 50upx;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+}
+.distance-box {
+    display: flex;
+    align-items: center;
+}
+.blue-text {
+    color: #3385FF;
+}
+.title-reduction {
+    width: 150upx;
+}
+.btn-reduction {
+    margin-right: 12upx;
+    height: 70upx;
+    line-height: 46upx;
+    &.active {
+       background-color: #3385ff !important;
+       color: #fff !important;
+       border: 1upx solid #3385ff !important;
+    }
+}
+
+.discount-quick-btn {
+    width: 120upx;
+    height: 120upx;
+    border-radius: 12upx;
+    border: 2upx solid #ddd;
+    background-color: #f9f9f9;
+    font-size: 32upx;
+    font-weight: 500;
+    color: #333;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    transition: all 0.2s ease;
+    padding: 0;
+    line-height: 1;
+    white-space: nowrap;
+    
+    &.active {
+        border-color: #3385ff;
+        background-color: #3385ff;
+        color: #fff;
+    }
+}
+
+.discount-popup-container {
+    width: 600upx;
+    padding: 30upx;
+    box-sizing: border-box;
+}
+
+.discount-popup-title {
+    font-size: 32upx;
+    font-weight: bold;
+    margin-bottom: 30upx;
+    text-align: center;
+    color: #333;
+}
+
+.discount-quick-buttons {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: center;
+    gap: 15upx;
+    margin-bottom: 30upx;
+}
+
+.discount-divider {
+    height: 1upx;
+    background-color: #f0f0f0;
+    margin: 20upx 0;
+}
+
+.discount-custom-section {
+    margin-bottom: 30upx;
+}
+
+.discount-custom-label {
+    font-size: 28upx;
+    font-weight: 500;
+    margin-bottom: 15upx;
+    color: #333;
+}
+
+.discount-custom-input-group {
+    display: flex;
+    gap: 10upx;
+    align-items: center;
+}
+
+.discount-custom-input {
+    flex: 1;
+    border: 1upx solid #ddd;
+    border-radius: 8upx;
+    padding: 12upx;
+    font-size: 28upx;
+    box-sizing: border-box;
+    min-height: 70upx;
+    line-height: 45upx;
+}
+
+.discount-action-buttons {
+    display: flex;
+    gap: 15upx;
+    justify-content: center;
+}
+.strike-through {
+    text-decoration: line-through;
+}
+.free-delivery-tag {
+    color: #3385FF;
+    margin-left: 5upx;
+}
+.btn-call {
+    width: 170upx;
+    &.active {
+       background-color: #3385ff !important;
+       color: #fff !important;
+       border: 1upx solid #3385ff !important;
+    }
+}
+.time-action-view {
+    display: flex;
+    align-items: center;
+    color: #3385ff;
+    font-size: 28upx;
+}
+.icon-arrow-right {
+    font-size: 24upx;
+    color: #3385ff;
+    margin-left: 5upx;
+}
+.address-box {
+    flex: 1;
+    text-align: center;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    .addr-main {
+        font-size: 32upx;
+        color: #333;
+    }
+    .addr-sub {
+        font-size: 28upx;
+        color: #999;
+        margin-top: 6upx;
+    }
+}
+</style>

+ 7 - 1
ghsApp/src/admin/billing/index2.vue

@@ -460,7 +460,13 @@ export default {
 			let customName = this.option.customName ? this.option.customName : '';
 			let orderId = this.option.orderId  ? this.option.orderId : 0
 			let book = this.option.book ? this.option.book : 0
-			this.$util.pageTo({ url: '/admin/billing/affirm', type:2, query: {customId:this.option.customId,customName:customName,orderId:orderId,book:book}})
+			let forward = this.option.forward ? this.option.forward : 0
+			let customId = this.option.customId ? this.option.customId : 0
+			if(forward == 0){
+				this.$util.pageTo({ url: '/admin/billing/affirm', type:2, query: {customId:this.option.customId,customName:customName,orderId:orderId,book:book}})
+			}else{
+				this.$util.pageTo({ url: '/admin/billing/affirmForward?customId='+customId+'&customName='+customName+'&orderId='+orderId, type:2})
+			}
 		}
 	}
 };

+ 46 - 31
ghsApp/src/admin/custom/selectCustom.vue

@@ -13,7 +13,7 @@
             <div class="tui-msg-item" style="position:relative;">
               <div class="tui-msg-name">
                 <div class="tui-user-name">
-                  {{ item.name }}
+                  <text class="tui-user-name__text">{{ item.name }}</text>
                   <text v-if="item.level == 2" class="super-man">大客</text>
                   <text v-if="item.level == 9" class="cost-man">成本</text>
                   <text v-if="item.level == 0" class="ls-man">零售</text>
@@ -113,6 +113,7 @@ export default {
     selectCurrent(item,scanEnv=0){
       let style = this.option.style ? this.option.style : 1
       let book = this.option.book ? this.option.book : 0
+      let forward = this.option.forward ? this.option.forward : 0
       //显示所有花材,包括没库存的花材
       let getAll = this.option.getAll ? this.option.getAll : 0
       this.selectStyle = style
@@ -121,7 +122,7 @@ export default {
         if(this.$util.isScanEnv() || scanEnv == 1){
           this.$util.pageTo({url: '/admin/billing/affirm='+item.id+'&customName='+item.name,type:2})
         }else{
-          this.$util.pageTo({url: '/admin/billing/index2?customId='+item.id+'&customName='+item.name+'&book='+book+'&getAll='+getAll,type:2})
+          this.$util.pageTo({url: '/admin/billing/index2?customId='+item.id+'&customName='+item.name+'&book='+book+'&getAll='+getAll+'&forward='+forward,type:2})
         }
       }else if(style == 2){
         //用于选择客户并且需要返回的情况
@@ -282,42 +283,56 @@ export default {
     font-size: 30upx;
     line-height: 1;
     color: #262b3a;
+    /* 客户名与等级标签同一行垂直居中 */
     .tui-user-name {
+      display: flex;
+      flex-direction: row;
+      align-items: center;
+      flex-wrap: nowrap;
       overflow: hidden;
-      text-overflow: ellipsis;
-      white-space: nowrap;
       width: 500upx;
-      font-size: 32upx;
-      .super-man{
-        margin-left:30upx;
-        font-size:20upx;
-        display:inline-block;
-        color:white;
-        border:1upx solid green;
-        padding:7upx 8upx;
-        background-color: green;
+      line-height: 1;
+
+      &__text {
+        flex-shrink: 1;
+        min-width: 0;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        font-size: 32upx;
+        line-height: 1.2;
+        color: #262b3a;
+      }
+
+      .super-man,
+      .cost-man,
+      .ls-man {
+        margin-left: 20upx;
+        font-size: 24upx;
+        flex-shrink: 0;
+        display: inline-flex;
+        align-items: center;
+        justify-content: center;
+        color: white;
+        padding: 6upx 10upx;
         border-radius: 11upx;
+        line-height: 1.2;
+        box-sizing: border-box;
+      }
+
+      .super-man {
+        border: 1upx solid green;
+        background-color: green;
       }
-      .cost-man{
-        margin-left:30upx;
-        font-size:20upx;
-        display:inline-block;
-        color:white;
-        border:1upx solid red;
-        padding:7upx 8upx;
+
+      .cost-man {
+        border: 1upx solid red;
         background-color: red;
-        border-radius: 11upx;
       }
-      /* 零售标签:圆角+内边距与大客/成本一致,蓝底白字 */
-      .ls-man{
-        margin-left:30upx;
-        font-size:20upx;
-        display:inline-block;
-        color:white;
-        border:1upx solid #6b9fec;
-        background-color:#6b9fec;
-        padding:7upx 8upx;
-        border-radius: 11upx;
+
+      .ls-man {
+        border: 1upx solid #6b9fec;
+        background-color: #6b9fec;
       }
     }
   }

+ 28 - 26
ghsApp/src/admin/home/member.vue

@@ -673,6 +673,7 @@ export default {
     font-size: 30upx;
     line-height: 1;
     color: #262b3a;
+    /* 客户名与大客/成本/零售标签垂直居中对齐 */
     .tui-user-name {
       display: flex;
       flex-direction: row;
@@ -689,41 +690,40 @@ export default {
         text-overflow: ellipsis;
         white-space: nowrap;
         font-size: 34upx;
+        line-height: 1.2;
       }
 
-      .super-man{
-        margin-left:20upx;
-        font-size:20upx;
+      .super-man,
+      .cost-man,
+      .ls-man {
+        margin-left: 20upx;
+        font-size: 24upx;
         flex-shrink: 0;
-        color:white;
-        border:1upx solid green;
-        padding:7upx 8upx;
-        background-color: green;
+        display: inline-flex;
+        align-items: center;
+        justify-content: center;
+        color: white;
+        padding: 6upx 10upx;
         border-radius: 11upx;
         line-height: 1.2;
+        box-sizing: border-box;
       }
-      .cost-man{
-        margin-left:20upx;
-        font-size:20upx;
-        flex-shrink: 0;
-        color:white;
-        border:1upx solid red;
-        padding:7upx 8upx;
+
+      .super-man {
+        border: 1upx solid green;
+        background-color: green;
+      }
+
+      .cost-man {
+        border: 1upx solid red;
         background-color: red;
-        border-radius: 11upx;
-        line-height: 1.2;
       }
-      .ls-man{
-        margin-left:20upx;
-        font-size:20upx;
-        flex-shrink: 0;
-        color:white;
-        border:1upx solid #6b9fec;
-        background-color:#6b9fec;
-        padding:7upx 8upx;
-        border-radius: 11upx;
-        line-height: 1.2;
+
+      .ls-man {
+        border: 1upx solid #6b9fec;
+        background-color: #6b9fec;
       }
+
       .pt-recommend {
         margin-left: 10upx;
         font-size: 24upx;
@@ -731,6 +731,8 @@ export default {
         font-weight: normal;
         flex-shrink: 0;
         line-height: 1.2;
+        display: inline-flex;
+        align-items: center;
       }
     }
   }

+ 1 - 0
ghsApp/src/pages.json

@@ -331,6 +331,7 @@
 				{ "path": "customerPlace", "style": { "navigationBarTitleText": "开单" } },
 				{ "path": "result", "style": { "navigationBarTitleText": "开单结果" } },
 				{ "path": "affirm", "style": { "navigationBarTitleText": "确认下单" } },
+				{ "path": "affirmForward", "style": { "navigationBarTitleText": "确认下单" } },
 				{ "path": "customerAffirm", "style": { "navigationBarTitleText": "确认下单" } },
 				{ "path": "confirm", "style": { "navigationBarTitleText": "待确认" } },
 				{"path": "toPay","style": {"navigationBarTitleText": "等待付款"}},