MONSTER-ygh vor 1 Jahr
Ursprung
Commit
fb43638c13

+ 9 - 0
src/api/distribution/ticketMr.js

@@ -51,3 +51,12 @@ export const seatPricePageList = (query) => {
     params: query
   })
 }
+
+// 税率设置
+export function setTaxRateApi(data){
+  return request({
+    url: '/member/marketPersonsBrokerageConfig/setTaxRate',
+    method: 'post',
+    data: data
+  })
+}

+ 1 - 1
src/api/ticketMr/ticketMr.js

@@ -59,4 +59,4 @@ export function basePositionApi(data) {
     method: 'get',
     params:data
   })
-}
+}

+ 2 - 2
src/views/distribution/personnelMr/dialog/addAndEdit.vue

@@ -61,7 +61,7 @@
             style="width: 100%;"
           />
         </el-form-item>
-        <el-form-item label="上级分销人员:" prop="parentId">
+        <!-- <el-form-item label="上级分销人员:" prop="parentId">
           <el-select
             v-model="form.parentId"
             filterable
@@ -78,7 +78,7 @@
               :value="item.id">
             </el-option>
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="是否可提现:" prop="allowWithdraw">
           <el-radio-group v-model="form.allowWithdraw">
             <el-radio v-for="dict in dict.type.user_allow_withdraw"

+ 2 - 2
src/views/distribution/personnelMr/index.vue

@@ -210,7 +210,7 @@
             <template slot="append">{{ setForm.type == 2 ? '%' : '元' }}</template>
           </el-input>
         </el-form-item>
-        <el-form-item label="提现门槛" prop="withdrawMinMoney">
+        <!-- <el-form-item label="提现门槛" prop="withdrawMinMoney">
           <div>
             <el-input
               type="number"
@@ -224,7 +224,7 @@
             <span style="margin-left: 5px">元以上方可提现</span>
           </div>
           <span style="font-size: 14px;color: #777;">注: 最低提现为0.3元</span>
-        </el-form-item>
+        </el-form-item> -->
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="setStatus = false">取消</el-button>

+ 148 - 0
src/views/distribution/ticketMr/dialog/setTaxRate.vue

