From 02f424925fbafc0e6e94f82afd4189c277daed89 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 10 四月 2026 14:36:53 +0800
Subject: [PATCH] 城市

---
 admin/src/components/business/OperaCityPriceRuleWindow.vue |  451 +++++++++++++++-------------------------
 /dev/null                                                  |   31 --
 admin/src/api/business/shopInfo.js                         |   31 ++
 admin/src/api/business/pricingRule.js                      |   68 ++++++
 admin/src/views/business/storeList.vue                     |   33 +-
 admin/src/views/business/area.vue                          |   16 -
 6 files changed, 291 insertions(+), 339 deletions(-)

diff --git a/admin/src/api/business/pricingRule.js b/admin/src/api/business/pricingRule.js
new file mode 100644
index 0000000..43b7dee
--- /dev/null
+++ b/admin/src/api/business/pricingRule.js
@@ -0,0 +1,68 @@
+import request from '../../utils/request'
+
+// 鏌ヨ
+export function fetchList (data) {
+  return request.post('/business/areas/page', data, {
+    trim: true
+  })
+}
+
+// 鍒涘缓
+export function create (data) {
+  return request.post('/business/areas/create', data)
+}
+
+// 淇敼
+export function updateById (data) {
+  return request.post('/business/areas/updateById', data)
+}
+
+// 鏌ヨ灏卞湴瀛樺彇瑙勫垯鍒楄〃
+export function localStorage (cityId) {
+  return request.get(`/business/pricingRule/localStorage/list?cityId=${cityId}`)
+}
+
+// 鏌ヨ寮傚湴瀵勯�佽鍒欏垪琛�
+export function remoteDelivery (cityId) {
+  return request.get(`/business/pricingRule/remoteDelivery/list?cityId=${cityId}`)
+}
+
+// 鏌ヨ寮傚湴瀵勯�佽鍒欏垪琛�
+export function estimatedDelivery (cityId) {
+  return request.get(`/business/pricingRule/estimatedDelivery/list?cityId=${cityId}`)
+}
+
+// 鏌ヨ闂ㄥ簵娉ㄥ唽鎶奸噾瑙勫垯鍒楄〃
+export function storeDeposit (cityId) {
+  return request.get(`/business/pricingRule/storeDeposit/list?cityId=${cityId}`)
+}
+
+// 鏌ヨ鍒嗘垚姣斾緥瑙勫垯鍒楄〃
+export function revenueShare (cityId) {
+  return request.get(`/business/pricingRule/revenueShare/list?cityId=${cityId}`)
+}
+
+// 鎵归噺淇濆瓨灏卞湴瀛樺彇瑙勫垯
+export function batchSave (data) {
+  return request.post('/business/pricingRule/localStorage/batchSave', data)
+}
+
+// 鎵归噺淇濆瓨寮傚湴瀵勯�佽鍒�
+export function batchSaveRemoteDelivery (data) {
+  return request.post('/business/pricingRule/remoteDelivery/batchSave', data)
+}
+
+// 鎵归噺淇濆瓨棰勮鏃舵晥閰嶇疆
+export function batchSaveEstimatedDelivery (data) {
+  return request.post('/business/pricingRule/estimatedDelivery/save', data)
+}
+
+// 鎵归噺淇濆瓨闂ㄥ簵娉ㄥ唽鎶奸噾瑙勫垯
+export function batchSaveStoreDeposit (data) {
+  return request.post('/business/pricingRule/storeDeposit/batchSave', data)
+}
+
+// 鎵归噺淇濆瓨鍒嗘垚姣斾緥瑙勫垯
+export function batchSaveRevenueShare (data) {
+  return request.post('/business/pricingRule/revenueShare/batchSave', data)
+}
diff --git a/admin/src/api/business/shopInfo.js b/admin/src/api/business/shopInfo.js
new file mode 100644
index 0000000..a04141c
--- /dev/null
+++ b/admin/src/api/business/shopInfo.js
@@ -0,0 +1,31 @@
+import request from '../../utils/request'
+
+export function fetchList (data) {
+  return request.post('/business/shopInfo/page', data, {
+    trim: true
+  })
+}
+
+export function create (data) {
+  return request.post('/business/shopInfo/create', data)
+}
+
+export function updateStatus (data) {
+  return request.post('/business/shopInfo/updateStatus', data)
+}
+
+export function updateById (data) {
+  return request.post('/business/shopInfo/updateById', data)
+}
+
+export function deleteById (id) {
+  return request.get(`/business/shopInfo/delete/${id}`)
+}
+
+export function deleteByIdInBatch (ids) {
+  return request.get('/business/shopInfo/delete/batch', {
+    params: {
+      ids
+    }
+  })
+}
\ No newline at end of file
diff --git a/admin/src/api/business/store.js b/admin/src/api/business/store.js
deleted file mode 100644
index f9fd605..0000000
--- a/admin/src/api/business/store.js
+++ /dev/null
@@ -1,31 +0,0 @@
-import request from '../../utils/request'
-
-export function fetchList (data) {
-  return request.post('/business/store/page', data, {
-    trim: true
-  })
-}
-
-export function create (data) {
-  return request.post('/business/store/create', data)
-}
-
-export function updateStatus (data) {
-  return request.post('/business/store/updateStatus', data)
-}
-
-export function updateById (data) {
-  return request.post('/business/store/updateById', data)
-}
-
-export function deleteById (id) {
-  return request.get(`/business/store/delete/${id}`)
-}
-
-export function deleteByIdInBatch (ids) {
-  return request.get('/business/store/delete/batch', {
-    params: {
-      ids
-    }
-  })
-}
\ No newline at end of file
diff --git a/admin/src/components/business/OperaCityPriceRuleWindow.vue b/admin/src/components/business/OperaCityPriceRuleWindow.vue
index 95b705f..8e40ff5 100644
--- a/admin/src/components/business/OperaCityPriceRuleWindow.vue
+++ b/admin/src/components/business/OperaCityPriceRuleWindow.vue
@@ -8,19 +8,9 @@
       <el-tab-pane label="灏卞湴瀵勫瓨" name="local">
         <div class="price-tip">鏍规嵁琛屾潕灏哄浠ュ強瀛樻斁澶╂暟鏀惰垂锛堜笉瓒充竴澶╂寜涓�澶╄浠凤級</div>
         <div class="price-items">
