Przeglądaj źródła

修改数据字段

wxy 4 miesięcy temu
rodzic
commit
ed437d5001

+ 15 - 1
src/views/flowPool/components/add.vue

@@ -63,9 +63,10 @@ const state = ref({
   formRef: null,
   sourceList: [],
   trafficList: [],
+  SelectAll: false
 })
 
-const { typeList, tariffIdList, formState, card, formRef, sourceList, trafficList } = toRefs(state.value)
+const { typeList, tariffIdList, formState, card, formRef, sourceList, trafficList, SelectAll } = toRefs(state.value)
 
 // 提交
 const handleSubmit = ({ values, errors }) => {
@@ -176,6 +177,14 @@ watch(() => modelValue.value, val => {
   }
 })
 
+watch(() => SelectAll.value, val => {
+  if (val) {
+    iccids.val = card.value.map(res => res.iccid)
+  } else {
+    iccids.val = []
+  }
+})
+
 
 </script>
 
@@ -223,6 +232,11 @@ watch(() => modelValue.value, val => {
                 item.iccid
               }}
               </a-option>
+              <template #header>
+                <div style="padding: 6px 12px;">
+                  <a-checkbox v-model="SelectAll">全选</a-checkbox>
+                </div>
+              </template>
             </a-select>
           </a-form-item>
           <a-form-item :label="$t('flowPool.expireTime')" field="expireTime">

+ 10 - 15
src/views/lotCard/cardList/index.vue

@@ -3,7 +3,7 @@
   <div class="container">
     <!-- 搜索条件区 -->
     <div class="search-section">
-      <a-form :model="searchForm" ref="formRef" layout="inline">
+      <a-form :model="searchForm"  layout="inline">
         <a-form-item field="iccid" :label="$t('lotCard.iccid')">
           <a-input v-model="searchForm.iccid" :placeholder="$t('lotCard.please') + $t('lotCard.iccid')" allow-clear />
         </a-form-item>
@@ -30,13 +30,13 @@
         <a-form-item>
 
           <a-space>
-            <a-button type="primary" @click="handleSearch">{{ $t('form.Search') }}</a-button>
-            <a-button @click="resetSearch">{{ $t('form.Reset') }}</a-button>
+            <a-button type="primary">{{ $t('form.Search') }}</a-button>
+            <a-button>{{ $t('form.Reset') }}</a-button>
           </a-space>
         </a-form-item>
       </a-form>
     </div>
-    
+
     <!-- <div class="top-actions">
       <a-space>
         <a-button type="primary" @click="showAdd=true">{{ $t('form.Add') }}</a-button>
@@ -60,7 +60,8 @@
     </a-table>
 
     <div class="pagtion">
-      <a-pagination :total="pagination.total"  show-total show-jumper show-page-size @change="evChangePage" @page-size-change="pagesChange"/>
+      <a-pagination :total="pagination.total" show-total show-jumper show-page-size @change="evChangePage"
+        @page-size-change="pagesChange" />
     </div>
     <!-- 查看流量消耗 -->
     <trafficUseDialog ref="trafficUseDialogRef" @submit="intData()" />
@@ -77,9 +78,8 @@ import trafficUseDialog from "./trafficUseDialog.vue";
 import { Getdictionary } from '@/mixins/index.js'
 import Add from './add.vue'
 const { proxy } = getCurrentInstance()
-import {useI18n} from 'vue-i18n'
-const {t} = useI18n();
-const formRef = ref()
+import { useI18n } from 'vue-i18n'
+const { t } = useI18n();
 const searchForm = ref({
   "iccid": "",
 });