@@ -0,0 +1,148 @@
+<!--
+ * @Description: 新增/编辑弹框
+ * @Author: Sugar.
+ * @Date: 2023-11-24 13:55:00
+ * @LastEditors: Sugar.
+ * @LastEditTime: 22023-11-24 13:55:00
+ * @FilePath: \cattle_webui\src\views\distribution\ticketMr\dialog\AddOrEditDialog.vue
+ * @Copyright: Copyright (c) 2016~2023 by Sugar., All Rights Reserved.
+-->
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="open"
+    width="700px"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="dialog">
+      <el-form :model="form" ref="form" :rules="rules" label-width="120px">
+        <el-form-item label="佣金税率:" prop="taxRate">
+          <el-input-number v-model="form.taxRate" controls-position="right" :min="0"></el-input-number>
+          %
+        </el-form-item>
+      </el-form>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="cancel">取消</el-button>
+      <el-button
+        type="primary"
+        @click="submitForm"
+        v-loading.fullscreen.lock="loading"
+        element-loading-text="提交中..."
+        element-loading-spinner="el-icon-loading"
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+      >
+        <span v-if="loading">提交中...</span>
+        <span v-else>保存</span>
+      </el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import { setTaxRateApi } from "@/api/distribution/ticketMr";
+export default {
+  name: "setTaxRate",
+  data() {
+    return {
+      title: "编辑",
+      model: "EDIT",
+      open: false,
+      loading: false,
+      form: {
+        id: undefined,
+      },
+      rules: {
+        taxRate: [{ required: true, message: "请输入佣金税率", trigger: ["change","blur"] }],
+      },
+    };
+  },
+  methods: {
+    /**
+     * 打开弹框
+     * @date 2023-11-22
+     * @param {any} obj
+     * @returns {any}
+     */
+    openDialog(title, obj) {
+      this.open = true;
+      this.$set(this.form,'taxRate',obj.taxRate)
+      this.$nextTick(()=>{
+        this.$refs.form.clearValidate()
+      })
+    },
+    /**
+     * 保存
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    submitForm() {
+      this.$refs["form"].validate(async (valid) => {
+        if (valid) {
+          try {
+            this.loading = true;
+            const { code } = await setTaxRateApi({ ...this.form });
+            if (code === 200) {
+              this.$message.success("操作成功!");
+              this.$emit("getList");
+              this.cancel();
+            }
+          } catch (error) {
+            console.error("error===",error)
+          } finally {
+            this.loading = false;
+          }
+        }
+      });
+    },
+    /**
+     * 重置
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    reset() {
+      this.form = {}
+      this.$refs.form.clearValidate()
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.reset();
+      this.open = false;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dialog {
+  padding: 0 30px;
+  max-height: 65vh;
+  overflow-y: auto;
+}
+.dialog {
+  padding: 0 30px;
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+}
+</style>

+ 23 - 3
src/views/distribution/ticketMr/index.vue

@@ -27,6 +27,15 @@
               v-hasPermi="['distributionTicketMr:distributionTicketMr:add']"
             >新增</el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+              type="primary"
+              plain
+              size="mini"
+              @click="handleSetTaxRateAdd"
+              v-hasPermi="['distributionTicketMr:distributionTicketMr:add']"
+            >佣金税率设置</el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -50,6 +59,7 @@
           <span v-if="scope.row.brokeragePrice || scope.row.brokeragePrice==0">¥{{ scope.row.brokeragePrice }}</span>
         </template>
       </el-table-column>
+      <el-table-column label="佣金税率(%)" align="center" prop="brokerageTaxRate" />
       <el-table-column label="状态" align="center">
         <template slot-scope="scope">
           <el-tag type="success" v-if="scope.row.status == 1">己上架</el-tag>
@@ -99,7 +109,7 @@
       :dict="dict"
       @getList="getList"
     />
-
+    <setTaxRate ref="setTaxRate"  @getList="getList" />
     <el-dialog
       title="查看"
       :visible.sync="visibleStatus"
@@ -128,11 +138,11 @@
 
 import { pageList, deleteById, updateStatus } from '@/api/distribution/ticketMr'
 import addAndEdit from "./dialog/addAndEdit.vue";
-
+import setTaxRate from "./dialog/setTaxRate.vue"
 export default {
   name: "agreement",
   dicts: ['distribution_type'],
-  components: { addAndEdit },
+  components: { addAndEdit, setTaxRate},
   data() {
     return {
       // 遮罩层
@@ -174,6 +184,7 @@ export default {
       setForm: {},
       setRules: [],
       setLoading: false,
+      taxRate: null,
     };
   },
   created() {
@@ -189,6 +200,11 @@ export default {
           this.dataList.forEach(item =>{
             item.switchValue = item.status;
           })
+          if(this.dataList && this.dataList.length>0 ){
+            this.taxRate = this.dataList[0].brokerageTaxRate
+          }else {
+            this.taxRate = null
+          }
           this.total = response.data.total;
           this.loading = false;
         }
@@ -222,6 +238,10 @@ export default {
     handleAdd() {
       this.$refs["addAndEdit"].openDialog("新增数据", null);
     },
+    /**  设置税率  */
+    handleSetTaxRateAdd() {
+      this.$refs["setTaxRate"].openDialog("新增数据", {taxRate: this.taxRate});
+    },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.$refs["addAndEdit"].openDialog("修改数据", row);

+ 10 - 0
src/views/order/groupBuyingMr/index.vue

@@ -19,6 +19,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="销售员" label-width="100px">
+        <el-input
+          v-model="queryParams.salerPerson"
+          placeholder="请输入销售员"
+          clearable
+          style="width: 240px;"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item label="团队类型">
         <el-select
         v-model="queryParams.teamTypeId"
@@ -516,6 +525,7 @@ export default {
       this.$set(this.queryParams, 'performDate', '');
       this.$set(this.queryParams, 'performTimeId', '');
       this.$set(this.queryParams, 'invoiceTime', '');
+      this.$set(this.queryParams, 'salerPerson', '');
       this.queryParams.pageNum = 1;
       this.handleQuery();
     },