Ver Fonte

跑腿费用

shish há 9 meses atrás
pai
commit
8a8aa794c7
3 ficheiros alterados com 112 adições e 17 exclusões
  1. 26 15
      ghsApp/src/admin/shop/sk.vue
  2. 82 2
      hdApp/src/admin/shop/sk.vue
  3. 4 0
      hdApp/src/api/shop/ext.js

+ 26 - 15
ghsApp/src/admin/shop/sk.vue

@@ -17,20 +17,6 @@
             <view>{{zjGatheringItemName}}</view>
           </tui-list-cell>
 
-          <tui-list-cell class="line-cell" :hover="false">
-            <view class="tui-title">下单后</view>
-            <radio-group class="tui-input" @change="orderFlowChange">
-              <label class="list" for="orderFlowZj">
-                <radio id="orderFlowZj" value="0" :checked="orderFlow == 0" style="transform:scale(0.7,0.7)" />
-                <span class="checkbox-text">直接完成</span>
-              </label>
-              <label class="list" for="orderFlowFh">
-                <radio id="orderFlowFh" value="1" :checked="orderFlow == 1" style="transform:scale(0.7,0.7)" />
-                <span class="checkbox-text">变待发货</span>
-              </label>
-            </radio-group>
-          </tui-list-cell>
-
           <tui-list-cell class="line-cell" :hover="false">
             <view class="tui-title">商城端跑腿</view>
             <radio-group class="tui-input" @change="thirdSendChange">
@@ -59,6 +45,28 @@
             </radio-group>
           </tui-list-cell>
 
+          <tui-list-cell class="line-cell" :hover="false" v-if="thirdSendFee == 1">
+            <view class="tui-title">自动计算</view>
+            <view>
+              <text v-if="wxStoreId!=''" style="color:#3385FF;font-weight:bold;">已开启</text>
+              <text v-else style="color:red;font-weight:bold;">未开启</text>
+            </view>
+          </tui-list-cell>
+
+          <tui-list-cell class="line-cell" :hover="false">
+            <view class="tui-title">下单后</view>
+            <radio-group class="tui-input" @change="orderFlowChange">
+              <label class="list" for="orderFlowZj">
+                <radio id="orderFlowZj" value="0" :checked="orderFlow == 0" style="transform:scale(0.7,0.7)" />
+                <span class="checkbox-text">直接完成</span>
+              </label>
+              <label class="list" for="orderFlowFh">
+                <radio id="orderFlowFh" value="1" :checked="orderFlow == 1" style="transform:scale(0.7,0.7)" />
+                <span class="checkbox-text">需要发货</span>
+              </label>
+            </radio-group>
+          </tui-list-cell>
+
         </view>
 
         <view class="confirm-btn">
@@ -88,7 +96,8 @@ export default {
       losingItemName:'',
       zjGatheringItem:0,
       zjGatheringItemName:'',
-      selectItemOk:0
+      selectItemOk:0,
+      wxStoreId:''
     };
   },
   onShow() {
@@ -163,6 +172,8 @@ export default {
           this.orderFlow = res.data.orderFlow
           this.thirdSend = res.data.thirdSend
           this.thirdSendFee = res.data.thirdSendFee
+          let main = res.data.main?res.data.main:[]
+          this.wxStoreId = main.wxStoreId
         }
       })
     },

+ 82 - 2
hdApp/src/admin/shop/sk.vue

@@ -14,6 +14,58 @@
             <view class="tui-title">直接收款:</view>
             <view>{{zjGatheringItemName}}</view>
           </tui-list-cell>
