wxy 4 ماه پیش
والد
کامیت
8f4f4032c2

+ 5 - 0
src/api/path/system.api.js

@@ -78,3 +78,8 @@ export function systemRelieveRoleUserById(param) {
 export function getSTSInfo(params) {
   return service.get('/admin/system/getSTSInfo', params)
 }
+
+// 获取客户列表
+export function getSTSInfoList(params) {
+  return service.post('/admin/platform/customerList', params)
+}

+ 5 - 0
src/api/path/tariffManagement.api.js

@@ -19,4 +19,9 @@ export function updateTariff(param) {
 // 删除资费计划
 export function deleteTariff(params) {
     return service.get('/admin/platform/deleteTariff', { params })
+}
+
+// 资费计划详情
+export function getTariffList(params) {
+
 }

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

@@ -72,8 +72,8 @@
             }}</a>
         </a-popconfirm>
         <!-- 导卡 -->
-        <!-- <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="dictShowModel(3, record)">{{
-            $t('flowPool.exportCard') }}</a> -->
+     <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="dictShowModel(3, record)">{{
+            $t('flowPool.exportCard') }}</a>
       </template>
 
     </a-table>
@@ -358,6 +358,7 @@ const intData = async () => {
   const {data} = await trafficPoolList(param)
   dataSource.value = (data.records || []).map((item, index) => {
     const trafficPoolType = typeList.value.find(val => val.value == item.trafficPoolType)?.label
+    console.log(trafficList.value)
     const trafficPoolStatus = trafficList.value.find(val => val.value == item.status)?.label
     const sourceName = sourceList.value.find(val => val.value == item.source)?.label
     return {

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

@@ -72,8 +72,8 @@
             }}</a>
         </a-popconfirm>
         <!-- 导卡 -->
-        <!-- <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="dictShowModel(3, record)">{{
-            $t('flowPool.exportCard') }}</a> -->
+        <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="dictShowModel(3, record)">{{
+            $t('flowPool.exportCard') }}</a>
       </template>
 
     </a-table>

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

@@ -4,10 +4,10 @@ export let columns = [
     { title: window.$t('tariffManagement.userName'), dataIndex: 'userName', align: 'center', width: 200 },
     { title: window.$t('tariffManagement.label'), dataIndex: 'label', align: 'center', width: 200 },
     { title: window.$t('tariffManagement.source'), dataIndex: 'sourceName', align: 'center', width: 200 },
-    { title: window.$t('tariffManagement.trafficType'), dataIndex: 'trafficTypeName', align: 'center', width: 200 },
-    { title: window.$t('tariffManagement.billingType'), dataIndex: 'billingTypeName', align: 'center', width: 200 },
+    // { title: window.$t('tariffManagement.trafficType'), dataIndex: 'trafficTypeName', align: 'center', width: 200 },
+    // { title: window.$t('tariffManagement.billingType'), dataIndex: 'billingTypeName', align: 'center', width: 200 },
     { title: window.$t('tariffManagement.billingCycle'), dataIndex: 'billingCycleName', align: 'center', width: 200 },
-    { title: window.$t('tariffManagement.bagSize'), dataIndex: 'bagSize', align: 'center', width: 200 },
+    // { title: window.$t('tariffManagement.bagSize'), dataIndex: 'bagSize', align: 'center', width: 200 },
     { title: window.$t('tariffManagement.pricing'), dataIndex: 'pricing', align: 'center', width: 200 },
     // { title: window.$t('tariffManagement.billingMethod'), dataIndex: 'billing_method', align: 'center', width: 200 },
     { title: window.$t('tariffManagement.settlementCycleLabel'), dataIndex: 'settlementCycle', align: 'center', width: 200 },

+ 16 - 130
src/views/tariffManagement/index.vue

@@ -34,23 +34,6 @@
             </a-option>
           </a-select>
         </a-form-item>
-        <!--计费类型-->
-        <a-form-item field="label" :label="$t('tariffManagement.BillingType')">
-          <a-select v-model="value" :style="{width:'320px'}" :placeholder="$t('lotCard.BillingTypeName')">
-            <a-option v-for=" item in typeList" :key="item.id" :value="item.value">{{
-                item.label
-              }}
-            </a-option>
-          </a-select>
-        </a-form-item>
-        <!--        计费周期-->
-        <!--        <a-form-item field="label" :label="$t('tariffManagement.ChargingCycle')">-->
-        <!--          <a-select v-model="formState.pricingUnit" style="width: 140px; margin-left: 8px;"  :placeholder="$t('lotCard.ChargingCycleName')">-->
-        <!--            <a-option value="天">天</a-option>-->
-        <!--            <a-option value="年">年</a-option>-->
-        <!--            <a-option value="月">月</a-option>-->
-        <!--          </a-select>-->
-        <!--        </a-form-item>-->
         <a-form-item>
           <a-space>
             <a-button type="primary" @click="handleSearch">{{ $t('form.Search') }}</a-button>
@@ -110,10 +93,6 @@
             </a-select>
           </a-form-item>
         </template>
-
-        <!--        <a-form-item :label="$t('tariffManagement.feeCode')" field="feeCode" required="">-->
-        <!--          <a-input v-model="formState.feeCode"/>-->
-        <!--        </a-form-item>-->
         <a-form-item :label="$t('tariffManagement.label')" field="label">
           <a-input v-model="formState.label"/>
         </a-form-item>
@@ -125,41 +104,6 @@
             </a-option>
           </a-select>
         </a-form-item>
-        <a-form-item :label="$t('tariffManagement.trafficType')" field="trafficType">
-          <a-select v-model="formState.trafficType">
-            <a-option v-for=" item in trafficList" :key="item.id" :value="item.value">{{
-                item.label
-              }}
-            </a-option>
-          </a-select>
-        </a-form-item>
-        <a-form-item :label="$t('tariffManagement.billingType')" field="billingType">
-          <a-select v-model="formState.billingType">
-            <a-option v-for=" item in typeList" :key="item.id" :value="item.value">{{
-                item.label
-              }}
-            </a-option>
-          </a-select>
-        </a-form-item>
-        <!-- <a-form-item :label="$t('tariffManagement.bagSize')" field="bagSize">
-            <a-input v-model="formState.bagSize" />
-        </a-form-item>
-        <a-form-item :label="$t('tariffManagement.billingCycle')" field="billingCycle">
-            <a-select v-model="formState.billingCycle">
-                <a-option v-for=" item in cycleist" :key="item.id" :value="item.value">{{ item.label
-                    }}</a-option>
-            </a-select>
-        </a-form-item>
-
-        <a-form-item :label="$t('tariffManagement.settlementCycle')" field="settlementCycle">
-            <a-select v-model="formState.settlementCycle">
-                <a-option v-for=" item in settlementCycleMap" :key="item.id" :value="item.value">{{ item.label
-                    }}</a-option>
-            </a-select>
-        </a-form-item>
-        <a-form-item :label="$t('tariffManagement.pricing')" field="pricing">
-            <a-input v-model="formState.pricing" />
-        </a-form-item> -->
         <a-form-item :label="$t('tariffManagement.billingMethod')" field="billingMethod">
           <a-select v-model="formState.billingMethod">
             <a-option v-for=" item in methodList" :key="item.id" :value="item.value">{{
@@ -169,7 +113,7 @@
           </a-select>
         </a-form-item>
         <a-form-item :label="$t('tariffManagement.currency')" field="currency">
-          <a-select v-model="formState.billingType">
+          <a-select v-model="formState.currency">
             <a-option v-for=" item in currency" :key="item.id" :value="item.value">{{
                 item.label
               }}
@@ -183,25 +127,12 @@
             <a-radio value="2">按月</a-radio>
           </a-radio-group>
         </a-form-item>
-        <a-form-item field="bagSize" :label="$t('tariffManagement.bagSize')">
-          <a-input v-model="formState.bagSize" :placeholder="$t('tariffManagement.bagSize')"/>
-          <!--          <a-select v-model="formState.bagSizeUnit" style="width: 80px; margin-left: 8px;">-->
-          <!--            <a-option value="KB">KB</a-option>-->
-          <!--            <a-option value="MB">MB</a-option>-->
-          <!--            <a-option value="GB">GB</a-option>-->
-          <!--          </a-select>-->
-        </a-form-item>
         <a-form-item field="pricing" :label="$t('tariffManagement.pricing')" required>
           <a-input v-model="formState.pricing" :placeholder="$t('tariffManagement.pricing')">
             <template #append>
             </template>
           </a-input>
-          <!--          <a-select v-model="formState.pricingUnit" style="width: 80px; margin-left: 8px;" placeholder="周期分类">-->
-          <!--            <a-option value="天">天</a-option>-->
-          <!--            <a-option value="年">年</a-option>-->
-          <!--            <a-option value="月">月</a-option>-->
-          <!--          </a-select>-->
         </a-form-item>
         <a-form-item field="settlementCycle" :label="$t('tariffManagement.cycleBuy')">
           <a-input v-model="formState.settlementCycleMap.starTime">
@@ -218,20 +149,6 @@
             </template>
           </a-input>
         </a-form-item>
-        <!--        <a-form-item field="number" label="连接数">-->
-        <!--          <a-input v-model="formState.number">-->
-        <!--            <template #append>-->
-        <!--              次-->
-        <!--            </template>-->
-        <!--          </a-input>-->
-        <!--        </a-form-item>-->
-        <!--        <a-form-item field="voice" label="语音被叫">-->
-        <!--          <a-input v-model="formState.voice">-->
-        <!--            <template #append>-->
-        <!--              元/分-->
-        <!--            </template>-->
-        <!--          </a-input>-->
-        <!--        </a-form-item>-->
         <a-form-item field="voice" label="计费函数">
           <a-input v-model="formState.billingFuc" placeholder="自动生成" :disabled="true"/>
 
@@ -277,12 +194,11 @@
 import {onMounted, ref, reactive, getCurrentInstance, nextTick, watch} from "vue";
 import {useRoute} from "vue-router";
 import {columns, columnsCustomer, planColumns} from "./config";
-import {Message, Notification} from '@arco-design/web-vue'
+import {Message} from '@arco-design/web-vue'
 import {deleteTariff, updateTariff, addTariff, tariffList} from "@/api/path/tariffManagement.api"
 import {getDataPlanList} from "@/api/path/lotCard.api"
-import {userList} from '@/api/path/system.api'
+import {getSTSInfoList} from '@/api/path/system.api'
 import {Getdictionary} from '@/mixins/index.js'
-import {enum_dict} from "@/hooks/enum";
 import {useSystemStore} from '@/store/modules/systemStore'
 
 const role = useSystemStore()
@@ -323,15 +239,11 @@ const intData = async () => {
   const {data} = await tariffList(param)
   dataSource.value = (data.records || []).map((item, index) => {
     const sourceName = sourceList.value.find(val => val.value == item.source)?.label
-    const trafficTypeName = trafficList.value.find(val => val.value == item.trafficType)?.label
-    const billingTypeName = typeList.value.find(val => val.value == item.billingType)?.label
     const billingCycleName = cycleist.value.find(val => val.value == item.billingCycle)?.label
     const methodName = methodList.value.find(val => val.value == item.billingMethod)?.label
     return {
       ...item,
       sourceName,
-      trafficTypeName,
-      billingTypeName,
       billingCycleName,
       feeCode: "NR0" + (index + 1),
       status: "正常"
@@ -391,12 +303,6 @@ const formState = ref({
   "userId": null,
   // 来源(必填)
   "source": "",
-  // 流量类型(必填)
-  "trafficType": "",
-  // 计费类型(必填)
-  "billingType": "",
-  // 流量包Size(必填)
-  "bagSize": "",
   // 计费周期(必填)
   "billingCycle": "",
   // 计费方式(必填)
@@ -408,14 +314,10 @@ const formState = ref({
   // 币种(必填)
   "currency": "",
 
-
-  "settlementCycleMap": {
-    "starTime": "",
-    "endTime": "",
-  },
-  // 流量包大小类型
-  "bagSizeUnit": "KB",
-  "pricingUnit": "月",
+  "settlementCycleMap":{
+    "starTime":'',
+    "endTime":''
+  }
 });
 
 const rules = {
@@ -423,12 +325,8 @@ const rules = {
   simDataPlanId: [{required: true, trigger: 'change',}],
   userId: [{required: true, trigger: 'change',}],
   source: [{required: true, trigger: 'change',}],
-  trafficType: [{required: true, trigger: 'change',}],
-  billingType: [{required: true, trigger: 'change',}],
-  bagSize: [{required: true, trigger: 'change',}],
   billingCycle: [{required: true, trigger: 'change',}],
   billingMethod: [{required: true, trigger: 'change',}],
-  // pricing: [{ required: true, trigger: 'change', }],
   currency: [{required: true, trigger: 'change',}],
 };
 
@@ -439,9 +337,6 @@ const handleSubmit = ({values, errors}) => {
     if (!errors) {
       const formVal = JSON.parse(JSON.stringify(values))
       delete formVal.settlementCycleMap
-      // delete formVal.bagSizeUnit
-      // delete formVal.pricingUnit
-
       formVal.currency = '1'
       formVal.userId = Number(values.userId)
       formVal.simDataPlanId = String(values.simDataPlanId)
@@ -453,12 +348,7 @@ const handleSubmit = ({values, errors}) => {
           duration: 2000,
         })
       }
-      // if (values.bagSize && values.bagSizeUnit) {
-      //   values.bagSize = values.bagSize + values.bagSizeUnit
-      // }
-      // if (values.pricingUnit) {
-      //   values.pricing = values.pricing + '元/' + values.pricingUnit
-      // }
+
       if (formState.value.id) {
         const {code, data} = await updateTariff(formVal)
 
@@ -495,15 +385,14 @@ const dictShowModel = (type, data) => {
 
   // 编辑
   if (type == 2) {
-    Object.assign(formState.value, data);
+    Object.keys(formState.value).forEach(key=>{
+      if(data[key]){
+        formState.value[key] = data[key]
+      }
+    })
     formState.value.simDataPlanId = Number(formState.value.simDataPlanId)
     formState.value.userId = Number(formState.value.userId)
-    if (data.bagSize) {
-      // formState.value.bagSizeUnit = data.bagSize.replace(/\d/g, '')
-      formState.value.bagSize = data.bagSize.match(/\d+/)[0]
-    }
     if (data.pricing) {
-      // formState.value.pricingUnit = data.pricing.split('/')[1] || ''
       formState.value.pricing = data.pricing.match(/\d+/)[0] || ''
     }
     if (data.settlementCycle) {
@@ -522,8 +411,8 @@ const handleModelId = async () => {
     current: 1,
     size: 999,
   }
-  userList(param).then(res => {
-    userIdList.value = (res.data.records || []).filter((item) => item.userType == '2')
+  getSTSInfoList(param).then(res => {
+    userIdList.value = (res.data.records || [])
   })
 }
 const handleDataPlan = async () => {
@@ -547,7 +436,6 @@ const resetForm = () => {
 // 资费弹窗------------------------------------------------
 const planVisible = ref(false)
 const formData = ref({})
-// const planList = ref([])
 const selectedKeysPlan = ref([])
 const rowSelectionPlan = reactive({
   type: 'radio',
@@ -588,18 +476,16 @@ watch(
 // 获取字典
 const handleDictValue = async () => {
   sourceList.value = await Getdictionary('source')
-  trafficList.value = await Getdictionary('BillingType')
   cycleist.value = await Getdictionary('Billingcycle')
   typeList.value = await Getdictionary('Billingcycle')
   methodList.value = await Getdictionary('billingMethod')
-  // settlementCycleMap.value = dictList.filter((item) => item.typeKey == enum_dict.settlementCycle)
   currency.value = await Getdictionary('currencyType')
 }
 
 
 onMounted(async () => {
-  await intData()
   await handleDictValue()
+  await intData()
 })