shish 6 месяцев назад
Родитель
Сommit
baefba6cd1
2 измененных файлов с 61 добавлено и 3 удалено
  1. 60 2
      ghsApp/src/admin/billing/affirm.vue
  2. 1 1
      ghsApp/src/admin/home/apply.vue

+ 60 - 2
ghsApp/src/admin/billing/affirm.vue

@@ -264,7 +264,8 @@
 
               <tui-list-cell class="line-cell" :hover="false" v-show="form.sendType == 3">
                 <div class="tui-title">配送物流</div>
-                <input type="text" placeholder="请填写物流" v-model="form.wlName" @focus="form.wlName = ''" placeholder-class="tui-placeholder" />
+                <input type="text" placeholder="请填写物流" style="width:251upx;" v-model="form.wlName" placeholder-class="tui-placeholder" :disabled="true" />
+                <button class="admin-button-com mini-btn default" @click="getMyWl" style="margin-left:10upx;height:70upx;line-height:46upx">选择物流</button>
               </tui-list-cell>
 
               <view v-show="displaySendCost == true">
@@ -439,7 +440,41 @@
                     </view>
                   </view>
                   <view style="text-align: center; padding: 10upx 0 10upx 0"
-                    ><button class="admin-button-com big blue" @click="cancelCurrentStaff()">取消选择</button></view
+                    ><button class="admin-button-com big blue" @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" @click="addWlItem()">新增</button>
+<button class="admin-button-com big blue" @click="cancelWlSelect()">取消</button>
+</view
                   >
                 </view>
               </uni-popup>
@@ -584,6 +619,7 @@ 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';
@@ -628,6 +664,7 @@ export default {
       ],
       discountValue: 0,
       staffList: [],
+      wlList: [],
       payWayList: [
         { name: '线下微信(收款码)', id: 0 },
         { name: '线下支付宝(收款码)', id: 1 },
@@ -1139,6 +1176,27 @@ export default {
       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; // 只处理花材

+ 1 - 1
ghsApp/src/admin/home/apply.vue

@@ -91,7 +91,7 @@ export default {
                     list:[
 
                         {name: "运费设置",img: `${this.$constant.hostUrl}/image/ghs/home/shop.png`,url: "/admin/order/freight"},
-                        {name: "物流",img: `${this.$constant.hostUrl}/image/ghs/home/kcyjs.png`,url: "/admin/shop/wl"},
+                        {name: "物流选项",img: `${this.$constant.hostUrl}/image/ghs/home/kcyjs.png`,url: "/admin/shop/wl"},
                         {name: "结账记录",img: `${this.$constant.hostUrl}/image/ghs/home/kcyjs.png`,url: "/admin/clear/customList"},
                         {name: "售后记录",img: `${this.$constant.hostUrl}/image/ghs/home/kcyjs.png`,url: "/pagesOrder/refundAllList"},
                         {name: "预订汇总",img: `${this.$constant.hostUrl}/image/ghs/home/kcyjs.png`,url: "/admin/order/statBook"},