Forráskód Böngészése

销售端红包充值

xgb 6 napja
szülő
commit
2394b805a7

+ 1 - 1
src/api/company/companyRecharge.js

@@ -63,7 +63,7 @@ export function recharge(data) {
 
 export function redRecharge(data) {
   return request({
-    url: '/his/company/redRecharge',
+    url: '/company/companyRedPacketBalanceLogs/redRecharge',
     method: 'post',
     data: data
   })

+ 36 - 2
src/views/company/companyRecharge/index.vue

@@ -24,6 +24,16 @@
               />
         </el-select>
       </el-form-item>
+      <el-form-item label="业务类型" prop="businessType">
+        <el-select v-model="queryParams.businessType" placeholder="请选择支付类型" clearable size="small">
+          <el-option
+            v-for="dict in businessTypeOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
 
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -51,6 +61,7 @@
           type="primary"
           icon="el-icon-edit"
           @click="handleRedRecharge"
+          v-if="showRedPacket"
           v-hasPermi="['company:companyRecharge:Recharge']"
         >红包充值</el-button>
       </el-col>
@@ -67,6 +78,11 @@
               <el-tag prop="status" v-for="(item, index) in payTypeOptions"   v-if="scope.row.payType==item.dictValue">{{item.dictLabel}}</el-tag>
         </template>
       </el-table-column>
+      <el-table-column label="业务类型" align="center" prop="businessType">
+        <template slot-scope="scope">
+          <dict-tag :options="businessTypeOptions" :value="scope.row.businessType"/>
+        </template>
+      </el-table-column>
       <el-table-column label="凭证照片" align="center" prop="images" >
         <template slot-scope="scope">
           <div v-if="scope.row.imgs != null && scope.row.imgs != undefined && scope.row.imgs != ''">
@@ -195,11 +211,14 @@
 <script>
 import { listCompanyRecharge, getCompanyRecharge, delCompanyRecharge, addCompanyRecharge, updateCompanyRecharge, exportCompanyRecharge, recharge, redRecharge, getCompanyRedPacketBalance } from "@/api/company/companyRecharge";
 import { getInfo } from '@/api/login';
+import { getConfigByKey } from '@/api/company/companyConfig'
 export default {
   name: "CompanyRecharge",
   data() {
     return {
-
+      // 业务类型 0-普通 1-红包充值
+      businessTypeOptions:[],
+      showRedPacket: false,
       payTypeOptions:[],
       statusOptions:[],
       // 遮罩层
@@ -229,7 +248,8 @@ export default {
         money: null,
         rechargeNo: null,
         payTime: null,
-        status: null
+        status: null,
+        businessType:null, // 业务类型
       },
       // 表单参数
       form: {},
@@ -277,6 +297,19 @@ export default {
     this.getDicts("comapny_recharge_pay_type").then((response) => {
       this.payTypeOptions = response.data;
     });
+    this.getDicts("sys_company_pay_business_type").then(response => {
+      this.businessTypeOptions = response.data;
+    });
+    getConfigByKey("course.config").then(response => {
+      if(response.data && response.data.configValue) {
+        const  config = JSON.parse(response.data.configValue);
+        if( config.isRedPackageBalanceDeduction && config.isRedPackageBalanceDeduction==1){
+          this.showRedPacket=true
+        }
+      } else {
+        this.showRedPacket = false;
+      }
+    });
     this.getList();
   },
   methods: {
@@ -315,6 +348,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.queryParams.businessType=null;
       this.handleQuery();
     },
     // 多选框选中数据

+ 1 - 1
src/views/company/companyRedPacketBalanceLogs/index.vue

@@ -188,7 +188,7 @@ export default {
   },
   created() {
 
-    this.getDicts("sys_company_money_logs_type").then(response => {
+    this.getDicts("company_red_packet_balance_type").then(response => {
       this.logsTypeOptions = response.data;
     });
     getCompanyList().then(response => {