+
+          <tui-list-cell class="line-cell" :hover="false">
+            <view class="tui-title">商城端跑腿</view>
+            <radio-group class="tui-input" @change="thirdSendChange">
+              <label class="list" for="thirdSendOk">
+                <radio id="thirdSendOk" value="0" :checked="thirdSend == 0" style="transform:scale(0.7,0.7)" />
+                <span class="checkbox-text">支持</span>
+              </label>
+              <label class="list" for="thirdSendNo">
+                <radio id="thirdSendNo" value="1" :checked="thirdSend == 1" style="transform:scale(0.7,0.7)" />
+                <span class="checkbox-text">不支持</span>
+              </label>
+            </radio-group>
+          </tui-list-cell>
+
+          <tui-list-cell class="line-cell" :hover="false">
+            <view class="tui-title">跑腿费用</view>
+            <radio-group class="tui-input" @change="thirdSendFeeChange">
+              <label class="list" for="thirdSendFeeDf">
+                <radio id="thirdSendFeeDf" value="0" :checked="thirdSendFee == 0" style="transform:scale(0.7,0.7)" />
+                <span class="checkbox-text">到付</span>
+              </label>
+              <label class="list" for="thirdSendFeeZd">
+                <radio id="thirdSendFeeZd" value="1" :checked="thirdSendFee == 1" style="transform:scale(0.7,0.7)" />
+                <span class="checkbox-text">自动计算</span>
+              </label>
+            </radio-group>
+          </tui-list-cell>
+
+          <tui-list-cell class="line-cell" :hover="false" v-if="thirdSendFee == 1">
+            <view class="tui-title">自动计算</view>
+            <view>
+              <text v-if="wxStoreId!=''" style="color:#3385FF;font-weight:bold;">已开启</text>
+              <text v-else style="color:red;font-weight:bold;">未开启</text>
+            </view>
+          </tui-list-cell>
+
+          <tui-list-cell class="line-cell" :hover="false">
+            <view class="tui-title">下单后</view>
+            <radio-group class="tui-input" @change="orderFlowChange">
+              <label class="list" for="orderFlowZj">
+                <radio id="orderFlowZj" value="0" :checked="orderFlow == 0" style="transform:scale(0.7,0.7)" />
+                <span class="checkbox-text">直接完成</span>
+              </label>
+              <label class="list" for="orderFlowFh">
+                <radio id="orderFlowFh" value="1" :checked="orderFlow == 1" style="transform:scale(0.7,0.7)" />
+                <span class="checkbox-text">需要发货</span>
+              </label>
+            </radio-group>
+          </tui-list-cell>
+
+
         </view>
         <view class="confirm-btn">
           <button class="admin-button-com big blue" @click="goBack">返回</button>
@@ -24,7 +76,7 @@
 <script>
 import TuiListCell from "@/components/plugin/list-cell";
 import { kjCustom,kjCustomSet } from "@/api/shop";
-import { setItem,getMyExtInfo } from "@/api/shop/ext";
+import { setItem,getMyExtInfo,modifyExt } from "@/api/shop/ext";
 export default {
   name: "sk",
   components: {TuiListCell},
@@ -40,7 +92,11 @@ export default {
       zjGatheringItem:0,
       zjGatheringItemName:'',
       hasLoad:false,
-      selectItemOk:0
+      selectItemOk:0,
+      orderFlow:0,
+      thirdSend:0,
+      thirdSendFee:0,
+      wxStoreId:''
     };
   },
   onShow() {
@@ -63,6 +119,25 @@ export default {
       }
   },
   methods: {
+    orderFlowChange(e){
+      this.orderFlow = e.detail.value
+      this.changeExt()
+    },
+    thirdSendChange(e){
+      this.thirdSend = e.detail.value
+      this.changeExt()
+    },
+    thirdSendFeeChange(e){
+      this.thirdSendFee = e.detail.value
+      this.changeExt()
+    },
+    changeExt(){
+      modifyExt({orderFlow:this.orderFlow,thirdSend:this.thirdSend,thirdSendFee:this.thirdSendFee}).then(res=>{
+        if(res.code == 1){
+          this.$msg(res.msg)
+        }
+      })
+    },
     goBack(){
       uni.navigateBack()
     },
@@ -84,6 +159,11 @@ export default {
           this.zjGatheringItem = res.data.zjGatheringItem
           this.losingItemName = res.data.losingItemName
           this.zjGatheringItemName = res.data.zjGatheringItemName
+          this.orderFlow = res.data.orderFlow
+          this.thirdSend = res.data.thirdSend
+          this.thirdSendFee = res.data.thirdSendFee
+          let main = res.data.main?res.data.main:[]
+          this.wxStoreId = main.wxStoreId
         }
       })
     },

+ 4 - 0
hdApp/src/api/shop/ext.js

@@ -22,4 +22,8 @@ export const setItem = data => {
 
 export const getMyExtInfo = data => {
 	return https.get('/shop-ext/my-info', data)
+}
+
+export const modifyExt = data => {
+	return https.post('/shop-ext/modify-ext', data)
 }