MONSTER-ygh 2 luni în urmă
părinte
comite
2a23b2d42c

+ 9 - 0
src/api/order/groupBuyingMr.js

@@ -44,4 +44,13 @@ export const teamOrderReSubmitApi = (data) => {
     method: 'post',
     data: data
   })
+}
+
+// 代客下单
+export const teamPayOrderUrlApi = (params) => {
+  return request({
+    url: '/member/marketTeam/teamPayOrderUrl',
+    method: 'get',
+    params: params
+  })
 }

+ 16 - 1
src/views/finance/Statements/quickReconciliation.vue

@@ -17,6 +17,21 @@
               value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
             </el-date-picker>
           </el-form-item>
+          <el-form-item label-width="80px" label="支付方式">
+            <el-select
+              v-model="queryParams.unionMid"
+              placeholder="支付方式"
+              clearable
+              style="width: 100%"
+            >
+                <el-option
+                  v-for="dict in dict.type.pay_mchid"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                />
+            </el-select>
+          </el-form-item>
           <el-form-item>
             <el-button style="margin-left: 10px;" type="primary" icon="el-icon-search" size="mini"
               @click="handleQuery">搜索</el-button>
@@ -94,7 +109,7 @@ export default {
     detailsDia,
     'parkingrecord-pagination-select': () => import('@/components/CustPaginationSelect') // 支持分页搜索功能的[el-select]下拉框
   },
-  dicts: ['order_form_type', 'pay_way_type', 'transaction_type'],
+  dicts: ['order_form_type', 'pay_way_type', 'transaction_type','pay_mchid'],
   data() {
     return {
       // 遮罩层

+ 42 - 57
src/views/order/groupBuyingMr/index.vue

@@ -296,20 +296,19 @@
                 <el-dropdown-menu slot="dropdown">
                   <el-dropdown-item 
                   command="1" 
-                  
                   v-if="hasPermi('groupBuyingMr:groupBuyingMr:duigong') && (scope.row.payWay == 'corporate'||scope.row.status === 0)">对公转账</el-dropdown-item>
                   <el-dropdown-item 
                   command="2" 
-                  
                   v-if="hasPermi('groupBuyingMr:groupBuyingMr:cancel') && scope.row.status == 0">关闭订单</el-dropdown-item>
                   <el-dropdown-item 
                   command="3" 
-                  
                   v-if="hasPermi('groupBuyingMr:groupBuyingMr:print') && (scope.row.status == 3 || scope.row.status == 7)">打印小票</el-dropdown-item>
                   <el-dropdown-item 
                   command="4" 
-                  
                   v-if="hasPermi('groupBuyingMr:groupBuyingMr:reset') && scope.row.status == 0">修改订单</el-dropdown-item>
+                  <el-dropdown-item 
+                  command="5" 
+                  >代客下单</el-dropdown-item>
                 </el-dropdown-menu>
               </el-dropdown>
             </template>
@@ -446,7 +445,12 @@
 <script>
 import { getToken } from "@/utils/auth";
 import auth from '@/plugins/auth'
-import { pageList,gotoCorporatePay, downOrderListXls } from '@/api/order/groupBuyingMr';
+import { 
+  pageList,
+  gotoCorporatePay, 
+  downOrderListXls,
+  teamPayOrderUrlApi 
+ } from '@/api/order/groupBuyingMr';
 import { orderInfoCancel } from '@/api/windowTicketSales/ticketingSales';
 import detailsDia from "./dialog/details.vue";
 import resetOrder from "./dialog/resetOrder.vue";
@@ -493,57 +497,6 @@ export default {
         pageNum: 1,
         pageSize: 10,
       },
-      statusList: {
-        0: '待支付',
-        2: '超时取消',
-        3: '待使用',
-        4: '退款中',
-        5: '己退款',
-        6: '退款失败',
-        7: '己使用',
-        8: '己超期',
-        9: '关闭',
-      },
-      statusMapList: [
-        {id: 1, name: '待支付', value: 0},
-        {id: 2, name: '超时取消', value: 2},
-        {id: 3, name: '待使用', value: 3},
-        {id: 4, name: '退款中', value: 4},
-        {id: 5, name: '己退款', value: 5},
-        {id: 6, name: '退款失败', value: 6},
-        {id: 7, name: '己使用', value: 7},
-        {id: 8, name: '己超期', value: 8},
-        {id: 9, name: '关闭', value: 9},
-      ],
-      payList: {
-        0: '未支付',
-        1: '已支付',
-        2: '支付中',
-        3: '支付失败',
-        4: '支付退款',
-      },
-      payWayList: {
-        'cahsh': '现金',
-        'wecaht.applet': '微信小程序支付',
-        'alipay': '支付宝OTA',
-        'wecaht.h5': '微信公众号支付',
-        'meituan': '美团支付',
-        'corporate': '对公支付',
-      },
-      sourceList: {
-        1: '小程序',
-        2: '公众号',
-        3: '美团',
-        4: '携程',
-        5: '团购',
-      },
-      sourceMapList: [
-        {id: 1, name: '小程序', value: 1},
-        {id: 2, name: '公众号', value: 2},
-        {id: 3, name: '美团', value: 3},
-        {id: 4, name: '携程', value: 4},
-        {id: 5, name: '团购', value: 5},
-      ],
       visibleStatus: false,
       newObj: {},
       visibleType: '',
@@ -1069,6 +1022,35 @@ export default {
       this.form.photoList.splice(index,1)
       this.$refs.ruleForm1.validateField('photoList')
     },
+    /**  代课下单  */
+    handPlaceAnOrder(row) {
+      /** 关闭订单 */
+      this.$confirm("确认要生成该订单的支付链接吗?温馨提示:请勿随意将链接发送给陌生人", '提示', {
+        confirmButtonText: '生成并复制链接',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        teamPayOrderUrlApi({ orderId: row.id }).then((res) => {
+          if (res.code == 200) {
+            this.$message({
+              type: 'success',
+              message: res.msg
+            });
+            this.copyToClipboard(res.data.url)
+          }
+        });
+      }).catch(() => { });
+    },
+    /**  复制内容  */
+    copyToClipboard(text) {
+      // 创建一个临时的textarea元素
+      const tempInput = document.createElement('textarea');
+      tempInput.value = text;
+      document.body.appendChild(tempInput);
+      tempInput.select();
+      document.execCommand('copy');
+      document.body.removeChild(tempInput);
+    },
     // 更多操作触发
     handleCommand(command, row) {
       switch (command) {
@@ -1081,9 +1063,12 @@ export default {
         case "3":
           this.handleOpen(row);
           break;
-          case "4":
+        case "4":
           this.handleResetOpen(row);
           break;
+        case "5":
+          this.handPlaceAnOrder(row);
+          break;
         default:
           break;
       }