From 3a154bdb0a5aaa2c0ac3eac95a6ba747068bd454 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 13 一月 2026 10:00:37 +0800
Subject: [PATCH] 优化

---
 admin/src/views/business/jkCustomer.vue |  169 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 169 insertions(+), 0 deletions(-)

diff --git a/admin/src/views/business/jkCustomer.vue b/admin/src/views/business/jkCustomer.vue
new file mode 100644
index 0000000..eb890d6
--- /dev/null
+++ b/admin/src/views/business/jkCustomer.vue
@@ -0,0 +1,169 @@
+<template>
+  <TableLayout :permissions="['business:jkcustomer:query']">
+    <!-- 鎼滅储琛ㄥ崟 -->
+    <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
+      <el-form-item label="瀹㈡埛绠�鐮�" prop="code">
+        <el-input v-model="searchForm.code" placeholder="璇疯緭鍏ュ鎴风畝鐮�" clearable @keypress.enter.native="search"></el-input>
+      </el-form-item>
+      <el-form-item label="瀹㈡埛鍚嶇О" prop="name">
+        <el-input v-model="searchForm.name" placeholder="璇疯緭鍏ュ鎴峰悕绉�" clearable @keypress.enter.native="search"></el-input>
+      </el-form-item>
+      <el-form-item label="鍦板潃" prop="location">
+        <el-input v-model="searchForm.location" placeholder="璇疯緭鍏ュ湴鍧�"  clearable @keypress.enter.native="search"></el-input>
+      </el-form-item>
+      <el-form-item label="閰嶉�佸懆鏈�" prop="lineWeeks">
+        <el-select v-model="searchForm.lineWeeks" clearable filterable placeholder="璇烽�夋嫨閰嶉�佸懆鏈�"  @change="search">
+          <el-option v-for="item in weeksList" :key="item" :label="item" :value="item">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="鎵�灞炰富绾胯矾" prop="categoryId">
+        <el-select v-model="searchForm.categoryId" clearable filterable placeholder="璇烽�夋嫨鎵�灞炰富绾胯矾"  @change="loadLines();search()">
+          <el-option v-for="item in categoryList" :key="item.id" :label="item.name" :value="item.id">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="閫佽揣绾胯矾" prop="lineId">
+        <el-select v-model="searchForm.lineId" clearable filterable placeholder="璇烽�夋嫨閫佽揣绾胯矾"  @change="search">
+          <el-option v-for="item in lineList" :key="item.id" :label="item.name" :value="item.id">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="浜ら�氳鍒掔姸鎬�" prop="distanceStatus">
+        <el-select v-model="searchForm.distanceStatus" clearable filterable placeholder="璇烽�夋嫨浜ら�氳鍒掔姸鎬�"  @change="search">
+          <el-option  :value="2" label="鏈畾浣�"></el-option>
+          <el-option  :value="0" label="鏈鍒�"></el-option>
+          <el-option  :value="1" label="宸茶鍒�"></el-option>
+        </el-select>
+      </el-form-item>
+      <section>
+        <el-button type="primary" @click="search">鎼滅储</el-button>
+        <el-button type="primary" :loading="isWorking.export" v-permissions="['business:jkcustomer:exportExcel']" @click="exportExcel">瀵煎嚭</el-button>
+        <el-button @click="reset">閲嶇疆</el-button>
+      </section>
+    </el-form>
+    <!-- 琛ㄦ牸鍜屽垎椤� -->
+    <template v-slot:table-wrap>
+      <ul class="toolbar" v-permissions="['business:jkcustomer:create', 'business:jkcustomer:delete']">
+<!--
+        <li><el-button type="primary" @click="$refs.operaJkCustomerWindow.open('鏂板缓浜ゆ帶-瀹㈡埛淇℃伅琛�')" icon="el-icon-plus" v-permissions="['business:jkcustomer:create']">鏂板缓</el-button></li>
+-->
+        <li><el-button icon="el-icon-upload"  type="primary" @click="$refs.OperaJkCustomerImportWindowRef.open('瀹㈡埛瀵煎叆')"  v-permissions="['business:jkcustomer:create']">瀹㈡埛瀵煎叆</el-button></li>
+        <li><el-button type="danger" @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:jkcustomer:delete']">鍒犻櫎</el-button></li>
+      </ul>
+      <el-table
+          :height="tableHeightNew"
+        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="code" label="瀹㈡埛绠�鐮�" min-width="100px"></el-table-column>
+        <el-table-column prop="name" label="瀹㈡埛鍚嶇О" min-width="100px"></el-table-column>
+        <el-table-column prop="location" label="鍦板潃" min-width="200px" show-tooltip-when-overflow></el-table-column>
+        <el-table-column prop="locationInfo" label="缁忕含搴�" min-width="150px">  </el-table-column>
+        <el-table-column prop="lineWeeks" label="閰嶉�佸懆鏈�" min-width="100px"></el-table-column>
+        <el-table-column prop="lineName" label="閫佽揣绾胯矾" min-width="200px" show-tooltip-when-overflow></el-table-column>
+        <el-table-column prop="categoryName" label="鎵�灞炰富绾胯矾" min-width="100px"></el-table-column>
+        <el-table-column prop="sortno" label="搴忓彿" min-width="100px"></el-table-column>
+        <el-table-column prop="distanceStatus" label="浜ら�氳鍒掔姸鎬�" min-width="100px" align="center">
+          <template slot-scope="{row}">
+            <span v-if="row.distanceStatus === 2" class="red">鏈畾浣�</span>
+            <span v-else-if="row.distanceStatus === 1" class="green">宸茶鍒�</span>
+            <span v-else class="blue">鏈鍒�</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="editDate" label="鏇存柊鏃堕棿" min-width="140px"></el-table-column>
+        <el-table-column
+          v-if="containPermissions(['business:jkcustomer:update', 'business:jkcustomer:delete'])"
+          label="鎿嶄綔"
+          min-width="120"
+          fixed="right"
+        >
+          <template slot-scope="{row}">
+            <el-button type="text" @click="$refs.operaJkCustomerWindow.open('缂栬緫瀹㈡埛淇℃伅', row)" icon="el-icon-edit" v-permissions="['business:jkcustomer:update']">缂栬緫</el-button>
+            <el-button type="text" style="color: red" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:jkcustomer:delete']">鍒犻櫎</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        @size-change="handleSizeChange"
+        @current-change="handlePageChange"
+        :pagination="tableData.pagination"
+      >
+      </pagination>
+    </template>
+    <!-- 鏂板缓/淇敼 -->
+    <OperaJkCustomerWindow ref="operaJkCustomerWindow" @success="handlePageChange"/>
+    <OperaJkCustomerImportWindow ref="OperaJkCustomerImportWindowRef" @success="handlePageChange" />
+  </TableLayout>
+</template>
+
+<script>
+import BaseTable from '@/components/base/BaseTable'
+import TableLayout from '@/layouts/TableLayout'
+import Pagination from '@/components/common/Pagination'
+import OperaJkCustomerWindow from '@/components/business/OperaJkCustomerWindow'
+import OperaJkCustomerImportWindow from '@/components/business/OperaJkCustomerImportWindow'
+import { fetchCateList } from '@/api/business/category'
+import { allList } from '@/api/business/jkLine'
+export default {
+  name: 'JkCustomer',
+  extends: BaseTable,
+  components: { TableLayout, Pagination, OperaJkCustomerWindow, OperaJkCustomerImportWindow },
+  data () {
+    return {
+      // 鎼滅储
+      searchForm: {
+        id: '',
+        categoryId: '',
+        name: '',
+        code: '',
+        distanceStatus: '',
+        location: '',
+        lineWeeks: '',
+        lineId: '',
+        status: '',
+        sortnum: ''
+      },
+      categoryList: [],
+      lineList: [],
+      weeksList: ['鍛ㄤ竴', '鍛ㄤ簩', '鍛ㄤ笁', '鍛ㄥ洓', '鍛ㄤ簲', '鍛ㄥ叚', '鍛ㄦ棩']
+    }
+  },
+  created () {
+    this.config({
+      module: '浜ゆ帶-瀹㈡埛淇℃伅琛�',
+      api: '/business/jkCustomer',
+      'field.id': 'id',
+      'field.main': 'id'
+    })
+    this.search()
+    this.loadCategory()
+    this.loadLines()
+  },
+  methods: {
+    reset() {
+      this.lineList = []
+      this.$refs.searchForm.resetFields()
+      this.search()
+    },
+    loadCategory () {
+      fetchCateList({
+        type: 4
+      }).then(res => {
+        this.categoryList = res
+      })
+    },
+    loadLines () {
+      this.searchForm.lineId =''
+      allList({
+        categoryId: this.searchForm.categoryId
+      }).then(res => {
+        this.lineList = res
+      })
+    }
+  }
+}
+</script>

--
Gitblit v1.9.3