10 Комити f59131d8cd ... bbf06720e2

Аутор SHA1 Порука Датум
  zweiqin bbf06720e2 Merge branch 'master' into dev пре 6 месеци
  zweiqin fb83303d1f 2024.09.11 补充提交 пре 6 месеци
  wzy 875493d86f Merge branch 'master' of http://159.75.201.17:3000/zwq/tuanfeng-pc-admin пре 6 месеци
  wzy cac8bc1292 订单类别的搜索 пре 6 месеци
  zweiqin a8229a01ac 2024.09.11 пре 6 месеци
  zweiqin 7e1e09cc8b 2024.09.10 пре 6 месеци
  zweiqin dc224393d7 2024.09.05 пре 7 месеци
  zweiqin cde29979e7 2024.08.31 пре 7 месеци
  GuYun-D 9b4d4800b1 Merge branch 'master' of http://159.75.201.17:3000/zwq/tuanfeng-pc-admin пре 7 месеци
  GuYun-D 389aa80678 Merge branch 'feat/v20240706-dashboard' пре 7 месеци

+ 1 - 0
.env.development

@@ -7,6 +7,7 @@ VUE_APP_BASE_API = '/dev-api'
 # 开发环境
 # VUE_APP_DOMAIN_PREFIX = 'http://192.168.0.91:9003'
 # 线上
+VUE_APP_DOMAIN_TF = 'https://nsappapi.tuanfengkeji.cn'
 VUE_APP_DOMAIN_TUAN = 'https://www.tuanfengkeji.cn/dts-app-api'
 VUE_APP_DOMAIN_PREFIX = 'https://nsadminapi.tuanfengkeji.cn'
 # 演示环境

+ 1 - 0
.env.production

@@ -4,5 +4,6 @@ ENV = 'production'
 # base api
 VUE_APP_BASE_API = '/prod-api'
 
+VUE_APP_DOMAIN_TF = 'https://nsappapi.tuanfengkeji.cn'
 VUE_APP_DOMAIN_TUAN = 'https://www.tuanfengkeji.cn/dts-app-api'
 VUE_APP_DOMAIN_PREFIX = 'https://nsadminapi.tuanfengkeji.cn'

+ 1 - 0
.env.staging

@@ -9,5 +9,6 @@ VUE_APP_BASE_API = '/stage-api'
 # 线上
 # VUE_APP_DOMAIN_PREFIX = 'https://nsadminapi.tuanfengkeji.cn'
 # 测试
+VUE_APP_DOMAIN_TF = 'https://nsappapitest.tuanfengkeji.cn'
 VUE_APP_DOMAIN_TUAN = 'https://test.tuanfengkeji.cn/dts-app-api'
 VUE_APP_DOMAIN_PREFIX = 'https://nsadminapitest.tuanfengkeji.cn'

+ 10 - 0
src/api/order.js

@@ -1,4 +1,5 @@
 import request from '@/utils/request'
+import aTFRequest from '@/utils/aTFRequest'
 
 //* ******************** 待处理订单  *********************
 // 订单管理查询
@@ -62,4 +63,13 @@ export function halfOrderRe(id){
     url:"/order/reSubmitBanziOrder/"+id,
     method: 'put',
   })
+}
+
+// 三方已支付时更新本系统的订单支付状态
+export function syncLocalOrderStatusPaid(params) {
+  return aTFRequest({
+    url: '/order/syncLocalOrderStatusWhen3rdPaid',
+    method: 'get',
+    params
+  })
 }

+ 54 - 37
src/router/index.js

@@ -1,11 +1,18 @@
-import Vue from 'vue'
-import Router from 'vue-router'
+import Vue from "vue";
+import Router from "vue-router";
 
-Vue.use(Router)
+Vue.use(Router);
 
 /* Layout */
 
