戴艳蓉 3 년 전
부모
커밋
c477364b27

+ 10 - 12
src/apis/service/serviceParam/terrace/index.js

@@ -3,19 +3,17 @@ import http from "@/apis/axios";
 const api = "admin/";
 export default {
   // 添加
-  add: (data, params) => http(api + "brandcreate", data, "post", params),
-  // 删除
-  delete: (data, params) => http(api + "delete", data, "post", params),
-  // 分页查询
-  list: (data, params) => http(api + "brandlist", data, "post", params),
+  add: (data, params) => http(api + "platformcreate", data, "post", params),
   // 详情
-  detail: (data, params) => http(api + "brandinfo", data, "post", params),
+  detail: (data, params) => http(api + "platforminfo", data, "post", params),
+
+  // 分页查询
+  list: (data, params) => http(api + "platformlist", data, "post", params),
+
   // 更新
-  update: (data, params) => http(api + "brandsave", data, "post", params),
+  update: (data, params) => http(api + "platformedit", data, "post", params),
   // 修改状态
-  status: (data, params) => http(api + 'brandstatus', data, 'post', params),
-  // 提交审核申请
-  again: (data, params) => http(api + 'brandagain', data, 'post', params),
-  // 审核人提交审核结果
-  exam: (data, params) => http(api + 'brandexam', data, 'post', params),
+  status: (data, params) => http(api + 'platformstatus', data, 'post', params),
+  // 删除
+  delete: (data, params) => http(api + "platformdelete", data, "post", params),
 };

+ 2 - 1
src/views/client/business/addEdit.vue

@@ -61,9 +61,10 @@
 </template>
    <script>
 import resToken from "@/mixins/resToken";
+import asyncRequest from "@/apis/service/client/business";
 export default {
   name: "goodsBack",
-  props: ["showModel", "sitem", "id"],
+  props: ["showModel", "isDetail", "id"],
   mixins: [resToken],
   data() {
     return {

+ 19 - 9
src/views/client/business/index.vue

@@ -69,7 +69,7 @@
             :size="searchSize"
             type="success"
             style="float: right"
-            @click="openModal({}, '003')"
+            @click="openModal('add','003')"
           >
             添加
           </el-button>
@@ -98,11 +98,12 @@
         <el-table-column prop="name" label="名称"> </el-table-column>
         <el-table-column prop="code" label="编码"> </el-table-column>
 
-        <el-table-column fixed="right" label="操作" width="50">
+        <el-table-column fixed="right" label="操作" width="150">
+          <!-- v-if="scope.row.kh === 0" -->
           <template slot-scope="scope">
             <el-tooltip
               effect="dark"
-              v-if="scope.row.kh === 0"
+              
               content="查询下一级"
               placement="top"
             >
@@ -117,7 +118,15 @@
               content="查看公司信息"
               placement="top"
             >
-              <i class="el-icon-view tb-icon" @click="openModal(scope.row)"></i>
+              <i class="el-icon-view tb-icon" @click="openModal(scope.row.id,'007')"></i>
+            </el-tooltip>
+              <el-tooltip
+              effect="dark"
+              v-if="scope.row.kh === 1"
+              content="编辑公司信息"
+              placement="top"
+            >
+              <i class="el-icon-edit tb-icon" @click="openModal(scope.row.id,'007')"></i>
             </el-tooltip>
           </template>
         </el-table-column>
@@ -126,7 +135,7 @@
       <add-edit
         :showModel="showModel"
         :id="modelId"
-        :sitem="sitem"
+        :is-detail="isDetail"
         @refresh="searchList"
         @cancel="showModel = false"
       ></add-edit>
@@ -170,8 +179,9 @@ export default {
         { id: 1, label: "公司" },
       ],
       titleList: [],
+      isDetail:false,
+      modelId:"",
       loading: true,
-      sitem: null,
       showModel: false,
       parmValue: {
         name: "",
@@ -185,9 +195,9 @@ export default {
     this.searchList();
   },
   methods: {
-    openModal(row, type) {
-      this.sitem = row;
-      this.modelId = type;
+    openModal(id,type) {
+      this.modelId = id;
+      this.isDetail=type
       this.showModel = true;
     },
     restSearch() {

+ 6 - 6
src/views/serviceParam/terrace/addEdit.vue

@@ -24,9 +24,9 @@
             label-width="80px"
             class="demo-ruleForm"
           >
-            <el-form-item label="平台名称" prop="terrace_name">
+            <el-form-item label="平台名称" prop="platform_name">
               <el-input
-                v-model="ruleForm.terrace_name"
+                v-model="ruleForm.platform_name"
                 :disabled="id == '007'"
                 placeholder="平台名称"
                 minlength="20"
@@ -63,11 +63,11 @@ export default {
       actionList: [],
       ruleForm: {
         id: "",
-        terrace_name: "",
+        platform_name: "",
       },
       rulesThis: this.rules,
       rules: {
-        terrace_name: [
+        platform_name: [
           { required: true, message: "平台名称不能为空", trigger: "blur" },
         ],
       },
@@ -108,10 +108,10 @@ export default {
         if (this.$refs.ruleForm) {
           this.$refs.ruleForm.resetFields();
           this.$refs.ruleForm.clearValidate();
-          const { id, terrace_name } = this.sitem;
+          const { id, platform_name } = this.sitem;
           this.ruleForm = {
             id: id || "",
-            terrace_name: terrace_name || "",
+            platform_name: platform_name || "",
           };
         }
       });

+ 3 - 1
src/views/serviceParam/terrace/index.vue

@@ -80,7 +80,7 @@
             <el-col :span="4" style="width: 373px">
               <el-input
                 :size="searchSize"
-                v-model="parmValue.name"
+                v-model="parmValue.platform_name"
                 :maxlength="40"
                 @blur="
                   pageInfo.curr = 1;
@@ -249,6 +249,7 @@ export default {
         end: "",
         status: "",
         creater: "",
+        platform_name:""
       },
       // 状态
       statusOptions: [
@@ -322,6 +323,7 @@ export default {
         end: "",
         status: "",
         creater: "",
+        platform_name:""
       };
       this.searchList();
     },