From 64a6a81753abfc712b1ab384de0f7afb87f4fb23 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 18 七月 2024 17:02:52 +0800
Subject: [PATCH] 提交

---
 admin/src/views/business/customerLog.vue |   50 +++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 39 insertions(+), 11 deletions(-)

diff --git a/admin/src/views/business/customerLog.vue b/admin/src/views/business/customerLog.vue
index d0a6099..225481f 100644
--- a/admin/src/views/business/customerLog.vue
+++ b/admin/src/views/business/customerLog.vue
@@ -42,25 +42,27 @@
     </el-form>
     <!-- 琛ㄦ牸鍜屽垎椤� -->
     <template v-slot:table-wrap>
-<!--  <ul class="toolbar" v-permissions="['business:customerlog:create', 'business:customerlog:delete']">
-        <li><el-button type="primary" @click="$refs.operaCustomerLogWindow.open('鏂板缓瀹㈡埛鐣欒祫璁板綍淇℃伅琛�')" icon="el-icon-plus" v-permissions="['business:customerlog:create']">鏂板缓</el-button></li>
-        <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:customerlog:delete']">鍒犻櫎</el-button></li>
-      </ul>-->
+      <ul class="toolbar" v-permissions="['business:customerlog:create', 'business:customerlog:delete']">
+        <li><el-button type="primary" @click="reSubmitAll(0)" icon="el-icon-plus" v-permissions="['business:customerlog:update']">鎻愪氦鍏ㄩ儴銆愭湭鎻愪氦銆戞暟鎹�</el-button></li>
+        <li><el-button type="primary" @click="reSubmitAll(2)" icon="el-icon-plus" v-permissions="['business:customerlog:update']">閲嶆柊鎻愪氦銆愬け璐ャ�戞暟鎹�</el-button></li>
+      </ul>
       <el-table
         v-loading="isWorking.search"
         :data="tableData.list"
         stripe
         @selection-change="handleSelectionChange"
       >
-        <el-table-column type="selection" width="55"></el-table-column>
-        <el-table-column prop="createDate" label="鍒涘缓鏃堕棿" min-width="120px"></el-table-column>
-        <el-table-column prop="type" label="鎻愪氦绫诲瀷" min-width="100px">
+        <el-table-column  prop="index"  width="55"><template slot-scope="scope">{{scope.$index+1}}</template></el-table-column>
+        <el-table-column prop="type" label="鎻愪氦绫诲瀷" fixed min-width="100px">
           <template slot-scope="{row}">
               <span v-if="row.type ==0">娴嬭瘯瑁呬慨椋庢牸</span>
               <span v-if="row.type ==1">0鍏冨畾鍒�</span>
               <span v-if="row.type ==2">瑁呬慨璁$畻鍣�</span>
           </template>
         </el-table-column>
+        <el-table-column prop="phone" label="鎵嬫満鍙�" fixed min-width="100px"></el-table-column>
+        <el-table-column prop="name" label="濮撳悕" fixed min-width="100px"></el-table-column>
+        <el-table-column prop="createDate" label="鍒涘缓鏃堕棿"  min-width="120px"></el-table-column>
         <el-table-column prop="orderDate" label="棰勭害閲忔埧鏃堕棿" min-width="120px"></el-table-column>
         <el-table-column prop="plaDate" label="璁″垝瑁呬慨寮�濮嬫椂闂�" min-width="120px">
           <template slot-scope="{row}">
@@ -119,7 +121,6 @@
         <el-table-column prop="styleInfo" label="椋庢牸" min-width="100px"></el-table-column>
         <el-table-column prop="provinceName" label="鐪佷唤鍚嶇О" min-width="100px"></el-table-column>
         <el-table-column prop="cityName" label="鍩庡競鍚嶇О" min-width="100px"></el-table-column>
-        <el-table-column prop="phone" label="鎵嬫満鍙�" min-width="100px"></el-table-column>
         <el-table-column prop="budget" label="瑁呬慨棰勭畻(鍏�)" min-width="100px"></el-table-column>
         <el-table-column prop="crmStatus" label="crm鎻愪氦鐘舵��" min-width="100px">
           <template slot-scope="{row}">
@@ -133,12 +134,13 @@
         <el-table-column
           v-if="containPermissions(['business:customerlog:update', 'business:customerlog:delete'])"
           label="鎿嶄綔"
-          min-width="120"
+          min-width="150"
           fixed="right"
+          align="center"
         >
           <template slot-scope="{row}">
-            <el-button type="text" @click="$refs.operaCustomerLogWindow.open('缂栬緫瀹㈡埛鐣欒祫璁板綍淇℃伅琛�', row)" icon="el-icon-edit" v-permissions="['business:customerlog:update']">缂栬緫</el-button>
-            <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:customerlog:update']" v-if="row.crmStatus !=1">閲嶆柊鎻愪氦crm</el-button>
+            <!-- <el-button type="text" @click="$refs.operaCustomerLogWindow.open('缂栬緫瀹㈡埛鐣欒祫璁板綍淇℃伅琛�', row)" icon="el-icon-edit" v-permissions="['business:customerlog:update']">缂栬緫</el-button>-->
+            <el-button type="text" @click="reSubmit(row)" icon="el-icon-edit" v-permissions="['business:customerlog:update']" v-if="row.crmStatus !=1">閲嶆柊鎻愪氦crm</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -165,6 +167,7 @@
   components: { TableLayout, Pagination, OperaCustomerLogWindow },
   data () {
     return {
+      running: false,
       // 鎼滅储
       searchForm: {
         queryEndDate: '',
@@ -188,6 +191,31 @@
   },
   methods: {
     // 鏌ヨ鏁版嵁
+    reSubmit (row) {
+      this.api.reSubmit({ id: row.id })
+        .then(res => {
+          this.handlePageChange()
+        })
+        .finally(() => {
+        })
+    },
+    reSubmitAll (status) {
+      this.$dialog.actionConfirm('纭杩涜璇ユ搷浣滃悧锛�?')
+        .then(() => {
+          this.running = true
+          this.api.reSubmitAll({ crmStatus: status })
+            .then(res => {
+              this.handlePageChange()
+            })
+            .finally(() => {
+            })
+            .catch(e => {
+            })
+            .finally(() => {
+              this.running = false
+            })
+        })
+    }
   }
 }
 </script>

--
Gitblit v1.9.3