-import Layout from '@/layout'
+import Layout from "@/layout";
+
+
+
+//  引入总览中的子页面
+
+import chidRoutes from "@/views/dashboard/data/childRoute.js"
+
 
 /**
  * Note: sub-menu only appear when route children.length >= 1
@@ -724,33 +731,42 @@ import Layout from '@/layout'
 
 export const mainRoutes = [
   {
-    path: '/login',
-    component: () => import('@/views/login/index'),
-    hidden: true
+    path: "/login",
+    component: () => import("@/views/login/index"),
+    hidden: true,
   },
   {
-    path: '/404',
-    component: () => import('@/views/404'),
-    hidden: true
+    path: "/404",
+    component: () => import("@/views/404"),
+    hidden: true,
   },
   {
-    path: '/',
+    path: "/",
     component: Layout,
-    redirect: '/dashboard',
+    redirect: "/dashboard",
     meta: {
-      title: '总览',
-      icon: 'el-icon-monitor'
+      title: "总览",
+      icon: "el-icon-monitor",
     },
-    children: [ {
-      path: 'dashboard',
-      name: 'dashboard',
-      component: () => import('@/views/dashboard/index.vue'),
-      meta: {
-        title: '总览',
-        icon: 'el-icon-monitor'
-      }
-    } ]
-  }
+    children: [
+      {
+        path: "dashboard",
+        name: "dashboard",
+        component: () => import("@/views/dashboard/index.vue"),
+        meta: {
+          title: "总览",
+          icon: "el-icon-monitor",
+        }
+      },
+      ...chidRoutes
+      // {
+      //   path: "/marketingManagement",
+      //   hidden:true,
+      //   name: "marketingManagement",
+      //   component: () => import("@/views/account/index.vue"),
+      // },
+    ],
+  },
   // {
   //   path: '/marketingManagement',
   //   component: Layout,
@@ -771,23 +787,24 @@ export const mainRoutes = [
   //     }
   //   } ]
   // }
-]
+];
 
-const createRouter = () => new Router({
-  // mode: 'history', // require service support
-  scrollBehavior: () => ({
-    y: 0
-  }),
-  // routes: constantRoutes
-  routes: mainRoutes
-})
+const createRouter = () =>
+  new Router({
+    // mode: 'history', // require service support
+    scrollBehavior: () => ({
+      y: 0,
+    }),
+    // routes: constantRoutes
+    routes: mainRoutes,
+  });
 
-const router = createRouter()
+const router = createRouter();
 
 // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
 export function resetRouter() {
-  const newRouter = createRouter()
-  router.matcher = newRouter.matcher // reset router
+  const newRouter = createRouter();
+  router.matcher = newRouter.matcher; // reset router
 }
 
-export default router
+export default router;

+ 88 - 0
src/utils/aTFRequest.js

@@ -0,0 +1,88 @@
+import Vue from 'vue'
+import axios from 'axios'
+import {
+  MessageBox,
+  Message
+} from 'element-ui'
+import store from '@/store'
+import router from '@/router'
+import {
+  getToken, removeToken
+} from '@/utils/auth'
+
+const baseURL = process.env.VUE_APP_DOMAIN_TF
+// create an axios instance
+Vue.prototype.axios = axios
+axios.defaults.timeout = 30000
+const service = axios.create({
+  baseURL, // url = base url + request url
+  // withCredentials: true, // send cookies when cross-domain requests
+  timeout: 30000 // request timeout
+})
+
+export const token = getToken()
+
+// request interceptor
+service.interceptors.request.use(
+  (config) => {
+    // console.log(config)
+    if (store.getters.token) {
+      config.headers['Content-Type'] = 'application/json'
+      config.headers.Authorization = getToken()
+      config.headers['satoken-user'] = getToken()
+    }
+    return config
+  },
+  (error) => {
+    console.log(error) // for debug
+    return Promise.reject(error)
+  }
+)
+
+// response interceptor
+// eslint-disable-next-line complexity
+service.interceptors.response.use((response) => {
+  if (response.status == 200) {
+    if ((response.data.code === '200') || (response.data.code === '')) {
+      return response.data
+    } else if ((response.data.code === '20004') || (response.data.code === '20005') || (response.data.code == 40005)) { // 有res.data
+      MessageBox.confirm(
+        'You have been logged out, you can cancel to stay on this page, or log in again',
+        'Confirm logout',
+        {
+          confirmButtonText: 'Re-Login',
+          cancelButtonText: 'Cancel',
+          type: 'warning'
+        }
+      ).then(() => {
+        store.dispatch('user/resetToken').then(() => {
+          location.reload()
+        })
+      })
+      return Promise.reject(new Error(response.data.message || 'Error'))
+    }  // 有res.data
+    Message({
+      message: response.data.message || 'Error',
+      type: 'error',
+      duration: 5 * 1000
+    })
+    return Promise.reject(response)
+  }  // 没有res.data
+  Message({
+    message: `请求错误:${response.statusText}`,
+    type: 'error',
+    duration: 5 * 1000
+  })
+  console.log('请求错误', response)
+  return Promise.reject(response)
+}, (error) => {
+  Message({
+    message: `请求失败:${error.statusText}`,
+    type: 'error',
+    duration: 5 * 1000
+  })
+  console.log('请求失败', error)
+  return Promise.reject(error)
+})
+
+export default service

+ 9 - 0
src/views/brandFactory/factoryList/index.vue

@@ -160,6 +160,13 @@
                   </el-radio-group>
                 </el-form-item>
 
+                <el-form-item label="支持的支付类型" prop="payType">
+                  <el-radio-group v-model="ruleForm.payType">
+                    <el-radio :label="9">惠市宝</el-radio>
+                    <el-radio :label="4">通联</el-radio>
+                    <el-radio :label="0">无</el-radio>
+                  </el-radio-group>
+                </el-form-item>
                 <el-form-item label="是否支持代金券" prop="isVoucher">
                   <el-radio-group v-model="ruleForm.isVoucher">
                     <el-radio :disabled="disabled" :label="1">
@@ -336,6 +343,7 @@ export default {
         chargePersonName: '', // 店铺负责人
         chargePersonPhone: '', // 负责人电话
         shopType: 1, // 店铺类型 1商城 2本地
+        payType: 0, // 支付类型
         isVoucher: 1, // 是否支持代金卷 1 true 2 false
         shopAdress: '', // 地址
         effectiveDate: '', // 生效日期
@@ -588,6 +596,7 @@ export default {
         effectiveDate: '', // 生效日期
         effectiveYear: '', // 生效年限
         shopType: 1, // 商家类型 1 商家 2 本地
+        payType: 0, // 支付类型
         isVoucher: 1, // 是否支持代金卷 1 true 2 false
         contractState: 1, // 合同状态 1-有效 0-无效
         auditLive: 1,

+ 7 - 0
src/views/business/businessList/components/DetailModal.vue

@@ -8,6 +8,12 @@
       <el-form-item label="店铺名称" prop="shopName">
         {{ formData.shopName || '--' }}
       </el-form-item>
+      <el-form-item label="支持的支付类型" prop="payType">
+        <span v-if="formData.payType === 9">惠市宝</span>
+        <span v-else-if="formData.payType === 4">通联</span>
+        <span v-else-if="formData.payType === 0">无</span>
+        <span v-else>--</span>
+      </el-form-item>
       <el-form-item label="是否支持代金券" prop="isVoucher">
         <span v-if="formData.isVoucher === 1">允许</span>
         <span v-else-if="formData.isVoucher === 2">拒绝</span>
@@ -149,6 +155,7 @@ export default {
         effectiveDate: '', // 生效日期
         effectiveYear: '', // 生效年限
         shopType: 2, // 商家类型 1 商家 2 本地
+        payType: 0, // 支付类型
         isVoucher: 1, // 是否支持代金卷 1 true 2 false
         voucherReturn: '',
         contractState: 1, // 合同状态 1-有效 0-无效

+ 8 - 0
src/views/business/businessList/components/EditModal.vue

@@ -9,6 +9,13 @@
                 <el-form-item label="店铺名称" prop="shopName">
                   <el-input v-model="formData.shopName" maxlength="20" />
                 </el-form-item>
+                <el-form-item label="支持的支付类型" prop="payType">
+                  <el-radio-group v-model="formData.payType">
+                    <el-radio :label="9">惠市宝</el-radio>
+                    <el-radio :label="4">通联</el-radio>
+                    <el-radio :label="0">无</el-radio>
+                  </el-radio-group>
+                </el-form-item>
                 <el-form-item label="是否支持代金券" prop="isVoucher">
                   <el-radio-group v-model="formData.isVoucher">
                     <el-radio :label="1">
@@ -255,6 +262,7 @@ export default {
         effectiveDate: '', // 生效日期
         effectiveYear: '', // 生效年限
         shopType: 2, // 商家类型 1 商家 2 本地
+        payType: 0, // 支付类型
         isVoucher: 1, // 是否支持代金卷 1 true 2 false
         voucherReturn: '',
         contractState: 1, // 合同状态 1-有效 0-无效

+ 66 - 0
src/views/dashboard/chidRoutes/consumerManagement/index.scss

@@ -0,0 +1,66 @@
+ //  混入使用弹性布局
+ @mixin flex($justify, $flexDir: flase, $gap: 0rpx) {
+    display: flex;
+    align-items: center;
+    @if $justify {
+      justify-content: $justify;
+    }
+    @if $flexDir {
+      flex-direction: $flexDir;
+    }
+    gap: $gap;
+  }
+
+  .consumerManagement{
+    padding: 24px;
+    height: calc(100vh - 50px);
+    box-sizing: border-box;
+    @include flex(center,column,null);
+    .top-all{
+        background-color: #ffffff;
+        width: 100%;
+        height: 130px;
+        padding: 0 24px;
+        @include flex(space-between,null,null);
+        .top-item{
+            width: 383px;
+            height: 98px;
+            background-color: #EFF4FF;
+            padding: 12px 0 12px 24px;
+            p{
+                margin-top: 4px;
+                &:first-of-type{
+                    color: #3A68F2;
+                    font-size: 32px;
+                     font-weight: 600;
+                }
+                &:last-of-type{
+                    color: #424E66;
+                    font-size: 14px;
+                }
+            }
+        }
+    }
+    .bottom-list{
+        flex: 1;
+        width: 100%;
+        background-color: #ffffff;
+        margin-top: 16px;
+        padding: 10px 24px;
+        box-sizing: border-box;
+    }
+  }
+
+
+  ::v-deep .el-tabs__active-bar{
+    height: 3px;
+    background-color: #3A68F2;
+  }
+  ::v-deep .el-tabs__item.is-active{
+    color: #3A68F2;
+  }
+  ::v-deep .el-tabs__item {
+    &:hover{
+        color: #3A68F2;
+    }
+  }

+ 32 - 0
src/views/dashboard/chidRoutes/consumerManagement/index.vue

@@ -0,0 +1,32 @@
+<template>
+  <div class="consumerManagement">
+    <div class="top-all">
+      <div class="top-item" v-for="item in 4" :key="item">
+        <p>4432</p>
+        <p>今日总支付消费金</p>
+      </div>
+    </div>
+    <div class="bottom-list">
+      <div class="tab-box">
+        <el-tabs v-model="activeName">
+          <el-tab-pane label="商圈" name="first">商圈</el-tab-pane>
+          <el-tab-pane label="商城" name="second">商城</el-tab-pane>
+        </el-tabs>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+    data () {
+        return {
+            activeName: 'first'
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+@import "./index.scss";
+</style>

+ 17 - 0
src/views/dashboard/data/childRoute.js

@@ -0,0 +1,17 @@
+
+
+// 统计页面的子路由在这里填写
+const chidRoutes = [
+    {
+        name:"consumerManagement",
+        path:"/dashboard/consumerManagement",
+        hidden:true,
+        component:() => import("@/views/dashboard/chidRoutes/consumerManagement/index.vue"),
+        meta:{
+            title:"支付查询"
+        }
+    }
+]
+
+
+export default chidRoutes

+ 1 - 0
src/views/finance/application/components/DetailModal.vue

@@ -88,6 +88,7 @@
             </el-table-column>
             <el-table-column align="center" min-width="80" prop="sourceId" label="来源Id" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" width="150" prop="orderFormid" label="来源订单编号" show-overflow-tooltip />
+            <el-table-column align="center" width="150" prop="transactionId" label="支付单号" show-overflow-tooltip />
             <el-table-column align="center" width="150" prop="commissionNumber" label="入账数量" show-overflow-tooltip />
             <el-table-column align="center" label="活动配置类型" prop="waterType">
               <template slot-scope="{ row }">

+ 9 - 0
src/views/lotteryManagement/LotteryPrizes/components/DetailModal.vue

@@ -35,8 +35,15 @@
         <span v-if="formData.prizeType === -1">谢谢参与</span>
         <span v-else-if="formData.prizeType === 1">普通奖品</span>
         <span v-else-if="formData.prizeType === 2">唯一性奖品</span>
+        <span v-else-if="formData.prizeType === 3">代金券</span>
+        <span v-else-if="formData.prizeType === 4">消费金</span>
+        <span v-else-if="formData.prizeType === 5">现金余额</span>
+        <span v-else-if="formData.prizeType === 6">优惠券</span>
         <span v-else>--</span>
       </el-form-item>
+      <el-form-item label="num字段" prop="prizeNum">
+        {{ typeof formData.prizeNum === 'number' ? formData.prizeNum : '--' }}
+      </el-form-item>
       <el-form-item label="总库存" prop="totalStock">
         {{ typeof formData.totalStock === 'number' ? formData.totalStock : '--' }}
       </el-form-item>
@@ -75,6 +82,7 @@ export default {
         lotteryId: '',
         prizeName: '',
         prizeType: '',
+        prizeNum: '',
         totalStock: '',
         validStock: '',
         remark: ''
@@ -101,6 +109,7 @@ export default {
           lotteryId: res.data.lotteryId || '',
           prizeName: res.data.prizeName || '',
           prizeType: res.data.prizeType,
+          prizeNum: res.data.prizeNum,
           totalStock: res.data.totalStock,
           validStock: res.data.validStock,
           remark: res.data.remark || ''

+ 31 - 2
src/views/lotteryManagement/LotteryPrizes/components/EditModal.vue

@@ -13,12 +13,35 @@
         </el-select>
       </el-form-item>
       <el-form-item label="奖品类型" prop="prizeType">
-        <el-select v-model="formData.prizeType" size="mini" placeholder="请选择任务状态">
+        <el-select
+          v-model="formData.prizeType" size="mini" placeholder="请选择奖品类型"
+          @change="(e) => formData.prizeNum = ''"
+        >
           <el-option label="谢谢参与" :value="-1" />
           <el-option label="普通奖品" :value="1" />
           <el-option label="唯一性奖品" :value="2" />
+          <el-option label="代金券" :value="3" />
+          <el-option label="消费金" :value="4" />
+          <el-option label="现金余额" :value="5" />
+          <el-option label="优惠券" :value="6" />
         </el-select>
       </el-form-item>
+      <div>
+        <el-form-item
+          v-if="formData.prizeType === 6" :label="`${'num字段'}\n${'(优惠券活动ID)'}`" prop="prizeNum"
+          style="white-space: pre-wrap;"
+        >
+          <el-select v-model="formData.prizeNum" size="mini" placeholder="请选择优惠券活动" filterable>
+            <el-option
+              v-for="(item, index) in couponDataList" :key="item.activityId" :label="`${item.activityName}(${item.activityId})`"
+              :value="item.id"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item v-else prop="prizeNum" label="num字段">
+          <el-input v-model="formData.prizeNum" placeholder="请输入num字段(数量/商品ID)" style="width: 250px;"></el-input>
+        </el-form-item>
+      </div>
       <el-form-item prop="totalStock" label="总库存">
         <el-input v-model="formData.totalStock" placeholder="请输入总库存" style="width: 250px;"></el-input>
       </el-form-item>
@@ -45,6 +68,7 @@
 <script>
 import { saveLotteryPrize, updateLotteryPrize, getByIdLotteryPrize } from '@/api/lotteryManagement/LotteryPrizes'
 import { getPageLotteryActivities } from '@/api/lotteryManagement/lotteryActivities'
+import { getCouponData } from '@/api/active/active_coupon.js'
 
 export default {
   name: 'EditModal',
@@ -63,6 +87,7 @@ export default {
         lotteryId: '',
         prizeName: '',
         prizeType: '',
+        prizeNum: '',
         totalStock: '',
         validStock: '',
         remark: ''
@@ -86,7 +111,8 @@ export default {
           { pattern: /^(0|[1-9][0-9]*)$/, message: '请输入正整数' }
         ]
       },
-      activityList: []
+      activityList: [],
+      couponDataList: []
     }
   },
   methods: {
@@ -96,6 +122,8 @@ export default {
     async initList() {
       const res1 = await getPageLotteryActivities({ page: 1, pageSize: 9999 })
       this.activityList = res1.data.list
+      const res2 = await getCouponData({ activityName: '', state: 3, page: 1, pageSize: 9999 })
+      this.couponDataList = res2.data.list
     },
     handleOpen(params = {}) {
       this.modalOptions.title = params.id ? '编辑抽奖奖品' : '添加抽奖奖品'
@@ -117,6 +145,7 @@ export default {
           lotteryId: res.data.lotteryId || '',
           prizeName: res.data.prizeName || '',
           prizeType: res.data.prizeType,
+          prizeNum: res.data.prizeNum,
           totalStock: res.data.totalStock,
           validStock: res.data.validStock,
           remark: res.data.remark || ''

+ 6 - 1
src/views/lotteryManagement/LotteryPrizes/index.vue

@@ -5,7 +5,7 @@
       <el-input
         v-model="listQuery.itemName" clearable size="mini" class="filter-item"
         style="width: 200px;"
-        placeholder="请输入奖名称"
+        placeholder="请输入奖名称"
       />
       <el-button
         size="mini" class="filter-item" type="primary" icon="el-icon-search"
@@ -50,9 +50,14 @@
             <el-tag v-if="row.prizeType === -1" effect="plain">谢谢参与</el-tag>
             <el-tag v-else-if="row.prizeType === 1" effect="plain">普通奖品</el-tag>
             <el-tag v-else-if="row.prizeType === 2" effect="plain">唯一性奖品</el-tag>
+            <el-tag v-else-if="row.prizeType === 3" effect="plain">代金券</el-tag>
+            <el-tag v-else-if="row.prizeType === 4" effect="plain">消费金</el-tag>
+            <el-tag v-else-if="row.prizeType === 5" effect="plain">现金余额</el-tag>
+            <el-tag v-else-if="row.prizeType === 6" effect="plain">优惠券</el-tag>
             <span v-else>--</span>
           </template>
         </el-table-column>
+        <el-table-column align="center" min-width="100" label="num字段" prop="prizeNum" />
         <el-table-column align="center" width="120" label="总库存" prop="totalStock" />
         <el-table-column align="center" width="120" label="可用库存" prop="validStock" />
         <el-table-column align="center" min-width="150" label="备注" prop="remark" show-overflow-tooltip />

+ 151 - 0
src/views/order/pending/components/PaymentStatusUpdate.vue

@@ -0,0 +1,151 @@
+<template>
+  <el-dialog
+    :visible.sync="visible"
+    v-bind="modalOptions"
+    append-to-body
+    @close="handleClose"
+  >
+    <el-form
+      ref="formData"
+      :model="formData"
+      :rules="formRules"
+      size="mini"
+      label-suffix=":"
+      label-width="150px"
+    >
+      <el-form-item label="客户方子订单编号" prop="orderFormId">
+        <el-input
+          v-model="formData.orderFormId" maxlength="20" placeholder="客户方子订单编号" disabled
+        />
+      </el-form-item>
+      <el-form-item label="号码类型" prop="numberType">
+        <el-radio-group
+          v-model="formData.numberType"
+          @input="(e) => e === 1 ? (formData.transactionId = '') : e === 2 ? (formData.outTradeNO = '') : ''"
+        >
+          <el-radio :label="1">客户方支付主订单编号</el-radio>
+          <el-radio :label="2">三方流水号</el-radio>
+        </el-radio-group>
+      </el-form-item>
+      <el-form-item v-if="formData.numberType === 1" label="客户方支付主订单编号" prop="outTradeNO">
+        <el-input v-model="formData.outTradeNO" placeholder="请输入客户方支付主订单编号" />
+      </el-form-item>
+      <el-form-item v-else-if="formData.numberType === 2" label="三方流水号" prop="transactionId">
+        <el-input v-model="formData.transactionId" placeholder="请输入三方流水号" />
+      </el-form-item>
+      <el-form-item label="支付方式" prop="paymentMode">
+        <el-select
+          v-model="formData.paymentMode" size="mini"
+          style="width: 240px;" placeholder="请选择支付方式(三方流水号共存)"
+        >
+          <el-option label="惠市宝" :value="9" />
+          <el-option label="通联" :value="4" />
+        </el-select>
+      </el-form-item>
+    </el-form>
+    <template #footer>
+      <span class="dialog-footer">
+        <el-button size="mini" @click="handleClose">取 消</el-button>
+        <el-button type="primary" size="mini" @click="handleSubmit">确 定</el-button>
+      </span>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+import { syncLocalOrderStatusPaid } from '@/api/order'
+
+export default {
+  name: 'PaymentStatusUpdate',
+  components: {
+  },
+  data() {
+    return {
+      modalOptions: {
+        closeOnClickModal: false,
+        width: '620px',
+        title: ''
+      },
+      visible: false,
+      formData: {
+        orderFormId: '',
+        numberType: 2, // 后端无需
+        outTradeNO: '',
+        transactionId: '',
+        paymentMode: ''
+      },
+      formRules: {
+        orderFormId: [
+          { required: true, message: '缺少客户方子订单编号' }
+        ],
+        numberType: [
+          { required: true, message: '缺少号码类型' }
+        ],
+        outTradeNO: [],
+        transactionId: [
+          { required: true, message: '请输入三方流水号' }
+        ]
+      }
+    }
+  },
+  watch: {
+    'formData.numberType': {
+      deep: true,
+      handler(val) {
+        if (val === 1) {
+          this.formRules.outTradeNO = [
+            { required: true, message: '请输入客户方支付主订单编号' }
+          ]
+          this.formRules.transactionId = []
+        } else if (val === 2) {
+          this.formRules.outTradeNO = []
+          this.formRules.transactionId = [
+            { required: true, message: '请输入三方流水号' }
+          ]
+        }
+      }
+    }
+  },
+  methods: {
+    handleClose() {
+      this.visible = false
+    },
+    initList() {
+    },
+    handleOpen(params = {}) {
+      this.modalOptions.title = '同步支付状态'
+      this.$refs.formData && this.$refs.formData.resetFields()
+      this.formData.orderFormId = params.orderFormid
+      // this.formData = Object.assign(this.$options.data().formData, params)
+      this.visible = true
+      this.initList()
+    },
+    handleSubmit() {
+      this.$refs.formData.validate(async (valid) => {
+        if (valid) {
+          const loading = this.$loading({ text: '加载中' })
+          try {
+            const { ...otps } = this.formData
+            const params = {
+              ...otps
+            }
+            await syncLocalOrderStatusPaid(params)
+            loading.close()
+            this.$message({ message: `操作成功!`, type: 'success' })
+            this.$emit('success')
+            this.visible = false
+          } catch (e) {
+            loading.close()
+          } finally {
+            loading.close()
+          }
+        } else {
+          this.$message({ message: '请输入相关信息', type: 'warning' })
+          return false
+        }
+      })
+    }
+  }
+}
+</script>
+

+ 13 - 2
src/views/order/pending/index.vue

@@ -41,6 +41,7 @@
             <el-option label="收件人手机号" value="4" />
             <!-- <el-option label="商品ID" value="5" /> -->
             <el-option label="下单号码" value="6" />
+            <el-option label="订单编号" value="7" />
           </el-select>
         </template>
       </el-input>
@@ -126,11 +127,17 @@
         </el-table-column>
         <el-table-column align="center" label="收件人" prop="receiveName" show-overflow-tooltip />
         <el-table-column align="center" label="手机号" prop="receivePhone" show-overflow-tooltip />
-        <el-table-column align="center" label="操作" width="120" fixed="right" class-name="small-padding fixed-width">
+        <el-table-column align="center" label="操作" width="180" fixed="right" class-name="small-padding fixed-width">
           <template slot-scope="{ row }">
             <el-button type="warning" size="mini" @click="handleDetail(row)">
               详情
             </el-button>
+            <el-button
+              v-if="row.state === 1" type="danger" size="mini"
+              @click="$refs.PaymentStatusUpdate && $refs.PaymentStatusUpdate.handleOpen(row)"
+            >
+              同步支付状态
+            </el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -148,6 +155,8 @@
     <el-dialog title="订单详情" :visible.sync="detailVisible" width="74%" center :close-on-click-modal="false">
       <OrderDetail :detail-row="form" @cancel="detailVisible = false" />
     </el-dialog>
+    <!-- 同步支付状态 -->
+    <PaymentStatusUpdate ref="PaymentStatusUpdate" @success="getList" />
 
     <el-dialog title="选择导出模版" :visible.sync="exportExcelVisible" center :close-on-click-modal="false">
       <el-radio-group v-model="exportTemplate">
@@ -169,11 +178,13 @@
 
 <script>
 import OrderDetail from './components/pendDetails'
+import PaymentStatusUpdate from './components/PaymentStatusUpdate'
 import { orderGetAll, orderExport } from '@/api/order'
 export default {
   name: 'Pending',
   components: {
-    OrderDetail
+    OrderDetail,
+    PaymentStatusUpdate
   },
   data() {
     return {

+ 6 - 1
src/views/relationshipChainManagement/commissionLog/index.vue

@@ -10,6 +10,10 @@
         v-model="listQuery.superiorPhone" clearable size="mini" class="filter-item"
         style="width: 200px;margin-left: 10px;" placeholder="请输入绑定上级手机号码"
       />
+      <el-input
+        v-model="listQuery.orderFormid" clearable size="mini" class="filter-item"
+        style="width: 200px;margin-left: 10px;" placeholder="请输入关联订单编号"
+      />
       <el-button
         size="mini" class="filter-item" type="primary" icon="el-icon-search"
         style="margin-left:10px;"
@@ -101,7 +105,8 @@ export default {
         page: 1,
         pageSize: 20,
         phone: '',
-        superiorPhone: ''
+        superiorPhone: '',
+        orderFormid:""
       }
     }
   },

+ 4 - 4
src/views/renovation/commoditySystem/components/ProductReview.vue

@@ -3,7 +3,7 @@
     :visible.sync="visible"
     v-bind="modalOptions"
     append-to-body
-    @close="diaClose""
+    @close="handleClose"
   >
     <el-form
       ref="formData"
@@ -93,11 +93,11 @@ export default {
       //  重置表单
       this.$refs.formData && this.$refs.formData.resetFields()
       this.formData.productId = params.productId
-      console.log(params.productId,this.formData.productId);
+      console.log(params.productId, this.formData.productId)
       // this.formData = Object.assign(this.$options.data().formData, params)
       this.visible = true
       // this.initList()
-      // this.$refs.formData && 
+      // this.$refs.formData &&
     },
     handleSubmit() {
       this.$refs.formData.validate(async (valid) => {
@@ -129,7 +129,7 @@ export default {
       })
     },
     //  关闭弹框 重置 id
-    diaClose(){
+    diaClose() {
       // this.formData.productId = ''
     }
   }