chen 3 лет назад
Родитель
Сommit
909da29739

+ 8 - 0
src/api/basic_data/material.js

@@ -297,6 +297,14 @@ export function getProductCategoryDelSub(params) {
     params
   })
 }
+//删除产品品类
+export function getProductCategoryDel(params) {
+  return request({
+    url:'/product-category/del',
+    method: 'post',
+    params
+  })
+}
 
 
 // 业务员

+ 10 - 0
src/api/finance/blance_sum.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 财务汇总-字段简单,直接看返回结果接
+export function getFinanceTotalCustomer(params) {
+    return request({
+      url: '/finance/totalCustomer',
+      method: 'get',
+      params
+    })
+  }

+ 8 - 0
src/api/finance/rebate_form.js

@@ -31,3 +31,11 @@ export function getRebateOrderApply(data) {
       data
     })
   }
+// 列表
+export function getRebateOrderList(params) {
+    return request({
+      url: '/rebate/order/list',
+      method: 'get',
+      params
+    })
+  }

+ 9 - 0
src/api/finance/rebate_list.js

@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+// 列表
+export function getRebateOrderList(params) {
+    return request({
+      url: '/rebate/order/list',
+      method: 'get',
+      params
+    })
+  }

+ 17 - 0
src/api/finance/tax_rate.js

@@ -0,0 +1,17 @@
+import request from '@/utils/request'
+// 获取税率配置
+export function getCommonTaxGet() {
+    return request({
+      url: '/common/tax/get',
+      method: 'post',
+      
+    })
+  }
+// 税率配置
+export function getCommonTaxConfig(data) {
+    return request({
+      url: '/common/tax/config',
+      method: 'post',
+      data
+    })
+  }

+ 0 - 3
src/views/basic_data/dealer/dealer_deposit.vue

@@ -47,9 +47,6 @@
       <div class="fl">
         <el-button type="primary" size="small" @click="addFn">新增</el-button>
       </div>
-      <div class="fr">
-        <el-button type="primary" size="small">打印</el-button>
-      </div>
     </div>
 
     <div class="mymain-container">

+ 23 - 11
src/views/basic_data/dealer/dealer_stock.vue

@@ -45,9 +45,6 @@
           >
         </el-popconfirm>
       </div>
-      <div class="fr">
-        <el-button type="primary" size="small">打印</el-button>
-      </div>
     </div>
 
     <div class="mymain-container">
@@ -181,7 +178,7 @@
         label-width="100px"
         label-position="right"
       >
-        <el-form-item label="经销商名称" prop="customerId">
+        <el-form-item label="经销商编码" prop="">
           <el-select
             filterable
             class="selectStyle"
@@ -191,12 +188,18 @@
             <el-option
               v-for="item in dealerList"
               :key="item.id"
-              :label="item.name"
+              :label="item.number"
               :value="item.id"
             >
             </el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="经销商名称" prop="">
+          <el-input disabled v-model="addForm.customerName"></el-input>
+          <!-- <template slot-scope="scope">
+            {{ scope.row }}
+          </template> -->
+        </el-form-item>
         <el-form-item label="产品大类" prop="mainId">
           <el-select
             class="selectStyle"
