Преглед на файлове

feat(orderManage): 新增运营商筛选功能并调整charge-order-info页面

- 在billing-strategy-api接口新增获取运营商下拉信息方法getOperatorSelect
- charge-order-info页面新增所属运营商筛选条件,支持搜索和清空
- charge-order-info页面列表增加运营商名称和车牌号字段展示
- 优化charge-order-info中page-search、page-content及page-modal的代码格式,减少换行
- 修改.env.development接口地址切换至线上地址
zouzexu преди 10 часа
родител
ревизия
87b9431a85
променени са 3 файла, в които са добавени 42 реда и са изтрити 43 реда
  1. 2 2
      .env.development
  2. 9 0
      src/api/operationsManage/billing-strategy-api.ts
  3. 31 41
      src/views/orderManage/charge-order-info/index.vue

+ 2 - 2
.env.development

@@ -6,8 +6,8 @@ VITE_APP_TITLE=zhongShuDianDong
 VITE_APP_BASE_API=/dev-api
 
 # 接口地址
-#VITE_APP_API_URL=https://cd.admin.zswlgz.com # 线上
-VITE_APP_API_URL=http://192.168.0.11:8989    # 本地
+VITE_APP_API_URL=https://cd.admin.zswlgz.com # 线上
+#VITE_APP_API_URL=http://192.168.0.11:8989    # 本地
 #VITE_APP_API_URL=http://192.168.0.217:8989    # 本地
 
 # WebSocket 端点(不配置则关闭),线上 ws://api.youlai.tech/ws ,本地 ws://localhost:8989/ws

+ 9 - 0
src/api/operationsManage/billing-strategy-api.ts

@@ -20,6 +20,15 @@ const BillingStrategyApi = {
       method: "get",
     });
   },
