Bladeren bron

2024.04.27
- 商家列表页增加是否支持交易金字段显示

zweiqin 11 maanden geleden
bovenliggende
commit
8206177283

+ 50 - 117
src/views/business/businessList/index.vue

@@ -38,12 +38,19 @@
             <template slot-scope="scope">{{ scope.row.shopName }}</template>
           </el-table-column>
           <el-table-column prop="shopCode" label="店铺编码" />
-					<el-table-column align="center" min-width="120" label="商家交易金提现比例" prop="beecoinRatio">
+          <el-table-column label="是否支持交易金">
+            <template slot-scope="scope">
+              <span v-if="scope.row.isBeeCoin === 1">支持</span>
+              <span v-else-if="scope.row.isBeeCoin === 2">不支持</span>
+              <span v-else>--</span>
+            </template>
+          </el-table-column>
+					<!-- <el-table-column align="center" min-width="120" label="商家交易金提现比例" prop="beecoinRatio">
 						<template slot-scope="{ row }">
 							<span v-if="row.beeCoinRatio">{{ row.beeCoinRatio }}:1</span>
 							<span v-else>--</span>
 						</template>
-					</el-table-column>
+					</el-table-column> -->
           <el-table-column prop="chargePersonName" label="负责人" />
           <el-table-column prop="chargePersonPhone" label="联系电话" />
           <el-table-column label="合同状态">
@@ -96,7 +103,17 @@
                 <el-form-item label="店铺名称" prop="shopName">
                   <el-input v-model="ruleForm.shopName" maxlength="20" :disabled="disabled" />
                 </el-form-item>
-                <el-form-item label="商家交易金提现比例" prop="beeCoinRatio">
+                <el-form-item label="是否支持交易金" prop="isBeeCoin">
+                  <el-radio-group v-model="ruleForm.isBeeCoin">
+                    <el-radio :disabled="disabled" :label="1">
+                      支持
+                    </el-radio>
+                    <el-radio :disabled="disabled" :label="2">
+                      不支持
+                    </el-radio>
+                  </el-radio-group>
+                </el-form-item>
+                <el-form-item v-if="ruleForm.isBeeCoin === 1" label="商家交易金提现比例" prop="beeCoinRatio">
                   <el-input v-model="ruleForm.beeCoinRatio" type="text" :disabled="disabled" placeholder="商家交易金提现比例"
                     style="width: 50%" />
                   <span style="margin-left: 10px;">:1</span>
