From e4f9739d74323aacf09d139700f22a383910ee97 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 04 三月 2026 10:38:32 +0800
Subject: [PATCH] 合并

---
 admin/src/views/business/labelsYunFee.vue |   51 +++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 47 insertions(+), 4 deletions(-)

diff --git a/admin/src/views/business/labelsYunFee.vue b/admin/src/views/business/labelsYunFee.vue
index 0c9601f..c1d00d4 100644
--- a/admin/src/views/business/labelsYunFee.vue
+++ b/admin/src/views/business/labelsYunFee.vue
@@ -3,7 +3,7 @@
     <!-- 鎼滅储琛ㄥ崟 -->
     <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
       <el-form-item label="鍚嶇О" prop="name">
-        <el-input v-model="searchForm.name" placeholder="璇疯緭鍏ュ悕绉�" @keypress.enter.native="search"></el-input>
+        <el-input v-model="searchForm.name" placeholder="璇疯緭鍏ュ悕绉�" clearable @keypress.enter.native="search"></el-input>
       </el-form-item>
       <section>
         <el-button type="primary" @click="search">鎼滅储</el-button>
@@ -28,7 +28,7 @@
         <el-table-column prop="areas" label="鍖呭惈鍦板尯" min-width="200px" align="center">
           <template slot-scope="{row}">
             <div v-if="row.areaList && row.areaList.length" >
-              <span v-for="item in row.areaList">{{item.name}}锛�> </span>
+              <span v-for="item in row.areaList">{{item.name}}锛�</span>
             </div>
           </template>
         </el-table-column>
@@ -42,6 +42,12 @@
                 inactive-color="#ff4949"
                 @change="statusChange(row)"
             ></el-switch>
+          </template>
+        </el-table-column>
+        <el-table-column prop="param" label="璐圭敤淇℃伅" min-width="200px">
+          <template slot-scope="{row}">
+             <span>棣栭噸锛歿{row.weight0||0}}kg锛涢閲嶈繍璐癸細{{row.fee0||0}}鍏冿紱</span><br>
+             <span>缁噸锛歿{row.weight1||0}}kg锛涚画閲嶈繍璐瑰鍔狅細{{row.fee1||0}}鍏冿紱</span>
           </template>
         </el-table-column>
         <el-table-column prop="sortnum" label="鎺掑簭鐮�" min-width="100px"></el-table-column>
@@ -76,7 +82,7 @@
 import Pagination from '@/components/common/Pagination'
 import OperaLabelsFeeAreaWindow from '@/components/business/OperaLabelsFeeAreaWindow'
 export default {
-  name: 'Labels',
+  name: 'labelsYunFee',
   extends: BaseTable,
   components: { OperaLabelsFeeAreaWindow, TableLayout, Pagination },
   data () {
@@ -99,7 +105,7 @@
   },
   methods: {
     statusChange (row) {
-      this.api.updateById({ id: row.id, status: row.status })
+      this.api.updateStatusById({ id: row.id, status: row.status })
         .then(() => {
           this.$message.success('鎿嶄綔鎴愬姛')
         })
@@ -109,6 +115,43 @@
         .then(() => {
           this.handlePageChange()
         })
+    },
+    handlePageChange (pageIndex) {
+      this.__checkApi()
+      this.tableData.pagination.pageIndex = pageIndex || this.tableData.pagination.pageIndex
+      this.isWorking.search = true
+      this.api.fetchList({
+        page: this.tableData.pagination.pageIndex,
+        capacity: this.tableData.pagination.pageSize,
+        model: this.searchForm,
+        sorts: this.tableData.sorts
+      })
+        .then(data => {
+          this.tableData.list = data.records
+          this.tableData.pagination.total = data.total
+          if (this.tableData.pagination.pageIndex === 1) {
+            this.tableData.totalData = data.countData || {}
+          }
+          this.tableData.list.forEach((item, index) => {
+            if (item.param) {
+              try {
+                var t = JSON.parse(item.param)
+                if (t) {
+                  item.weight0 = parseFloat(t.weight0 || 0)
+                  item.fee0 = parseFloat(t.fee0 || 0)
+                  item.weight1 = parseFloat(t.weight1 || 0)
+                  item.fee1 = parseFloat(t.fee1 || 0)
+                }
+              } catch (e) {}
+            }
+          })
+        })
+        .catch(e => {
+          this.$tip.apiFailed(e)
+        })
+        .finally(() => {
+          this.isWorking.search = false
+        })
     }
   }
 }

--
Gitblit v1.9.3