-          <div class="price-item">
-            <span class="price-label">鍏朵腑澶т欢琛屾潕姣忓ぉ鏀惰垂</span>
-            <el-input style="width: 200px;" v-model="form.bigPriceDay" type="number" placeholder="璇疯緭鍏�"></el-input>
-            <span class="price-unit">鍏�</span>
-          </div>
-          <div class="price-item">
-            <span class="price-label">鍏朵腑涓欢琛屾潕姣忓ぉ鏀惰垂</span>
-            <el-input style="width: 200px;" v-model="form.mediumPriceDay" type="number" placeholder="璇疯緭鍏�"></el-input>
-            <span class="price-unit">鍏�</span>
-          </div>
-          <div class="price-item">
-            <span class="price-label">鍏朵腑灏忎欢琛屾潕姣忓ぉ鏀惰垂</span>
-            <el-input style="width: 200px;" v-model="form.smallPriceDay" type="number" placeholder="璇疯緭鍏�"></el-input> 
+          <div class="price-item" v-for="(item, index) in jiudiTableData" :key="index">
+            <span class="price-label">鍏朵腑{{item.categoryName}}姣忓ぉ鏀惰垂</span>
+            <el-input style="width: 200px;" v-model="item.unitPrice" type="number" placeholder="璇疯緭鍏�"></el-input>
             <span class="price-unit">鍏�</span>
           </div>
         </div>
@@ -31,25 +21,25 @@
           <span class="remote-tip">鏍规嵁琛屾潕灏哄銆侀厤閫侀噷绋嬪強閰嶉�佷环鏍兼敹鍙栬垂鐢紙涓嶈冻1鍏噷鎸�1鍏噷璁′环锛�</span>
         </div>
         <el-table :data="remoteTableData" border stripe>
-          <el-table-column prop="baggageSize" label="琛屾潕灏哄" min-width="100px"></el-table-column>
-          <el-table-column prop="deliveryDistance" label="璧烽�侀噷绋�(鍏噷)" min-width="120px">
+          <el-table-column prop="categoryName" label="琛屾潕灏哄"></el-table-column>
+          <el-table-column label="璧烽�侀噷绋�(鍏噷)">
             <template slot-scope="{row}">
-              <el-input v-model="row.deliveryDistance" type="number" placeholder="璇疯緭鍏�"></el-input>
+              <el-input v-model="row.startDistance" type="number" placeholder="璇疯緭鍏�"></el-input>
             </template>
           </el-table-column>
-          <el-table-column prop="deliveryPrice" label="璧烽�佷环鏍�(鍏�)" min-width="140px">
+          <el-table-column label="璧烽�佷环鏍�(鍏�)">
             <template slot-scope="{row}">
-              <el-input v-model="row.deliveryPrice" type="number" placeholder="璇疯緭鍏�"></el-input>
+              <el-input v-model="row.startPrice" type="number" placeholder="璇疯緭鍏�"></el-input>
             </template>
           </el-table-column>
-          <el-table-column prop="sortnum" label="缁�侀噷绋�(鍏噷)" min-width="80px">
+          <el-table-column label="缁�侀噷绋�(鍏噷)">
             <template slot-scope="{row}">
-              <el-input v-model="row.sortnum" type="number" placeholder="璇疯緭鍏�"></el-input>
+              <el-input v-model="row.extraDistance" type="number" placeholder="璇疯緭鍏�"></el-input>
             </template>
           </el-table-column>
-          <el-table-column prop="sortnum" label="缁�佷环鏍�(鍏�)" min-width="80px">
+          <el-table-column label="缁�佷环鏍�(鍏�)">
             <template slot-scope="{row}">
-              <el-input v-model="row.sortnum" type="number" placeholder="璇疯緭鍏�"></el-input>
+              <el-input v-model="row.extraPrice" type="number" placeholder="璇疯緭鍏�"></el-input>
             </template>
           </el-table-column>
         </el-table>
