From 76795e84d3d8399ce5804998fe877b57d1666849 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期日, 07 四月 2024 18:29:39 +0800
Subject: [PATCH] 获取纤度登记表列表的接口联调和字段调试+获取纤度登记表的详情接口联调字段调试+删纤度登记表的接口联调

---
 src/views/productManage/silkRegisterForm/index.vue |   57 ++++++++++++++++++++++++++-------------------------------
 1 files changed, 26 insertions(+), 31 deletions(-)

diff --git a/src/views/productManage/silkRegisterForm/index.vue b/src/views/productManage/silkRegisterForm/index.vue
index f301c9d..a82b23d 100644
--- a/src/views/productManage/silkRegisterForm/index.vue
+++ b/src/views/productManage/silkRegisterForm/index.vue
@@ -30,8 +30,8 @@
             <template slot="tableButton">
               <el-table-column label="鎿嶄綔" width="90" fixed="right">
                 <template slot-scope="scope">
-                  <el-button @click="handleClick(scope.row)" type="text" size="small">缂栬緫</el-button>
-                  <el-button @click="delClick(scope.row.id)" type="text" size="small">鍒犻櫎</el-button>
+                  <el-button @click="handleClick(scope.row)" type="text" size="small">淇敼</el-button>
+                  <el-button @click="delClick(scope.row.ID)" type="text" size="small">鍒犻櫎</el-button>
                 </template>
               </el-table-column>
             </template>
@@ -46,7 +46,7 @@
 </template>
 
 <script>
-import { getRegisterList, getDeleteRegister } from "@/api/productManage/silkRegisterForm.js"
+import { getRegisterList,getDeleteRegister } from "@/api/productManage/silkRegisterForm.js"
 import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
 
 export default {
@@ -61,11 +61,6 @@
       tableList: {},
       loading: false,
       searchOptions: [],
-      editConfig: {
-        visible: false,
-        title: "鏂板缓",
-        infomation: {}
-      },
       search_map: {},
       tableColumn: [
         { label: "缂栧彿", prop: "number", min: 120, default: true }, // 涓婚
@@ -135,20 +130,20 @@
         .then((res) => {
           console.log(res)
           if (res.code === 200) {
-            if (res.data.list && res.data.list.length > 0) {
-              const list = res.data.list.map((item) => {
-                return {
-                  ...item,
-                  client_name: item.client.name,
-                  contact_name: item.contact.name,
-                  client_status: item.client_status.name,
-                  phone: item.contact.phone,
-                  member_name: item.member.username,
-                  contact_information_name: item.contact_information.name
-                }
-              })
-              this.tableList.tableInfomation = list || []
-              this.pagerOptions.totalCount = res.data.count
+            if (res.data && res.data.length > 0) {
+              // const list = res.data.map((item) => {
+              //   return {
+              //     ...item,
+              //     client_name: item.client.name,
+              //     contact_name: item.contact.name,
+              //     client_status: item.client_status.name,
+              //     phone: item.contact.phone,
+              //     member_name: item.member.username,
+              //     contact_information_name: item.contact_information.name
+              //   }
+              // })
+              this.tableList.tableInfomation =  res.data || []
+              this.pagerOptions.totalCount = res.count
             } else {
               this.tableList.tableInfomation = []
             }
@@ -181,23 +176,23 @@
     },
     // 缂栬緫
     handleClick(row) {
-      console.log(row)
-      this.editConfig.title = "缂栬緫"
-      let config=JSON.parse(JSON.stringify(row));
-      config.client_status_id=config.client_status_id?config.client_status_id:null
-      config.contact_information_id=config.contact_information_id?config.contact_information_id:null
-      this.editConfig.infomation = { ...config, sale_chance_name:row.sale_chance.name, sales_leads_name: "" }
-      this.editConfig.visible = true
+      this.$router.push({
+                path:"/productManage/silkRegisterForm/addPage",
+                query:{
+                  id:row.ID,
+                  activeName:'first'
+                }
+              });
     },
     // 鍒犻櫎
     delClick(id) {
-      this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", {
+      this.$confirm("璇风‘璁ゆ槸鍚﹀垹闄わ紝鍒犻櫎鎿嶄綔涓嶅彲鎾ら攢?", "璀﹀憡", {
         confirmButtonText: "纭畾",
         cancelButtonText: "鍙栨秷",
         type: "warning"
       })
         .then(() => {
-          getDeleteRegister({ ids: id }).then((response) => {
+          getDeleteRegister({ id: id }).then((response) => {
             if (response.code === 200) {
               this.$message.success("鍒犻櫎鎴愬姛")
               this.getData()

--
Gitblit v1.8.0