فهرست منبع

增加卡清单搜索字段

wxy 3 ماه پیش
والد
کامیت
c1323c0360

+ 10 - 12
src/components/Search/index.vue

@@ -5,7 +5,7 @@
             <a-form :model="formState" layout="inline">
                 <a-form-item v-for="(item, index) in showIcon ? data : InitialData" :key="index" :label="item.label"
                     :field="item.field" :wrapper-col-style="{ marginBottom: '20px' }">
-                    <component :is="'a-' + item.type" v-model="formState[item.field].value"
+                    <component :is="'a-' + item.type" v-model="formState[item.field]"
                         :placeholder="item.type == 'input' ? '请输入' : '请选择' + item.label" allow-clear
                         :style="{ width: item.width ? item.width + 'px' : '' }">
                         <template v-if="item.type == 'select'">
@@ -18,13 +18,12 @@
                 <a-form-item>
                     <a-button type="primary" @click="handleQuery">查询</a-button>
                     <a-button @click="handleReset" style="margin-left: 10px;">重置</a-button>
+                    <div v-if="show" @click="showIcon = !showIcon" class="icon">
+                        {{ showIcon ? '折叠' : '展开' }} <icon-down :rotate="showIcon ? 180 : 0" />
+                    </div>
                 </a-form-item>
             </a-form>
         </div>
-
-        <div v-if="show" @click="showIcon = !showIcon" class="icon">
-            {{ showIcon ? '折叠' : '展开' }} &nbsp; <icon-down :rotate="showIcon ? 180 : 0" />
-        </div>
     </div>
 </template>
 
@@ -74,9 +73,7 @@ const data = ref()
 
 const emit = defineEmits(['query'])
 SearchForm.value.forEach(item => {
-    formState.value[item.field] = {
-        value: item.value,
-    };
+    formState.value[item.field] = item.value;
 });
 
 // 字典加载
@@ -111,7 +108,6 @@ watch(
 
 // 查询操作
 const handleQuery = () => {
-    // 将表单数据通过事件传递给父组件
     emit('query', formState.value);
 };
 
@@ -129,15 +125,17 @@ const handleReset = () => {
     justify-content: space-between;
 }
 
-.Form{
+.Form {
     width: 95%;
 }
 
-.icon{
+.icon {
     display: flex;
     // align-items: center;
     color: #3491fa;
-    font-size: 18px;
+    font-size: 15px;
     cursor: pointer;
+    font-weight: 600;
+    margin-left: 15px;
 }
 </style>

+ 10 - 10
src/views/lotCard/cardList/config.js

@@ -196,13 +196,13 @@ export const SearchForm = [
   {
     type: "input",
     label: "ICCID",
-    field: "source",
+    field: "iccid",
     value: "", // 双向绑定的值
   },
   {
     type: "select",
     label: "来源",
-    field: "simType",
+    field: "source",
     options: [], // 默认空,后面会通过字典加载
     dict: "source",
     value: "", // 双向绑定的值
@@ -211,13 +211,13 @@ export const SearchForm = [
   {
     type: "input",
     label: "客户名称",
-    field: "source",
+    field: "username",
     value: "", // 双向绑定的值
   },
   {
     type: "input",
     label: "IMSI",
-    field: "source",
+    field: "currentImsi",
     value: "", // 双向绑定的值
   },
   {
@@ -225,23 +225,23 @@ export const SearchForm = [
     label: "流量包状态",
     field: "simType",
     options: [], // 默认空,后面会通过字典加载
-    dict: "source",
+    dict: "account",
     value: "", // 双向绑定的值
     width: "200",
   },
   {
     type: "select",
     label: "SIM状态",
-    field: "simType",
+    field: "iccidstatus",
     options: [], // 默认空,后面会通过字典加载
-    dict: "source",
+    dict: "account",
     value: "", // 双向绑定的值
     width: "200",
   },
   {
     type: "date-picker",
     label: "SIM激活日期",
-    field: "simType",
+    field: "activeTime",
     options: [], // 默认空,后面会通过字典加载
     dict: "source",
     value: "", // 双向绑定的值
@@ -250,7 +250,7 @@ export const SearchForm = [
   {
     type: "date-picker",
     label: "SIM关闭日期",
-    field: "simType",
+    field: "closeTime",
     options: [], // 默认空,后面会通过字典加载
     dict: "source",
     value: "", // 双向绑定的值
@@ -259,7 +259,7 @@ export const SearchForm = [
   {
     type: "input",
     label: "IMSI所属供应商名称 ",
-    field: "simType",
+    field: "currentImsiProvider",
     options: [], // 默认空,后面会通过字典加载
     dict: "source",
     value: "", // 双向绑定的值

+ 3 - 2
src/views/lotCard/cardList/index.vue

@@ -3,7 +3,7 @@
   <div class="container">
     <!-- 搜索条件区 -->
     <div class="search-section">
-       <Search :SearchForm="SearchForm"/>
+       <Search :SearchForm="SearchForm" @query="intData"/>
     </div>
 
     <a-table row-key="iccid" :data="dataSource" :columns="columns" :pagination="false" :scroll="{ x: 'auto' }">
@@ -59,10 +59,11 @@ const showAdd = ref(false)
 const trafficUseDialogRef = ref()
 
 
-const intData = async () => {
+const intData = async (item) => {
   const param = {
     current: pagination.value.current,
     size: pagination.value.pageSize,
+    ...item
   }
   const { data } = await cardInfoList(param)
   dataSource.value = (data.records || []).map((item, index) => {

+ 1 - 1
src/views/supplier/trafficList/config.js

@@ -9,7 +9,7 @@ export const columns = [
   { title: '语音呼出流量', dataIndex: 'voiceMo', align: 'center', ellipsis: true },
   { title: '短信总条数', dataIndex: 'smsTotal', align: 'center', ellipsis: true },
   { title: '默认限速', dataIndex: 'dataSpeedDefault', align: 'center', ellipsis: true },
-  { title: '单请求可用流量', dataIndex: 'dataQuota', align: 'center', ellipsis: true },
+  { title: '单请求可用流量', dataIndex: 'dataQuota', align: 'center', ellipsis: true },
   { title:'有效期类型', dataIndex: 'validDayType', align: 'center', ellipsis: true },
   { title: '费率组名称', dataIndex: 'rateGroupName', align: 'center', ellipsis: true },
   { title: '语音呼出地区名称', dataIndex: 'zoneVoiceMtName', align: 'center', ellipsis: true },

+ 1 - 1
vite.config.js

@@ -62,7 +62,7 @@ export default defineConfig({
         proxy: {
             "/api": {
                 target: "http://sim.nanodreamtech.com",
-                // target:"http://192.168.0.78:3001",// 果本地端口
+                // target:"http://192.168.101.12:3001",// 果本地端口
                 // target: "http://127.0.0.1:3001",
                 // target: "http://sim.ainets.net",
                 changeOrigin: true,