+  /**
+   * 获取运营商下拉选择信息
+   */
+  getOperatorSelect() {
+    return request<any>({
+      url: `/api/v1/third-party-info/list`,
+      method: "get",
+    });
+  },
   /**
    * 通过选择的站点获取策略信息并编辑
    * @param stationId(站点id ) salesType(销售类型(0、平台 1、企业 2、渠道方)) thirdPartyId(销售类型为1、2时必填) firmId(企业ID(销售类型为1时必填)关联c_firm_info 企业ID(销售类型为1时必填)关联c_firm_info)

+ 31 - 41
src/views/orderManage/charge-order-info/index.vue

@@ -1,21 +1,13 @@
 <template>
   <div class="app-container h-full flex flex-1 flex-col">
     <!-- 搜索 -->
-    <page-search
-      ref="searchRef"
-      :search-config="searchConfig"
-      @query-click="handleQueryClick"
-      @reset-click="handleResetClick"
-    >
+    <page-search ref="searchRef" :search-config="searchConfig" @query-click="handleQueryClick"
+      @reset-click="handleResetClick">
       <template #orderType="scope">
         <Dict v-model="scope.formData[scope.prop]" code="charge_order_type" v-bind="scope.attrs" />
       </template>
       <template #status="scope">
-        <Dict
-          v-model="scope.formData[scope.prop]"
-          code="charge_order_status"
-          v-bind="scope.attrs"
-        />
+        <Dict v-model="scope.formData[scope.prop]" code="charge_order_status" v-bind="scope.attrs" />
       </template>
       <template #stopReason="scope">
         <Dict v-model="scope.formData[scope.prop]" code="charge_stop_reason" v-bind="scope.attrs" />
@@ -26,16 +18,9 @@
     </page-search>
 
     <!-- 列表 -->
-    <page-content
-      ref="contentRef"
-      :content-config="contentConfig"
-      @add-click="handleAddClick"
-      @export-click="handleExportClick"
-      @search-click="handleSearchClick"
-      @toolbar-click="handleToolbarClick"
-      @operate-click="handleOperateClick"
-      @filter-change="handleFilterChange"
-    >
+    <page-content ref="contentRef" :content-config="contentConfig" @add-click="handleAddClick"
+      @export-click="handleExportClick" @search-click="handleSearchClick" @toolbar-click="handleToolbarClick"
+      @operate-click="handleOperateClick" @filter-change="handleFilterChange">
       <template #orderType="scope">
         <DictLabel v-model="scope.row[scope.prop]" code="charge_order_type" />
       </template>
@@ -62,11 +47,7 @@
         <Dict v-model="scope.formData[scope.prop]" code="charge_order_type" v-bind="scope.attrs" />
       </template>
       <template #status="scope">
-        <Dict
-          v-model="scope.formData[scope.prop]"
-          code="charge_order_status"
-          v-bind="scope.attrs"
-        />
+        <Dict v-model="scope.formData[scope.prop]" code="charge_order_status" v-bind="scope.attrs" />
       </template>
       <template #stopType="scope">
         <Dict v-model="scope.formData[scope.prop]" code="stop_type" v-bind="scope.attrs" />
@@ -77,11 +58,7 @@
     </page-modal>
 
     <!-- 编辑 -->
-    <page-modal
-      ref="editModalRef"
-      :modal-config="editModalConfig"
-      @submit-click="handleSubmitClick"
-    >
+    <page-modal ref="editModalRef" :modal-config="editModalConfig" @submit-click="handleSubmitClick">
       <template #chargeOrderNo="scope">
         <span class="color-coolGray">{{ scope.formData[scope.prop] }}</span>
       </template>
@@ -89,11 +66,7 @@
         <Dict v-model="scope.formData[scope.prop]" code="charge_order_type" v-bind="scope.attrs" />
       </template>
       <template #status="scope">
-        <Dict
-          v-model="scope.formData[scope.prop]"
-          code="charge_order_status"
-          v-bind="scope.attrs"
-        />
+        <Dict v-model="scope.formData[scope.prop]" code="charge_order_status" v-bind="scope.attrs" />
       </template>
       <template #stopType="scope">
         <Dict v-model="scope.formData[scope.prop]" code="stop_type" v-bind="scope.attrs" />
@@ -102,11 +75,7 @@
         <Dict v-model="scope.formData[scope.prop]" code="masp_status" v-bind="scope.attrs" />
       </template>
       <template #remark="scope">
-        <el-input
-          v-model="scope.formData[scope.prop]"
-          type="textarea"
-          v-bind="scope.attrs"
-        />
+        <el-input v-model="scope.formData[scope.prop]" type="textarea" v-bind="scope.attrs" />
       </template>
     </page-modal>
   </div>
@@ -262,6 +231,25 @@ const searchConfig: ISearchConfig = reactive({
         }));
       },
     },
+    {
+      type: "select",
+      label: "所属运营商",
+      prop: "operatorId",
+      attrs: {
+        placeholder: "请选择运营商",
+        clearable: true,
+        filterable: true,
+        style: { width: "200px" },
+      },
+      options: [],
+      async initFn(formItem) {
+        const data = await BillingStrategyAPI.getOperatorSelect();
+        formItem.options = (data || []).map((item: any) => ({
+          label: item.ecName,
+          value: item.operatorId,
+        }));
+      },
+    },
     {
       type: "date-picker",
       label: "创建时间",
@@ -325,8 +313,10 @@ const contentConfig: IContentConfig<ChargeOrderInfoPageQuery> = reactive({
       templet: "custom",
       slotName: "orderType",
     },
+    { label: "车牌号", prop: "plateNum" },
     { label: "充电站名称", prop: "stationName" },
     { label: "设备名称", prop: "connectorName" },
+    { label: "运营商名称", prop: "ecName" },
     { label: "充电桩编号", prop: "equipmentId" },
     { label: "终端编号", prop: "connectorId" },
     { label: "充电开始时间", prop: "startTime" },