Bläddra i källkod

税率和台账功能更改

chen 3 år sedan
förälder
incheckning
4a0d242a5e

+ 7 - 4
src/views/engin_deposit/refund_list.vue

@@ -36,8 +36,11 @@
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="经销商名称" prop="">
-                <el-input placeholder="请输入"></el-input>
+              <el-form-item label="经销商名称" prop="customerKeyword">
+                <el-input
+                  v-model="searchForm.customerKeyword"
+                  placeholder="请输入"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
@@ -74,7 +77,7 @@
                 </el-date-picker>
               </el-form-item>
             </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
+            <!-- <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="产品名称" prop="">
                 <el-input placeholder="请输入"></el-input>
               </el-form-item>
@@ -83,7 +86,7 @@
               <el-form-item label="规格型号" prop="">
                 <el-input placeholder="请输入"></el-input>
               </el-form-item>
-            </el-col>
+            </el-col> -->
 
             <el-col :xs="24" :sm="24" :lg="24">
               <el-form-item label="" class="fr">

+ 1 - 1
src/views/finance/change_apply.vue

@@ -286,7 +286,7 @@ export default {
       let receiverRemark;
       let amount;
 
-      await this.$refs.searchForm.validate(["theTime"]);
+      await this.$refs.searchForm.validate();
       let aaa = this.dataList.find((v) => {
         if (v.money == "") {
           this.$message.error("请输入返利金额");

+ 24 - 13
src/views/finance/tax_rate.vue

@@ -79,12 +79,12 @@ export default {
   data() {
     return {
       mainForm: {
-        storageFeeTax: "",
-        enginPriceDifTax: "",
-        transportTax: "",
-        installTax: "",
-        stockTax: "",
-        depositTax: "",
+        storageFeeTax: null,
+        enginPriceDifTax: null,
+        transportTax: null,
+        installTax: null,
+        stockTax: null,
+        depositTax: null,
       },
     };
   },
@@ -94,19 +94,30 @@ export default {
   methods: {
     //修改
     async editFn() {
-      await getCommonTaxConfig(this.mainForm);
+      await getCommonTaxConfig({
+        storageFeeTax: Number((this.mainForm.storageFeeTax / 100).toFixed(2)),
+        enginPriceDifTax: Number(
+          (this.mainForm.enginPriceDifTax / 100).toFixed(2)
+        ),
+        transportTax: Number((this.mainForm.transportTax / 100).toFixed(2)),
+        installTax: Number((this.mainForm.installTax / 100).toFixed(2)),
+        stockTax: Number((this.mainForm.stockTax / 100).toFixed(2)),
+        depositTax: Number((this.mainForm.depositTax / 100).toFixed(2)),
+      });
+      this.$message.success("修改成功");
+      this.getData();
     },
     //获取税率数据
     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,
-        depositTax: res.data.depositTax,
+        storageFeeTax: res.data.storageFeeTax * 100,
+        enginPriceDifTax: res.data.enginPriceDifTax * 100,
+        transportTax: res.data.transportTax * 100,
+        installTax: res.data.installTax * 100,
+        stockTax: res.data.stockTax * 100,
+        depositTax: res.data.depositTax * 100,
       };
     },
   },

+ 21 - 20
src/views/finance/wallet.vue

@@ -9,6 +9,7 @@
       <el-form
         ref="searchForm"
         :model="searchForm"
+        :rules="rulesSearchForm"
         label-width="100px"
         size="small"
         label-position="left"
@@ -234,7 +235,7 @@ export default {
   data() {
     return {
       searchForm: {
-        customerId: "",
+        customerId: null,
       },
       customerList: [],
       listLoading: false, // 列表加载loading
@@ -244,6 +245,15 @@ export default {
         rebateRate: null,
       },
       dialogForm: false,
+      rulesSearchForm: {
+        customerId: [
+          {
+            required: true,
+            message: "请选择经销商",
+            trigger: "blur",
+          },
+        ],
+      },
       rules: {
         rebateRate: [
           {
@@ -256,7 +266,7 @@ export default {
     };
   },
   created() {
-    console.log(this.$route.query.id, 11, this.customerId);
+    // console.log(this.$route.query.id, 11, this.customerId);
     if (this.$route.query.id) {
       this.getDataWallet({
         customerId: this.$route.query.id,
@@ -289,16 +299,7 @@ export default {
     },
     //搜索
     async searchFn() {
-      // await this.$refs.searchForm.validate((valid, obj) => {
-      //   if (valid) {
-      //     console.log(valid, obj);
-      //     console.log(this.searchForm.customerId);
-      //     alert("submit!");
-      //   } else {
-      //     console.log("error submit!!");
-      //     return false;
-      //   }
-      // });
+      await this.$refs.searchForm.validate();
       this.getDataWallet({
         customerId: this.searchForm.customerId,
         type: "COMMONLY",
@@ -338,7 +339,7 @@ export default {
         });
       } else {
         this.getDataRebate({
-          customerId: this.customerId,
+          customerId: this.searchForm.customerId,
           type: "REBATE",
         });
       }
@@ -351,13 +352,13 @@ export default {
       this.addForm.rebateRate = v.rebateRate * 100;
       this.dialogForm = true;
     },
-    //一键生成
-    async generateFn() {
-      await getfinanceInit({ customerId: this.customerId });
-      this.getDataWallet();
-      this.getDataRebate();
-      this.$message.success("已生成");
-    },
+    // //一键生成
+    // async generateFn() {
+    //   await getfinanceInit({ customerId: this.customerId });
+    //   this.getDataWallet();
+    //   this.getDataRebate();
+    //   this.$message.success("已生成");
+    // },
     //
     async getDataRebate(data) {
       let res = await getWalletCustomerList(data);