@@ -60,24 +50,24 @@
           <span class="remote-tip">鏍规嵁閰嶉�侀噷绋嬮璁¢厤閫佹椂闀垮苟灞曠ず鍦ㄥ皬绋嬪簭涓嬪崟椤甸潰</span>
         </div>
         <el-table :data="timeTableData" border stripe>
-          <el-table-column prop="deliveryDistance" label="璧烽�侀噷绋�(鍏噷)" min-width="120px">
+          <el-table-column label="璧烽�侀噷绋�(鍏噷)">
             <template slot-scope="{row}">
-              <el-input v-model="row.deliveryDistance" type="number" placeholder="璇疯緭鍏�"></el-input>
+              <el-input v-model="row.startDistance" type="number" placeholder="璇疯緭鍏�"></el-input>
             </template>
           </el-table-column>
-          <el-table-column prop="deliveryHours" label="璧烽�佹椂闀�(灏忔椂)" min-width="120px">
+          <el-table-column label="璧烽�佹椂闀�(灏忔椂)">
             <template slot-scope="{row}">
-              <el-input v-model="row.deliveryHours" type="number" placeholder="璇疯緭鍏�"></el-input>
+              <el-input v-model="row.startTime" type="number" placeholder="璇疯緭鍏�"></el-input>
             </template>
           </el-table-column>
-          <el-table-column prop="sortnum" label="缁�侀噷绋�(鍏噷)" min-width="80px">
+          <el-table-column label="缁�侀噷绋�(鍏噷)">
             <template slot-scope="{row}">
-              <el-input v-model="row.sortnum" type="number" placeholder="璇疯緭鍏�"></el-input>
+              <el-input v-model="row.continueDistance" type="number" placeholder="璇疯緭鍏�"></el-input>
             </template>
           </el-table-column>
-          <el-table-column prop="sortnum" label="缁�佹椂闀�(灏忔椂)" min-width="80px">
+          <el-table-column label="缁�佹椂闀�(灏忔椂)">
             <template slot-scope="{row}">
-              <el-input v-model="row.sortnum" type="number" placeholder="璇疯緭鍏�"></el-input>
+              <el-input v-model="row.continueTime" type="number" placeholder="璇疯緭鍏�"></el-input>
             </template>
           </el-table-column>
         </el-table>
@@ -85,14 +75,9 @@
       <el-tab-pane label="闂ㄥ簵娉ㄥ唽鎶奸噾" name="deposit">
         <div class="price-tip">鏍规嵁鎵�鍦ㄥ煄甯備互鍙婃敞鍐岀被鍨嬩笉鍚岋紝骞冲彴鏀跺彇涓嶅悓鏁伴鎶奸噾銆傛娂閲戜細鍦ㄩ棬搴楅��缃戝悗绾夸笅鍘熼閫�杩橈紙闂ㄥ簵绾夸笂寰俊鏀粯鐨勬娂閲戝洜寰俊瀹樻柟瑕佹眰鍏锋湁鏃舵晥鎬э級</div>
         <div class="price-items">
-          <div class="price-item">
-            <span class="price-label">鍏朵腑浼佷笟鏀跺彇鎶奸噾</span>
-            <el-input style="width: 200px;" v-model="form.corporateDepositAmount" type="number" placeholder="璇疯緭鍏�"></el-input>
-            <span class="price-unit">鍏�</span>
-          </div>
-          <div class="price-item">
-            <span class="price-label">鍏朵腑涓汉鏀跺彇鎶奸噾</span>
-            <el-input style="width: 200px;" v-model="form.personalDepositAmount" type="number" placeholder="璇疯緭鍏�"></el-input>
+          <div class="price-item" v-for="(item, index) in storeDepositData" :key="index">
+            <span class="price-label">鍏朵腑{{item.fieldTypeName}}鏀跺彇鎶奸噾</span>
+            <el-input style="width: 200px;" v-model="item.depositAmount" type="number" placeholder="璇疯緭鍏�"></el-input>
             <span class="price-unit">鍏�</span>
           </div>
         </div>
@@ -100,29 +85,9 @@
       <el-tab-pane label="鍒嗘垚姣斾緥" name="share">
         <div class="price-tip">鏍规嵁璁㈠崟涓笉鍚岃繍钀ヨ鑹茶�岀嫭绔嬮厤缃笉鍚屽垎鎴愭瘮渚�</div>
         <div class="price-items">
