Quellcode durchsuchen

修改产品费率

silent vor 4 Jahren
Ursprung
Commit
8a4104f69f

+ 10 - 1
src/views/ldt_mall/comps/mall-product-fee.vue

@@ -1,5 +1,10 @@
 <template>
   <div>
+    <el-dialog @close="dialogShow=false" append-to-body :close-on-click-modal="false" :visible.sync="dialogShow"
+               :destroy-on-close="false"
+               title="产品费率更改历史" width="80%">
+      <productfee ref="refName" :businessId="this.operateId" type="mall"></productfee>
+    </el-dialog>
     <avue-crud :data="data" v-model="form" :option="option" @on-load="onLoad">
       <template slot-scope="{type,size}" slot="menuLeft">
         <el-popover
@@ -44,14 +49,17 @@ import {
   modifyProductFee,
   productFeeTip
 } from "@/api/ldt_mall/mall";
+import productfee from "@/views/ldt_product_fee/productfee";
 
 export default {
   props: {
     operateId: String,
     merchantNo: String,
   },
+  components:{productfee},
   data() {
     return {
+      dialogShow: false,
       dialog: {
         loading: false,
         state: false,
@@ -263,7 +271,8 @@ export default {
       });
     },
     viewUpdateHistory() {
-      this.$router.push({path: `/ldt_product_fee/productfee/handle/mall/${this.operateId}`})
+      this.dialogShow = true;
+      // this.$router.push({path: `/ldt_product_fee/productfee/handle/mall/${this.operateId}`})
     },
     updateProductFee() {
       Object.assign(this.dialog.data, this.data);

+ 12 - 4
src/views/ldt_product_fee/productfee.vue

@@ -62,7 +62,7 @@
       </template>
     </avue-crud>
     <el-dialog
-      title="修改产品费率"
+      title="查询产品费率修改"
       :visible.sync="dialog.state"
       :close-on-click-modal="false"
       :append-to-body="true"
@@ -80,6 +80,14 @@
 
   export default {
     components:{ProductFee},
+    props:{
+      businessId:{
+        type: "String"
+      },
+      type:{
+        type: "String"
+      }
+    },
     data() {
       return {
         dialog:{
@@ -359,10 +367,10 @@
       },
       onLoad(page, params = {}) {
         this.loading = true;
-        if(this.$route.params.type==="mall"){
-          params.mallId = this.$route.params.id;
+        if((this.$route.params.type || this.type)==="mall"){
+          params.mallId = this.$route.params.id || this.businessId;
         }else{
-          params.shopId = this.$route.params.id;
+          params.shopId = this.$route.params.id || this.businessId;
         }
         getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
           const data = res.data.data;

+ 10 - 1
src/views/ldt_shop/comps/shop-product-fee.vue

@@ -1,5 +1,10 @@
 <template>
   <div>
+    <el-dialog @close="dialogShow=false" append-to-body :close-on-click-modal="false" :visible.sync="dialogShow"
+               :destroy-on-close="false"
+               title="产品费率更改历史" width="80%">
+      <productfee ref="refName" :businessId="this.operateId" type="shop"></productfee>
+    </el-dialog>
     <avue-crud :data="data" v-model="form" :option="option" @on-load="onLoad">
       <template slot-scope="{type,size}" slot="menuLeft">
         <el-popover
@@ -44,14 +49,17 @@ import {
   modifyProductFee,
   productFeeTip
 } from "@/api/ldt_shop/shop";
+import productfee from "@/views/ldt_product_fee/productfee";
 
 export default {
   props: {
     operateId: String,
     merchantNo: String,
   },
+  components:{productfee},
   data() {
     return {
+      dialogShow: false,
       dialog: {
         loading: false,
         state: false,
@@ -263,7 +271,8 @@ export default {
       });
     },
     viewUpdateHistory() {
-      this.$router.push({path: `/ldt_product_fee/productfee/handle/shop/${this.operateId}`})
+      this.dialogShow = true;
+      // this.$router.push({path: `/ldt_product_fee/productfee/handle/shop/${this.operateId}`})
     },
     updateProductFee() {
       Object.assign(this.dialog.data, this.data);