@@ -348,6 +365,7 @@ export default {
       disabled: false,
       ruleForm: {
         shopName: '', // 店铺名称
+        isBeeCoin: '', // 是否支持交易金
         beeCoinRatio: '', // 商家交易金提现比例
         chargePersonName: '', // 店铺负责人
         chargePersonPhone: '', // 负责人电话
@@ -377,129 +395,38 @@ export default {
       personPhone: '',
 
       rulesInfo: {
-        beeCoinRatio: [
-          { required: true, message: '请输入商家交易金提现比例', trigger: 'blur' }
-        ],
-        effectiveYear: [
-          { required: true, message: '请输入生效时限', trigger: 'blur' }
-        ],
-        shopName: [
-          { required: true, message: '请输入店铺名称', trigger: 'blur' }
-        ],
-        chargePersonName: [
-          { required: true, message: '请输入店铺负责人', trigger: 'blur' }
-        ],
+        isBeeCoin: [ { required: true, message: '请选择是否支持交易金', trigger: 'change' } ],
+        // beeCoinRatio: [ { required: true, message: '请输入商家交易金提现比例', trigger: 'blur' }],
+        effectiveYear: [ { required: true, message: '请输入生效时限', trigger: 'blur' } ],
+        shopName: [ { required: true, message: '请输入店铺名称', trigger: 'blur' } ],
+        chargePersonName: [ { required: true, message: '请输入店铺负责人', trigger: 'blur' } ],
         chargePersonPhone: [
           { required: true, message: '请输入负责人电话', trigger: 'blur' },
-          {
-            pattern: /^1[3456789]\d{9}$/,
-            message: '目前只支持中国大陆的手机号码'
-          }
-        ],
-        shopAdress: [
-          { required: true, message: '请输入地址', trigger: 'blur' }
-        ],
-        contractState: [
-          {
-            required: true,
-            message: '请选择合同状态',
-            trigger: 'change'
-          }
-        ],
-        shopType: [
-          {
-            required: true,
-            message: '请选择店铺类型',
-            trigger: 'change'
-          }
-        ],
-        perCapita: [
-          { required: true, message: "请输入人均消费额", trigger: "blur" }
+          { pattern: /^1[3456789]\d{9}$/, message: '目前只支持中国大陆的手机号码' }
         ],
-        shopBrief: [{
-          required: true,
-          message: "请填写商家介绍",
-          trigger: "blur"
-        }],
-        isVoucher: [
-          {
-            required: true,
-            message: '请选择是否允许使用代金卷',
-            trigger: 'change'
-          }
-        ], // 是否支持代金卷 1 true 2 false
-        auditLive: [
-          {
-            required: true,
-            message: '请选择状态',
-            trigger: 'change'
-          }
-        ],
-        auditLiveProduct: [
-          {
-            required: true,
-            message: '请选择状态',
-            trigger: 'change'
-          }
-        ],
-        effectiveDate: [
-          {
-            required: true,
-            message: '请选择日期',
-            trigger: 'change'
-          }
-        ],
-        score: [
-          {
-            required: true,
-            message: '请选择商家评分',
-            trigger: 'change'
-          }
-        ],
-        monthlySales: [
-          {
-            required: true,
-            message: '请输入商家月售额',
-            trigger: 'trigger'
-          }
-        ],
-        // advertisement: [
-        //   {
-        //     required: true,
-        //     message: '请上传广告图',
-        //     trigger: 'trigger'
-        //   }
-        // ],
-        areaId: [
-          {
-            required: true,
-            message: "请选择地址",
-            trigger: 'blur'
-          }
-        ],
-        longitude: [
-          {
-            required: true,
-            message: "请选择商家经纬度",
-            trigger: 'blur'
-          }
-        ]
+        shopAdress: [ { required: true, message: '请输入地址', trigger: 'blur' } ],
+        contractState: [ { required: true, message: '请选择合同状态', trigger: 'change' } ],
+        shopType: [ { required: true, message: '请选择店铺类型', trigger: 'change' } ],
+        perCapita: [ { required: true, message: "请输入人均消费额", trigger: "blur" } ],
+        shopBrief: [ { required: true, message: "请填写商家介绍", trigger: "blur" } ],
+        isVoucher: [ { required: true, message: '请选择是否允许使用代金卷', trigger: 'change' } ], // 是否支持代金卷 1 true 2 false
+        auditLive: [ { required: true, message: '请选择状态', trigger: 'change' } ],
+        auditLiveProduct: [ { required: true, message: '请选择状态', trigger: 'change' } ],
+        effectiveDate: [ { required: true, message: '请选择日期', trigger: 'change' } ],
+        score: [ { required: true, message: '请选择商家评分', trigger: 'change' } ],
+        monthlySales: [ { required: true, message: '请输入商家月售额', trigger: 'trigger' } ],
+        // advertisement: [ { required: true, message: '请上传广告图', trigger: 'trigger' } ],
+        areaId: [ { required: true, message: "请选择地址", trigger: 'blur' } ],
+        longitude: [ { required: true, message: "请选择商家经纬度", trigger: 'blur' } ]
       },
       rules: {
         shopPhone: [
           { required: true, message: '请输入账号', trigger: 'blur' },
-          {
-            pattern: /^1[3456789]\d{9}$/,
-            message: '目前只支持中国大陆的手机号码'
-          }
+          { pattern: /^1[3456789]\d{9}$/, message: '目前只支持中国大陆的手机号码' }
         ],
         shopPassword: [
           { required: true, message: '请输入密码', trigger: 'blur' },
-
-          {
-            pattern: /^[~!@#$%^&*\-+=_.0-9a-zA-Z]{8,16}$/,
-            message: '8-16密码数字英文混合'
-          }
+          { pattern: /^[~!@#$%^&*\-+=_.0-9a-zA-Z]{8,16}$/, message: '8-16密码数字英文混合' }
         ]
       },
       total: 1,
@@ -568,6 +495,7 @@ export default {
       this.personPhone = ''
       this.ruleForm = {
         shopName: '', // 店铺名称
+        isBeeCoin: '', // 是否支持交易金
         beeCoinRatio: '', // 商家交易金提现比例
         chargePersonName: '', // 店铺负责人
         chargePersonPhone: '', // 负责人电话
@@ -626,7 +554,12 @@ export default {
             this.$message.error('请输入生效日期')
             return
           }
-          if (submitData.beeCoinRatio === '') {
+          if (!(typeof submitData.isBeeCoin === 'number')) {
+						console.log(submitData)
+            this.$message.error('请选择是否支持交易金')
+            return
+          }
+          if ((submitData.isBeeCoin === 1) && !submitData.beeCoinRatio) {
             this.$message.error('请输入商家交易金提现比例')
             return
           }

+ 1 - 1
src/views/finance/withdrawal/components/RelatedCommissionLogs.vue

@@ -74,7 +74,7 @@
         <el-table-column align="center" min-width="100" label="佣金比例" prop="proportion">
           <template slot-scope="{ row }">
             <span>
-              {{ typeof row.proportion === Number ? `${row.proportion * 100}%` : '--' }}
+              {{ typeof row.proportion === 'number' ? `${row.proportion * 100}%` : '--' }}
             </span>
           </template>
         </el-table-column>

+ 3 - 3
vue.config.js

@@ -41,7 +41,7 @@ module.exports = {
     // before: require('./mock/mock-server.js'),
     proxy: {
       '/api': {
-        target: 'https://nsadminapitest.tuanfengkeji.cn', // 测试
+        target: 'https://nsadminapi.tuanfengkeji.cn', // 测试
         // target: 'http://192.168.0.91:9103', // 平台端
         // target: 'http://192.168.0.91:9003', // 商家端
         changeOrigin: true,
@@ -50,7 +50,7 @@ module.exports = {
         }
       },
       '/adminapi': {
-        target: 'https://nsadminapitest.tuanfengkeji.cn', // 测试
+        target: 'https://nsadminapi.tuanfengkeji.cn', // 测试
         // target: 'http://192.168.0.91:9103', // 平台端
         // target: 'http://192.168.0.91:9003', // 商家端
         changeOrigin: true,
@@ -59,7 +59,7 @@ module.exports = {
         }
       },
       '/': {
-        target: 'https://nsadminapitest.tuanfengkeji.cn', // 测试
+        target: 'https://nsadminapi.tuanfengkeji.cn', // 测试
         // target: 'http://192.168.0.91:9103', // 平台端
         // target: 'http://192.168.0.91:9003', // 商家端
         changeOrigin: true