-          <div class="price-item">
-            <span class="price-label">鍏朵腑闂ㄥ簵绫诲瀷涓轰紒涓氬苟鍦ㄨ鍗曚腑浣滀负瀵勪欢鐐规椂锛屽垎鎴愭瘮渚嬩负</span>
-            <el-input style="width: 100px;" v-model="form.corporateSenderRatio" type="number" placeholder="璇疯緭鍏�"></el-input>
-            <span class="price-unit">%</span>
-          </div>
-          <div class="price-item">
-            <span class="price-label">鍏朵腑闂ㄥ簵绫诲瀷涓轰釜浜哄苟鍦ㄨ鍗曚腑浣滀负瀵勪欢鐐规椂锛屽垎鎴愭瘮渚嬩负</span>
-            <el-input style="width: 100px;" v-model="form.personalSenderRatio" type="number" placeholder="璇疯緭鍏�"></el-input>
-            <span class="price-unit">%</span>
-          </div>
-          <div class="price-item">
-            <span class="price-label">鍏朵腑闂ㄥ簵绫诲瀷涓轰紒涓氬苟鍦ㄨ鍗曚腑浣滀负鏀朵欢鐐规椂锛屽垎鎴愭瘮渚嬩负</span>
-            <el-input style="width: 100px;" v-model="form.corporateReceiverRatio" type="number" placeholder="璇疯緭鍏�"></el-input>
-            <span class="price-unit">%</span>
-          </div>
-          <div class="price-item">
-            <span class="price-label">鍏朵腑闂ㄥ簵绫诲瀷涓轰釜浜哄苟鍦ㄨ鍗曚腑浣滀负鏀朵欢鐐规椂锛屽垎鎴愭瘮渚嬩负</span>
-            <el-input style="width: 100px;" v-model="form.personalReceiverRatio" type="number" placeholder="璇疯緭鍏�"></el-input>
-            <span class="price-unit">%</span>
-          </div>
-          <div class="price-item">
-            <span class="price-label">鍦ㄨ鍗曚腑浣滀负閰嶉�佸憳鏃讹紝鍒嗘垚姣斾緥涓�</span>
-            <el-input style="width: 100px;" v-model="form.deliverRatio" type="number" placeholder="璇疯緭鍏�"></el-input>
+          <div class="price-item" v-for="(item, index) in shareTableData" :key="index">
+            <span class="price-label">{{item.fieldType === 4 ? '鍦ㄨ鍗曚腑浣滀负閰嶉�佸憳鏃讹紝' : '鍏朵腑闂ㄥ簵绫诲瀷涓�'}}{{item.fieldTypeName}}鍒嗘垚姣斾緥涓�</span>
+            <el-input style="width: 100px;" v-model="item.ratio" type="number" placeholder="璇疯緭鍏�"></el-input>
             <span class="price-unit">%</span>
           </div>
         </div>
@@ -138,7 +103,18 @@
 <script>
 import BaseOpera from '@/components/base/BaseOpera'
 import GlobalWindow from '@/components/common/GlobalWindow'
-import { fetchPriceRule } from '@/api/business/areas'
+import {
+  localStorage,
+  remoteDelivery,
+  estimatedDelivery,
+  storeDeposit,
+  revenueShare,
+  batchSave,
+  batchSaveRemoteDelivery,
+  batchSaveEstimatedDelivery,
+  batchSaveStoreDeposit,
+  batchSaveRevenueShare
+} from '@/api/business/pricingRule'
 export default {
   name: 'OperaCityPriceRuleWindow',
   extends: BaseOpera,
@@ -146,50 +122,21 @@
   data () {
     return {
       activeTab: 'local',
-      remoteTableData: [
-        { size: 1, a: '', b: '', c: '', d: '' }
-      ],
-      remotePageIndex: 1,
-      remotePageSize: 5,
-      remoteTotal: 0,
+
+      jiudiTableData: [],
+      remoteTableData: [],
       timeTableData: [],
-      timePageIndex: 1,
-      timePageSize: 5,
-      timeTotal: 0,
+      storeDepositData: [],
+      shareTableData: [],
+
       form: {
-        id: null,
-        cityName: '',
-        bigPrice: '澶т欢',
-        bigPriceDay: null,
-        mediumPrice: '涓欢',
-        mediumPriceDay: null,
-        smallPrice: '灏忎欢',
-        smallPriceDay: null,
-        remoteBigPrice: '澶т欢',
-        remoteBigPriceDay: null,
-        remoteMediumPrice: '涓欢',
-        remoteMediumPriceDay: null,
-        remoteSmallPrice: '灏忎欢',
-        remoteSmallPriceDay: null,
-        timeLimit: '',
-        corporateDeposit: '浼佷笟',
-        corporateDepositAmount: null,
-        personalDeposit: '涓汉',
-        personalDepositAmount: null,
-        corporateType: '浼佷笟',
-        corporateSenderRatio: null,
-        corporateReceiverRatio: null,
-        personalType: '涓汉',
-        personalSenderRatio: null,
-        personalReceiverRatio: null,
-        deliverType: '閰嶉�佸憳',
-        deliverRatio: null
+        cityId: null
       }
     }
   },
   created () {
     this.config({
-      api: '/business/area',
+      api: '/business/pricingRule',
       'field.id': 'id'
     })
   },
@@ -198,80 +145,91 @@
       this.title = title
       this.visible = true
       this.activeTab = 'local'
+      this.jiudiTableData = []
       this.remoteTableData = []
-      this.remotePageIndex = 1
-      this.remoteTotal = 0
-      this.timeTableData = [{
-        deliveryDistance: null,
-        deliveryHours: null,
-        sortnum: null
-      }]
-      this.timePageIndex = 1
-      this.timeTotal = 0
+      this.timeTableData = []
+      this.storeDepositData = []
+      this.shareTableData = []
       this.form = {
-        id: target.id,
-        cityName: target.name,
-        bigPrice: '澶т欢',
-        bigPriceDay: null,
-        mediumPrice: '涓欢',
-        mediumPriceDay: null,
-        smallPrice: '灏忎欢',
-        smallPriceDay: null,
-        remoteBigPrice: '澶т欢',
-        remoteBigPriceDay: null,
-        remoteMediumPrice: '涓欢',
-        remoteMediumPriceDay: null,
-        remoteSmallPrice: '灏忎欢',
-        remoteSmallPriceDay: null,
-        timeLimit: '',
-        corporateDeposit: '浼佷笟',
-        corporateDepositAmount: null,
-        personalDeposit: '涓汉',
-        personalDepositAmount: null,
-        corporateType: '浼佷笟',
-        corporateSenderRatio: null,
-        corporateReceiverRatio: null,
-        personalType: '涓汉',
-        personalSenderRatio: null,
-        personalReceiverRatio: null,
-        deliverType: '閰嶉�佸憳',
-        deliverRatio: null
+        cityId: target
       }
-      this.loadPriceRule(target.id)
+      this.fetchPriceRule()
+      this.fetchRemoteDelivery()
+      this.fetchEstimatedDelivery()
+      this.fetchStoreDeposit()
+      this.fetchRevenueShare()
     },
