wangyong пре 3 месеци
родитељ
комит
b1f5b6252f

+ 3 - 0
.env.development

@@ -0,0 +1,3 @@
+# 开发环境
+VITE_API_URL=http://sim.nanodreamtech.com
+VITE_ENV=development

+ 3 - 0
.env.production

@@ -0,0 +1,3 @@
+# 生产环境api
+VITE_API_URL=http://sim.ainets.net
+VITE_ENV=production

+ 3 - 2
src/App.vue

@@ -93,10 +93,11 @@ body {
 }
 
 // 文字主题色加重色
-.boldTxt{
+.boldTxt {
   color: rgb(@blue_0);
 }
-.txtPointer{ 
+
+.txtPointer {
   cursor: pointer;
 }
 </style>

+ 1 - 1
src/api/path/lotCard.api.js

@@ -57,7 +57,7 @@ export function getDataPlanList(params) {
 
 // CDR详单查询
 export function getDataCDR(params) {
-    return service.post("/admin/sim/simCDR", params);
+    return service.post("/admin/sim/newSimCDR", params);
 }
 
 

+ 6 - 5
src/components/Layout/components/layout/menu.vue

@@ -1,6 +1,6 @@
 <template>
   <a-layout style="min-height: 100vh">
-    <a-layout-sider theme="dark" :width="160" :collapsed-width="48" collapsible :trigger="null"
+    <a-layout-sider theme="dark" :width="160" :collapsed-width="50" collapsible :trigger="null"
       @collapse="evMenuSecondLongShow" v-model:collapsed="menuSecondLongShow">
       <div class="logo-layout">
         <div class="logo">
@@ -61,7 +61,7 @@ import { useRoute, useRouter } from "vue-router";
 import { useSystemStore } from "@/store/modules/systemStore";
 import LayoutHeader from "@/components/Layout/components/layoutHeader/index.vue";
 import subMenu from "@/components/Layout/components/subMenu/index.vue";
-import {RouterTagData} from '@/store/modules/routerTag.js'
+import { RouterTagData } from '@/store/modules/routerTag.js'
 
 // 标签页仓库
 const settingStore = RouterTagData()
@@ -103,8 +103,9 @@ const evMouseLeavesSubMenu = () => {
 };
 // 鼠标滑动上去更新菜单栏 目前先屏蔽
 const evMenuGetFn = (routeItem, type) => {
-  // menuSecondData.value = routeItem;
-  // console.log(routeItem);
+  if (menuSecondLongShow.value) {
+    menuSecondData.value = routeItem;
+  }
 };
 
 // 查找最下级
@@ -160,7 +161,7 @@ watch(
 .layout-header {
   height: 48px;
   background: @bg_color_2;
-  padding-inline: 10px;
+  // padding-inline: 10px;
   box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
   z-index: 9;
 }

+ 1 - 6
src/components/Layout/components/layoutHeader/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="header">
+  <div class="header" >
     <div class="layout_header">
       <!-- 面包屑 -->
       <div class="flex_item_bread">
@@ -153,11 +153,6 @@ onMounted(() => {
   height: 50px;
 }
 
-.header {
-  background-color: #ffffff;
-}
-
-
 .flex-right-user {
   width: auto;
   display: flex;

+ 2 - 1
src/i18n/zh/customer.js

@@ -271,5 +271,6 @@ export default {
     userAdmin:'客户账号',
     startTime:'创建时间',
     platform:'平台',
-    client:'客户'
+    client:'客户',
+    note:'注:登录密码是明文加密,编辑并不会回显原密码,如无需修改密码,请直接保存信息即可!!'
 };

+ 2 - 2
src/i18n/zh/form.js

@@ -83,6 +83,6 @@ export default {
     pleaseEnter: "请输入",
   },
 
-  alter:'变更'
-   
+  alter:'变更',
+  confirm:'保存'
 }

+ 1 - 2
src/i18n/zh/lotCard.js

@@ -178,11 +178,10 @@ export default {
      TotalVoiceMinutes:'总语音分钟数',
      NumberTextMessagesSent:'发短信数',
      ClosingDate:'SIM关闭日期',
-     SupplierName:'所属供应商名称',
      CardPackage:'卡套餐',
      EarlyWarningState:'预警状态',
      PoolName_Number:'池名称/编号',
-     TheExpirationTime:'沉默期到期时间',
+     TheExpirationTime:'沉默期/月',
      UsedPlanData:'已用(套餐流量)',
      AvailablePlanData:'可用(套餐流量)',
      used:'已用(加油包流量)',

+ 1 - 0
src/i18n/zh/order.js

@@ -47,4 +47,5 @@ export default {
     AuditOpinion:'审核意见',
     TurnDown:'驳回',
     ReturnAmount:'退货金额',
+    ChangeTariff:'变更资费'
 }

+ 41 - 0
src/views/SetMeal/config.js

@@ -0,0 +1,41 @@
+
+export const SetMealSearchForm = [
+    {
+      type: "input",
+      label: "套餐名称",
+      field: "label",
+      value: "", // 双向绑定的值
+    },
+    {
+      type: "input",
+      label: "套餐ID",
+      field: "label",
+      value: "", // 双向绑定的值
+    },
+    {
+      type: "select",
+      label: "所属客户",
+      field: "state",
+      options: [], // 默认空,后面会通过字典加载
+      dict: "userType",
+      value: "", // 双向绑定的值
+      width: "200",
+    },
+    {
+      type: "range-picker",
+      label: "创建时间",
+      field: "createdAt",
+      value: [], // 双向绑定的值
+      width: "300",
+      Custom: 'mode="month"', // 自定义值
+    },
+    {
+      type: "select",
+      label: "状态",
+      field: "state",
+      options: [], // 默认空,后面会通过字典加载
+      dict: "userType",
+      value: "", // 双向绑定的值
+      width: "200",
+    },
+  ]

+ 22 - 0
src/views/SetMeal/index.vue

@@ -0,0 +1,22 @@
+<template>
+    <div>
+      <div class="search">
+          <Search :SearchForm="SetMealSearchForm"></Search>
+      </div>
+  
+      <div class="table">
+          
+      </div>
+    </div>
+  </template>
+  
+  <script setup>
+  import { ref, onMounted, toRefs } from 'vue';
+  import Search from '@/components/Search/index.vue'
+  import {SetMealSearchForm} from './config.js'
+  </script>
+  <style lang="less" scoped>
+  .search{
+      margin-top: 1rem;
+  }
+  </style>

+ 1 - 1
src/views/financialManagement/appPuy/index.vue

@@ -72,7 +72,7 @@ const getTopUpRecordListFc = async (item) => {
     let puyType = await Getdictionary('puyType')
     res = await getAdiroePuyList(param)
     tableData.value = (res.data?.records || []).map(res => {
-        res.payStatus = puyType.filter(item => item.code == res.puyType)[0]?.label
+        res.payStatus = puyType.filter(item => item.value == res.payStatus)[0]?.label
         return res
     })
     pagination.value.total = res.data.total;

+ 190 - 0
src/views/flowPool/components/GuideCard.vue

@@ -0,0 +1,190 @@
+<template>
+    <a-modal v-model:visible="modelValue" @ok="handleOk" @cancel="handleCancel" width="1200px" title="导卡">
+        <div class="card_item_header">
+            <a-button type="primary" @click="showCard=true" :disabled="show">分配卡号</a-button>
+            <a-button type="primary" @click="DownloadSampleFile">下载示例文件</a-button>
+        </div>
+        
+        <div class="search">
+           <Search :SearchForm="CardSearchForm"></Search>
+        </div>
+
+        <div class="detail-table" v-if="!show">
+            <a-table :columns="columnsExport" :data="dataExport" />
+        </div>
+
+        <div class="progress" v-if="show">
+            <div class="cusrte">
+                <a-progress type="circle" :percent="(schedule / 100)" size="large" />
+            </div>
+        </div>
+    </a-modal>
+
+    <a-modal v-model:visible="showCard" :title="$t('order.AllocationCardNumber')"
+        @cancel="closeModal(showCard, FormDataList)" @before-ok="showCard = false" :okText="$t('form.Confirm')"
+        :cancelText="$t('form.Cancel')">
+        <div style="display: flex;justify-content: space-between;">
+            <div>
+                <Upload listType="" minx="1" accept=".xlsx" :handelUpload="customRequest" :showRemoveButton="false">
+                </Upload>
+                <span style="color: #ccc;margin-top: 10px;display: inline-block;">请上传.xlsx文件</span>
+            </div>
+            <div>
+                <a-button type="primary" @click="DownloadSampleFile">下载示例文件</a-button>
+            </div>
+        </div>
+    </a-modal>
+</template>
+
+<script setup>
+import { ref, onMounted, toRefs, toRef, watch } from 'vue';
+import { downloadFile } from '@/utils/xlsx.js'
+import {DistributionCard} from '@/api/path/order'
+import Search from '@/components/Search/index.vue'
+
+const props = defineProps({
+    modelValue: {
+        type: Boolean,
+        default: false
+    },
+})
+
+const modelValue = toRef(props, 'modelValue')
+const emit = defineEmits(['update:modelValue', 'submit'])
+// 定时器ID
+let timer;
+const columnsExport = [
+    { title: 'ICCID', dataIndex: 'iccid', align: 'center' },
+    {
+        title: '卡状态',
+        dataIndex: 'name',
+    },
+    {
+        title: '创建时间',
+        dataIndex: 'exportTime',
+    },
+];
+
+const CardSearchForm = [
+{
+    type: "input",
+    label: "ICCID",
+    field: "iccid",
+    value: "", // 双向绑定的值
+  },
+  {
+    type: "select",
+    label: "卡状态",
+    field: "status",
+    options: [], 
+    dict: "trafficPacketStatus",
+    value: "", // 双向绑定的值
+    width: "200",
+  },
+  {
+    type: "date-picker",
+    label: "下单时间",
+    field: "createdAt",
+    value: "", // 双向绑定的值
+    width: "200",
+  },
+]
+
+const state = ref({
+    dataExport: [],
+    paginationCard: {
+        total: 0,
+        pageSize: 10,
+        current: 1,
+    },
+    searchForm: {
+        "label": "",
+        "trafficPoolType": "1"
+    },
+    showCard:false,
+    show: false,
+    schedule: 0,// 进度
+})
+
+const { dataExport, paginationCard, searchForm ,show,schedule} = toRefs(state.value)
+
+
+// 卡信息
+const evChangePageCard = (page) => {
+    paginationCard.value.current = page
+    intData()
+}
+
+// 导卡进度
+const CardProgress = async () => {
+    let res = await GuideCardProgress({ id: FormDataList.value.id })
+    if (res.code === 200) {
+        show.value = res.data !== 0 && res.data !== 100;
+        schedule.value = res.data;
+    }
+}
+
+// 导卡
+// 分配卡号
+const customRequest = (options) => {
+    const formData = new FormData();
+    formData.append('file', options.fileItem.file);  // 这里将文件添加到 FormDataList 中
+    formData.append('orderId', FormDataList.value.id);
+    DistributionCard(formData).then(res => {
+        if (res.code == 200) {
+            Message.success(res.message)
+            showCard.value = false
+            CardProgress()
+        }
+    })
+}
+
+const handleCancel = () => {
+    emit('update:modelValue', false)
+}
+
+// 下载示例文件
+const DownloadSampleFile = () => {
+    // 下载示例文件
+    downloadFile(['ICCID'], [['8968099000011939']])
+}
+
+
+// 监听导卡进度
+// watch(() => modelValue.value, val => {
+//     if (val) {
+//         CardProgress()
+//     } else {
+//         clearInterval(timer);
+//     }
+// }, { immediate: true })
+
+// watch(() => schedule.value, val => {
+//     // 清除旧的定时器(如果存在)
+//     if (timer) {
+//         clearInterval(timer);
+//     }
+//     timer = setInterval(() => {
+//         CardProgress();
+//         if (val === 100) {
+//             clearInterval(timer);
+//         }
+//     }, 10000);
+// })
+</script>
+<style scoped lang="less">
+.card_item_header{
+    display: flex;
+    justify-content: space-between;
+}
+
+.detail-table,.search{
+    margin-top: 1.5rem;
+}
+
+.progress {
+    margin: 1.5rem auto;
+    display: flex;
+    justify-content: center;
+}
+</style>

+ 35 - 31
src/views/flowPool/components/forewarning.vue

@@ -1,9 +1,9 @@
 <script setup>
-import { ref, onMounted, toRefs, toRef, watch, watchEffect } from 'vue';
+import { ref, onMounted, toRefs, toRef, watch, defineExpose } from 'vue';
 import { Message } from "@arco-design/web-vue";
 import { Getdictionary } from '@/mixins/index.js'
 import { createWarning, updateWarning } from '@/api/path/flowPool.api.js'
-import {useI18n} from 'vue-i18n'
+import { useI18n } from 'vue-i18n'
 
 const { t } = useI18n()
 const props = defineProps({
@@ -102,7 +102,6 @@ const handleSubmit = ({ values, error }) => {
       formWarning.value.clientNotifyNumber = Number(formWarning.value.clientNotifyNumber)
       formWarning.value.manageWarn = Number(formWarning.value.manageWarn)
       formWarning.value.clientSingleCardWarn = String(formWarning.value.clientSingleCardWarn)
-
       let res = formWarning.value.id ? await updateWarning(formWarning.value) : await createWarning(formWarning.value)
       if (res.code === 200) {
         Message.success(t('setting.ControlsSuccess'))
@@ -120,9 +119,8 @@ const handleDictValue = async () => {
   earlyList.value = await Getdictionary('forewarning')
 }
 
-watch(() => FormDataList.value, val => {
-  if (!val.id) return;
 
+const detaile = (val)=>{
   formWarning.value.userId = val.userId;
   formWarning.value.poolId = val.id;
 
@@ -136,9 +134,12 @@ watch(() => FormDataList.value, val => {
     });
     formWarning.value.clientSingleCardWarn = Number(formWarning.value.clientSingleCardWarn)
   }
+  if (val.alert.id !== '') {
+    formWarning.value.id = val.alert.id
+  }
+}
 
-})
-
+defineExpose({detaile})
 
 onMounted(() => {
   handleDictValue()
@@ -146,18 +147,18 @@ onMounted(() => {
 </script>
 
 <template>
-  <a-modal :title="$t('forewarning.forewarning')" v-model:visible="modelValue" @cancel="resetForm" centered :maskClosable="false" :footer="null"
-    width="55%">
+  <a-modal :title="$t('forewarning.forewarning')" v-model:visible="modelValue" @cancel="resetForm" centered
+    :maskClosable="false" :footer="null" width="55%">
     <a-tabs>
       <a-tab-pane key="1" :title="$t('forewarning.PoolEarlyWarning')">
         <a-form :model="formWarning" direction="inline" ref="formRef" :rules="rules">
           <div class="form-pool-tit">
             <div class="pool-icon"></div>
-             {{ $t('forewarning.clientWarning') }}
+            {{ $t('forewarning.clientWarning') }}
           </div>
-          <a-form-item field="clientPooPc"  :label="$t('forewarning.TakeUpOf') ">
-            <a-input-number v-model="formWarning.clientPooPc" :style="{ width: '320px' }" :placeholder="$t('forewarning.PleaseEnter')" allow-clear
-              hide-button>
+          <a-form-item field="clientPooPc" :label="$t('forewarning.TakeUpOf')">
+            <a-input-number v-model="formWarning.clientPooPc" :style="{ width: '320px' }"
+              :placeholder="$t('forewarning.PleaseEnter')" allow-clear hide-button>
               <template #suffix>
                 %
               </template>
@@ -171,15 +172,16 @@ onMounted(() => {
             <a-checkbox v-model="formWarning.clientPooPcStopSwitch">{{ $t('forewarning.ShutDown') }}</a-checkbox>
           </a-form-item> -->
           <a-form-item field="clientArriveStopNetwork" :label="$t('forewarning.NetworkOutage')">
-            <a-select v-model="formWarning.clientPooPcStopNetwork" :placeholder="$t('forewarning.PleaseSelect')"  :style="{ width: '320px' }"
-              allow-clear>
+            <a-select v-model="formWarning.clientPooPcStopNetwork" :placeholder="$t('forewarning.PleaseSelect')"
+              :style="{ width: '320px' }" allow-clear>
               <a-option v-for="item in earlyList" :key="item.value" :value="item.value" :label="item.label" />
             </a-select>
-            <a-checkbox v-model="formWarning.clientPooPcStopNetworkSwitch">{{ $t('forewarning.NetworkOutage') }}</a-checkbox>
+            <a-checkbox v-model="formWarning.clientPooPcStopNetworkSwitch">{{ $t('forewarning.NetworkOutage')
+              }}</a-checkbox>
           </a-form-item>
           <a-form-item field="clientNotifyNumber" :label="$t('forewarning.ReminderTimes')">
-            <a-input-number v-model="formWarning.clientNotifyNumber" :style="{ width: '320px' }" :placeholder="$t('forewarning.PleaseEnter')"
-              allow-clear hide-button>
+            <a-input-number v-model="formWarning.clientNotifyNumber" :style="{ width: '320px' }"
+              :placeholder="$t('forewarning.PleaseEnter')" allow-clear hide-button>
               <template #suffix>
                 {{ $t('forewarning.TimesMonth') }}
               </template>
@@ -189,9 +191,9 @@ onMounted(() => {
             <div class="pool-icon"></div>
             {{ $t('forewarning.SingleCard') }}
           </div>
-          <a-form-item field="clientSingleCardWarn"  :label="$t('forewarning.SingleCardUsage')">
-            <a-input-number v-model="formWarning.clientSingleCardWarn" :style="{ width: '320px' }" :placeholder="$t('forewarning.PleaseEnter')"
-              allow-clear hide-button>
+          <a-form-item field="clientSingleCardWarn" :label="$t('forewarning.SingleCardUsage')">
+            <a-input-number v-model="formWarning.clientSingleCardWarn" :style="{ width: '320px' }"
+              :placeholder="$t('forewarning.PleaseEnter')" allow-clear hide-button>
               <template #suffix>
                 %
               </template>
@@ -206,19 +208,20 @@ onMounted(() => {
             <a-checkbox v-model="formWarning.clientSingleCardWarnStopSwitch">{{$t('forewarning.ShutDown')}}</a-checkbox>
           </a-form-item> -->
           <a-form-item field="clientSingleCardWarnStopNetwork" :label="$t('forewarning.NetworkOutage')">
-            <a-select v-model="formWarning.clientSingleCardWarnStopNetwork" :placeholder="$t('forewarning.PleaseSelect')"
-              :style="{ width: '320px' }" allow-clear>
+            <a-select v-model="formWarning.clientSingleCardWarnStopNetwork"
+              :placeholder="$t('forewarning.PleaseSelect')" :style="{ width: '320px' }" allow-clear>
               <a-option v-for="item in earlyList" :key="item.value" :value="item.value" :label="item.label" />
             </a-select>
-            <a-checkbox v-model="formWarning.clientSingleCardWarnStopNetworkSwitch">{{$t('forewarning.NetworkOutage')}}</a-checkbox>
+            <a-checkbox
+              v-model="formWarning.clientSingleCardWarnStopNetworkSwitch">{{ $t('forewarning.NetworkOutage') }}</a-checkbox>
           </a-form-item>
           <div class="form-pool-tit">
             <div class="pool-icon"></div>
             {{ $t('forewarning.ManagementSide') }}
           </div>
-          <a-form-item field="manageWarn"  :label="$t('forewarning.consumed')">
-            <a-input-number v-model="formWarning.manageWarn" :style="{ width: '320px' }" :placeholder="$t('forewarning.PleaseEnter')" allow-clear
-              hide-button>
+          <a-form-item field="manageWarn" :label="$t('forewarning.consumed')">
+            <a-input-number v-model="formWarning.manageWarn" :style="{ width: '320px' }"
+              :placeholder="$t('forewarning.PleaseEnter')" allow-clear hide-button>
               <template #suffix>
                 %
               </template>
@@ -233,11 +236,12 @@ onMounted(() => {
             <a-checkbox v-model="formWarning.manageWarnSwitchStopSwitch">{{ $t('forewarning.ShutDown') }}</a-checkbox>
           </a-form-item> -->
           <a-form-item field="manageWarnStopNetwork" :label="$t('forewarning.NetworkOutage')">
-            <a-select v-model="formWarning.manageWarnStopNetwork" :placeholder="$t('forewarning.PleaseSelect')" :style="{ width: '320px' }"
-              allow-clear>
+            <a-select v-model="formWarning.manageWarnStopNetwork" :placeholder="$t('forewarning.PleaseSelect')"
+              :style="{ width: '320px' }" allow-clear>
               <a-option v-for="item in earlyList" :key="item.value" :value="item.value" :label="item.label" />
             </a-select>
-            <a-checkbox v-model="formWarning.manageWarnStopNetworkSwitch">{{ $t('forewarning.NetworkOutage') }}</a-checkbox>
+            <a-checkbox v-model="formWarning.manageWarnStopNetworkSwitch">{{ $t('forewarning.NetworkOutage')
+              }}</a-checkbox>
           </a-form-item>
           <a-form-item>
             <a-button type="primary" @click="handleSubmit" style="margin-right: 10px;">{{
@@ -249,7 +253,7 @@ onMounted(() => {
         </a-form>
       </a-tab-pane>
       <a-tab-pane key="2" title="卡预警">
-        
+
       </a-tab-pane>
     </a-tabs>
   </a-modal>

+ 15 - 10
src/views/flowPool/index.vue

@@ -27,6 +27,7 @@
           }}</a>
         <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="handelForewring(record)"
           v-if="role == 1">{{ $t('flowPool.Waring') }}</a>
+        <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="handelgetCard(record)">导卡</a>
         <!-- 删除 -->
         <a-popconfirm :content="$t('form.Delete')" :ok-text="$t('form.Confirm')" :cancel-text="$t('form.Cancel')"
           @ok="handleDel(record.id)">
@@ -37,7 +38,8 @@
       </template>
 
       <template #status="{ record }">
-        <a-tag :color="record.status==1?'#00b42a':'#f53f3f'">{{ trafficList.find(val => val.value == record.status)?.label }}</a-tag>
+        <a-tag :color="record.status == 1 ? '#00b42a' : '#f53f3f'">{{ trafficList.find(val => val.value ==
+          record.status)?.label }}</a-tag>
       </template>
 
     </a-table>
@@ -45,15 +47,15 @@
 
 
     <add v-model:model-value="showAdd" status="1" :typeCurrent="typeCurrent" :record="record" @submit="intData()"></add>
-    <Forewarning v-model:modelValue="visibleForewarning" :FormDataList="FormDataList" @submit="intData()" />
-    <openExport v-model:model-value="ShowOpenExport" />
+    <Forewarning v-model:modelValue="visibleForewarning" ref="forewarning" @submit="intData()" />
+    <GuideCard v-model:model-value="ShowOpenExport" />
 
   </div>
 </template>
 
 <script setup>
 import { onMounted, ref, getCurrentInstance, toRefs } from "vue";
-import { columns ,SearchFormList} from "./config";
+import { columns, SearchFormList } from "./config";
 import { Message } from '@arco-design/web-vue'
 import {
   deleteTrafficPool,
@@ -63,7 +65,7 @@ import { useSystemStore } from "@/store/modules/systemStore"
 import { Getdictionary } from '@/mixins/index.js'
 import Forewarning from "./components/forewarning.vue";
 import add from './components/add.vue'
-import openExport from "./components/openExport.vue"
+import GuideCard from "./components/GuideCard.vue"
 import { useI18n } from 'vue-i18n'
 const { t } = useI18n();
 const systemStore = useSystemStore()
@@ -87,7 +89,7 @@ const state = ref({
   typeCurrent: 1,
   record: {},
   dataSource: [],
-  FormDataList: {}
+  forewarning: null
 })
 const {
   role,
@@ -101,12 +103,12 @@ const {
   showAdd,
   record,
   dataSource,
-  FormDataList
+  forewarning
 } = toRefs(state.value)
 const { proxy } = getCurrentInstance()
 
 const intData = async (item) => {
-  if(item){
+  if (item) {
     searchForm.value = item
   }
   const param = {
@@ -158,11 +160,10 @@ const dictShowModel = (type, data) => {
   typeCurrent.value = type
   record.value = data
   showAdd.value = true
-  console.log(record.value);
 }
 
 const handelForewring = (item) => {
-  FormDataList.value = item
+  forewarning.value.detaile(item)
   visibleForewarning.value = true
 }
 
@@ -171,6 +172,10 @@ const handleDictValue = async () => {
   trafficList.value = await Getdictionary('trafficPacketStatus')
 }
 
+const handelgetCard = (item) => {
+  ShowOpenExport.value = true
+}
+
 onMounted(async () => {
   await handleDictValue()
 

+ 29 - 52
src/views/flowPool/rearFlowPool/index.vue

@@ -17,76 +17,47 @@
       </a-button>
     </div>
 
-    <a-table
-      row-key="id"
-      :data="dataSource"
-      :columns="columnsAfter"
-      :pagination="pagination"
-      :scroll="{ x: 'auto' }"
-      @page-change="evChangePage"
-    >
+    <a-table row-key="id" :data="dataSource" :columns="columnsAfter" :pagination="pagination" :scroll="{ x: 'auto' }"
+      @page-change="evChangePage">
       <template #id="{ record }">
         <!-- 修改 -->
-        <a
-          class="a-link"
-          href="javascript:;"
-          style="margin-right: 1rem"
-          @click="dictShowModel(2, record)"
-          v-if="role == 1"
-          >{{ $t("form.Edit") }}</a
-        >
-        <a
-          class="a-link"
-          href="javascript:;"
-          style="margin-right: 1rem"
-          @click="handelForewring(record)"
-          v-if="role == 1"
-          >{{ $t('flowPool.Waring') }}</a
-        >
+        <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="dictShowModel(2, record)"
+          v-if="role == 1">{{ $t("form.Edit") }}</a>
+        <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="handelForewring(record)"
+          v-if="role == 1">{{ $t('flowPool.Waring') }}</a>
+        <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="handelgetCard(record)">导卡</a>
         <!-- 删除 -->
-        <a-popconfirm
-          :content="$t('form.Delete')"
-          :ok-text="$t('form.Confirm')"
-          :cancel-text="$t('form.Cancel')"
-          @ok="handleDel(record.id)"
-          v-if="role == 1"
-        >
+        <a-popconfirm :content="$t('form.Delete')" :ok-text="$t('form.Confirm')" :cancel-text="$t('form.Cancel')"
+          @ok="handleDel(record.id)" v-if="role == 1">
           <a class="a-link" href="javascript:;" style="margin-right: 1rem">{{
             $t("form.Delete")
           }}</a>
         </a-popconfirm>
       </template>
       <template #status="{ record }">
-        <a-tag :color="record.status==1?'#00b42a':'#f53f3f'">{{ trafficList.find(val => val.value == record.status)?.label }}</a-tag>
+        <a-tag :color="record.status == 1 ? '#00b42a' : '#f53f3f'">{{ trafficList.find(val => val.value ==
+          record.status)?.label }}</a-tag>
       </template>
     </a-table>
-    <add
-      v-model:modelValue="showAdd"
-      status="2"
-      :typeCurrent="typeCurrent"
-      :record="record"
-      @submit="intData()"
-    ></add>
-    <Forewarning
-      v-model:modelValue="visibleForewarning"
-      :FormDataList="FormDataList"
-      @submit="intData()"
-    />
+    <add v-model:modelValue="showAdd" status="2" :typeCurrent="typeCurrent" :record="record" @submit="intData()"></add>
+    <Forewarning v-model:modelValue="visibleForewarning" ref="forewarning" @submit="intData()" />
+    <GuideCard v-model:model-value="ShowOpenExport" />
   </div>
 </template>
 
 <script setup>
 import { onMounted, reactive, toRefs } from "vue";
-import { columnsAfter,SearchFormList } from "../config";
+import { columnsAfter, SearchFormList } from "../config";
 import { Message } from "@arco-design/web-vue";
 import { deleteTrafficPool, lotCatdList } from "@/api/path/flowPool.api";
 import { useSystemStore } from "@/store/modules/systemStore";
 import add from "../components/add.vue";
 import Forewarning from "../components/forewarning.vue";
 import { Getdictionary } from "@/mixins/index.js";
-import {useI18n} from 'vue-i18n'
+import { useI18n } from 'vue-i18n'
 import Search from '@/components/Search/index.vue'
-const {t} = useI18n();
+import GuideCard from '../components/GuideCard.vue'
+const { t } = useI18n();
 const systemStore = useSystemStore();
 const state = reactive({
   dataSource: [],
@@ -99,11 +70,12 @@ const state = reactive({
   role: systemStore.getRole,
   typeCurrent: 1,
   visibleForewarning: false,
-  FormDataList: {},
   record: {},
   sourceList: [],
   trafficList: [],
   showAdd: false,
+  forewarning: null,
+  ShowOpenExport: false
 });
 
 const {
@@ -113,15 +85,16 @@ const {
   role,
   typeCurrent,
   visibleForewarning,
-  FormDataList,
   record,
   sourceList,
   trafficList,
   showAdd,
+  forewarning,
+  ShowOpenExport
 } = toRefs(state);
 
 const intData = async (item) => {
-  if(item){
+  if (item) {
     searchForm.value = item
   }
   const param = {
@@ -149,7 +122,7 @@ const intData = async (item) => {
       Activated: Activated,
       HaveBeenUsed: HaveBeenUsed,
       trafficPoolStatus,
-      size:item.size+'/'+item.sizeType
+      size: item.size + '/' + item.sizeType
     };
   });
   pagination.value.total = data.total;
@@ -186,7 +159,7 @@ const dictShowModel = (type, data) => {
 };
 
 const handelForewring = (item) => {
-  FormDataList.value = item;
+  forewarning.value.detaile(item)
   visibleForewarning.value = true;
 };
 
@@ -195,6 +168,10 @@ const handleDictValue = async () => {
   trafficList.value = await Getdictionary("trafficPacketStatus");
 };
 
+const handelgetCard = (item)=>{
+  ShowOpenExport.value = true;
+}
+
 onMounted(async () => {
   await handleDictValue();
   await intData();

+ 5 - 12
src/views/lotCard/cardList/config.js

@@ -6,7 +6,7 @@ export const columns = [
     ellipsis: true,
   },
   {
-    title: window.$t("lotCard.source"),
+    title: window.$t("lotCard.sourcePlan"),
     dataIndex: "source",
     align: "center",
     ellipsis: true,
@@ -39,13 +39,13 @@ export const columns = [
   // { title: '支付方式', dataIndex: 'payType', align: 'center', ellipsis: true },
   {
     title: window.$t("lotCard.SimStatus"),
-    dataIndex: "iccidStatus",
+    slotName: "iccidStatus",
     align: "center",
     ellipsis: true,
   },
   {
     title: window.$t("lotCard.DatapackageStatus"),
-    dataIndex: "DatapackageStatus",
+    slotName: "DatapackageStatus",
     align: "center",
     ellipsis: true,
   },
@@ -98,12 +98,6 @@ export const columns = [
     align: "center",
     ellipsis: true,
   },
-  {
-    title: "IMSI" + window.$t("lotCard.SupplierName"),
-    dataIndex: "currentImsiProvider",
-    align: "center",
-    ellipsis: true,
-  },
   {
     title: window.$t("lotCard.CardPackage"),
     dataIndex: "tariffName",
@@ -120,14 +114,13 @@ export const columns = [
   {
     title: window.$t("lotCard.PoolName_Number"),
     dataIndex: "poolNum",
-    slotName: "poolNum",
     align: "center",
     width: 200,
     ellipsis: true,
   },
   {
     title: window.$t("lotCard.TheExpirationTime"),
-    dataIndex: "SilenceEndtime",
+    dataIndex: "periodOfSilence",
     align: "center",
     width: 200,
     ellipsis: true,
@@ -201,7 +194,7 @@ export const SearchForm = [
   },
   {
     type: "select",
-    label: "来源",
+    label: "供应商",
     field: "source",
     options: [], // 默认空,后面会通过字典加载
     dict: "source",

+ 19 - 23
src/views/lotCard/cardList/index.vue

@@ -3,28 +3,31 @@
   <div class="container">
     <!-- 搜索条件区 -->
     <div class="search-section">
-       <Search :SearchForm="SearchForm" @query="intData" @reset="reset"/>
+      <Search :SearchForm="SearchForm" @query="intData" @reset="reset" />
     </div>
 
     <a-table row-key="iccid" :data="dataSource" :columns="columns" :pagination="false" :scroll="{ x: 'auto' }">
-      <template #poolNum="{ record }">
-        <span>{{ record.poolName }}</span>
-        <br />
-        <span>{{ record.poolId }}</span>
-      </template>
       <template #dataUsageTotal="{ record }">
         <span>{{ record.dataUsageTotal }}MB</span>
       </template>
+      <template #iccidStatus="{ record }">
+        <a-tag  color="#7bc616" v-if="record.iccidStatus=='正常'">{{ record.iccidStatus }}</a-tag>
+        <a-tag v-else>{{ record.iccidStatus }}</a-tag>
+      </template>
+      <template #DatapackageStatus="{ record }">
+        <a-tag  color="#7bc616" v-if="record.DatapackageStatus=='已激活'">{{ record.DatapackageStatus }}</a-tag>
+        <a-tag v-else>{{ record.DatapackageStatus }}</a-tag>
+      </template>
       <template #id="{ record }">
         <!-- 查看流量消耗 -->
         <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="handletrafficUseDialog(record)">详情</a>
+        <!-- 解绑卡和绑定卡 -->
       </template>
-
     </a-table>
 
     <div class="pagtion">
-      <a-pagination :total="pagination.total" v-model:current="pagination.current " show-total show-jumper show-page-size @change="evChangePage"
-        @page-size-change="pagesChange" />
+      <a-pagination :total="pagination.total" v-model:current="pagination.current" show-total show-jumper show-page-size
+        @change="evChangePage" @page-size-change="pagesChange" />
     </div>
     <!-- 查看流量消耗 -->
     <trafficUseDialog ref="trafficUseDialogRef" @submit="intData()" />
@@ -35,11 +38,11 @@
 
 <script setup>
 import { onMounted, ref, getCurrentInstance, h } from "vue";
-import { columns,SearchForm } from "./config";
+import { columns, SearchForm } from "./config";
 import { cardInfoList } from "@/api/path/lotCard.api"
 import trafficUseDialog from "./trafficUseDialog.vue";
 import { Getdictionary } from '@/mixins/index.js'
-import {sanitizeObject} from '@/utils/utils'
+import { sanitizeObject } from '@/utils/utils'
 import Add from './add.vue'
 import Search from '@/components/Search/index.vue'
 const { proxy } = getCurrentInstance()
@@ -61,7 +64,7 @@ const trafficUseDialogRef = ref()
 
 
 const intData = async (item) => {
-  if(item){
+  if (item) {
     SearchFormList.value = item
   }
   const param = {
@@ -80,15 +83,15 @@ const intData = async (item) => {
       SilenceEndtime: '一个月',
       usedBg: '0',
       usableBg: '0',
-      DatapackageStatus:item.dataPackage[0]?.status,
-      dataUsage: item.dataPackage[0]?.dataUsage?item.dataPackage[0]?.dataUsage:'0' + '/MB',
-      dataTotal: item.dataPackage[0]?.dataTotal?item.dataPackage[0]?.dataTotal:'0' + '/MB',
+      DatapackageStatus: item.dataPackage[0]?.status,
+      dataUsage: item.dataPackage[0]?.dataUsage ? item.dataPackage[0]?.dataUsage : '0' + '/MB',
+      dataTotal: item.dataPackage[0]?.dataTotal ? item.dataPackage[0]?.dataTotal : '0' + '/MB',
     }
   })
   pagination.value.total = data.total
 }
 
-const reset = (item)=>{
+const reset = (item) => {
   pagination.value.current = 1
   SearchFormList.value = item
   intData()
@@ -131,13 +134,6 @@ onMounted(() => {
   margin-top: 30px;
 }
 
-.head-title-right {
-  .m-r-10 {
-    margin-right: 10px;
-  }
-
-}
-
 .search-section {
   margin-top: 20px;
   margin-bottom: 20px;

+ 3 - 4
src/views/order/BuyCard/index.vue

@@ -49,12 +49,11 @@
           </div>
           <a-button @click="openPriceing(record)" type="text" v-if="record.moderationStatus == 2 && userType == 1">{{
             $t('order.UploadAmount') }}</a-button>
-          <!-- <a-button @click="openDetail(record)" type="text" v-if="userType !== 1">套餐</a-button>
-          <a-button @click="openDetail(record)" type="text" v-if="userType !== 1">资费</a-button> -->
           <a-button @click="openEndDate(record)" type="text" v-if="userType == 1 && record.moderationStatus == 2">{{
             $t('order.ChangeValidity') }}</a-button>
+            <a-button @click="openEndDate(record)" type="text" v-if="userType == 2 && record.moderationStatus == 2">{{
+            $t('order.ChangeTariff') }}</a-button>
           <a-button @click="openDetail(record)" type="text">{{ $t('order.view') }}</a-button>
-
         </div>
       </template>
     </a-table>
@@ -99,7 +98,7 @@
     <Card v-model:modelValue="showAudit" @submit="intData()" />
     <Status v-model:modelValue="showStatus" @submit="intData()" :FormDataList="FormDataList" />
     <Detaile v-model:modelValue="showDetail" @submit="intData()" :FormDataList="FormDataList" />
-    <returnCard v-model:modelValue="showReturn" :ReturnData="ReturnData"  @submit="intData()"></returnCard>
+    <returnCard v-model:modelValue="showReturn" :ReturnData="ReturnData"   @submit="intData()"></returnCard>
   </div>
 </template>
 

+ 17 - 15
src/views/order/BuyCard/returnCard.vue

@@ -19,7 +19,7 @@
 <script setup>
 import { ref, defineProps, toRef, defineEmits, watch } from 'vue';
 import { Message } from '@arco-design/web-vue';
-import { ReturntheCard,TariffOrderCard } from '@/api/path/order'
+import { ReturntheCard, TariffOrderCard } from '@/api/path/order'
 import { useI18n } from 'vue-i18n'
 const { t } = useI18n();
 const props = defineProps({
@@ -28,14 +28,13 @@ const props = defineProps({
         default: false
     },
     ReturnData: [Array, Object],
-    id: String,
 })
 const modelValue = toRef(props, 'modelValue')
 const emit = defineEmits(['update:modelValue', 'submit'])
 const selectedKeys = ref([])
 const inputValue = ref()
 const form = ref({})
-const columns = [{ title: 'ICCID', dataIndex: 'iccid' }, { title: t('order.CardStatus'), dataIndex: 'status' }, { title: t('order.CreationTime'), dataIndex: 'expireTime' }]
+const columns = [{ title: 'ICCID', dataIndex: 'iccid' }, { title: t('order.CardStatus'), dataIndex: 'iccidStatus' }, { title: t('order.CreationTime'), dataIndex: 'expireTime' }]
 const data = ref()
 const rowSelection = ref({
     type: 'checkbox',
@@ -51,23 +50,26 @@ const submitStatus = async () => {
         Message.warning($t('form.pleaseSelect') + 'ICCID')
         return
     }
-    await ReturntheCard({ iccids: selectedKeys.value, id: props.id })
-    emit('update:modelValue', false)
-    emit('submit', true)
-    data.value = []
+    let res = await ReturntheCard({ iccids: selectedKeys.value, id: form.value.id })
+    if (res.code == 200) {
+        emit('update:modelValue', false)
+        emit('submit', true)
+        data.value = []
+        selectedKeys.value = []
+    }
 }
 
 const getDetaileICCID = async (traaid) => {
-  const res = await TariffOrderCard({ id: traaid,iccid:inputValue.value })
-  if(res.code==200){
-    data.value = (res.data || []).map(res=>({ ...res, status: res.status == 1 ? t('order.normal') : t('order.unsubscribe') }))
-  }
+    const res = await TariffOrderCard({ id: traaid, iccid: inputValue.value })
+    if (res.code == 200) {
+        data.value = res.data || []
+    }
 }
 watch(() => props.ReturnData, val => {
-  if(val.id){
-    form.value = val
-    getDetaileICCID(val.trafficId)
-  }
+    if (val.id) {
+        form.value = val
+        getDetaileICCID(val.trafficId)
+    }
 }, { immediate: true })
 </script>
 <style scoped></style>

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

@@ -2,11 +2,11 @@
 <template>
     <div class="supplier-management">
         <!-- 顶部操作区 -->
-        <div class="top-actions">
+        <!-- <div class="top-actions">
             <a-space>
                 <a-button type="primary" @click="showNewSupplierForm">{{ $t('supplier.addSupplier') }}</a-button>
             </a-space>
-        </div>
+        </div> -->
 
         <!-- 搜索条件区 -->
         <div class="search-section">

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

@@ -1,6 +1,6 @@
 export const columns = [
   { title: window.$t('dataPackage.id'), dataIndex: 'id', align: 'center', ellipsis: true },
-  { title: '来源', dataIndex: 'source', 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 },

+ 50 - 33
src/views/tariffManagement/Management/add.vue

@@ -8,7 +8,7 @@
                 <a-select v-model="formState.source">
                     <a-option v-for=" item in sourceList" :key="item.id" :value="item.value">{{
                         item.label
-                    }}
+                        }}
                     </a-option>
                 </a-select>
             </a-form-item>
@@ -41,7 +41,7 @@
                 <a-select v-model="formState.userId">
                     <a-option v-for=" item in userIdList" :key="item.id" :value="item.id">{{
                         item.name
-                    }}
+                        }}
                     </a-option>
                 </a-select>
             </a-form-item>
@@ -49,7 +49,7 @@
                 <a-select v-model="formState.billingMethod">
                     <a-option v-for=" item in methodList" :key="item.id" :value="item.value">{{
                         item.label
-                    }}
+                        }}
                     </a-option>
                 </a-select>
             </a-form-item>
@@ -57,7 +57,7 @@
                 <a-select v-model="formState.currency">
                     <a-option v-for=" item in currency" :key="item.id" :value="item.value">{{
                         item.label
-                    }}
+                        }}
                     </a-option>
                 </a-select>
             </a-form-item>
@@ -69,17 +69,38 @@
             <a-form-item field="" :label="$t('tariffManagement.pricing')" required>
                 <a-input v-model="formState.pricing" v-if="formState.billingMethod == 2">
                     <template #append>
-                        {{ formState.currency === '0' ? $t('setting.yuan') : $t('setting.USD') }}
+                        {{ formState.currency }}
                     </template>
                 </a-input>
                 <a-input v-model="formState.trafficBilling" v-if="formState.billingMethod == 1"></a-input>
                 <a-select v-model="formState.trafficBillingType" style="width: 80px; margin:0 8px;"
                     v-if="formState.billingMethod == 1">
                     <a-option value="MB">MB</a-option>
+                    <a-option value="GB">GB</a-option>
+                    <a-option value="KB">KB</a-option>
                 </a-select>
                 <a-input v-model="formState.trafficBillingAmount" v-if="formState.billingMethod == 1">
                     <template #append>
-                        {{ formState.currency === '0' ? $t('setting.yuan') : $t('setting.USD') }}
+                        {{ formState.currency }}
+                    </template>
+                </a-input>
+            </a-form-item>
+            <a-form-item label="原价" field="networkAccessFee">
+                <a-input v-model="formState.pricing" v-if="formState.billingMethod == 2">
+                    <template #append>
+                        {{ formState.currency }}
+                    </template>
+                </a-input>
+                <a-input v-model="formState.trafficBilling" v-if="formState.billingMethod == 1"></a-input>
+                <a-select v-model="formState.trafficBillingType" style="width: 80px; margin:0 8px;"
+                    v-if="formState.billingMethod == 1">
+                    <a-option value="MB">MB</a-option>
+                    <a-option value="GB">GB</a-option>
+                    <a-option value="KB">KB</a-option>
+                </a-select>
+                <a-input v-model="formState.trafficBillingAmount" v-if="formState.billingMethod == 1">
+                    <template #append>
+                        {{ formState.currency }}
                     </template>
                 </a-input>
             </a-form-item>
@@ -89,21 +110,21 @@
             <a-form-item :label="$t('tariffManagement.MRCName')" field="mrcAmount">
                 <a-input v-model="formState.mrcAmount">
                     <template #append>
-                        {{ formState.currency === '0' ? $t('setting.yuan') : $t('setting.USD') }}
+                        {{ formState.currency }} 
                     </template>
                 </a-input>
             </a-form-item>
             <a-form-item :label="$t('tariffManagement.networkName')" field="networkAccessFee">
                 <a-input v-model="formState.networkAccessFee">
                     <template #append>
-                        {{ formState.currency === '0' ? $t('setting.yuan') : $t('setting.USD') }}
+                        {{ formState.currency  }}
                     </template>
                 </a-input>
             </a-form-item>
             <a-form-item>
                 <a-button type="primary" html-type="submit" style="margin-right: 10px;">{{
                     $t('form.Confirm')
-                }}
+                    }}
                 </a-button>
                 <a-button @click="resetForm">{{ $t('form.Cancel') }}</a-button>
             </a-form-item>
@@ -112,7 +133,7 @@
 </template>
 
 <script setup>
-import { ref, onMounted, toRefs, toRef, watch } from 'vue';
+import { ref, onMounted, toRefs, toRef, watch, defineExpose } from 'vue';
 import { getDataPlanList } from "@/api/path/lotCard.api"
 import { getSTSInfoList } from '@/api/path/system.api'
 import { updateTariff, addTariff } from "@/api/path/tariffManagement.api"
@@ -129,15 +150,10 @@ const props = defineProps({
         type: Number,
         default: null
     },
-    FormDataList: {
-        type: Object,
-        default: () => { }
-    }
 })
 
 const modelValue = toRef(props, 'modelValue')
 const typeIndexSet = ref(null)
-const FormDataList = toRef(props, 'FormDataList')
 const emit = defineEmits(['update:modelValue', 'submit'])
 
 const state = ref({
@@ -157,7 +173,7 @@ const state = ref({
         // 价格(必填)
         "pricing": "",
         // 币种(必填)
-        "currency": "usb",
+        "currency": "USD",
         // 流量资费计费
         "trafficBilling": '',
         // 流量资费计费类型
@@ -200,7 +216,6 @@ const rules = {
     testsimDataPlanId: [{ required: true, trigger: 'change', }],
 };
 
-
 // 提交
 const handleSubmit = ({ values, errors }) => {
     formRef.value.validate(async (errors) => {
@@ -245,11 +260,16 @@ const handleSubmit = ({ values, errors }) => {
 const resetForm = () => {
     emit('update:modelValue', false)
     Object.keys(formState.value).forEach(key => {
-        formState.value[key] = ''
+        if (
+            key != 'billingMethod' &&
+            key != 'currency' &&
+            key != 'trafficBillingType'
+        ) {
+            formState.value[key] = ''
+        }
     })
-    delete formState.value.id
-    FormDataList.value = {}
 
+    delete formState.value.id
 }
 
 const handleDataPlan = async () => {
@@ -263,7 +283,7 @@ const handleDataPlan = async () => {
     })
 }
 
-// 获取id数组
+// 获取用户
 const handleModelId = async () => {
     const param = {
         current: 1,
@@ -303,29 +323,26 @@ watch(
     { immediate: true, deep: true }
 );
 
+watch(() => props.typeIndex, val => {
+    if (val == null) return
+    typeIndexSet.value = val
+}, { immediate: true })
 
-watch(() => FormDataList.value, val => {
-    if (!val.id) return
+const detaile = (val) => {
+    if (!val) return
     Object.keys(formState.value).forEach(key => {
         if (val[key]) {
             formState.value[key] = key === 'userId' ? Number(val[key]) : val[key];
         }
     })
     formState.value.id = val.id
-}, { immediate: true })
-
-
-watch(() => props.typeIndex, val => {
-    if (val == null) return
-    typeIndexSet.value = val
-
-    console.log(typeIndexSet.value);
-}, { immediate: true })
+}
 
 onMounted(() => {
     handleDictValue()
     handleModelId()
-    formState.value.trafficBillingType = 'MB'
 })
+
+defineExpose({ detaile })
 </script>
 <style scoped></style>

+ 22 - 16
src/views/tariffManagement/Management/meal.vue

@@ -1,7 +1,8 @@
 <template>
-    <a-modal width="55%" v-model:visible="modelValue" @ok="handleOk" @cancel="handleCancel" :title="$t('tariffManagement.SetMeal')"  :okText="$t('form.Confirm')"
-    :cancelText="$t('form.Cancel')"> 
-        <div class="add"><a-button type="primary" @click="addMeal" v-if="role.getRole == 1">{{ $t('tariffManagement.AddPackage') }}</a-button></div>
+    <a-modal width="55%" v-model:visible="modelValue" @ok="handleOk" @cancel="handleCancel"
+        :title="$t('tariffManagement.SetMeal')" :okText="$t('form.Confirm')" :cancelText="$t('form.Cancel')">
+        <div class="add"><a-button type="primary" @click="addMeal" v-if="role.getRole == 1">{{
+            $t('tariffManagement.AddPackage') }}</a-button></div>
         <div class="item_warp">
             <a-table :columns="columns" :data="wanberFloter" style="margin-top: 20px" :pagination="false"
                 :scroll="{ y: 'auto' }">
@@ -12,22 +13,22 @@
                     <a-input v-model="record.price" />
                 </template>
                 <template #currency="{ record, rowIndex }">
-                    <a-select v-model="record.currency" :style="{ width: '300px' }" :placeholder="$t('form.datapoolForm.pleaseSelect')"
-                        :disabled="role.getRole == 2">
+                    <a-select v-model="record.currency" :style="{ width: '300px' }"
+                        :placeholder="$t('form.datapoolForm.pleaseSelect')" :disabled="role.getRole == 2">
                         <a-option v-for="res of Pricing" :value="res.value" :label="res.label" />
                     </a-select>
                 </template>
                 <template #label="{ record, rowIndex }">
                     <a-input v-model="record.label" v-if="role.getRole !== 1" />
                 </template>
-                <template #setting="{ record }">
+                <template #setting="{ record, rowIndex }">
                     <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="addUpate(record)">{{
-                        record.id == '' ? $t('form.Add') : $t('form.Edit') }}</a>
+                        $t('form.confirm') }}</a>
                     <a-popconfirm :content="$t('form.Delete')" :ok-text="$t('form.Confirm')"
-                        :cancel-text="$t('form.Cancel')" @ok="deletaMeal(record.id)">
+                        :cancel-text="$t('form.Cancel')" @ok="deletaMeal(record.id, rowIndex)">
                         <a class="a-link" href="javascript:;" v-if="role.getRole == 1">{{
                             $t('form.Delete')
-                        }}</a>
+                            }}</a>
                     </a-popconfirm>
                 </template>
             </a-table>
@@ -41,8 +42,8 @@ import { Getdictionary } from '@/mixins/index.js'
 import { useSystemStore } from '@/store/modules/systemStore'
 import { Message } from '@arco-design/web-vue'
 import { addTariffPackage, CheckTariffPackages, UpdateTariffTtems, DeleteTariffItems } from '@/api/path/tariffManagement.api'
-import {useI18n} from 'vue-i18n'
-const {t} = useI18n();
+import { useI18n } from 'vue-i18n'
+const { t } = useI18n();
 const props = defineProps({
     modelValue: {
         type: Boolean,
@@ -128,12 +129,17 @@ const addMeal = () => {
     wanberFloter.value.push({ id: '', period: '', price: '', currency: '', label: '' })
 }
 // 删除
-const deletaMeal = async (ids) => {
-    let res = await DeleteTariffItems({ id: ids })
-    if (res.code === 200) {
-        Message.success(t('setting.deleteSuccess'))
-        await getList()
+const deletaMeal = async (ids, index) => {
+    if (ids) {
+        let res = await DeleteTariffItems({ id: ids })
+        if (res.code === 200) {
+            Message.success(t('setting.deleteSuccess'))
+            await getList()
+        }
+    } else {
+        wanberFloter.value.splice(index, 1)
     }
+
 }
 
 const handeDict = async () => {

+ 22 - 0
src/views/tariffManagement/SetMeal/index.vue

@@ -0,0 +1,22 @@
+<template>
+  <div>
+    <div class="search">
+        <Search :SearchForm="SetMealSearchForm"></Search>
+    </div>
+
+    <div class="table">
+        
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref, onMounted, toRefs } from 'vue';
+import Search from '@/components/Search/index.vue'
+import {SetMealSearchForm} from '../config.js'
+</script>
+<style lang="less" scoped>
+.search{
+    margin-top: 1rem;
+}
+</style>

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

@@ -239,6 +239,7 @@ export const UserColumns = [
     title: window.$t("customer.userAdmin"),
     dataIndex: "username",
     align: "center",
+    minWidth: "200",
   },
   {
     title: window.$t("customer.customerStatus"),
@@ -270,6 +271,48 @@ export const UserColumns = [
     slotName: "operation",
     align: "center",
     ellipsis: true,
-    fixed: 'right',
+    fixed: "right",
   },
 ];
+
+
+export const SetMealSearchForm = [
+  {
+    type: "input",
+    label: "套餐名称",
+    field: "label",
+    value: "", // 双向绑定的值
+  },
+  {
+    type: "input",
+    label: "套餐ID",
+    field: "label",
+    value: "", // 双向绑定的值
+  },
+  {
+    type: "select",
+    label: "所属客户",
+    field: "state",
+    options: [], // 默认空,后面会通过字典加载
+    dict: "userType",
+    value: "", // 双向绑定的值
+    width: "200",
+  },
+  {
+    type: "range-picker",
+    label: "创建时间",
+    field: "createdAt",
+    value: [], // 双向绑定的值
+    width: "300",
+    Custom: 'mode="month"', // 自定义值
+  },
+  {
+    type: "select",
+    label: "状态",
+    field: "state",
+    options: [], // 默认空,后面会通过字典加载
+    dict: "userType",
+    value: "", // 双向绑定的值
+    width: "200",
+  },
+]

+ 16 - 29
src/views/tariffManagement/customer/NewCustomerForm.vue

@@ -13,7 +13,6 @@
             <a-input v-model="formData.zip" :placeholder="$t('customer.enterCustomerCode')" :max-length="60"
               show-word-limit />
           </a-form-item>
-
           <a-form-item field="email" :label="$t('customer.emailName')" required validate-trigger="blur">
             <a-input v-model="formData.email" :placeholder="$t('customer.emailType')" :max-length="60"
               show-word-limit />
@@ -37,20 +36,9 @@
               show-word-limit />
             <a-button type="primary" @click="generatePassword">{{ $t('customer.generatePassword') }}</a-button>
           </a-form-item>
-          <!--          role-->
-          <!--          <a-form-item field="roleIds" :label="$t('customer.roleldsName')" required validate-trigger="blur">-->
-          <!--            <a-select multiple v-model="formData.roleIds" :style="{width:'100%'}"-->
-          <!--                      :placeholder="$t('customer.roleldsNamedType')">-->
-          <!--              <a-option v-for="item of roles" :value="item.id" :label="item.name"/>-->
-          <!--            </a-select>-->
-          <!--          </a-form-item>-->
-          <!--          <a-form-item field="userType" :label="$t('customer.userTypeName')" required validate-trigger="blur">-->
-          <!--            <a-select  v-model="formData.userType" :style="{width:'100%'}"-->
-          <!--                       :placeholder="$t('customer.userTypeNameType')">-->
-          <!--              <a-option v-for="item of userTypeList" :value="item.value" :label="item.label"/>-->
-          <!--            </a-select>-->
-          <!--          </a-form-item>-->
-          <!-- Remark -->
+          <div class="note">
+            {{ $t('customer.note') }}
+          </div>
           <a-form-item field="note" :label="$t('customer.remark')" required validate-trigger="blur">
             <a-input v-model="formData.note" :placeholder="$t('customer.enterRemark')" :max-length="60"
               show-word-limit />
@@ -68,10 +56,10 @@
           <!-- Status -->
           <a-form-item field="state" :label="$t('customer.statusName')" required validate-trigger="blur">
             <a-radio-group v-model="formData.state">
-              <a-radio value="1">{{ $t('customer.status.normal') }}</a-radio>
-              <a-radio value="2">{{ $t('customer.status.disabled') }}</a-radio>
-              <a-radio value="3">{{ $t('customer.status.pending') }}</a-radio>
-              <a-radio value="4">{{ $t('customer.status.suspended') }}</a-radio>
+
+              <a-radio :value="item.value" v-for="item in userTypes">{{
+                item.value == 1 ? $t('customer.status.normal') : (item.value == 2 ? $t('customer.status.disabled') : (item.value == 3 ? $t('customer.status.pending') : $t('customer.status.suspended')))
+                }} </a-radio>
             </a-radio-group>
           </a-form-item>
         </a-form>
@@ -178,15 +166,6 @@
               </template>
             </a-input-number>
           </a-form-item>
-          <!-- <a-form-item field="arriveStop" :label="$t('forewarning.ShutDown')" required validate-trigger="blur">
-            <a-input-number v-model="formData.arriveStop" :style="{ width: '320px' }"
-              :placeholder="$t('form.datapoolForm.pleaseEnter')" allow-clear hide-button>
-              <template #suffix>
-                %
-              </template>
-            </a-input-number>
-            <a-radio-group v-model="formData.arriveStopOperation" :options="reachList"></a-radio-group>
-          </a-form-item> -->
           <a-form-item field="arriveNetwork" :label="$t('forewarning.NetworkOutage')" required validate-trigger="blur">
             <a-input-number v-model="formData.arriveNetwork" :style="{ width: '320px' }"
               :placeholder="$t('form.datapoolForm.pleaseEnter')" allow-clear hide-button>
@@ -407,7 +386,7 @@ const getRolesData = async () => {
 
 const getList = async () => {
   let res = await Getdictionary('userType')
-  userTypes.value = res.data
+  userTypes.value = res
 }
 
 watch(() => props.visible, val => {
@@ -430,4 +409,12 @@ watch(() => props.visible, val => {
   color: #999;
   margin-top: 4px;
 }
+
+.note{
+  color: #f73f3f;
+  text-align: center;
+  position: relative;
+  top: -20px;
+  left: 65px;
+}
 </style>

+ 12 - 12
src/views/tariffManagement/index.vue

@@ -3,10 +3,10 @@
   <div class="container">
     <!-- 搜索条件区 -->
     <div class="search-section">
-      <Search :SearchForm="trafficSearchFrom" @query="intData" @reset="reset"/>
+      <Search :SearchForm="trafficSearchFrom" @query="intData" @reset="reset" />
     </div>
     <div class="audit-btn">
-      <a-button type="text" @click="dictShowModel(1, null)" v-if="role.getRole == 1">
+      <a-button type="text" @click="dictShowModel(1, false)" v-if="role.getRole == 1">
         <template #icon>
           <icon-plus-circle />
         </template>
@@ -60,14 +60,14 @@
     </a-modal>
 
     <Meal v-model:model-value="modealShow" :traffIds="ids" @submit="intData()" />
-    <Add v-model:model-value="visible" :type-index="typeCurrent" :FormDataList="FormDataList" @submit="intData()"></Add>
+    <Add v-model:model-value="visible" :type-index="typeCurrent" ref="addDetaile" @submit="intData()"></Add>
   </div>
 </template>
 
 <script setup>
 import { onMounted, ref, toRefs, getCurrentInstance } from "vue";
 import { useRoute } from "vue-router";
-import { columns, planColumns ,trafficSearchFrom} from "./config";
+import { columns, planColumns, trafficSearchFrom } from "./config";
 import { deleteTariff, tariffList } from "@/api/path/tariffManagement.api"
 import { Getdictionary } from '@/mixins/index.js'
 import { useSystemStore } from '@/store/modules/systemStore'
@@ -82,7 +82,6 @@ const { proxy } = getCurrentInstance()
 const route = useRoute();
 const state = ref({
   searchForm: {},
-  FormDataList: {},
   currency: [],
   dataSource: [],
   pagination: {
@@ -109,7 +108,6 @@ const state = ref({
 })
 const {
   searchForm,
-  FormDataList,
   currency,
   dataSource,
   pagination,
@@ -127,8 +125,10 @@ const {
   methodList
 } = toRefs(state.value);
 
+const addDetaile = ref(null)
+
 const intData = async (item) => {
-  if(item){
+  if (item) {
     searchForm.value = item
   }
   const param = {
@@ -148,9 +148,9 @@ const intData = async (item) => {
     let pricingName;
 
     if (item.billingMethod == 1) {
-      pricingName = item.trafficBillingAmount + pricingCurrty
+      pricingName = item.trafficBillingAmount + '/' + pricingCurrty
     } else if (item.billingMethod == 2) {
-      pricingName = item.pricing + pricingCurrty
+      pricingName = item.pricing + '/' + pricingCurrty
     }
     return {
       ...item,
@@ -167,8 +167,8 @@ const intData = async (item) => {
   pagination.value.total = data.total
 }
 
-const reset = (item)=>{
-  searchForm.value = item 
+const reset = (item) => {
+  searchForm.value = item
   pagination.value.current = 1
   intData()
 }
@@ -193,7 +193,7 @@ const evChangePage = (page) => {
 
 // 弹框
 const dictShowModel = (type, data) => {
-  FormDataList.value = type == 1 ? {} : data
+  addDetaile.value.detaile(data)
   typeCurrent.value = type;
   visible.value = true;
 }