فهرست منبع

增加字段 & 修改字段

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

+ 9 - 0
package-lock.json

@@ -19,6 +19,7 @@
         "lodash": "^4.17.21",
         "monaco-editor": "^0.52.0",
         "pinia": "^2.1.7",
+        "qrcode.vue": "^3.6.0",
         "vue": "^3.4.21",
         "vue-echarts": "^7.0.3",
         "vue-i18n": "^10.0.1",
@@ -3665,6 +3666,14 @@
       "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==",
       "optional": true
     },
+    "node_modules/qrcode.vue": {
+      "version": "3.6.0",
+      "resolved": "https://registry.npmmirror.com/qrcode.vue/-/qrcode.vue-3.6.0.tgz",
+      "integrity": "sha512-vQcl2fyHYHMjDO1GguCldJxepq2izQjBkDEEu9NENgfVKP6mv/e2SU62WbqYHGwTgWXLhxZ1NCD1dAZKHQq1fg==",
+      "peerDependencies": {
+        "vue": "^3.0.0"
+      }
+    },
     "node_modules/query-string": {
       "version": "4.3.4",
       "resolved": "https://registry.npmmirror.com/query-string/-/query-string-4.3.4.tgz",

+ 1 - 0
package.json

@@ -20,6 +20,7 @@
     "lodash": "^4.17.21",
     "monaco-editor": "^0.52.0",
     "pinia": "^2.1.7",
+    "qrcode.vue": "^3.6.0",
     "vue": "^3.4.21",
     "vue-echarts": "^7.0.3",
     "vue-i18n": "^10.0.1",

+ 1 - 1
src/i18n/zh/flowPool.js

@@ -48,7 +48,7 @@ export default {
     ICCIDName:'请选择ICCID',
     tariffName:'资费名称',
     ActivatedName:'已激活/总卡数量',
-    HaveBeenUsedName:'已使用/总流量',
+    HaveBeenUsedName:'已使用流量',
     TimeName:'过期时间',
     Waring:'预警'
 }

+ 10 - 12
src/i18n/zh/lotCard.js

@@ -105,14 +105,14 @@ export default {
 
     // 卡详情
      currencyBalance:'SIM货币余额',
-     ActivationDate:'激活日期',
-     DueDate:'到期日期',
+     ActivationDate:'激活日期',
+     DueDate:'到期日期',
      validity:'有效期',
      supplier:'供应商',
      month:'月',
      CurrentPackageInformation:'当前套餐信息',
-     PackageName:'套餐名称',
-     PackageStatus:'套餐状态',
+     PackageName:'资费名称',
+     PackageStatus:'流量包状态',
      Activated:'已激活',
      Off:'关闭',
      expired:'已过期',
@@ -120,7 +120,7 @@ export default {
      WhetherToGive:'是否赠送套餐',
      Yes:'是',
      No:'否',
-     PackageActivationDate:'套餐激活日期',
+     PackageActivationDate:'流量包激活日期',
      PackageExpirationDate:'套餐过期日期',
      PlaAvailableData:'套餐可用流量',
      UnlimitedFlow:'无限流量',
@@ -178,14 +178,10 @@ export default {
      TotalVoiceMinutes:'总语音分钟数',
      NumberTextMessagesSent:'发短信数',
      ClosingDate:'SIM关闭日期',
-     CardPackage:'卡套餐',
+     CardPackage:'卡资费',
      EarlyWarningState:'预警状态',
      PoolName_Number:'池名称/编号',
-     TheExpirationTime:'沉默期/月',
-     UsedPlanData:'已用(套餐流量)',
-     AvailablePlanData:'可用(套餐流量)',
-     used:'已用(加油包流量)',
-     available:'可用(加油包流量)',
+     TheExpirationTime:'沉默期',
      DefaultRate:'默认速率',
      CardDetails:'卡详情',
      TariffName:'资费名称',
@@ -194,5 +190,7 @@ export default {
      FormationPool:'组池',
      FlowPool:'流量池',
      QuantityCardsPurchased:'购卡数量',
-     DatapackageStatus:'流量包状态'
+     DatapackageStatus:'流量包状态',
+     UsedpackFlow:'已用加油包流量',
+     FuelPackFlowAvailable:'可用加油包流量'
 }  

+ 2 - 2
src/views/flowPool/components/forewarning.vue

@@ -252,9 +252,9 @@ onMounted(() => {
           </a-form-item>
         </a-form>
       </a-tab-pane>
-      <a-tab-pane key="2" title="卡预警">
+      <!-- <a-tab-pane key="2" title="卡预警">
 
-      </a-tab-pane>
+      </a-tab-pane> -->
     </a-tabs>
   </a-modal>
 </template>

+ 2 - 2
src/views/flowPool/index.vue

@@ -115,13 +115,13 @@ const intData = async (item) => {
     current: pagination.value.current,
     size: pagination.value.pageSize,
     ...searchForm.value,
-    type: 1
+    trafficPoolType: '1'
   }
   const { data } = await lotCatdList(param)
   dataSource.value = (data.records || []).map((item, index) => {
     const sourceName = sourceList.value.find(val => val.value == item.source)?.label
     const Activated = 0 + '/' + item.iccids?.length
-    const HaveBeenUsed = 0 + '/' + item.size + item.sizeType
+    const HaveBeenUsed = item.size + item.sizeType
     return {
       ...item,
       sourceName,// 运营商名称

+ 1 - 4
src/views/flowPool/rearFlowPool/index.vue

@@ -102,11 +102,9 @@ const intData = async (item) => {
     size: pagination.value.pageSize,
     ...searchForm.value,
     trafficPoolType: "2",
-    type: 2,
   };
   const { data } = await lotCatdList(param);
   dataSource.value = (data.records || []).map((item, index) => {
-    // const trafficPoolType = typeList.value.find(val => val.value == item.trafficPoolType)?.label
     const trafficPoolStatus = trafficList.value.find(
       (val) => val.value == item.status
     )?.label;
@@ -114,11 +112,10 @@ const intData = async (item) => {
       (val) => val.value == item.source
     )?.label;
     const Activated = 0 + "/" + item.iccids?.length;
-    const HaveBeenUsed = 0 + "/" + item.size + item.sizeType;
+    const HaveBeenUsed = item.size + item.sizeType;
     return {
       ...item,
       sourceName, // 运营商名称
-      // trafficPoolType,
       Activated: Activated,
       HaveBeenUsed: HaveBeenUsed,
       trafficPoolStatus,

+ 167 - 61
src/views/lotCard/cardList/config.js

@@ -24,19 +24,6 @@ export const columns = [
     align: "center",
     ellipsis: true,
   },
-  {
-    title: "SIM货币余额",
-    dataIndex: "moneyBalances",
-    align: "center",
-    ellipsis: true,
-  },
-  {
-    title: window.$t("lotCard.GenerationDate"),
-    dataIndex: "createTime",
-    align: "center",
-    ellipsis: true,
-  },
-  // { title: '支付方式', dataIndex: 'payType', align: 'center', ellipsis: true },
   {
     title: window.$t("lotCard.SimStatus"),
     slotName: "iccidStatus",
@@ -56,24 +43,6 @@ export const columns = [
     align: "center",
     ellipsis: true,
   },
-  {
-    title: window.$t("lotCard.MinutesIncomingVoiceCalls"),
-    dataIndex: "voiceMtTotal",
-    align: "center",
-    ellipsis: true,
-  },
-  {
-    title: window.$t("lotCard.MinutesOutgoingVoiceCalls"),
-    dataIndex: "voiceMoTotal",
-    align: "center",
-    ellipsis: true,
-  },
-  {
-    title: window.$t("lotCard.TotalVoiceMinutes"),
-    dataIndex: "voiceTotal",
-    align: "center",
-    ellipsis: true,
-  },
   {
     title: window.$t("lotCard.NumberTextMessagesSent"),
     dataIndex: "smsTotal",
@@ -125,36 +94,6 @@ export const columns = [
     width: 200,
     ellipsis: true,
   },
-  {
-    title: window.$t("lotCard.UsedPlanData"),
-    dataIndex: "dataUsage",
-    align: "center",
-    ellipsis: true,
-  },
-  {
-    title: window.$t("lotCard.AvailablePlanData"),
-    dataIndex: "dataTotal",
-    align: "center",
-    ellipsis: true,
-  },
-  {
-    title: window.$t("lotCard.used"),
-    dataIndex: "usedBg",
-    align: "center",
-    ellipsis: true,
-  },
-  {
-    title: window.$t("lotCard.available"),
-    dataIndex: "usableBg",
-    align: "center",
-    ellipsis: true,
-  },
-  {
-    title: window.$t("lotCard.DefaultRate"),
-    dataIndex: "dataSpeed",
-    align: "center",
-    ellipsis: true,
-  },
   {
     title: window.$t("global.common.operations"),
     dataIndex: "id",
@@ -259,3 +198,170 @@ export const SearchForm = [
     width: "200",
   },
 ];
+
+
+export const columnsCard = [
+  {
+    title: window.$t('lotCard.PackageName'),
+    dataIndex: 'productName',
+    align: 'center', ellipsis: true
+  }, {
+    title: window.$t('lotCard.PackageStatus'),
+    dataIndex: 'status',
+    align: 'center', ellipsis: true
+  },
+  {
+    title: window.$t('lotCard.validity') + (window.$t('lotCard.month')),
+    dataIndex: 'validMonth',
+    align: 'center', ellipsis: true
+  },
+  {
+    title: window.$t('lotCard.AvailableFlow'),
+    dataIndex: 'dataTotal',
+    align: 'center', ellipsis: true
+  },
+  {
+    title: window.$t('lotCard.Usedflow'),
+    dataIndex: 'dataUsage',
+    align: 'center', ellipsis: true
+  },
+  {
+    title: window.$t('lotCard.TrafficUsedToday'),
+    dataIndex: 'dataToday',
+    align: 'center', ellipsis: true
+  },
+  {
+    title: window.$t('lotCard.PackageValidity'),
+    dataIndex: 'validDays',
+    align: 'center', ellipsis: true
+  },
+  {
+    title: window.$t('lotCard.ActivationDate'),
+    dataIndex: 'activeTime',
+    align: 'center', ellipsis: true
+  },
+  {
+    title: window.$t('lotCard.ExpirationDate'),
+    dataIndex: 'expiryTime',
+    align: 'center', ellipsis: true
+  },
+]
+
+export const columnsTopup = [
+  {
+    title: window.$t('lotCard.OrderNumber'),
+    dataIndex: 'productName',
+    ellipsis: true,
+    align: 'center',
+  },
+  {
+    title: 'ICCID',
+    dataIndex: 'productName',
+    ellipsis: true,
+    align: 'center',
+  },
+  {
+    title: window.$t('lotCard.PurchasePackage'),
+    dataIndex: 'productName',
+    ellipsis: true,
+    align: 'center',
+  },
+  {
+    title: window.$t('lotCard.OrderType'),
+    dataIndex: 'productName',
+    ellipsis: true,
+    align: 'center',
+  },
+  {
+    title: window.$t('lotCard.PackagePrice'),
+    dataIndex: 'productName',
+    ellipsis: true,
+    align: 'center',
+  },
+  {
+    title: window.$t('lotCard.operator'),
+    dataIndex: 'productName',
+    ellipsis: true,
+    align: 'center',
+  },
+  {
+    title: window.$t('lotCard.PaymentStatus'),
+    dataIndex: 'productName',
+    ellipsis: true,
+    align: 'center',
+  },
+  {
+    title: window.$t('lotCard.OrderDate'),
+    dataIndex: 'productName',
+    ellipsis: true,
+    align: 'center',
+  },
+]
+
+export const columnsAmount = [
+  {
+    title: window.$t('lotCard.ID'),
+    dataIndex: 'productId',
+    align: 'center', ellipsis: true
+  },
+  {
+    title: 'IMIS',
+    dataIndex: 'imsi',
+    align: 'center', ellipsis: true
+  },
+
+  {
+    title: window.$t('lotCard.accountCard'),
+    dataIndex: 'account',
+    align: 'center', ellipsis: true
+  },
+  {
+    title: `${window.$t('lotCard.FlowRate')}(MB)`,
+    dataIndex: 'usage',
+    align: 'center', ellipsis: true
+  },
+  {
+    title: window.$t('lotCard.CargoAreaCode'),
+    dataIndex: 'countryNo',
+    align: 'center', ellipsis: true
+  },
+  {
+    title: window.$t('lotCard.DetailDate'),
+    dataIndex: 'date',
+    align: 'center', ellipsis: true
+  },
+]
+
+
+export const columnsOperation = [
+  {
+    title: window.$t('lotCard.settingUser'),
+    dataIndex: 'userId',
+    ellipsis: true,
+    align: 'center',
+  },
+  {
+    title: 'iccid',
+    dataIndex: 'iccid',
+    ellipsis: true,
+    align: 'center',
+  },
+  {
+    title: window.$t('lotCard.source'),
+    dataIndex: 'source',
+    ellipsis: true,
+    align: 'center',
+  },
+  {
+    title: window.$t('lotCard.Controls'),
+    dataIndex: 'operation',
+    ellipsis: true,
+    align: 'center',
+  },
+  {
+    title: window.$t('lotCard.remark'),
+    dataIndex: 'remark',
+    ellipsis: true,
+    align: 'center',
+  },
+]

+ 42 - 179
src/views/lotCard/cardList/trafficUseDialog.vue

@@ -1,6 +1,6 @@
 <template>
-  <a-modal width="70%" :visible="visible" :title="$t('lotCard.CardDetails') + Card_info.iccid" :hide-cancel='true'  :okText="$t('form.Confirm')"
-  :cancelText="$t('form.Cancel')" @ok="handleSubmit" @cancel="handleCancel" draggable>
+  <a-modal width="70%" :visible="visible" :title="$t('lotCard.CardDetails') + Card_info.iccid" :hide-cancel='true'
+    :okText="$t('form.Confirm')" :cancelText="$t('form.Cancel')" @ok="handleSubmit" @cancel="handleCancel" draggable>
     <!-- 卡片信息 -->
     <a-row class="grid-demo" :gutter="24">
       <a-col :span="12">
@@ -39,9 +39,19 @@
             </a-col>
             <a-col :span="12">
               <a-form-item :label="$t('lotCard.supplier')">
-                {{ Card_info.currentImsiProvider }}
+                {{ Card_info.source }}
               </a-form-item>
             </a-col>
+            <!-- <a-col :span="12">
+              <a-form-item :label="$t('lotCard.UsedpackFlow')">
+                {{ Card_info.source }}
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-item :label="$t('lotCard.FuelPackFlowAvailable')">
+                {{ Card_info.source }}
+              </a-form-item>
+            </a-col> -->
           </a-row>
         </a-form>
         <p>{{ $t('lotCard.CurrentPackageInformation') }}</p>
@@ -60,11 +70,11 @@
                 }}
               </a-form-item>
             </a-col>
-            <a-col :span="12">
+            <!-- <a-col :span="12">
               <a-form-item :label="$t('lotCard.validity')">
                 {{ dataPackage?.validDays }} {{ $t('lotCard.month') }}
               </a-form-item>
-            </a-col>
+            </a-col> -->
             <a-col :span="12">
               <a-form-item :label="$t('lotCard.WhetherToGive')">
                 {{ dataPackage?.present == 0 ? $t('lotCard.No') : $t('lotCard.Yes') }}
@@ -136,19 +146,20 @@
           }}</a-button>
         <a-button type="primary" status="warning" @click="SIMCardService(1)">{{ $t('lotCard.RestoreService')
           }}</a-button>
-        <a-button type="primary" status="warning">{{ $t('lotCard.CloseCard') }}</a-button>
+        <a-button type="primary" status="warning" @click="SIMCardService(2)">{{ $t('lotCard.CloseCard') }}</a-button>
       </div>
     </template>
   </a-modal>
 </template>
 <script setup>
-import { onMounted, ref } from "vue";
+import { onMounted, ref ,h} from "vue";
 import { getDataCDR, PauseSIMService, RecoverSIMService, OperationRecord } from '@/api/path/lotCard.api'
 import { Getdictionary } from '@/mixins/index'
-import { Message } from '@arco-design/web-vue'
+import { Message ,Modal} from '@arco-design/web-vue'
 // 图表插件
 import * as echarts from "echarts";
 import { useI18n } from 'vue-i18n'
+import {columnsCard,columnsTopup,columnsAmount,columnsOperation} from './config'
 const { t } = useI18n();
 const props = defineProps({});
 
@@ -181,175 +192,17 @@ const option = ref({
 })
 
 // 卡套餐信息
-const columnsCard = [
-  {
-    title: t('lotCard.PackageName'),
-    dataIndex: 'productName',
-    align: 'center', ellipsis: true
-  }, {
-    title: t('lotCard.PackageStatus'),
-    dataIndex: 'status',
-    align: 'center', ellipsis: true
-  },
-  {
-    title: t('lotCard.validity')+(t('lotCard.month')),
-    dataIndex: 'validMonth',
-    align: 'center', ellipsis: true
-  },
-  {
-    title: t('lotCard.AvailableFlow'),
-    dataIndex: 'dataTotal',
-    align: 'center', ellipsis: true
-  },
-  {
-    title: t('lotCard.Usedflow'),
-    dataIndex: 'dataUsage',
-    align: 'center', ellipsis: true
-  },
-  {
-    title: t('lotCard.TrafficUsedToday'),
-    dataIndex: 'dataToday',
-    align: 'center', ellipsis: true
-  },
-  {
-    title: t('lotCard.PackageValidity'),
-    dataIndex: 'validDays',
-    align: 'center', ellipsis: true
-  },
-  {
-    title: t('lotCard.ActivationDate'),
-    dataIndex: 'activeTime',
-    align: 'center', ellipsis: true
-  },
-  {
-    title: t('lotCard.ExpirationDate'),
-    dataIndex: 'expiryTime',
-    align: 'center', ellipsis: true
-  },
-]
 const dataCard = ref([])
 
 // 充值信息
-const columnsTopup = [
-  {
-    title: t('lotCard.OrderNumber'),
-    dataIndex: 'productName',
-    ellipsis: true,
-    align: 'center',
-  },
-  {
-    title: 'ICCID',
-    dataIndex: 'productName',
-    ellipsis: true,
-    align: 'center',
-  },
-  {
-    title: t('lotCard.PurchasePackage'),
-    dataIndex: 'productName',
-    ellipsis: true,
-    align: 'center',
-  },
-  {
-    title: t('lotCard.OrderType'),
-    dataIndex: 'productName',
-    ellipsis: true,
-    align: 'center',
-  },
-  {
-    title: t('lotCard.PackagePrice'),
-    dataIndex: 'productName',
-    ellipsis: true,
-    align: 'center',
-  },
-  {
-    title: t('lotCard.operator'),
-    dataIndex: 'productName',
-    ellipsis: true,
-    align: 'center',
-  },
-  {
-    title: t('lotCard.PaymentStatus'),
-    dataIndex: 'productName',
-    ellipsis: true,
-    align: 'center',
-  },
-  {
-    title: t('lotCard.OrderDate'),
-    dataIndex: 'productName',
-    ellipsis: true,
-    align: 'center',
-  },
-]
+
 const dataTopup = ref([])
 // 使用量
-const columnsAmount = [
-  {
-    title: t('lotCard.ID'),
-    dataIndex: 'productId',
-    align: 'center', ellipsis: true
-  },
-  {
-    title: 'IMIS',
-    dataIndex: 'imsi',
-    align: 'center', ellipsis: true
-  },
 
-  {
-    title: t('lotCard.accountCard'),
-    dataIndex: 'account',
-    align: 'center', ellipsis: true
-  },
-  {
-    title: `${t('lotCard.FlowRate')}(MB)`,
-    dataIndex: 'usage',
-    align: 'center', ellipsis: true
-  },
-  {
-    title: t('lotCard.CargoAreaCode'),
-    dataIndex: 'countryNo',
-    align: 'center', ellipsis: true
-  },
-  {
-    title: t('lotCard.DetailDate'),
-    dataIndex: 'date',
-    align: 'center', ellipsis: true
-  },
-]
 const dataAmount = ref([])
 
 // 操作记录
-const columnsOperation = [
-  {
-    title: t('lotCard.settingUser'),
-    dataIndex: 'userId',
-    ellipsis: true,
-    align: 'center',
-  },
-  {
-    title: 'iccid',
-    dataIndex: 'iccid',
-    ellipsis: true,
-    align: 'center',
-  },
-  {
-    title: t('lotCard.source'),
-    dataIndex: 'source',
-    ellipsis: true,
-    align: 'center',
-  },
-  {
-    title: t('lotCard.Controls'),
-    dataIndex: 'operation',
-    ellipsis: true,
-    align: 'center',
-  },
-  {
-    title: t('lotCard.remark'),
-    dataIndex: 'remark',
-    ellipsis: true,
-    align: 'center',
-  },
-]
+
 const dataOperation = ref([])
 const open = (data) => {
   if (!data) {
@@ -428,17 +281,27 @@ const intData = async () => {
 
 // SIM卡操作
 const SIMCardService = async (index) => {
-  const Inform = {
-    iccid: Card_info.value.iccid, source: Card_info.value.source
-  }
-  // 暂停SIM卡
-  let res = index == 0 ? await PauseSIMService(Inform) : (index == 1 ? await RecoverSIMService(Inform) : '')
-  if (res.code === 200) {
-    Message.success({
-      content: res.message,
-      duration: 2000,
-    })
-    handleSubmit()
+  if (index !== 2) {
+    const Inform = {
+      iccid: Card_info.value.iccid, source: Card_info.value.source
+    }
+    // 暂停SIM卡
+    let res = index == 0 ? await PauseSIMService(Inform) : (index == 1 ? await RecoverSIMService(Inform) : '')
+    if (res.code === 200) {
+      Message.success({
+        content: res.message,
+        duration: 2000,
+      })
+      handleSubmit()
+    }
+  } else {
+    Modal.info({
+      title: '关闭卡',
+      cancelText:'关闭',
+      content: ()=>{
+        return h('div',{style:'color:red;text-align: center;font-size:18px'},'当前操作不可逆,请确定是否关闭当前卡!!')
+      }
+    });
   }
 }
 const handleSubmit = () => {

+ 21 - 5
src/views/tariffManagement/SetMeal/index.vue

@@ -14,32 +14,48 @@
         <template #Controls="{ record }">
           <a-space>
             <a-button type="text">设置套餐</a-button>
-            <a-button type="text">充值二维码</a-button>
+            <a-button type="text" @click="visibleQrCode=true">充值二维码</a-button>
             <a-button type="text">下架</a-button>
           </a-space>
         </template>
       </a-table>
     </div>
+
+    <a-modal v-model:visible="visibleQrCode" width="700px" @cancel="visibleQrCode = false" title="充值二维码">
+      <div class="code">
+        <qrcode-vue :value="codeUrl" size="150" level="H" ></qrcode-vue>
+      </div>
+      <template #footer>
+        <a-button @click="visibleQrCode = false">关闭</a-button>
+      </template>
+    </a-modal>
   </div>
 </template>
 
 <script setup>
 import { ref, onMounted, toRefs } from 'vue';
 import Search from '@/components/Search/index.vue'
-import { SetMealSearchForm ,columnsSetMeal} from '../config.js'
+import { SetMealSearchForm, columnsSetMeal } from '../config.js'
+import QrcodeVue from 'qrcode.vue'
 const state = ref({
-  data: [{labelName:'666',ID:'4884',userName:'张总',time:'2024',status:'正常'}],
+  data: [{ labelName: '666', ID: '4884', userName: '张总', time: '2024', status: '正常' }],
   pagination: {
     total: 0,
     pageSize: 10,
     current: 1,
-  }
+  },
+  visibleQrCode: false,
+  codeUrl:'https://baidu.com'
 })
-const {data,pagination} = toRefs(state.value)
+const { data, pagination, visibleQrCode ,codeUrl} = toRefs(state.value)
 </script>
 <style lang="less" scoped>
 .search,
 .table {
   margin-top: 1rem;
 }
+.code{
+  justify-content: center;
+  display: flex;
+}
 </style>

+ 1 - 1
src/views/tariffManagement/config.js

@@ -243,7 +243,7 @@ export const UserColumns = [
   },
   {
     title: window.$t("customer.cardNum"),
-    dataIndex: "simcount",
+    dataIndex: "simCount",
     align: "center",
     minWidth: "200",
   },