From db42d47f5692ef64e5436c5a6d29dcb537b44596 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 26 一月 2026 16:36:13 +0800
Subject: [PATCH] 浪潮对接单点登录:mis调整

---
 src/views/procurementManagement/advancedPriceManagement/index.vue |  773 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 773 insertions(+), 0 deletions(-)

diff --git a/src/views/procurementManagement/advancedPriceManagement/index.vue b/src/views/procurementManagement/advancedPriceManagement/index.vue
new file mode 100644
index 0000000..84bd160
--- /dev/null
+++ b/src/views/procurementManagement/advancedPriceManagement/index.vue
@@ -0,0 +1,773 @@
+<template>
+  <div class="app-container">
+    <!-- 鎼滅储鍖哄煙 -->
+    <el-card class="search-card" shadow="never">
+      <el-form :model="searchForm" :inline="true" label-width="100px">
+        <el-form-item label="鍟嗗搧鍚嶇О锛�">
+          <el-input v-model="searchForm.productName" placeholder="璇疯緭鍏ュ晢鍝佸悕绉�" clearable style="width: 200px" />
+        </el-form-item>
+        <el-form-item label="渚涘簲鍟嗭細">
+          <el-select v-model="searchForm.supplierId" placeholder="璇烽�夋嫨渚涘簲鍟�" clearable style="width: 200px">
+            <el-option v-for="supplier in supplierList" :key="supplier.id" :label="supplier.name" :value="supplier.id" />
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="handleSearch" :loading="loading">
+            <el-icon><Search /></el-icon>
+            鎼滅储
+          </el-button>
+          <el-button @click="resetSearch">
+            <el-icon><Refresh /></el-icon>
+            閲嶇疆
+          </el-button>
+        </el-form-item>
+      </el-form>
+    </el-card>
+
+    <!-- 鍔熻兘鎸夐挳鍖哄煙 -->
+    <el-card class="action-card" shadow="never">
+      <div class="action-buttons">
+        <el-button type="primary" @click="openDialog('add')">
+          <el-icon><Plus /></el-icon>
+          鏂板浠锋牸
+        </el-button>
+        <el-button type="success" @click="openBatchDiscountDialog">
+          <el-icon><Discount /></el-icon>
+          鎵归噺鎶樻墸
+        </el-button>
+        <el-button type="info" @click="exportData">
+          <el-icon><Download /></el-icon>
+          瀵煎嚭鏁版嵁
+        </el-button>
+        <el-button type="danger" @click="handleBatchDelete" :disabled="selectedRows.length === 0">
+          <el-icon><Delete /></el-icon>
+          鎵归噺鍒犻櫎
+        </el-button>
+      </div>
+    </el-card>
+
+
+    <!-- 涓昏〃鏍� -->
+    <el-card class="table-card" shadow="never">
+      <el-table 
+        :data="tableData" 
+        border 
+        v-loading="loading" 
+        @selection-change="handleSelectionChange"
+        :default-sort="{ prop: 'updateTime', order: 'descending' }"
+      >
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column label="鍟嗗搧淇℃伅" min-width="200">
+          <template #default="{ row }">
+            <div class="product-info">
+              <div class="product-name">{{ row.productName }}</div>
+              <div class="product-spec">{{ row.specification }}</div>
+              <div class="product-code">缂栫爜: {{ row.productCode }}</div>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="渚涘簲鍟�" prop="supplierName" width="150" />
+        <el-table-column label="鍩虹浠锋牸" width="120" align="right">
+          <template #default="{ row }">
+            <span class="price-text">楼{{ row.basePrice }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="鎶樻墸淇℃伅" width="150">
+          <template #default="{ row }">
+            <div v-if="row.discountType">
+              <el-tag :type="getDiscountTagType(row.discountType)" size="small">
+                {{ getDiscountText(row.discountType) }}
+              </el-tag>
+              <div class="discount-value">{{ row.discountValue }}{{ row.discountType === 'percentage' ? '%' : '鍏�' }}</div>
+            </div>
+            <span v-else class="no-discount">鏃犳姌鎵�</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="瀹為檯浠锋牸" width="120" align="right">
+          <template #default="{ row }">
+            <span class="final-price">楼{{ calculateFinalPrice(row) }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="浠锋牸鎺у埗" width="120">
+          <template #default="{ row }">
+            <div class="price-control">
+              <div v-if="row.minPrice" class="control-item">
+                鏈�浣�: 楼{{ row.minPrice }}
+              </div>
+              <div v-if="row.maxPrice" class="control-item">
+                鏈�楂�: 楼{{ row.maxPrice }}
+              </div>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="鐘舵��" width="100" align="center">
+          <template #default="{ row }">
+            <el-tag :type="getStatusType(row.status)">{{ getStatusText(row.status) }}</el-tag>
+            <div v-if="isPriceWarning(row)" class="warning-indicator">
+              <el-icon color="#F56C6C"><Warning /></el-icon>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="鐢熸晥鏃堕棿" prop="effectiveTime" width="180" />
+        <el-table-column label="鏇存柊鏃堕棿" prop="updateTime" width="180" sortable />
+        <el-table-column label="鎿嶄綔" width="250" align="center" fixed="right">
+          <template #default="{ row }">
+            <el-button type="primary" link @click="openDialog('edit', row)">
+              <el-icon><Edit /></el-icon>
+              缂栬緫
+            </el-button>
+            <el-button type="danger" link @click="handleDelete(row)">
+              <el-icon><Delete /></el-icon>
+              鍒犻櫎
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <!-- 鍒嗛〉 -->
+      <div class="pagination-wrapper">
+        <el-pagination
+          v-model:current-page="pagination.current"
+          v-model:page-size="pagination.size"
+          :page-sizes="[10, 20, 50, 100]"
+          :total="total"
+          layout="total, sizes, prev, pager, next, jumper"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+        />
+      </div>
+    </el-card>
+
+    <!-- 鏂板/缂栬緫瀵硅瘽妗� -->
+    <FormDialog v-model="dialogVisible" :title="dialogType === 'add' ? '鏂板浠锋牸' : '缂栬緫浠锋牸'" :width="'800px'" :operation-type="dialogType" @close="dialogVisible = false" @confirm="handleSubmit" @cancel="dialogVisible = false">
+      <el-form :model="formData" :rules="formRules" ref="formRef" label-width="120px">
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="鍟嗗搧鍚嶇О" prop="productName">
+              <el-select v-model="formData.productName" placeholder="璇烽�夋嫨鍟嗗搧" style="width: 100%" filterable>
+                <el-option v-for="product in productList" :key="product.id" :label="product.name" :value="product.name" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鍟嗗搧缂栫爜" prop="productCode">
+              <el-input v-model="formData.productCode" placeholder="璇疯緭鍏ュ晢鍝佺紪鐮�" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="瑙勬牸鍨嬪彿" prop="specification">
+              <el-input v-model="formData.specification" placeholder="璇疯緭鍏ヨ鏍煎瀷鍙�" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="渚涘簲鍟�" prop="supplierName">
+              <el-select v-model="formData.supplierName" placeholder="璇烽�夋嫨渚涘簲鍟�" style="width: 100%">
+                <el-option v-for="supplier in supplierList" :key="supplier.id" :label="supplier.name" :value="supplier.name" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="鍩虹浠锋牸" prop="basePrice">
+              <el-input-number v-model="formData.basePrice" :min="0" :precision="2" placeholder="璇疯緭鍏ュ熀纭�浠锋牸" style="width: 100%" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鍗曚綅">
+              <el-input v-model="formData.unit" placeholder="璇疯緭鍏ュ崟浣�" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        
+        <!-- 鎶樻墸璁剧疆 -->
+        <el-divider content-position="left">鎶樻墸璁剧疆</el-divider>
+        <el-row :gutter="20">
+          <el-col :span="8">
+            <el-form-item label="鎶樻墸绫诲瀷">
+              <el-select v-model="formData.discountType" placeholder="璇烽�夋嫨鎶樻墸绫诲瀷" style="width: 100%">
+                <el-option label="鏃犳姌鎵�" value="" />
+                <el-option label="鐧惧垎姣旀姌鎵�" value="percentage" />
+                <el-option label="鍥哄畾閲戦" value="fixed" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="鎶樻墸鍊�" v-if="formData.discountType && formData.discountType !== 'tiered'">
+              <el-input-number 
+                v-model="formData.discountValue" 
+                :min="0" 
+                :max="formData.discountType === 'percentage' ? 100 : undefined"
+                :precision="2" 
+                placeholder="璇疯緭鍏ユ姌鎵e��" 
+                style="width: 100%" 
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="鎶樻墸鏈夋晥鏈�">
+              <el-date-picker 
+                v-model="formData.discountEndTime" 
+                type="datetime" 
+                placeholder="閫夋嫨缁撴潫鏃堕棿" 
+                style="width: 100%" 
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <!-- 浠锋牸鎺у埗 -->
+        <el-divider content-position="left">浠锋牸鎺у埗</el-divider>
+        <el-row :gutter="20">
+          <el-col :span="8">
+            <el-form-item label="鏈�浣庝环鏍�">
+              <el-input-number v-model="formData.minPrice" :min="0" :precision="2" placeholder="鏈�浣庝环鏍�" style="width: 100%" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="鏈�楂樹环鏍�">
+              <el-input-number v-model="formData.maxPrice" :min="0" :precision="2" placeholder="鏈�楂樹环鏍�" style="width: 100%" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="棰勮闃堝��(%)">
+              <el-input-number v-model="formData.warningThreshold" :min="0" :max="100" :precision="1" placeholder="棰勮闃堝��" style="width: 100%" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="鐢熸晥鏃堕棿" prop="effectiveTime">
+              <el-date-picker v-model="formData.effectiveTime" type="datetime" placeholder="閫夋嫨鐢熸晥鏃堕棿" style="width: 100%" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="澶辨晥鏃堕棿">
+              <el-date-picker v-model="formData.expireTime" type="datetime" placeholder="閫夋嫨澶辨晥鏃堕棿" style="width: 100%" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-form-item label="璋冧环鍘熷洜" prop="reason">
+          <el-select v-model="formData.reason" placeholder="璇烽�夋嫨璋冧环鍘熷洜" style="width: 100%">
+            <el-option label="甯傚満浠锋牸鍙樺姩" value="market" />
+            <el-option label="鎴愭湰鍙樺寲" value="cost" />
+            <el-option label="渚涘簲鍟嗚皟鏁�" value="supplier" />
+            <el-option label="瀛h妭鎬ц皟鏁�" value="seasonal" />
+            <el-option label="淇冮攢娲诲姩" value="promotion" />
+            <el-option label="鍏朵粬鍘熷洜" value="other" />
+          </el-select>
+        </el-form-item>
+
+        <el-form-item label="澶囨敞">
+          <el-input v-model="formData.remark" type="textarea" :rows="3" placeholder="璇疯緭鍏ュ娉ㄤ俊鎭�" />
+        </el-form-item>
+      </el-form>
+    </FormDialog>
+
+    <!-- 鎵归噺鎶樻墸瀵硅瘽妗� -->
+    <FormDialog v-model="batchDiscountVisible" title="鎵归噺璁剧疆鎶樻墸" :width="'600px'" @close="batchDiscountVisible = false" @confirm="handleBatchDiscount" @cancel="batchDiscountVisible = false">
+      <el-form :model="batchDiscountForm" label-width="120px">
+        <el-form-item label="鎶樻墸绫诲瀷">
+          <el-select v-model="batchDiscountForm.discountType" placeholder="璇烽�夋嫨鎶樻墸绫诲瀷" style="width: 100%">
+            <el-option label="鐧惧垎姣旀姌鎵�" value="percentage" />
+            <el-option label="鍥哄畾閲戦" value="fixed" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="鎶樻墸鍊�">
+          <el-input-number 
+            v-model="batchDiscountForm.discountValue" 
+            :min="0" 
+            :max="batchDiscountForm.discountType === 'percentage' ? 100 : undefined"
+            :precision="2" 
+            placeholder="璇疯緭鍏ユ姌鎵e��" 
+            style="width: 100%" 
+          />
+        </el-form-item>
+        <el-form-item label="鐢熸晥鏃堕棿">
+          <el-date-picker v-model="batchDiscountForm.effectiveTime" type="datetime" placeholder="閫夋嫨鐢熸晥鏃堕棿" style="width: 100%" />
+        </el-form-item>
+        <el-form-item label="澶辨晥鏃堕棿">
+          <el-date-picker v-model="batchDiscountForm.expireTime" type="datetime" placeholder="閫夋嫨澶辨晥鏃堕棿" style="width: 100%" />
+        </el-form-item>
+        <el-form-item label="閫傜敤鍟嗗搧">
+          <div class="selected-items">
+            宸查�夋嫨 {{ selectedRows.length }} 涓晢鍝�
+          </div>
+        </el-form-item>
+      </el-form>
+    </FormDialog>
+
+    <!-- 浠锋牸鎺у埗瀵硅瘽妗� -->
+    <FormDialog v-model="priceControlVisible" title="浠锋牸鎺у埗璁剧疆" :width="'700px'" @close="priceControlVisible = false" @confirm="handlePriceControl" @cancel="priceControlVisible = false">
+      <el-form :model="priceControlForm" label-width="120px">
+        <el-form-item label="榛樿鏈�浣庝环鏍�">
+          <el-input-number v-model="priceControlForm.defaultMinPrice" :min="0" :precision="2" style="width: 200px" />
+        </el-form-item>
+        <el-form-item label="榛樿鏈�楂樹环鏍�">
+          <el-input-number v-model="priceControlForm.defaultMaxPrice" :min="0" :precision="2" style="width: 200px" />
+        </el-form-item>
+        <el-form-item label="浠锋牸鍙樺姩闃堝��">
+          <el-input-number v-model="priceControlForm.changeThreshold" :min="0" :max="100" :precision="1" style="width: 200px" />
+        </el-form-item>
+      </el-form>
+    </FormDialog>
+
+  </div>
+</template>
+
+<script setup>
+import FormDialog from '@/components/Dialog/FormDialog.vue';
+import {ref, reactive, computed, onMounted, getCurrentInstance} from 'vue'
+import { ElMessage, ElMessageBox } from 'element-plus'
+import {
+  Search, Refresh, Plus, Discount, Setting, Download, Delete, Edit, 
+  Warning
+} from '@element-plus/icons-vue'
+import { listPage, update, del, add } from '@/api/procurementManagement/advancedPriceManagement'
+
+// 鍝嶅簲寮忔暟鎹�
+const loading = ref(false)
+const submitLoading = ref(false)
+const dialogVisible = ref(false)
+const batchDiscountVisible = ref(false)
+const priceControlVisible = ref(false)
+const dialogType = ref('add')
+const selectedRows = ref([])
+const formRef = ref()
+
+// 鎼滅储琛ㄥ崟
+const searchForm = reactive({
+  productName: '',
+  supplierId: ''
+})
+
+const total = ref(0)
+
+// 鍒嗛〉
+const pagination = reactive({
+  current: 1,
+  size: 10
+})
+
+
+// 琛ㄥ崟鏁版嵁
+const formData = reactive({
+  productName: '',
+  productCode: '',
+  specification: '',
+  supplierName: '',
+  basePrice: 0,
+  unit: '',
+  discountType: '',
+  discountValue: 0,
+  discountEndTime: '',
+  tieredDiscount: [],
+  minPrice: null,
+  maxPrice: null,
+  warningThreshold: 10,
+  effectiveTime: '',
+  expireTime: '',
+  reason: '',
+  remark: ''
+})
+
+const tableData = ref([])
+
+// 鎵归噺鎶樻墸琛ㄥ崟
+const batchDiscountForm = reactive({
+  discountType: 'percentage',
+  discountValue: 0,
+  effectiveTime: '',
+  expireTime: ''
+})
+
+// 浠锋牸鎺у埗琛ㄥ崟
+const priceControlForm = reactive({
+  defaultMinPrice: 0,
+  defaultMaxPrice: 0,
+  changeThreshold: 10,
+})
+
+// 琛ㄥ崟楠岃瘉瑙勫垯
+const formRules = {
+  productName: [{ required: true, message: '璇烽�夋嫨鍟嗗搧鍚嶇О', trigger: 'change' }],
+  productCode: [{ required: true, message: '璇疯緭鍏ュ晢鍝佺紪鐮�', trigger: 'blur' }],
+  supplierName: [{ required: true, message: '璇烽�夋嫨渚涘簲鍟�', trigger: 'change' }],
+  basePrice: [{ required: true, message: '璇疯緭鍏ュ熀纭�浠锋牸', trigger: 'blur' }],
+  effectiveTime: [{ required: true, message: '璇烽�夋嫨鐢熸晥鏃堕棿', trigger: 'change' }],
+  reason: [{ required: true, message: '璇烽�夋嫨璋冧环鍘熷洜', trigger: 'change' }]
+}
+
+const supplierList = ref([
+  { id: 1, name: '浼樿川浜旈噾渚涘簲鍟�' },
+  { id: 2, name: '閽㈡潗璐告槗鍏徃' },
+  { id: 3, name: '寤烘潗鎵瑰彂鍟�' }
+])
+
+const productList = ref([
+  { id: 1, name: '楂樺己搴﹁灪鏍�' },
+  { id: 2, name: '涓嶉攬閽㈢' },
+  { id: 3, name: '閾濆悎閲戝瀷鏉�' }
+])
+
+
+// 鏂规硶
+const calculateFinalPrice = (row) => {
+  let finalPrice = row.basePrice
+  if (row.discountType === 'percentage') {
+    finalPrice = row.basePrice * (1 - row.discountValue / 100)
+  } else if (row.discountType === 'fixed') {
+    finalPrice = row.basePrice - row.discountValue
+  }
+  return Math.max(finalPrice, 0)
+}
+
+const getDiscountTagType = (discountType) => {
+  const typeMap = {
+    percentage: 'success',
+    fixed: 'warning',
+    tiered: 'info'
+  }
+  return typeMap[discountType] || 'info'
+}
+
+const getDiscountText = (discountType) => {
+  const textMap = {
+    percentage: '鐧惧垎姣�',
+    fixed: '鍥哄畾閲戦'
+  }
+  return textMap[discountType] || '鏈煡'
+}
+
+const getStatusType = (status) => {
+  const statusMap = {
+    active: 'success',
+    pending: 'warning',
+    expired: 'info'
+  }
+  return statusMap[status] || 'info'
+}
+
+const getStatusText = (status) => {
+  const statusMap = {
+    active: '鏈夋晥',
+    pending: '寰呯敓鏁�',
+    expired: '宸茶繃鏈�'
+  }
+  return statusMap[status] || '鏈煡'
+}
+
+const isPriceWarning = (row) => {
+  if (!row.priceControl) return false
+  const finalPrice = calculateFinalPrice(row)
+  return finalPrice < row.priceControl.minPrice || finalPrice > row.priceControl.maxPrice
+}
+
+
+const handleSearch = () => {
+  loading.value = true
+  // 妯℃嫙API璋冪敤
+  listPage({ ...searchForm, ...pagination}).then(res => {
+    tableData.value = res.data.records
+    total.value = res.data.total
+    loading.value = false
+  })
+}
+
+const resetSearch = () => {
+  Object.assign(searchForm, {
+    productName: '',
+    supplierId: ''
+  })
+  handleSearch()
+}
+
+
+const openDialog = (type, row = {}) => {
+  dialogType.value = type
+  if (type === 'edit' && row.id) {
+    Object.assign(formData, {
+      ...row,
+      minPrice: row.priceControl?.minPrice,
+      maxPrice: row.priceControl?.maxPrice,
+      tieredDiscount: row.tieredDiscount || []
+    })
+  } else {
+    resetFormData()
+  }
+  dialogVisible.value = true
+}
+
+const resetFormData = () => {
+  Object.assign(formData, {
+    productName: '',
+    productCode: '',
+    specification: '',
+    supplierName: '',
+    basePrice: 0,
+    unit: '',
+    discountType: '',
+    discountValue: 0,
+    discountEndTime: '',
+    tieredDiscount: [],
+    minPrice: null,
+    maxPrice: null,
+    warningThreshold: 10,
+    effectiveTime: '',
+    expireTime: '',
+    reason: '',
+    remark: ''
+  })
+}
+
+const addTieredRow = () => {
+  formData.tieredDiscount.push({
+    minQty: 0,
+    maxQty: 0,
+    discount: 0
+  })
+}
+
+const removeTieredRow = (index) => {
+  formData.tieredDiscount.splice(index, 1)
+}
+
+const handleSubmit = async () => {
+  if (!formRef.value) return
+  
+  try {
+    await formRef.value.validate()
+    submitLoading.value = true
+
+    if (dialogType.value === 'add') {
+      add(formData).then(res => {
+        if (res.code === 200){
+          ElMessage.success('鏂板鎴愬姛')
+          handleSearch()
+        }
+      })
+    } else {
+      update(formData).then(res => {
+        if (res.code === 200){
+          ElMessage.success('缂栬緫鎴愬姛')
+          handleSearch()
+        }
+      })
+    }
+
+  } catch (error) {
+    console.error('琛ㄥ崟楠岃瘉澶辫触:', error)
+  }finally {
+    dialogVisible.value = false
+    submitLoading.value = false
+  }
+}
+
+const openBatchDiscountDialog = () => {
+  if (selectedRows.value.length === 0) {
+    ElMessage.warning('璇峰厛閫夋嫨瑕佽缃姌鎵g殑鍟嗗搧')
+    return
+  }
+  batchDiscountVisible.value = true
+}
+
+const handleBatchDiscount = () => {
+  // 鎵归噺璁剧疆鎶樻墸閫昏緫
+  selectedRows.value.forEach(row => {
+    row.discountType = batchDiscountForm.discountType
+    row.discountValue = batchDiscountForm.discountValue
+    update(row).then(res => {
+      handleSearch()
+    })
+  })
+  ElMessage.success('鎶樻墸璁剧疆鎴愬姛')
+  batchDiscountVisible.value = false
+
+}
+
+const openPriceControlDialog = () => {
+  priceControlVisible.value = true
+}
+
+const handlePriceControl = () => {
+  ElMessage.success('浠锋牸鎺у埗璁剧疆宸蹭繚瀛�')
+  priceControlVisible.value = false
+}
+
+const handleDelete = (row) => {
+  ElMessageBox.confirm('纭畾瑕佸垹闄よ繖鏉¤褰曞悧锛�', '鎻愮ず', {
+    confirmButtonText: '纭畾',
+    cancelButtonText: '鍙栨秷',
+    type: 'warning'
+  }).then(() => {
+   let ids = [row.id]
+    del(ids).then(res => {
+      if(res.code === 200){
+        ElMessage.success('鍒犻櫎鎴愬姛')
+        handleSearch()
+      }
+    })
+  })
+}
+
+const handleBatchDelete = () => {
+  if (selectedRows.value.length === 0) {
+    ElMessage.warning('璇峰厛閫夋嫨瑕佸垹闄ょ殑璁板綍')
+    return
+  }
+  
+  ElMessageBox.confirm(`纭畾瑕佸垹闄ら�変腑鐨� ${selectedRows.value.length} 鏉¤褰曞悧锛焋, '鎻愮ず', {
+    confirmButtonText: '纭畾',
+    cancelButtonText: '鍙栨秷',
+    type: 'warning'
+  }).then(() => {
+     del(selectedRows.value.map(item => item.id)).then(i =>{
+       if(i.code === 200){
+        ElMessage.success('鍒犻櫎鎴愬姛')
+        handleSearch()
+      }
+     })
+  })
+}
+
+const handleSelectionChange = (rows) => {
+  selectedRows.value = rows
+}
+
+const handleSizeChange = (size) => {
+  pagination.size = size
+  handleSearch()
+}
+
+const handleCurrentChange = (page) => {
+  pagination.current = page
+  handleSearch()
+}
+const { proxy } = getCurrentInstance();
+
+const exportData = () => {
+  ElMessageBox.confirm("鍐呭灏嗚瀵煎嚭锛屾槸鍚︾‘璁ゅ鍑猴紵", "瀵煎嚭", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  })
+      .then(() => {
+        proxy.download("/procurementPriceManagement/export", {}, "閲囪喘浠锋牸绠$悊.xlsx");
+      })
+      .catch(() => {
+        proxy.$modal.msg("宸插彇娑�");
+      });
+}
+
+// 鐢熷懡鍛ㄦ湡
+onMounted(() => {
+  handleSearch()
+})
+</script>
+
+<style scoped>
+.app-container {
+  padding: 20px;
+}
+
+.search-card, .action-card, .table-card {
+  margin-bottom: 20px;
+}
+
+.action-buttons {
+  display: flex;
+  gap: 10px;
+  flex-wrap: wrap;
+}
+
+
+.product-info {
+  line-height: 1.4;
+}
+
+.product-name {
+  font-weight: bold;
+  color: #303133;
+}
+
+.product-spec, .product-code {
+  font-size: 12px;
+  color: #909399;
+}
+
+.price-text {
+  font-weight: bold;
+  color: #409EFF;
+}
+
+.final-price {
+  font-weight: bold;
+  color: #67C23A;
+  font-size: 16px;
+}
+
+.discount-value {
+  font-size: 12px;
+  color: #E6A23C;
+  margin-top: 2px;
+}
+
+.no-discount {
+  color: #C0C4CC;
+  font-size: 12px;
+}
+
+.price-control {
+  font-size: 12px;
+  line-height: 1.3;
+}
+
+.control-item {
+  color: #909399;
+}
+
+.warning-indicator {
+  margin-top: 2px;
+}
+
+.pagination-wrapper {
+  display: flex;
+  justify-content: end;
+  margin-top: 20px;
+}
+
+.selected-items {
+  color: #409EFF;
+  font-weight: bold;
+}
+
+
+.mt-2 {
+  margin-top: 8px;
+}
+
+.ml-2 {
+  margin-left: 8px;
+}
+
+:deep(.el-table) {
+  font-size: 13px;
+}
+
+:deep(.el-table th) {
+  background-color: #fafafa;
+}
+
+:deep(.el-card__body) {
+  padding: 15px;
+}
+
+:deep(.el-divider__text) {
+  font-weight: bold;
+  color: #409EFF;
+}
+</style>

--
Gitblit v1.9.3