@@ -307,6 +310,8 @@ export default {
       dialogForm: false,
       addForm: {
         customerId: "",
+        customerName: "",
+        customerNumber: "",
         oneParentId: "",
         twoParentId: "",
         threeParentId: "",
@@ -363,6 +368,14 @@ export default {
   },
   computed: {},
   watch: {
+    "addForm.customerId": async function (newValue) {
+      if (newValue) {
+        const res = this.dealerList.filter((i) => i.id == newValue);
+
+        this.addForm.customerName = res[0].name;
+        this.addForm.customerNumber = res[0].number;
+      }
+    },
     "addForm.oneParentId": async function (newValue) {
       if (newValue) {
         let res = await getAdminWebsitByparent({ parentId: newValue });
@@ -443,14 +456,11 @@ export default {
     },
     addFn() {
       this.title = "经销商业务关系管理";
+
       this.dialogForm = true;
     },
     async addDataListFn() {
       await this.$refs.addForm.validate();
-      console.log(this.addForm);
-      let data = this.dealerList.filter((v) => {
-        return v.id === this.addForm.customerId;
-      });
 
       let data2 = this.categoryList.filter((v) => {
         return v.productCategoryId == this.addForm.mainId;
@@ -461,8 +471,8 @@ export default {
 
       let value = {
         customerId: this.addForm.customerId,
-        customerName: data[0].name,
-        customerNumber: data[0].number,
+        customerName: this.addForm.cusotmerName,
+        customerNumber: this.addForm.customerNumber,
         mainId: this.addForm.mainId,
         mainName: data2[0].productCategoryName,
         serviceId: this.addForm.serviceId,
@@ -478,6 +488,7 @@ export default {
         this.$message.success("添加成功");
       }
       this.addForm.customerId = "";
+      this.addForm.customerName = "";
       this.addForm.mainId = "";
       this.addForm.oneParentId = "";
       this.addForm.twoParentId = "";
@@ -493,6 +504,7 @@ export default {
     async cancelFn() {
       await this.$refs.addForm.clearValidate();
       this.addForm.customerId = "";
+      this.addForm.customerName = "";
       this.addForm.mainId = "";
       this.addForm.oneParentId = "";
       this.addForm.twoParentId = "";

+ 10 - 12
src/views/basic_data/material/classify_list.vue

@@ -11,12 +11,8 @@
           >新建分组</el-button
         >
         <div class="list">
-          <div
-            class="item"
-            :class="activeGroup === '' ? 'active' : ''"
-            @click="changeGroup('')"
-          >
-            <div class="title">所有分组</div>
+          <div class="item">
+            <strong class="title">所有分组</strong>
           </div>
           <div
             class="item"
@@ -34,9 +30,9 @@
                 <el-dropdown-item :command="['edit', v]"
                   >修改名称</el-dropdown-item
                 >
-                <!-- <el-dropdown-item :command="['del', v]"
+                <el-dropdown-item :command="['del', v]"
                   >删除分组</el-dropdown-item
-                > -->
+                >
               </el-dropdown-menu>
             </el-dropdown>
           </div>
@@ -208,6 +204,7 @@ import {
   getProductCategoryAdd,
   getProductCategoryEdit,
   getProductCategoryDelSub,
+  getProductCategoryDel,
 } from "@/api/basic_data/material";
 export default {
   data() {
@@ -330,10 +327,11 @@ export default {
           type: "warning",
         })
           .then(() => {
-            // deleteGroup({ groupId: item.marketingGroupId }).then((res) => {
-            //   this.$successMsg("删除成功");
-            //   this.getGroupList();
-            // });
+            console.log(v, 111);
+            getProductCategoryDel({ ids: v.productCategoryId }).then((res) => {
+              this.getDataList();
+              this.$successMsg("删除成功");
+            });
           })
           .catch(() => {});
       }

+ 40 - 26
src/views/finance/balance_sum.vue

@@ -12,18 +12,26 @@
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="经销商名称" prop="">
-              <el-input placeholder="请输入经销商名称"></el-input>
+              <el-input
+                v-model="searchForm.customerName"
+                placeholder="请输入经销商名称"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="经销商编码" prop="">
-              <el-input placeholder="请输入"></el-input>
+              <el-input
+                v-model="searchForm.customerNumber"
+                placeholder="请输入"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="24" :lg="24">
             <el-form-item label="" class="fr">
               <el-button size="small">清空</el-button>
-              <el-button size="small" type="primary">搜索</el-button>
+              <el-button size="small" type="primary" @click="searchFn"
+                >搜索</el-button
+              >
             </el-form-item>
           </el-col>
         </el-row>
@@ -54,35 +62,28 @@
           <el-table-column
             align="center"
             label="经销商编码"
-            prop=""
+            prop="customerNumber"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="经销商名称"
-            prop=""
-            min-width="160"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="起初金额"
-            prop=""
+            prop="customerName"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="总金额"
-            prop=""
+            prop="total"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="更新时间"
-            prop=""
+            prop="theTime"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
@@ -94,16 +95,12 @@
             show-overflow-tooltip
           >
             <template slot-scope=""> </template>
-            <el-button type="text" class="textColor" slot="reference">
-              余额
-            </el-button>
-            <el-button type="text" class="textColor" slot="reference">
-              明细
-            </el-button>
+            <el-button type="text" class="textColor"> 余额 </el-button>
+            <el-button type="text" class="textColor"> 明细 </el-button>
           </el-table-column>
         </el-table>
       </div>
-      <!-- 分页 -->
+      <!-- 分页
       <div class="fr">
         <el-pagination
           :current-page="currentPage"
@@ -113,24 +110,41 @@
           :total="listTotal"
         >
         </el-pagination>
-      </div>
+      </div> -->
     </div>
   </div>
 </template>
 
 <script>
+import { getFinanceTotalCustomer } from "@/api/finance/blance_sum";
 export default {
   data() {
     return {
-      currentPage: 1, // 当前页码
-      pageSize: 10, // 每页数量
-      listTotal: 0, // 列表总数
+      // currentPage: 1, // 当前页码
+      // pageSize: 10, // 每页数量
+      // listTotal: 0, // 列表总数
       dataList: [], // 列表数据
-      searchForm: {}, //搜索表单
+      searchForm: {
+        customerName: "",
+        customerNumber: "",
+      }, //搜索表单
       listLoading: false, // 列表加载loading
     };
   },
+  created() {
+    this.getDataList();
+  },
   methods: {
+    //搜索
+    searchFn() {
+      this.getDataList(this.searchForm);
+    },
+    //获取列表数据
+    async getDataList(data) {
+      const res = await getFinanceTotalCustomer(data);
+      console.log(res);
+      this.dataList = res.data;
+    },
     //余额
     walletFn() {
       this.$router.push("/finance/wallet");

+ 5 - 5
src/views/finance/finance_sum.vue

@@ -96,7 +96,7 @@
           ></el-table-column>
         </el-table>
       </div>
-      <!-- 分页 -->
+      <!-- 分页
       <div class="fr">
         <el-pagination
           :current-page="currentPage"
@@ -106,7 +106,7 @@
           :total="listTotal"
         >
         </el-pagination>
-      </div>
+      </div> -->
     </div>
   </div>
 </template>
@@ -119,9 +119,9 @@ import {
 export default {
   data() {
     return {
-      currentPage: 1, // 当前页码
-      pageSize: 10, // 每页数量
-      listTotal: 0, // 列表总数
+      // currentPage: 1, // 当前页码
+      // pageSize: 10, // 每页数量
+      // listTotal: 0, // 列表总数
       dataList: [], // 列表数据
       searchForm: {
         mainId: "",

+ 13 - 2
src/views/finance/rebate_form.vue

@@ -284,7 +284,9 @@
     <div class="btn-group clearfix">
       <div class="fl">
         <el-button type="primary" size="small" @click="addFn">保存</el-button>
-        <el-button type="primary" size="small">提交审批</el-button>
+        <el-button type="primary" size="small" @click="submitFn"
+          >提交审批</el-button
+        >
         <el-button type="primary" size="small">重置</el-button>
       </div>
       <div class="fr">
@@ -303,6 +305,7 @@ import {
   getWalletCustomerList,
   getRebateOrderAdd,
   getRebateOrderApply,
+  getRebateOrderList,
 } from "@/api/finance/rebate_form";
 export default {
   data() {
@@ -322,6 +325,15 @@ export default {
     this.getCustomerData();
   },
   methods: {
+    //提交审批
+    async submitFn() {
+      let res = await getRebateOrderList({ pageSize: -1, pageNum: 1 });
+      console.log(res);
+      let index = res.data.records.length - 1;
+      let arr = res.data.records;
+      await getRebateOrderApply({ id: arr[index].id });
+      this.$message.success("提交审批成功");
+    },
     //新增
     async addFn() {
       console.log(this.searchForm);
@@ -341,7 +353,6 @@ export default {
         type: "REBATE",
       });
       const res2 = this.customerData.filter((i) => i.id == v);
-      console.log(res2, 326556);
 
       this.$set(this.dataList[index], "customerNumber", res2[0].number);
       this.$set(this.dataList[index], "customerName", res2[0].name);

+ 120 - 48
src/views/finance/rebate_list.vue

@@ -79,185 +79,244 @@
           >
             <el-table-column
               align="center"
-              label="返利单号"
+              label="状态"
               prop=""
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
-              label="返利日期"
-              prop=""
+              label="返利单号"
+              prop="rebateOrderId"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
-              label="经销商编码"
-              prop=""
+              label="返利日期"
+              prop="theTime"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
-              label="经销商名称"
-              prop=""
+              label="经销商编码"
+              prop="customerNumber"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
-              label="主表备注"
-              prop=""
+              label="经销商名称"
+              prop="customerName"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
-              label="总金额"
-              prop=""
+              label="返利类型"
+              prop="walletName"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
-              label="返利类型"
+              label="总返利金额"
               prop=""
               min-width="160"
               show-overflow-tooltip
-            ></el-table-column>
+            >
+              <template slot-scope="scope">
+                {{ Math.abs(scope.row.amount) + scope.row.withholdAmount }}
+              </template>
+            </el-table-column>
             <el-table-column
               align="center"
               label="返利金额"
-              prop=""
+              prop="amount"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="暂扣返利"
-              prop=""
+              prop="withholdAmount"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="折让金额"
-              prop=""
+              prop="allowanceAmount"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="折让编号"
-              prop=""
+              prop="allowanceCode"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="折让账号"
-              prop=""
+              prop="allowanceAccount"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="已办理折让金额"
-              prop=""
+              prop="handledAllowanceAmount"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="折让对应收款单号"
-              prop=""
+              prop="allowanceOrderNo"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="政策文件流水号"
+              prop="policyFileNo"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="政策文号"
+              prop="policyDocNo"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="政策年份"
+              prop="policyYear"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="政策月份"
+              prop="policyMonth"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="政策归属部门"
+              prop="policyOrg"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="客户区域"
+              prop="customerArea"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="客户属性"
+              prop="customerAttr"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="奖励实际归属客户"
+              prop="rewardActualCustomers"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="备注1"
+              prop="remark1"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="备注2"
+              prop="remark2"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="制单人"
-              prop=""
+              prop="createBy"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="制单时间"
-              prop=""
+              prop="createTime"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="审核人"
-              prop=""
+              prop="examineBy"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="审核时间"
-              prop=""
+              prop="examineTime"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="确认人"
-              prop=""
+              prop="customerName"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="确认时间"
-              prop=""
+              prop="customerConfirmTime"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="复核人"
-              prop=""
+              prop="secondExamineBy"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="复核时间"
-              prop=""
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="状态"
-              prop=""
+              prop="secondExamineTime"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="操作"
-              min-width="160"
+              min-width="260"
               show-overflow-tooltip
               fixed="right"
             >
               <template slot-scope="">
-                <el-button type="text" class="textColor" slot="reference"
-                  >申请</el-button
-                >
-                <el-button type="text" class="textColor" slot="reference"
-                  >审核</el-button
-                >
-                <el-button type="text" class="textColor" slot="reference"
-                  >复核</el-button
-                >
-                <el-button type="text" class="textColor" slot="reference"
-                  >详情</el-button
-                >
+                <el-button type="text" class="textColor">申请</el-button>
+                <el-button type="text" class="textColor">审核</el-button>
+                <el-button type="text" class="textColor">复核</el-button>
+                <el-button type="text" class="textColor">详情</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -284,6 +343,7 @@
 </template>
 
 <script>
+import { getRebateOrderList } from "@/api/finance/rebate_list";
 import RebateListApply from "./components/rebate_list-apply.vue";
 import RebateListExamine from "./components/rebate_list-examine.vue";
 import RebateListReview from "./components/rebate_list-review.vue";
@@ -306,7 +366,19 @@ export default {
       showPage: 1,
     };
   },
+  created() {
+    this.getDataList({
+      pageSize: this.pageSize,
+      pageNum: this.currentPage,
+    });
+  },
   methods: {
+    //获取列表数据
+    async getDataList(data) {
+      const res = await getRebateOrderList(data);
+      this.dataList = res.data.records;
+      this.listTotal = res.data.total;
+    },
     //复核
     reviewFn() {
       this.showPage = 4;

+ 184 - 61
src/views/finance/tax_rate.vue

@@ -1,79 +1,202 @@
 <template>
   <div class="app-container">
-    <div class="setting_title">税率设置</div>
-    <el-divider></el-divider>
-    <div class="">
-      <el-form label-position="left" label-width="100px">
-        <el-row>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="仓存费税率" prop="">
-              <el-input placeholder="请输入">
-                <i class="el-input__icon" slot="suffix">% </i>
-              </el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :xs="24" :sm="24" :lg="6">
-            <el-form-item label="工程价差税率" prop="">
-              <el-input placeholder="请输入">
-                <i class="el-input__icon" slot="suffix">% </i>
-              </el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :xs="24" :sm="24" :lg="6">
-            <el-form-item label="运输费税率" prop="">
-              <el-input placeholder="请输入">
-                <i class="el-input__icon" slot="suffix">% </i>
-              </el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :xs="24" :sm="24" :lg="6">
-            <el-form-item label="安装费税率" prop="">
-              <el-input placeholder="请输入">
-                <i class="el-input__icon" slot="suffix">% </i>
-              </el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :xs="24" :sm="24" :lg="6">
-            <el-form-item label="库存商品税率" prop="">
-              <el-input placeholder="请输入">
-                <i class="el-input__icon" slot="suffix">% </i>
-              </el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
+    <div>
+      <div class="setting_title">税率设置</div>
+      <el-divider></el-divider>
 
-        <el-row>
-          <el-col :xs="24" :sm="24" :lg="24">
-            <el-form-item label="" class="">
-              <el-button size="small">修改</el-button>
-              <el-button size="small" type="primary">确定</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
+      <el-card shadow="never" class="my-card">
+        <el-form
+          class="my-form"
+          ref="mainForm"
+          :model="mainForm"
+          label-width="120px"
+          label-position="right"
+        >
+          <el-form-item label="仓存费税率" prop="nickName">
+            <el-input
+              v-model="mainForm.storageFeeTax"
+              autocomplete="off"
+              placeholder="请输入"
+              ><i class="el-input__icon" slot="suffix">% </i></el-input
+            >
+          </el-form-item>
+          <el-form-item label="工程价差税率" prop="nickName">
+            <el-input
+              v-model="mainForm.enginPriceDifTax"
+              autocomplete="off"
+              placeholder="请输入"
+              ><i class="el-input__icon" slot="suffix">% </i></el-input
+            >
+          </el-form-item>
+          <el-form-item label="运输费税率" prop="nickName">
+            <el-input
+              v-model="mainForm.transportTax"
+              autocomplete="off"
+              placeholder="请输入"
+              ><i class="el-input__icon" slot="suffix">% </i></el-input
+            >
+          </el-form-item>
+          <el-form-item label="安装费税率" prop="nickName">
+            <el-input
+              v-model="mainForm.installTax"
+              autocomplete="off"
+              placeholder="请输入"
+              ><i class="el-input__icon" slot="suffix">% </i></el-input
+            >
+          </el-form-item>
+          <el-form-item label="库存商品税率" prop="nickName">
+            <el-input
+              v-model="mainForm.stockTax"
+              autocomplete="off"
+              placeholder="请输入"
+              ><i class="el-input__icon" slot="suffix">% </i></el-input
+            >
+          </el-form-item>
+        </el-form>
+        <!-- <el-form label-position="left" label-width="100px">
+          <el-row>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="仓存费税率" prop="">
+                <el-input placeholder="请输入">
+                  <i class="el-input__icon" slot="suffix">% </i>
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :xs="24" :sm="24" :lg="6">
+              <el-form-item label="工程价差税率" prop="">
+                <el-input placeholder="请输入">
+                  <i class="el-input__icon" slot="suffix">% </i>
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :xs="24" :sm="24" :lg="6">
+              <el-form-item label="运输费税率" prop="">
+                <el-input placeholder="请输入">
+                  <i class="el-input__icon" slot="suffix">% </i>
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :xs="24" :sm="24" :lg="6">
+              <el-form-item label="安装费税率" prop="">
+                <el-input placeholder="请输入">
+                  <i class="el-input__icon" slot="suffix">% </i>
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :xs="24" :sm="24" :lg="6">
+              <el-form-item label="库存商品税率" prop="">
+                <el-input placeholder="请输入">
+                  <i class="el-input__icon" slot="suffix">% </i>
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row>
+            <el-col :xs="24" :sm="24" :lg="24">
+              <el-form-item label="" class="">
+                <el-button size="small">修改</el-button>
+                <el-button size="small" type="primary">确定</el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form> -->
+      </el-card>
+    </div>
+
+    <div class="page-footer">
+      <div class="footer">
+        <el-button type="primary" @click="editFn">修改</el-button>
+        <el-button type="primary">确定</el-button>
+      </div>
     </div>
   </div>
 </template>
 
 <script>
+import { getCommonTaxGet, getCommonTaxConfig } from "@/api/finance/tax_rate";
 export default {
   data() {
     return {
-      userInfo: {
-        nickName: "",
+      mainForm: {
+        storageFeeTax: "",
+        enginPriceDifTax: "",
+        transportTax: "",
+        installTax: "",
+        stockTax: "",
       },
     };
   },
+  created() {
+    this.getData();
+  },
+  methods: {
+    //修改
+    async editFn() {
+      await getCommonTaxConfig(this.mainForm);
+    },
+    //获取税率数据
+    async getData() {
+      const res = await getCommonTaxGet();
+      console.log(res);
+      this.mainForm = {
+        storageFeeTax: res.data.storageFeeTax,
+        enginPriceDifTax: res.data.enginPriceDifTax,
+        transportTax: res.data.transportTax,
+        installTax: res.data.installTax,
+        stockTax: res.data.stockTax,
+      };
+    },
+  },
 };
 </script>
 
-<style>
+<style lang="scss" scoped>
+.setting_title {
+  padding-left: 0;
+}
+.tips {
+  font-size: 14px;
+}
+.my-card {
+  margin-top: 20px;
+  .box {
+    background: rgb(235, 240, 249);
+    padding: 10px;
+    font-size: 14px;
+    margin: 20px 0;
+    line-height: 18px;
+    ::v-deep .el-link {
+      vertical-align: unset;
+    }
+  }
+}
+.my-form {
+  width: 450px;
+  margin: 0 auto;
+}
+.show-pwd {
+  position: absolute;
+  right: 15px;
+  top: 0;
+  font-size: 16px;
+  cursor: pointer;
+  user-select: none;
+}
+.question {
+  position: absolute;
+  right: -30px;
+  top: 0;
+  font-size: 20px;
+  cursor: pointer;
+  user-select: none;
+}
 </style>

+ 190 - 129
src/views/merchant/create_account.vue

@@ -3,47 +3,96 @@
     <div v-show="step == 1">
       <div class="setting_title">开通账号</div>
       <el-divider></el-divider>
-      <div class="tips">说明:开通商户账号是指开通商城后台管理系统的总登录账号。</div>
+      <div class="tips">
+        说明:开通商户账号是指开通商城后台管理系统的总登录账号。
+      </div>
 
       <el-card shadow="never" class="my-card">
-        <el-form class="my-form" ref="mainForm" :model="mainForm" :rules="mainFormRules" label-width="120px" label-position="right">
+        <el-form
+          class="my-form"
+          ref="mainForm"
+          :model="mainForm"
+          :rules="mainFormRules"
+          label-width="120px"
+          label-position="right"
+        >
           <el-form-item label="商户账号" prop="account">
-            <el-input v-model="mainForm.account" autocomplete="off" placeholder="请输入商户账号"></el-input>
+            <el-input
+              v-model="mainForm.account"
+              autocomplete="off"
+              placeholder="请输入商户账号"
+            ></el-input>
             <el-popover
               class="question"
               placement="right-start"
               title="账号设置"
               width="260"
               trigger="hover"
-              content="账号设置需按数字、字母组合设置至少12位账号">
+              content="账号设置需按数字、字母组合设置至少12位账号"
+            >
               <svg-icon icon-class="question" slot="reference" />
             </el-popover>
           </el-form-item>
           <el-form-item label="账户昵称" prop="nickName">
-            <el-input v-model="mainForm.nickName" autocomplete="off" placeholder="请输入账户昵称"></el-input>
+            <el-input
+              v-model="mainForm.nickName"
+              autocomplete="off"
+              placeholder="请输入账户昵称"
+            ></el-input>
           </el-form-item>
           <el-form-item label="负责人" prop="chargePerson">
-            <el-input v-model="mainForm.chargePerson" autocomplete="off" placeholder="请输入负责人"></el-input>
+            <el-input
+              v-model="mainForm.chargePerson"
+              autocomplete="off"
+              placeholder="请输入负责人"
+            ></el-input>
           </el-form-item>
           <el-form-item label="联系电话" prop="phone">
-            <el-input v-model="mainForm.phone" autocomplete="off" placeholder="请输入联系电话"></el-input>
+            <el-input
+              v-model="mainForm.phone"
+              autocomplete="off"
+              placeholder="请输入联系电话"
+            ></el-input>
           </el-form-item>
           <el-form-item label="金蝶主体账号" prop="kingdeeId">
-            <el-input v-model="mainForm.kingdeeId" autocomplete="off" placeholder="请输入金蝶主体账号"></el-input>
+            <el-input
+              v-model="mainForm.kingdeeId"
+              autocomplete="off"
+              placeholder="请输入金蝶主体账号"
+            ></el-input>
           </el-form-item>
           <el-form-item label="金蝶主体名称" prop="kingdeeName">
-            <el-input v-model="mainForm.kingdeeName" autocomplete="off" placeholder="请输入金蝶主体名称"></el-input>
+            <el-input
+              v-model="mainForm.kingdeeName"
+              autocomplete="off"
+              placeholder="请输入金蝶主体名称"
+            ></el-input>
           </el-form-item>
           <el-form-item label="电子邮箱" prop="email">
-            <el-input v-model="mainForm.email" autocomplete="off" placeholder="请输入电子邮箱"></el-input>
+            <el-input
+              v-model="mainForm.email"
+              autocomplete="off"
+              placeholder="请输入电子邮箱"
+            ></el-input>
           </el-form-item>
           <el-form-item label="地址" prop="address">
-            <el-input v-model="mainForm.address" placeholder="请输入地址"></el-input>
+            <el-input
+              v-model="mainForm.address"
+              placeholder="请输入地址"
+            ></el-input>
           </el-form-item>
           <el-form-item label="登录密码" prop="newPassword">
-            <el-input v-model="mainForm.newPassword" ref="password1" auto-complete="new-password" placeholder="请输入登录密码" :type="passwordType1"></el-input>
+            <el-input
+              v-model="mainForm.newPassword"
+              ref="password1"
+              auto-complete="new-password"
+              placeholder="请输入登录密码"
+              :type="passwordType1"
+            ></el-input>
             <span class="show-pwd" @click="showPwd(1)">
-              <svg-icon :icon-class="passwordType1 === 'password' ? 'eye' : 'eye-open'" />
+              <svg-icon
+                :icon-class="passwordType1 === 'password' ? 'eye' : 'eye-open'"
+              />
             </span>
             <el-popover
               class="question"
@@ -51,14 +100,23 @@
               title="密码设置"
               width="260"
               trigger="hover"
-              content="密码设置需按数字、字母组合设置至少12位密码">
+              content="密码设置需按数字、字母组合设置至少12位密码"
+            >
               <svg-icon icon-class="question" slot="reference" />
             </el-popover>
           </el-form-item>
           <el-form-item label="确认密码" prop="confirmPassword">
-            <el-input v-model="mainForm.confirmPassword" ref="password2" auto-complete="confirm-password" placeholder="请再次输入密码" :type="passwordType2"></el-input>
+            <el-input
+              v-model="mainForm.confirmPassword"
+              ref="password2"
+              auto-complete="confirm-password"
+              placeholder="请再次输入密码"
+              :type="passwordType2"
+            ></el-input>
             <span class="show-pwd" @click="showPwd(2)">
-              <svg-icon :icon-class="passwordType2 === 'password' ? 'eye' : 'eye-open'" />
+              <svg-icon
+                :icon-class="passwordType2 === 'password' ? 'eye' : 'eye-open'"
+              />
             </span>
             <el-popover
               class="question"
@@ -66,7 +124,8 @@
               title="密码设置"
               width="260"
               trigger="hover"
-              content="确认密码需要和登录密码保持一致">
+              content="确认密码需要和登录密码保持一致"
+            >
               <svg-icon icon-class="question" slot="reference" />
             </el-popover>
           </el-form-item>
@@ -76,121 +135,121 @@
 
     <div class="page-footer">
       <div class="footer" :class="classObj">
-        <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{ formLoading ? '提交中 ...' : '提 交' }}</el-button>
+        <el-button
+          type="primary"
+          @click="clickSubmitForm"
+          :loading="formLoading"
+          >{{ formLoading ? "提交中 ..." : "提 交" }}</el-button
+        >
         <el-popconfirm
           title="确定关闭吗?"
           @onConfirm="goBack"
-          style="margin-left: 10px;"
+          style="margin-left: 10px"
         >
           <el-button slot="reference">关 闭</el-button>
         </el-popconfirm>
       </div>
     </div>
-    
   </div>
 </template>
 
 <script>
-import { getToken } from '@/utils/auth'
+import { getToken } from "@/utils/auth";
 import { addAccount } from "@/api/merchant";
 
 export default {
   data() {
     var validateAccount = (rule, value, callback) => {
-      if (value === '') {
-        callback(new Error('请输入商户账号'));
+      if (value === "") {
+        callback(new Error("请输入商户账号"));
       } else if (value.length < 12) {
-        callback(new Error('账号长度至少12位'));
+        callback(new Error("账号长度至少12位"));
       } else if (/[A-Za-z].*[0-9]|[0-9].*[A-Za-z]/.test(value) == false) {
-        callback(new Error('账号必须包含数字和字母'));
+        callback(new Error("账号必须包含数字和字母"));
       } else {
         callback();
       }
     };
     var validatePass3 = (rule, value, callback) => {
-      if (value === '') {
-        callback(new Error('请输入登录密码'));
+      if (value === "") {
+        callback(new Error("请输入登录密码"));
       } else if (value.length < 12) {
-        callback(new Error('密码长度至少12位'));
+        callback(new Error("密码长度至少12位"));
       } else if (/[A-Za-z].*[0-9]|[0-9].*[A-Za-z]/.test(value) == false) {
-        callback(new Error('密码必须包含数字和字母'));
+        callback(new Error("密码必须包含数字和字母"));
       } else {
-        if (this.mainForm.confirmPassword !== '') {
-          this.$refs.mainForm.validateField('confirmPassword');
+        if (this.mainForm.confirmPassword !== "") {
+          this.$refs.mainForm.validateField("confirmPassword");
         }
         callback();
       }
     };
     var validatePass4 = (rule, value, callback) => {
-      if (value === '') {
-        callback(new Error('请再次输入密码'));
+      if (value === "") {
+        callback(new Error("请再次输入密码"));
       } else if (value !== this.mainForm.newPassword) {
-        callback(new Error('两次输入密码不一致'));
+        callback(new Error("两次输入密码不一致"));
       } else {
         callback();
       }
     };
     return {
       baseURL: process.env.VUE_APP_BASE_API,
-      myHeaders: {'x-token': getToken()},
+      myHeaders: { "x-token": getToken() },
       step: 1,
       mainForm: {
-        account: '', // 账号
-        nickName: '', // 用户名
-        appName: '', // 小程序名称
-        chargePerson: '', // 负责人
-        phone: '', // 联系电话
-        kingdeeId: '',
-        kingdeeName: '',
-        email: '', // 电子邮箱
-        address: '', // 地址
-        newPassword: '', // 登录密码
-        confirmPassword: '', // 确认密码
+        account: "", // 账号
+        nickName: "", // 用户名
+        appName: "", // 小程序名称
+        chargePerson: "", // 负责人
+        phone: "", // 联系电话
+        kingdeeId: "",
+        kingdeeName: "",
+        email: "", // 电子邮箱
+        address: "", // 地址
+        newPassword: "", // 登录密码
+        confirmPassword: "", // 确认密码
       },
       mainFormRules: {
         account: [
-          { required: true, validator: validateAccount, trigger: 'blur' }
+          { required: true, validator: validateAccount, trigger: "blur" },
         ],
         nickName: [
-          { required: true, message: '请输入用户名', trigger: 'blur' }
-        ],
-        appName: [
-          { required: true, message: '请输入用户名', trigger: 'blur' }
+          { required: true, message: "请输入用户名", trigger: "blur" },
         ],
+        appName: [{ required: true, message: "请输入用户名", trigger: "blur" }],
         chargePerson: [
-          { required: true, message: '请输入负责人', trigger: 'blur' }
-        ],
-        phone: [
-          { required: true, message: '请输入联系电话', trigger: 'blur' }
+          { required: true, message: "请输入负责人", trigger: "blur" },
         ],
+        phone: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
         kingdeeId: [
-          { required: true, message: '请输入金蝶主体账号', trigger: 'blur' }
+          { required: true, message: "请输入金蝶主体账号", trigger: "blur" },
         ],
         kingdeeName: [
-          { required: true, message: '请输入金蝶主体密码', trigger: 'blur' }
+          { required: true, message: "请输入金蝶主体密码", trigger: "blur" },
         ],
         newPassword: [
-          { required: true, validator: validatePass3, trigger: 'blur' }
+          { required: true, validator: validatePass3, trigger: "blur" },
         ],
         confirmPassword: [
-          { required: true, validator: validatePass4, trigger: 'blur' }
+          { required: true, validator: validatePass4, trigger: "blur" },
         ],
       },
-      passwordType1: 'password',
-      passwordType2: 'password',
+      passwordType1: "password",
+      passwordType2: "password",
 
       formLoading: false,
-    }
+    };
   },
   computed: {
     sidebar() {
-      return this.$store.state.app.sidebar
+      return this.$store.state.app.sidebar;
     },
     classObj() {
       return {
         hideSidebar: !this.sidebar.opened,
-        openSidebar: this.sidebar.opened
-      }
+        openSidebar: this.sidebar.opened,
+      };
     },
   },
   methods: {
@@ -200,25 +259,25 @@ export default {
 
     // 显示隐藏密码
     showPwd(num) {
-      if(num == 1) {
-        if (this.passwordType1 === 'password') {
-          this.passwordType1 = ''
+      if (num == 1) {
+        if (this.passwordType1 === "password") {
+          this.passwordType1 = "";
         } else {
-          this.passwordType1 = 'password'
+          this.passwordType1 = "password";
         }
         this.$nextTick(() => {
-          this.$refs.password1.focus()
-        })
+          this.$refs.password1.focus();
+        });
       }
-      if(num == 2) {
-        if (this.passwordType2 === 'password') {
-          this.passwordType2 = ''
+      if (num == 2) {
+        if (this.passwordType2 === "password") {
+          this.passwordType2 = "";
         } else {
-          this.passwordType2 = 'password'
+          this.passwordType2 = "password";
         }
         this.$nextTick(() => {
-          this.$refs.password2.focus()
-        })
+          this.$refs.password2.focus();
+        });
       }
     },
 
@@ -228,7 +287,7 @@ export default {
         if (valid) {
           this.submitForm();
         }
-      })
+      });
     },
 
     // 提交表单
@@ -247,61 +306,63 @@ export default {
           address: this.mainForm.address,
           password: this.mainForm.confirmPassword,
         },
-      }
-      addAccount(params).then(res => {
-        this.$successMsg('开通成功');
-        setTimeout(() => {
-          this.$router.push({
-            path: '/merchant/merchant_list',
-            query: {}
-          })
-        }, 1500)
-      }).finally(res => {
-        this.formLoading = false;
-      })
-    }
-  }
-}
+      };
+      addAccount(params)
+        .then((res) => {
+          this.$successMsg("开通成功");
+          setTimeout(() => {
+            this.$router.push({
+              path: "/merchant/merchant_list",
+              query: {},
+            });
+          }, 1500);
+        })
+        .finally((res) => {
+          this.formLoading = false;
+        });
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-  .setting_title {
-    padding-left: 0;
-  }
-  .tips {
+.setting_title {
+  padding-left: 0;
+}
+.tips {
+  font-size: 14px;
+}
+.my-card {
+  margin-top: 20px;
+  .box {
+    background: rgb(235, 240, 249);
+    padding: 10px;
     font-size: 14px;
-  }
-  .my-card {
-    margin-top: 20px;
-    .box {
-      background: rgb(235, 240, 249);
-      padding: 10px;
-      font-size: 14px;
-      margin: 20px 0;
-      line-height: 18px;
-      ::v-deep .el-link {
-        vertical-align: unset;
-      }
+    margin: 20px 0;
+    line-height: 18px;
+    ::v-deep .el-link {
+      vertical-align: unset;
     }
   }
-  .my-form {
-    width: 450px;
-    margin: 0 auto;
-  }
-  .show-pwd {
-    position: absolute;
-    right: 15px;
-    top: 0;
-    font-size: 16px;
-    cursor: pointer;
-    user-select: none;
-  }
-  .question {
-    position: absolute;
-    right: -30px;
-    top: 0;
-    font-size: 20px;
-    cursor: pointer;
-    user-select: none;
-  }
+}
+.my-form {
+  width: 450px;
+  margin: 0 auto;
+}
+.show-pwd {
+  position: absolute;
+  right: 15px;
+  top: 0;
+  font-size: 16px;
+  cursor: pointer;
+  user-select: none;
+}
+.question {
+  position: absolute;
+  right: -30px;
+  top: 0;
+  font-size: 20px;
+  cursor: pointer;
+  user-select: none;
+}
 </style>