huangxiao 1 månad sedan
förälder
incheckning
c75410d57f

+ 4 - 2
src/main/webapp/WEB-INF/manager/tf/enterprise-products/form.ftl

@@ -267,7 +267,7 @@ placeholder="请输入价格"
         methods: {
 
             back: function (){
-                ms.util.openSystemUrl("/tf/enterpriseProducts/index.do",true);
+                ms.util.openSystemUrl("/tf/enterpriseProducts/index.do?id="+ms.util.getParameter("productEnterpriseId"),true);
             },
 
             save:function() {
@@ -296,7 +296,7 @@ placeholder="请输入价格"
                                     message: "保存成功",
                                     type: 'success'
                                 });
-                                ms.util.openSystemUrl("/tf/enterpriseProducts/index.do",that.form.id > 0);
+                                ms.util.openSystemUrl("/tf/enterpriseProducts/index.do?id="+ms.util.getParameter("productEnterpriseId"),that.form.id > 0);
                             } else {
                                 that.$notify({
                                     title: "错误",
@@ -420,6 +420,8 @@ placeholder="请输入价格"
             var that = this;
 
             this.form.id = ms.util.getParameter("id");
+            this.form.productEnterpriseId = ms.util.getParameter("productEnterpriseId");
+            console.log(this.form);
             if (this.form.id) {
                 this.get(this.form.id);
             }

+ 4 - 5
src/main/webapp/WEB-INF/manager/tf/enterprise-products/index.ftl

@@ -308,8 +308,7 @@
                     pageSize : that.pageSize
                 }
                 var form = JSON.parse(JSON.stringify(that.form))
-
-
+                form.productEnterpriseId = ms.util.getParameter("id");
                 if(isSearch) {
                     //删除空字符串
                     for (var key in form){
@@ -365,7 +364,7 @@
                                     message:"删除成功"
                                 });
                                 //删除成功,刷新列表
-                                that.list();
+                                that.list(true);
                             }else {
                                 that.$notify({
                                     title: "错误",
@@ -382,9 +381,9 @@
             //新增
             save:function(id){
                 if(id){
-                    ms.util.openSystemUrl("/tf/enterpriseProducts/form.do?id="+id);
+                    ms.util.openSystemUrl("/tf/enterpriseProducts/form.do?productEnterpriseId=" + ms.util.getParameter("id") + "&id=" + id);
                 }else {
-                    ms.util.openSystemUrl("/tf/enterpriseProducts/form.do");
+                    ms.util.openSystemUrl("/tf/enterpriseProducts/form.do?productEnterpriseId=" + ms.util.getParameter("id"));
                 }
             },
 

+ 12 - 0
src/main/webapp/WEB-INF/manager/tf/enterprise/index.ftl

@@ -149,6 +149,10 @@
                     <el-table-column  min-width="180" align="center" label="创建时间" prop="createDate"></el-table-column>
                     <el-table-column label="操作"  width="180" align="center" fixed="right">
                             <template #default="scope">
+                                <@shiro.hasPermission name="tf:enterpriseProducts:view">
+                                    <el-link type="primary" :underline="false" @click="openlist(scope.row.id,scope.row.enterpriseName)">产品管理</el-link>
+                                </@shiro.hasPermission>
+
                                 <@shiro.hasPermission name="tf:enterprise:update">
                                     <el-link type="primary" :underline="false" @click="save(scope.row.id)">编辑</el-link>
                                 </@shiro.hasPermission>
@@ -411,6 +415,14 @@
                     ms.util.openSystemUrl("/tf/enterprise/form.do");
                 }
             },
+            //产品管理
+            openlist:function(id,name){
+                window.parent.indexVue.open({
+                    id: "E-"+id,
+                    modelTitle: "产品管理-"+name,
+                    modelUrl: "/tf/enterpriseProducts/index.do?id=" + id,
+                })
+            },
 
             //pageSize改变时会触发
             sizeChange:function(pagesize) {