cz 1 рік тому
батько
коміт
3448756b04

+ 4 - 4
src/views/finance/fundManage/accountStatement/index.vue

@@ -26,13 +26,13 @@
             action: () => openModalOne('add'),
           },
           {
-            text: '添加流水',
-            action: () => openModal('add'),
-          },
-          {
             text: '结汇',
             action: () => openSettlementModal('add'),
           },
+          {
+            text: '添加流水',
+            action: () => openModal('add'),
+          },
         ]"
         @get-list="getList"
       >

+ 4 - 5
src/views/finance/fundManage/flow/index.vue

@@ -17,11 +17,6 @@
             text: '添加借款',
             action: () => addloan(),
           },
-
-          {
-            text: '添加流水',
-            action: () => openModal('add'),
-          },
           {
             text: '内部转账',
             action: () => openTransferMoney('add'),
@@ -30,6 +25,10 @@
             text: '结汇',
             action: () => openSettlementModal('add'),
           },
+          {
+            text: '添加流水',
+            action: () => openModal('add'),
+          },
         ]"
         @moreSearch="moreSearch"
         @get-list="getList"

+ 3 - 1
src/views/purchaseManage/purchasePayment/payment/index.vue

@@ -114,13 +114,13 @@ const config = computed(() => {
       attrs: {
         label: "付款说明",
         prop: "remark",
-        width: 300,
       },
     },
     {
       attrs: {
         label: "付款类型",
         prop: "type",
+        width: 100,
       },
       render(type) {
         return proxy.dictValueLabel(type, payMethod.value);
@@ -130,6 +130,7 @@ const config = computed(() => {
       attrs: {
         label: "付款方式",
         prop: "payType",
+        width: 100,
       },
       render(type) {
         return proxy.dictValueLabel(type, fundsPaymentMethod.value);
@@ -139,6 +140,7 @@ const config = computed(() => {
       attrs: {
         label: "付款账户",
         prop: "accountManagementId",
+        width: 100,
       },
       render(type) {
         return proxy.dictValueLabel(type, accountList.value);

+ 162 - 2
src/views/salesMange/salesMange/performance/index.vue

@@ -198,7 +198,70 @@
         @current-change="handlePageChange"
       />
     </el-row>
-
+    <el-dialog title="提成类型配置" v-model="commissionTypeModal" width="1000">
+      <div style="margin-bottom:10px">
+        <el-button @click="commissionTypeListPush">添加</el-button>
+      </div>
+      <el-table :data="commissionTypeList" style="width: 100%">
+        <el-table-column prop="date" label="类型名称">
+          <template #default="{ row,$index }">
+            <div style="width: 100%">
+              <el-input v-model="commissionTypeList[$index].name" placeholder="类型名称" />
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="afterSalesRatio" label="售后占比">
+          <template #default="{ row,$index }">
+            <div style="width: 100%">
+              <el-input type="number" :min="0" v-model="commissionTypeList[$index].afterSalesRatio" placeholder="售后占比" />
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="afterSalesRatio" label="公共占比">
+          <template #default="{ row,$index }">
+            <div style="width: 100%">
+              <el-input type="number" :min="0" v-model="commissionTypeList[$index].publicRatio" placeholder="公共占比" />
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="afterSalesRatio" label="总办占比">
+          <template #default="{ row,$index }">
+            <div style="width: 100%">
+              <el-input type="number" :min="0" v-model="commissionTypeList[$index].haveOverallRatio" placeholder="总办占比" />
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="afterSalesRatio" label="部门占比">
+          <template #default="{ row,$index }">
+            <div style="width: 100%">
+              <el-input type="number" :min="0" v-model="commissionTypeList[$index].departmentalRatio" placeholder="部门占比" />
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="afterSalesRatio" label="个人占比">
+          <template #default="{ row,$index }">
+            <div style="width: 100%">
+              <el-input type="number" :min="0" v-model="commissionTypeList[$index].personalRatio" placeholder="个人占比" />
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center" width="100" fixed="right">
+          <template #default="{ row,$index }">
+            <div>
+              <el-button type="primary" @click="deleteCommissionTypeList(row,$index)" link
+                >删除</el-button
+              >
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <template #footer>
+        <el-button @click="commissionTypeModal = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitCommissionType()" size="large"
+          >确 定</el-button
+        >
+      </template>
+    </el-dialog>
     <el-dialog title="调整" v-if="openChange" v-model="openChange" width="700">
       <byForm
         :formConfig="formChangeConfig"
@@ -207,6 +270,13 @@
         :rules="rules"
         ref="change"
       >
+        <template #commissionType>
+          <!-- commissionTypeList -->
+          <div>
+            <el-button v-for="i in commissionTypeListShowCopy" :key='i.id' @click="updateFormChangeData(i)">{{ i.name }}</el-button>
+            <el-button @click='commissionTypeModal = true'>配置</el-button>
+          </div>
+        </template>
         <template #afterSalesRatioSlot>
           <div style="width: 100%">
             <el-row>
@@ -594,6 +664,12 @@ const formChangeData = reactive({
 });
 const formChangeConfig = computed(() => {
   return [
+  {
+      type: "slot",
+      prop: "commissionType",
+      slotName: "commissionType",
+      label: "提成类型",
+    },
     {
       type: "slot",
       prop: "afterSalesRatio",
@@ -626,11 +702,95 @@ const formChangeConfig = computed(() => {
     },
   ];
 });
+const commissionTypeModal = ref(false)
+let commissionTypeList = ref([])
+let commissionTypeListShowCopy = ref([])
+const updateFormChangeData = (row) => {
+  formChangeData.data = row
+}
+
+const deleteCommissionTypeList = (row,index) => {
+  commissionTypeList.value.splice(index,1)
+}
+const getCommissionType = () => {
+  proxy.get("/commissionType/list", {  }).then((res) => {
+    commissionTypeList.value = res.data
+    commissionTypeListShowCopy.value = {...res.data}
+    openChange.value = true;
+  });
+}
+
+const submitCommissionType = () => {
+  //先判断值是否全部填写
+  for(let i = 0; i < commissionTypeList.value.length; i++) {
+    if(!commissionTypeList.value[i].name) {
+      return ElMessage({
+        message: "请填写类型名称",
+        type: "info",
+      });
+    }
+    if(!commissionTypeList.value[i].afterSalesRatio) {
+      return ElMessage({
+        message: "请填写售后占比",
+        type: "info",
+      });
+    }
+    if(!commissionTypeList.value[i].publicRatio) {
+      return ElMessage({
+        message: "请填写公共占比",
+        type: "info",
+      });
+    }
+    if(!commissionTypeList.value[i].haveOverallRatio) {
+      return ElMessage({
+        message: "请填写总办占比",
+        type: "info",
+      });
+    }
+    if(!commissionTypeList.value[i].departmentalRatio) {
+      return ElMessage({
+        message: "请填写部门占比",
+        type: "info",
+      });
+    }
+    if(!commissionTypeList.value[i].personalRatio) {
+      return ElMessage({
+        message: "请填写个人占比",
+        type: "info",
+      });
+    }
+  }
+  proxy.post("/commissionType/addOrEdit", commissionTypeList.value).then((res) => {
+    commissionTypeModal.value = false
+    getCommissionType()
+    
+    ElMessage({
+      message: "操作成功",
+      type: "success",
+    });
+  });
+}
+
+
+
+const commissionTypeListPush = () => {
+  commissionTypeList.value.push({
+    id:null,
+    name: '',
+    afterSalesRatio: '',
+    publicRatio: '',
+    haveOverallRatio: '',
+    departmentalRatio: '',
+    personalRatio: '',
+  })
+}
+
 const rowData = ref({});
 const changeExchangeRate = (row) => {
   rowData.value = row;
+  getCommissionType()
   proxy.post("/commissionRule/detail", { id: row.id }).then((res) => {
-    openChange.value = true;
+    
     formChangeData.data = res;
   });
 };