-    loadPriceRule (cityId) {
-      fetchPriceRule({ cityId }).then(res => {
-        if (res) {
-          try {
-            const data = typeof res === 'string' ? JSON.parse(res) : res
-            if (data.remoteList && Array.isArray(data.remoteList)) {
-              this.remoteTableData = data.remoteList
-              this.remoteTotal = data.remoteList.length
-            }
-            if (data.timeList && Array.isArray(data.timeList)) {
-              this.timeTableData = data.timeList
-              this.timeTotal = data.timeList.length
-            }
-            Object.assign(this.form, data)
-          } catch (e) {
-            console.error('Parse price rule failed', e)
-          }
-        }
-      }).catch(e => {
-        this.$tip.apiFailed(e)
-      })
+    // 鏌ヨ灏卞湴瀛樺彇瑙勫垯鍒楄〃
+    fetchPriceRule () {
+      localStorage(this.form.cityId)
+        .then(data => {
+          this.jiudiTableData = data
+        })
+        .catch(e => {
+          this.$tip.apiFailed(e)
+        })
     },
+    // 鏌ヨ寮傚湴瀵勯�佽鍒欏垪琛�
+    fetchRemoteDelivery () {
+      remoteDelivery(this.form.cityId)
+        .then(data => {
+          this.remoteTableData = data
+        })
+        .catch(e => {
+          this.$tip.apiFailed(e)
+        })
+    },
+    // 鏌ヨ寮傚湴瀵勯�佽鍒欏垪琛�
+    fetchEstimatedDelivery () {
+      estimatedDelivery(this.form.cityId)
+        .then(data => {
+          this.timeTableData = [
+            data
+          ]
+        })
+        .catch(e => {
+          this.$tip.apiFailed(e)
+        })
+    },
+    // 鏌ヨ闂ㄥ簵娉ㄥ唽鎶奸噾瑙勫垯鍒楄〃
+    fetchStoreDeposit () {
+      storeDeposit(this.form.cityId)
+        .then(data => {
+          this.storeDepositData = data
+        })
+        .catch(e => {
+          this.$tip.apiFailed(e)
+        })
+    },
+    // 鏌ヨ鍒嗘垚姣斾緥瑙勫垯鍒楄〃
+    fetchRevenueShare () {
+      revenueShare(this.form.cityId)
+        .then(data => {
+          this.shareTableData = data
+        })
+        .catch(e => {
+          this.$tip.apiFailed(e)
+        })
+    },
+    // 淇濆瓨鎵�鏈夎鍒�
     confirm () {
-      const submitData = {
-        ...this.form,
-        remoteList: this.remoteTableData,
-        timeList: this.timeTableData
-      }
+      if (!this.validateLocalStorage()) return
+      if (!this.validateRemoteDelivery()) return
+      if (!this.validateEstimatedDelivery()) return
+      if (!this.validateStoreDeposit()) return
+      if (!this.validateRevenueShare()) return
+
       this.isWorking = true
-      this.api.updateById(submitData)
+      Promise.all([
+        batchSave({ cityId: this.form.cityId, items: this.jiudiTableData }),
+        batchSaveRemoteDelivery({ cityId: this.form.cityId, items: this.remoteTableData }),
+        batchSaveEstimatedDelivery({ cityId: this.form.cityId, ...this.timeTableData[0] }),
+        batchSaveStoreDeposit({ cityId: this.form.cityId, items: this.storeDepositData }),
+        batchSaveRevenueShare({ cityId: this.form.cityId, items: this.shareTableData })
+      ])
         .then(() => {
-          this.$tip.apiSuccess('淇濆瓨鎴愬姛')
           this.visible = false
+          this.$tip.apiSuccess('淇濆瓨鎴愬姛')
           this.$emit('success')
         })
         .catch(e => {
@@ -281,126 +239,60 @@
           this.isWorking = false
         })
     },
-    handleAddRemote () {
-      this.$prompt('璇疯緭鍏ヨ鏉庡昂瀵�', '鏂板寮傚湴瀵勫瓨閰嶇疆', {
-        inputValue: '',
-        confirmButtonText: '纭畾',
-        cancelButtonText: '鍙栨秷'
-      }).then(({ value }) => {
-        if (!value) {
-          this.$message.warning('琛屾潕灏哄涓嶈兘涓虹┖')
-          return
+    // 鏍¢獙灏卞湴瀵勫瓨
+    validateLocalStorage () {
+      for (const item of this.jiudiTableData) {
+        if (item.unitPrice === null || item.unitPrice === undefined || item.unitPrice === '') {
+          this.$message.error('璇峰~鍐欐墍鏈夊氨鍦板瘎瀛樼殑鏀惰垂閲戦')
+          return false
         }
-        this.remoteTableData.push({
-          id: null,
-          baggageSize: value,
-          deliveryDistance: null,
-          deliveryPrice: null,
-          sortnum: this.remoteTableData.length + 1
-        })
-        this.remoteTotal = this.remoteTableData.length
-      }).catch(() => {})
-    },
-    handleEditRemote (row, index) {
-      this.$prompt('璇疯緭鍏ヨ鏉庡昂瀵�', '缂栬緫寮傚湴瀵勫瓨閰嶇疆', {
-        inputValue: row.baggageSize,
-        confirmButtonText: '纭畾',
-        cancelButtonText: '鍙栨秷'
-      }).then(({ value }) => {
-        if (!value) {
-          this.$message.warning('琛屾潕灏哄涓嶈兘涓虹┖')
-          return
-        }
-        this.$prompt('璇疯緭鍏ラ厤閫侀噷绋嬶紙鍏噷锛�', '缂栬緫閰嶉�侀噷绋�', {
-          inputValue: row.deliveryDistance,
-          confirmButtonText: '纭畾',
-          cancelButtonText: '鍙栨秷'
-        }).then(({ value: distance }) => {
-          this.$prompt('璇疯緭鍏ラ厤閫佷环鏍硷紙姣忓叕閲�/鍏冿級', '缂栬緫閰嶉�佷环鏍�', {
-            inputValue: row.deliveryPrice,
-            confirmButtonText: '纭畾',
-            cancelButtonText: '鍙栨秷'
-          }).then(({ value: price }) => {
-            this.$prompt('璇疯緭鍏ユ帓搴�', '缂栬緫鎺掑簭', {
-              inputValue: row.sortnum,
-              confirmButtonText: '纭畾',
-              cancelButtonText: '鍙栨秷'
-            }).then(({ value: sortnum }) => {
-              this.$prompt('璇疯緭鍏ヨ鏉庡昂瀵�', '缂栬緫寮傚湴瀵勫瓨閰嶇疆', {
-                inputValue: row.baggageSize
-              })
-              this.remoteTableData.splice(index, 1, {
-                ...row,
-                baggageSize: value,
-                deliveryDistance: distance ? Number(distance) : null,
-                deliveryPrice: price ? Number(price) : null,
-                sortnum: sortnum ? Number(sortnum) : this.remoteTableData.length + 1
-              })
-            }).catch(() => {})
-          }).catch(() => {})
-        }).catch(() => {})
-      }).catch(() => {})
-    },
-    handleDeleteRemote (row, index) {
-      this.$confirm('纭鍒犻櫎璇ュ紓鍦板瘎瀛橀厤缃悧锛�', '鎻愮ず', {
-        confirmButtonText: '纭畾',
-        cancelButtonText: '鍙栨秷',
-        type: 'warning'
-      }).then(() => {
-        this.remoteTableData.splice(index, 1)
-        this.remoteTotal = this.remoteTableData.length
-      }).catch(() => {})
-    },
-    handleAddTime () {
-      this.$refs.operaTimeRuleWindow.open('鏂板缓棰勮鏃舵晥瑙勫垯', null)
-    },
-    handleTimeRuleSuccess (data) {
-      if (data) {
-        this.timeTableData.push(data)
-        this.timeTotal = this.timeTableData.length
       }
+      return true
     },
-    handleEditTime (row, index) {
-      this.$prompt('璇疯緭鍏ラ厤閫侀噷绋嬶紙鍏噷锛�', '缂栬緫棰勮鏃舵晥閰嶇疆', {
-        inputValue: row.deliveryDistance,
-        confirmButtonText: '纭畾',
-        cancelButtonText: '鍙栨秷'
-      }).then(({ value }) => {
-        this.$prompt('璇疯緭鍏ラ厤閫佹椂闀匡紙灏忔椂锛�', '缂栬緫棰勮鏃舵晥閰嶇疆', {
-          inputValue: row.deliveryHours,
-          confirmButtonText: '纭畾',
-          cancelButtonText: '鍙栨秷'
-        }).then(({ value: hours }) => {
-          this.$prompt('璇疯緭鍏ユ帓搴�', '缂栬緫棰勮鏃舵晥閰嶇疆', {
-            inputValue: row.sortnum,
-            confirmButtonText: '纭畾',
-            cancelButtonText: '鍙栨秷'
-          }).then(({ value: sortnum }) => {
-            this.timeTableData.splice(index, 1, {
-              ...row,
-              deliveryDistance: value ? Number(value) : null,
-              deliveryHours: hours ? Number(hours) : null,
-              sortnum: sortnum ? Number(sortnum) : this.timeTableData.length + 1
-            })
-          }).catch(() => {})
-        }).catch(() => {})
-      }).catch(() => {})
+    // 鏍¢獙寮傚湴瀵勫瓨
+    validateRemoteDelivery () {
+      for (const item of this.remoteTableData) {
+        if (item.startDistance === null || item.startDistance === undefined || item.startDistance === '' ||
+            item.startPrice === null || item.startPrice === undefined || item.startPrice === '' ||
+            item.extraDistance === null || item.extraDistance === undefined || item.extraDistance === '' ||
+            item.extraPrice === null || item.extraPrice === undefined || item.extraPrice === '') {
+          this.$message.error('璇峰~鍐欐墍鏈夊紓鍦板瘎閫佺殑閰嶇疆淇℃伅')
+          return false
+        }
+      }
+      return true
     },
-    handleDeleteTime (row, index) {
-      this.$confirm('纭鍒犻櫎璇ラ璁℃椂鏁堥厤缃悧锛�', '鎻愮ず', {
-        confirmButtonText: '纭畾',
-        cancelButtonText: '鍙栨秷',
-        type: 'warning'
-      }).then(() => {
-        this.timeTableData.splice(index, 1)
-        this.timeTotal = this.timeTableData.length
-      }).catch(() => {})
+    // 鏍¢獙棰勮鏃舵晥
+    validateEstimatedDelivery () {
+      const item = this.timeTableData[0]
+      if (!item || item.startDistance === null || item.startDistance === undefined || item.startDistance === '' ||
+          item.startTime === null || item.startTime === undefined || item.startTime === '' ||
+          item.continueDistance === null || item.continueDistance === undefined || item.continueDistance === '' ||
+          item.continueTime === null || item.continueTime === undefined || item.continueTime === '') {
+        this.$message.error('璇峰~鍐欓璁℃椂鏁堢殑鎵�鏈夐厤缃俊鎭�')
+        return false
+      }
+      return true
     },
-    handleTimePageChange (page) {
-      this.timePageIndex = page
+    // 鏍¢獙闂ㄥ簵娉ㄥ唽鎶奸噾
+    validateStoreDeposit () {
+      for (const item of this.storeDepositData) {
+        if (item.depositAmount === null || item.depositAmount === undefined || item.depositAmount === '') {
+          this.$message.error('璇峰~鍐欐墍鏈夐棬搴楁敞鍐屾娂閲戠殑閲戦')
+          return false
+        }
+      }
+      return true
     },
-    handleRemotePageChange (page) {
-      this.remotePageIndex = page
+    // 鏍¢獙鍒嗘垚姣斾緥
+    validateRevenueShare () {
+      for (const item of this.shareTableData) {
+        if (item.ratio === null || item.ratio === undefined || item.ratio === '') {
+          this.$message.error('璇峰~鍐欐墍鏈夊垎鎴愭瘮渚�')
+          return false
+        }
+      }
+      return true
     }
   }
 }
@@ -432,7 +324,8 @@
 }
 .dialog-footer {
   text-align: right;
-  padding: 10px 20px;
+  padding: 0 20px;
+  box-sizing: border-box;
   border-top: 1px solid #eee;
 }
 .remote-config-title {
diff --git a/admin/src/views/business/area.vue b/admin/src/views/business/area.vue
index 725bf56..99afb26 100644
--- a/admin/src/views/business/area.vue
+++ b/admin/src/views/business/area.vue
@@ -1,15 +1,5 @@
 <template>
   <TableLayout :permissions="['business:areas:query']">
-    <!-- 鎼滅储琛ㄥ崟 -->
-    <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-form-item>
-      <section>
-        <el-button type="primary" @click="search">鎼滅储</el-button>
-        <el-button @click="reset">閲嶇疆</el-button>
-      </section>
-    </el-form>
     <!-- 琛ㄦ牸鍜屽垎椤� -->
     <template v-slot:table-wrap>
       <el-table
@@ -22,7 +12,7 @@
         row-key="id"
         stripe
         border
-        :height="tableHeightNew - 40"
+        :height="tableHeightNew - 50"
         :header-row-class-name="'table-header'"
         class="doumee-element-table"
         @selection-change="handleSelectionChange"
@@ -52,7 +42,7 @@
           min-width="80"
         >
           <template slot-scope="{ row }">
-            <el-button type="text" @click="openPriceRule(row)">璁′环瑙勫垯</el-button>
+            <el-button type="text" @click="openPriceRule(row)" v-if="row.type === 1">璁′环瑙勫垯</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -145,7 +135,7 @@
       this.refreshLoadTree(parentId)
     },
     openPriceRule(row) {
-      this.$refs.operaCityPriceRuleWindow.open('璁′环瑙勫垯', row)
+      this.$refs.operaCityPriceRuleWindow.open('璁′环瑙勫垯', row.id)
     },
     handlePriceRuleSuccess() {
       this.$message.success('淇濆瓨鎴愬姛')
diff --git a/admin/src/views/business/storeList.vue b/admin/src/views/business/storeList.vue
index 16ccd94..10a9a3d 100644
--- a/admin/src/views/business/storeList.vue
+++ b/admin/src/views/business/storeList.vue
@@ -1,23 +1,23 @@
 <template>
-  <TableLayout :permissions="['business:store:query']">
+  <TableLayout :permissions="['business:shopInfo:query']">
     <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" clearable placeholder="璇疯緭鍏ラ棬搴楀悕绉�" @keypress.enter.native="search"></el-input>
       </el-form-item>
-      <el-form-item label="绫诲瀷" prop="type">
-        <el-select v-model="searchForm.type" clearable placeholder="璇烽�夋嫨绫诲瀷" @change="search">
+      <el-form-item label="绫诲瀷" prop="companyType">
+        <el-select v-model="searchForm.companyType" clearable placeholder="璇烽�夋嫨绫诲瀷" @change="search">
           <el-option label="浼佷笟" :value="1"></el-option>
-          <el-option label="涓汉" :value="2"></el-option>
+          <el-option label="涓汉" :value="0"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="闂ㄥ簵鍦板潃" prop="address">
         <el-input v-model="searchForm.address" clearable placeholder="璇疯緭鍏ラ棬搴楀湴鍧�" @keypress.enter.native="search"></el-input>
       </el-form-item>
-      <el-form-item label="鑱旂郴浜�" prop="contact">
-        <el-input v-model="searchForm.contact" clearable placeholder="璇疯緭鍏ヨ仈绯讳汉" @keypress.enter.native="search"></el-input>
+      <el-form-item label="鑱旂郴浜�" prop="linkName">
+        <el-input v-model="searchForm.linkName" clearable placeholder="璇疯緭鍏ヨ仈绯讳汉" @keypress.enter.native="search"></el-input>
       </el-form-item>
-      <el-form-item label="鑱旂郴鐢佃瘽" prop="telephone">
-        <el-input v-model="searchForm.telephone" clearable placeholder="璇疯緭鍏ヨ仈绯荤數璇�" @keypress.enter.native="search"></el-input>
+      <el-form-item label="鑱旂郴鐢佃瘽" prop="linkPhone">
+        <el-input v-model="searchForm.linkPhone" clearable placeholder="璇疯緭鍏ヨ仈绯荤數璇�" @keypress.enter.native="search"></el-input>
       </el-form-item>
       <el-form-item label="娉ㄥ唽鏃堕棿" prop="createTime">
         <el-date-picker type="daterange" v-model="searchForm.createTime" clearable value-format="yyyy-MM-dd HH:mm:ss"
@@ -25,8 +25,9 @@
       </el-form-item>
       <el-form-item label="鐘舵��" prop="status">
         <el-select v-model="searchForm.status" clearable placeholder="璇烽�夋嫨鐘舵��" @change="search">
-          <el-option label="鍚敤" :value="0"></el-option>
-          <el-option label="绂佺敤" :value="1"></el-option>
+          <el-option label="寰呭鎵�" :value="0"></el-option>
+          <el-option label="瀹℃壒閫氳繃" :value="1"></el-option>
+          <el-option label="瀹℃壒鏈�氳繃" :value="2"></el-option>
         </el-select>
       </el-form-item>
       <section>
@@ -44,9 +45,9 @@
       >
         <el-table-column type="selection" width="55"></el-table-column>
         <el-table-column prop="name" label="闂ㄥ簵鍚嶇О" min-width="120px"></el-table-column>
-        <el-table-column prop="type" label="绫诲瀷" min-width="80px">
+        <el-table-column prop="companyType" label="绫诲瀷" min-width="80px">
           <template slot-scope="{row}">
-            {{row.type == 1 ? '浼佷笟' : '涓汉'}}
+            {{row.companyType == 1 ? '浼佷笟' : '涓汉'}}
           </template>
         </el-table-column>
         <el-table-column prop="address" label="闂ㄥ簵鍦板潃" min-width="200px"></el-table-column>
@@ -83,10 +84,10 @@
     return {
       searchForm: {
         name: '',
-        type: '',
+        companyType: '',
         address: '',
-        contact: '',
-        telephone: '',
+        linkName: '',
+        linkPhone: '',
         createTime: '',
         status: ''
       }
@@ -95,7 +96,7 @@
   created () {
     this.config({
       module: '闂ㄥ簵鍒楄〃',
-      api: '/business/store',
+      api: '/business/shopInfo',
       'field.id': 'id',
       'field.main': 'id'
     })

--
Gitblit v1.9.3