@@ -110,13 +110,11 @@ const intData = async () => {
   dataSource.value = (data.records || []).map((item, index) => {
     const payType = item.payType == 0 ? 'Prepay' : 'Postpay';
     // const soure = soureName.find(val => val.value == item.source)?.label
-    const iccidStatus = accountStatusName.find(val => val.value == item.iccidStatus)?.label
     return {
       ...item,
       ...item.Info,
       payType: payType,
       // sourceName: soure,
-      iccidStatus,
       forewarningStatus: '正常',
       SilenceEndtime: '一个月',
       usedBg: '0',
@@ -161,10 +159,6 @@ const handleDictValue = async () => {
   serviceList.value = await Getdictionary('activationPackageMethod')
 }
 
-const resetSearch = () => {
-  proxy.$refs.formRef.resetFields()
-  intData()
-}
 
 onMounted(() => {
   handleDictValue()
@@ -173,11 +167,12 @@ onMounted(() => {
 </script>
 
 <style scoped lang="less">
-.pagtion{
+.pagtion {
   display: flex;
   justify-content: flex-end;
   margin-top: 30px;
 }
+
 .head-title-right {
   .m-r-10 {
     margin-right: 10px;

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

@@ -1,21 +1,21 @@
 export const columns = [
-  { title: window.$t('dataPackage.id'), dataIndex: 'id', align: 'center', width: 200 },
-  { title: '来源', dataIndex: 'source', align: 'center', width: 200 },
-  { title: '流量包名称', dataIndex: 'productName', align: 'center', width: 200 },
-  { title: '地区名称', dataIndex: 'dataZoneName', align: 'center', width: 200 },
-  { title: '套餐有效天数', dataIndex: 'validDays', align: 'center', width: 200 },
-  { title: '套餐可用流量', dataIndex: 'total', align: 'center', width: 200 },
-  { title: '语音呼入流量', dataIndex: 'voiceMt', align: 'center', width: 200 },
-  { title: '语音呼出流量', dataIndex: 'voiceMo', align: 'center', width: 300 },
-  { title: '短信总条数', dataIndex: 'smsTotal', align: 'center', width: 200 },
-  { title: '默认限速', dataIndex: 'dataSpeedDefault', align: 'center', width: 200 },
-  { title: '单词请求可用流量', dataIndex: 'dataQuota', align: 'center', width: 200 },
-  { title:'有效期类型', dataIndex: 'validDayType', align: 'center', width: 200 },
-  { title: '费率组名称', dataIndex: 'rateGroupName', align: 'center', width: 200 },
-  { title: '语音呼出地区名称', dataIndex: 'zoneVoiceMtName', align: 'center', width: 200 },
-  { title: '语音呼入地区名称', dataIndex: 'zoneVoiceMoName', align: 'center', width: 200 },
-  { title: '流量使用地区名称', dataIndex: 'zoneDataName', align: 'center', width: 200 },
-  { title: '短信使用地区名称', dataIndex: 'zoneSmsName', align: 'center', width: 200 },
+  { title: window.$t('dataPackage.id'), dataIndex: 'id', align: 'center', ellipsis: true },
+  { title: '来源', dataIndex: 'source', align: 'center', ellipsis: true },
+  { title: '流量包名称', dataIndex: 'productName', align: 'center', ellipsis: true },
+  { title: '地区名称', dataIndex: 'dataZoneName', align: 'center', ellipsis: true },
+  { title: '套餐有效天数', dataIndex: 'validDays', align: 'center', ellipsis: true },
+  { title: '套餐可用流量', dataIndex: 'total', align: 'center', ellipsis: true },
+  { title: '语音呼入流量', dataIndex: 'voiceMt', align: 'center', ellipsis: true},
+  { 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: 'validDayType', align: 'center', ellipsis: true },
+  { title: '费率组名称', dataIndex: 'rateGroupName', align: 'center', ellipsis: true },
+  { title: '语音呼出地区名称', dataIndex: 'zoneVoiceMtName', align: 'center', ellipsis: true },
+  { title: '语音呼入地区名称', dataIndex: 'zoneVoiceMoName', align: 'center', ellipsis: true },
+  { title: '流量使用地区名称', dataIndex: 'zoneDataName', align: 'center', ellipsis: true },
+  { title: '短信使用地区名称', dataIndex: 'zoneSmsName', align: 'center', ellipsis: true},
   // {
   //   title: window.$t('global.common.operations'),
   //   dataIndex: 'id',