Sfoglia il codice sorgente

微信扫码一键线下发货功能提交

yjwang 6 giorni fa
parent
commit
1617ffc72e

+ 9 - 0
src/api/hisStore/storePayment.js

@@ -76,3 +76,12 @@ export function setPayNotify(data) {
     data: data
   })
 }
+
+//同步订单状态
+export function oneClickShipping(data) {
+  return request({
+    url: '/store/store/storePayment/oneClickShipping',
+    method: 'post',
+    data: data
+  })
+}

+ 25 - 1
src/views/hisStore/storePayment/index.vue

@@ -160,6 +160,15 @@
           @click="handlePayNotify"
           v-hasPermi="['store:storePayment:payNotify']"
         >同步订单状态</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          icon="el-icon-s-order"
+          size="mini"
+          type="success"
+          @click="wxOneClickShipping"
+        >微信一键线下自提发货
+        </el-button>
       </el-col>
 	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
@@ -287,7 +296,7 @@
 </template>
 
 <script>
-import { refundStorePayment,listStorePayment, getStorePayment, delStorePayment, addStorePayment, updateStorePayment, exportStorePayment,setPayNotify } from "@/api/hisStore/storePayment";
+import { refundStorePayment,listStorePayment, getStorePayment, delStorePayment, addStorePayment, updateStorePayment, exportStorePayment,setPayNotify, oneClickShipping} from "@/api/hisStore/storePayment";
 import { getCompanyList } from "@/api/company/company";
 import { listLiveOrderPayments,getLivePayment,updateLivePayment,exportLiveOrderPayments } from "@/api/live/liveOrderPayment";
 
@@ -605,6 +614,21 @@ export default {
         }).then(response => {
           this.download(response.msg);
         }).catch(function() {});
+    },
+    wxOneClickShipping(){
+      this.$confirm('是否同步微信线下发货?', '一键发货', {
+        confirmButtonText: '是',
+        cancelButtonText: '否',
+        type: 'warning'
+      }).then(() => {
+        oneClickShipping().then(response => {
+          if(response.code === 200) {
+            this.$message.success("操作成功!")
+            this.getList();
+          }
+        })
+      }).catch(() => {
+      });
     }
   }
 };

+ 17 - 10
src/views/system/config/config.vue

@@ -585,6 +585,13 @@
           <el-form-item v-if="form9.type=='hf'" label="汇付大额退款回调地址" prop="hfOnlineRefundNotifyUrl">
             <el-input v-model="form9.hfOnlineRefundNotifyUrl" label="汇付分账回调地址"></el-input>
           </el-form-item>
+          <el-form-item label="是否开启微信发货" prop="isWeChatShipping">
+            <el-switch
+              v-model="form17.isWeChatShipping"
+              active-color="#13ce66"
+              inactive-color="#ff4949">
+            </el-switch>
+          </el-form-item>
           <div class="footer">
             <el-button type="primary" @click="submitForm9">提 交</el-button>
           </div>
@@ -2258,7 +2265,7 @@
       <el-tab-pane label="拼手气红包配置" name="randomRedpacket:config">
         <el-form ref="form29" :model="form29" label-width="150px">
           <el-form-item label="是否开启拼手气红包" prop="enableRandomRedpacket">
-          
+
             <el-switch
               v-model="form29.enableRandomRedpacket"
               active-color="#13ce66"
@@ -2268,9 +2275,9 @@
         <div v-if="!!form29.enableRandomRedpacket" style=" display: flex;
                   flex-direction: column;
                   margin-bottom: 50px;">
-                   
+
              <div v-for="(rule, index) in form29.rules" :key="index" class="form-row">
-              
+
            <el-form-item
             label="金额区间"
             :prop="`rules.${index}.minAmount`"
@@ -3335,7 +3342,7 @@ export default {
     validateMinAmount(rule, value, callback) {
       // debugger;
       // const maxAmount = this.form29.rules[].maxAmount
-      
+
       const index = rule.index;
       const maxAmount = this.form29.rules[index].maxAmount;
 
@@ -3372,24 +3379,24 @@ export default {
     handleAmountInput(rule, field) {
       let value = rule[field];
       if (value === null || value === undefined) return;
-      
+
       // 转换为字符串处理
       let str = value.toString();
-      
+
       // 移除除数字和小数点外的所有字符
       str = str.replace(/[^0-9.]/g, '');
-      
+
       // 只保留一个小数点
       const dotIndex = str.indexOf('.');
       if (dotIndex !== -1) {
         str = str.substring(0, dotIndex + 1) + str.substring(dotIndex + 1).replace(/\./g, '');
       }
-      
+
       // 限制小数点后最多两位
       if (dotIndex !== -1 && str.length > dotIndex + 3) {
         str = str.substring(0, dotIndex + 3);
       }
-      
+
       // 转换回数字并更新
       rule[field] = parseFloat(str) || 0;
     },
@@ -3432,7 +3439,7 @@ export default {
   /* 关键改动:添加以下两行 */
   align-items: center;    /* 垂直居中对齐 */
   justify-content: flex-start; /* 水平方向从左到右排列(默认值,可显式写出) */
-  
+
   padding: 10px;
   border-bottom: 1px solid #ebeef5;
 }