From 3ef2d9bd0fe2a0f157a034ee604aa91ca8aace32 Mon Sep 17 00:00:00 2001 From: wqz Date: Fri, 29 Nov 2024 16:55:38 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E5=AF=B9=E5=A4=96API=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../openApi/PublicOpenAapiController.java | 24 --- .../service/impl/NewOPenApiServiceImpl.java | 168 ++++++++---------- yunze-ui/src/views/tool/apifile/index.vue | 137 +++++++------- 3 files changed, 139 insertions(+), 190 deletions(-) diff --git a/yunze-iotapi/src/main/java/com/yunze/iotapi/controller/openApi/PublicOpenAapiController.java b/yunze-iotapi/src/main/java/com/yunze/iotapi/controller/openApi/PublicOpenAapiController.java index 29b5141..73fb4df 100644 --- a/yunze-iotapi/src/main/java/com/yunze/iotapi/controller/openApi/PublicOpenAapiController.java +++ b/yunze-iotapi/src/main/java/com/yunze/iotapi/controller/openApi/PublicOpenAapiController.java @@ -608,31 +608,7 @@ public class PublicOpenAapiController { } } - /** - * 批量停机功能 - * - * @param request - * @return - */ - @RequestMapping("/mulCardStop") - @ResponseBody - @LogAnnotation(action = "批量停机") - public String mulCardStop(HttpServletRequest request) { - return newOpenApiService.mulCardStop(request); - } - /** - * 批量复机功能 - * - * @param request - * @return - */ - @RequestMapping("/mulCardStart") - @ResponseBody - @LogAnnotation(action = "批量复机") - public String mulCardStart(HttpServletRequest request) { - return newOpenApiService.mulCardStart(request); - } /** * 续费功能 diff --git a/yunze-iotapi/src/main/java/com/yunze/iotapi/service/impl/NewOPenApiServiceImpl.java b/yunze-iotapi/src/main/java/com/yunze/iotapi/service/impl/NewOPenApiServiceImpl.java index 309e53c..7a2e2c1 100644 --- a/yunze-iotapi/src/main/java/com/yunze/iotapi/service/impl/NewOPenApiServiceImpl.java +++ b/yunze-iotapi/src/main/java/com/yunze/iotapi/service/impl/NewOPenApiServiceImpl.java @@ -64,6 +64,30 @@ public class NewOPenApiServiceImpl implements NewOpenApiService { List dataList = new ArrayList<>(); for (String iccid : iccidList) { Map cardInfoMaps = yzCardMapper.selectCardInfoList(iccid); + if (!cardInfoMaps.containsKey("iccid") ||"".equals(cardInfoMaps.get("iccid"))) { + cardInfoMaps.put("iccid",null); + } + if (!cardInfoMaps.containsKey("msisdn") ||"".equals(cardInfoMaps.get("msisdn"))) { + cardInfoMaps.put("msisdn",null); + } + if (!cardInfoMaps.containsKey("imsi")||"".equals(cardInfoMaps.get("imsi"))) { + cardInfoMaps.put("imsi",null); + } + if (!cardInfoMaps.containsKey("imei") || "".equals(cardInfoMaps.get("imei"))) { + cardInfoMaps.put("imei",null); + } + if (!cardInfoMaps.containsKey("activateDate") || "".equals(cardInfoMaps.get("activateDate"))) { + cardInfoMaps.put("activateDate",null); + } + if (!cardInfoMaps.containsKey("dueExpireTime") || "".equals(cardInfoMaps.get("dueExpireTime"))) { + cardInfoMaps.put("dueExpireTime",null); + } + if (!cardInfoMaps.containsKey("status") || "".equals(cardInfoMaps.get("status"))) { + cardInfoMaps.put("status",null); + } + if (!cardInfoMaps.containsKey("remarks") || "".equals(cardInfoMaps.get("remarks"))) { + cardInfoMaps.put("remarks",null); + } dataList.add(cardInfoMaps); } System.err.println(dataList); @@ -80,9 +104,38 @@ public class NewOPenApiServiceImpl implements NewOpenApiService { List dataList = new ArrayList<>(); for (String iccid : iccidList) { Map cardInfoMaps = yzCardMapper.selectCardDetail(iccid); + if (!cardInfoMaps.containsKey("iccid") ||"".equals(cardInfoMaps.get("iccid"))) { + cardInfoMaps.put("iccid",null); + } + if (!cardInfoMaps.containsKey("msisdn") ||"".equals(cardInfoMaps.get("msisdn"))) { + cardInfoMaps.put("msisdn",null); + } + if (!cardInfoMaps.containsKey("imsi") ||"".equals(cardInfoMaps.get("imsi"))) { + cardInfoMaps.put("imsi",null); + } + if (!cardInfoMaps.containsKey("useFlow") ||"".equals(cardInfoMaps.get("useFlow"))) { + cardInfoMaps.put("useFlow",null); + } + if (!cardInfoMaps.containsKey("remaining") ||"".equals(cardInfoMaps.get("remaining"))) { + cardInfoMaps.put("remaining",null); + } + if (!cardInfoMaps.containsKey("startTime") ||"".equals(cardInfoMaps.get("startTime"))) { + cardInfoMaps.put("startTime",null); + } + if (!cardInfoMaps.containsKey("endTime") ||"".equals(cardInfoMaps.get("endTime"))) { + cardInfoMaps.put("endTime",null); + } + if (!cardInfoMaps.containsKey("activateDate") ||"".equals(cardInfoMaps.get("activateDate"))) { + cardInfoMaps.put("activateDate",null); + } + if (!cardInfoMaps.containsKey("status") ||"".equals(cardInfoMaps.get("status"))) { + cardInfoMaps.put("status",null); + } + if (!cardInfoMaps.containsKey("packageName") ||"".equals(cardInfoMaps.get("packageName"))) { + cardInfoMaps.put("packageName",null); + } dataList.add(cardInfoMaps); } - System.err.println(dataList); return new ResponseJson().initSuccessOpen(dataList); } @@ -96,104 +149,33 @@ public class NewOPenApiServiceImpl implements NewOpenApiService { List dataList = new ArrayList<>(); for (String iccid : iccidList) { Map cardInfoMaps = yzCardMapper.queryCardPackage(iccid); + if (!cardInfoMaps.containsKey("iccid") ||"".equals(cardInfoMaps.get("iccid"))) { + cardInfoMaps.put("iccid",null); + } + if (!cardInfoMaps.containsKey("msisdn") ||"".equals(cardInfoMaps.get("msisdn"))) { + cardInfoMaps.put("msisdn",null); + } + if (!cardInfoMaps.containsKey("imsi") ||"".equals(cardInfoMaps.get("imsi"))) { + cardInfoMaps.put("imsi",null); + } + if (!cardInfoMaps.containsKey("validateType") ||"".equals(cardInfoMaps.get("validateType"))) { + cardInfoMaps.put("validateType",null); + } + if (!cardInfoMaps.containsKey("packageId") ||"".equals(cardInfoMaps.get("packageId"))) { + cardInfoMaps.put("packageId",null); + } + if (!cardInfoMaps.containsKey("packetId") ||"".equals(cardInfoMaps.get("packetId"))) { + cardInfoMaps.put("packetId",null); + } + if (!cardInfoMaps.containsKey("packetName") ||"".equals(cardInfoMaps.get("packetName"))) { + cardInfoMaps.put("packetName",null); + } dataList.add(cardInfoMaps); } System.err.println(dataList); return new ResponseJson().initSuccessOpen(dataList); } - @Override - public String mulCardStop(HttpServletRequest request) { - //返回变量 - String apnCardStatusResult = ""; - //获取请求参数 - String map = (String) request.getAttribute("map"); - //fastJson工具转换 - Map paramMap = JSON.parseObject(map, new TypeReference>() { - }); - Map params = (Map) paramMap.get("Param"); - //拿到业务请求参数后转换为string数组 - List msisdnList = JSONArray.parseArray(params.get("msisdn").toString(), String.class); - for (String msisdn : msisdnList) { - //根据msisdn从数据库中拿到调用api所需参数 - Map apiParams = yzCardMapper.selectApiParams(msisdn); - //防止不存在的msisdn异常 - if (apiParams != null) { - //判断区分运营商类别(目前考虑移动和电信5G、电信4G) 调用三方API - String cdCode = (String) apiParams.get("cd_code"); - if ("YiDong_EC".equals(cdCode)) { - //移动 - //停机参数 - String operType = "0"; - Query_YD queryYd = new Query_YD(apiParams, cdCode); - apnCardStatusResult = queryYd.FunctionApnCardStop(msisdn, operType); - } else if ("DianXin_CMP_5G".equals(cdCode)) { - //电信5G - //停机参数 - String orderTypeId = "19"; - Query_DX5G queryDx5G = new Query_DX5G(apiParams); - apnCardStatusResult = queryDx5G.FunctionApnCardStop(msisdn, orderTypeId); - } else if ("DianXin_CMP".equals(cdCode)) { - //电信4G - //停机参数 - String orderTypeId = "19"; - //固定值 保持为空 - String acctCd = ""; - Query_DX queryDx = new Query_DX(apiParams); - apnCardStatusResult = queryDx.FunctionApnCardStop(msisdn, orderTypeId, acctCd); - - } - } - } - return apnCardStatusResult; - } - - @Override - public String mulCardStart(HttpServletRequest request) { - //返回变量 - String apnCardStatusResult = ""; - //获取请求参数 - String map = (String) request.getAttribute("map"); - //fastJson工具转换 - Map paramMap = JSON.parseObject(map, new TypeReference>() { - }); - Map params = (Map) paramMap.get("Param"); - //拿到业务请求参数后转换为string数组 - List msisdnList = JSONArray.parseArray(params.get("msisdn").toString(), String.class); - for (String msisdn : msisdnList) { - //根据msisdn从数据库中拿到调用api所需参数 - Map apiParams = yzCardMapper.selectApiParams(msisdn); - //防止不存在的msisdn异常 - if (apiParams != null) { - //判断区分运营商类别(目前考虑移动和电信5G、电信4G) 调用三方API - String cdCode = (String) apiParams.get("cd_code"); - if ("YiDong_EC".equals(cdCode)) { - //移动 - //复机参数 - String operType = "1"; - Query_YD queryYd = new Query_YD(apiParams, cdCode); - apnCardStatusResult = queryYd.FunctionApnCardStop(msisdn, operType); - } else if ("DianXin_CMP_5G".equals(cdCode)) { - //电信5G - //复机参数 - String orderTypeId = "20"; - Query_DX5G queryDx5G = new Query_DX5G(apiParams); - apnCardStatusResult = queryDx5G.FunctionApnCardStop(msisdn, orderTypeId); - } else if ("DianXin_CMP".equals(cdCode)) { - //电信4G - //复机参数 - String orderTypeId = "20"; - //固定值 保持为空 - String acctCd = ""; - Query_DX queryDx = new Query_DX(apiParams); - apnCardStatusResult = queryDx.FunctionApnCardStop(msisdn, orderTypeId, acctCd); - - } - } - } - return apnCardStatusResult; - } - @Override //添加事务 回滚异常操作 @Transactional diff --git a/yunze-ui/src/views/tool/apifile/index.vue b/yunze-ui/src/views/tool/apifile/index.vue index 0dd1fe6..bdd7880 100644 --- a/yunze-ui/src/views/tool/apifile/index.vue +++ b/yunze-ui/src/views/tool/apifile/index.vue @@ -2455,7 +2455,7 @@ export default { InterfaceName: 'API接口名称', mailbox: 'feizhenlong@139.com', editionList: [//版本说明 - { a: 'V2.0.0', b: '2024-10-11', c: 'Wang', d: '更新对外接口,包括批量查询卡信息、批量停复机(目前支持移动、电信5G和4G)' }, + { a: 'V2.0.0', b: '2024-10-11', c: '山东云则信息技术有限公司', d: '更新对外接口,包括批量查询卡信息、批量查询卡详情等' }, ], cardList: [//接口命名规则 { a: 'appId', b: 'String', c: '是', d: 'Verify Map 内', e: 'appId用于唯一标识请求' }, @@ -2716,7 +2716,7 @@ export default { { name: 'iccid', requiredType: '是', - type: 'Object', + type: 'String', explanation: '集成电路卡识别码,IC卡的唯一识别号码,共有20位字符组成,举例:89860423123123132135。' }, { @@ -2725,18 +2725,6 @@ export default { type: 'String', explanation: '国际移动用户识别码,其总长度不超过15位,使用0~9的数字,举例:460079650004176。' }, - { - name: 'packetType', - requiredType: '是', - type: 'int', - explanation: '加油包类型:0.基础加油包 1.叠加油包' - }, - { - name: 'validateType', - requiredType: '否', - type: 'int', - explanation: '生效类型详细请参3.4生效类别说明' - }, { name: 'activateDate', requiredType: '否', @@ -2773,24 +2761,6 @@ export default { type: 'int', explanation: '卡状态 详细请参考 3.1 卡状态说明' }, - { - name: 'netWorkStatus', - requiredType: '否', - type: 'int', - explanation: '断开网状态:1.正常 2.断网' - }, - { - name: 'operatorId', - requiredType: '是', - type: 'String', - explanation: '运营商类型:1移动 2联通 3电信 4其他' - }, - { - name: 'type', - requiredType: '是', - type: 'String', - explanation: '卡类型: 0.中国移动 1.中国联通 2.中国电信 3.其他' - }, { name: 'remaining', requiredType: '是', @@ -2803,28 +2773,25 @@ export default { ' "result": {\n' + ' "data": [\n' + ' {\n' + - ' "packetType": 0,\n' + - ' "validateType": 1,\n' + ' "activateDate": "2022-01-01",\n' + ' "imsi": "460113163750000",\n' + - ' "type": "3",\n' + ' "remaining": 50,\n' + ' "iccid": "8986112124301965000",\n' + ' "useFlow": 30,\n' + - ' "netWorkStatus": 1,\n' + - ' "startTime": "2024-06-10",\n' + + ' "startTime": "2024-11-08",\n' + ' "packageName": "移动NB卡",\n' + - ' "endTime": "2024-10-09",\n' + + ' "endTime": "2024-11-08",\n' + ' "msisdn": "1410158305000",\n' + - ' "operatorId": "3",\n' + ' "status": 4\n' + ' },\n' + ' {\n' + ' "iccid": "898604B21522C001001",\n' + + ' "useFlow": "25.2",\n' + + ' "startTime": "null",\n' + ' "activateDate": "2024-05-20",\n' + - ' "netWorkStatus": 1,\n' + ' "imsi": "460083272213000",\n' + ' "packageName": "联通地王卡",\n' + + ' "endTime": "null",\n' + ' "msisdn": "1441127223000",\n' + ' "remaining": 200,\n' + ' "status": 6\n' + @@ -2889,7 +2856,7 @@ export default { { name: 'iccid', requiredType: '是', - type: 'Object', + type: 'String', explanation: '集成电路卡识别码,IC卡的唯一识别号码,共有20位字符组成,举例:89860423123123132135。' }, { @@ -2904,32 +2871,54 @@ export default { type: 'String', explanation: '资费计划名称' }, + { + name: 'packetId', + requiredType: '是', + type: 'String', + explanation: '套餐包ID' + }, + { + name: 'packageId', + requiredType: '是', + type: 'String', + explanation: '套餐ID' + }, + { + name: 'validateType', + requiredType: '是', + type: 'String', + explanation: '资费计划类型 参考3.4生效类型辅助文档' + }, ], - backExample_success: tools.formatJson('{\n' + - ' "result": {\n' + - ' "data": [\n' + - ' {\n' + - ' "iccid": "8986112124301965000",\n' + - ' "imsi": "460113163750000",\n' + - ' "msisdn": "1410158305000",\n' + - ' "packetName": "大王卡30MB一月"\n' + - ' },\n' + - ' {\n' + - ' "iccid": "898604B21522C001001",\n' + - ' "imsi": "460083272213000",\n' + - ' "msisdn": "1441127223000",\n' + - '\n' + - ' \t "packetName": "大王卡30MB一月" \n' + - '\n' + - ' }\n' + - ' ]\n' + - ' },\n' + - ' "message": "成功",\n' + - ' "status": "1"\n' + - '}'), + backExample_success: tools.formatJson({ + "result": { + "data": [ + { + "packetId": "YZ2021070204353637421010", + "iccid": "898602B5132290026822", + "validateType": null, + "packageId": "YZ202107020435363742", + "imsi": "460040574816822", + "msisdn": "1064857486822", + "packetName": "60M月/12月" + }, + { + "packetId": "YZ2021070204353637421010", + "iccid": "8986112124301965946", + "validateType": null, + "packageId": "YZ202107020435363742", + "imsi": "460113163750388", + "msisdn": "1410158305863", + "packetName": "60M月/12月" + } + ] + }, + "message": "成功", + "status": "1" + }), backExample_fail: tools.formatJson('{"message":"无访问权限","result":null,"status":"1003"}') }, - { + /*{ T1_title: '2.2业务类', T2_title: '2.2.1 SIM卡批量停机', describe: '批量停机(注:同一卡号或群组3分钟内不能调用该接口超过1次)', @@ -3025,11 +3014,11 @@ export default { '\n' + '}'), backExample_fail: tools.formatJson('{"message":"无访问权限","result":null,"status":"1003"}') - }, + },*/ { - T1_title: '', - T2_title: '2.2.3 SIM卡批量续费', - describe: '批量复机注:批量续费卡数量单次不能超过500张)', + T1_title: ' 2.2业务类', + T2_title: '2.2.1 SIM卡批量续费', + describe: '批量续费卡数量单次不能超过500张,先通过2.3接口 拿到返回的iccid集合和资费计划后 再进行批量续费', url: 'http://api.5iot.cn/route/open/mulCardRenewal', type: 'POST', requestParameterArr: [//请求参数 @@ -3059,13 +3048,15 @@ export default { }, ], requestInstance: tools.formatJson({ - 'Param': { "iccid":[ + 'Param': { + "iccid": [ "8986112124301960000", "898604B21522C000000" ], - "packageId":"20241023", - "packetId":"123456", - "validateType":"1" }, + "packageId": "20241023", + "packetId": "123456", + "validateType": "1" + }, 'verify': { 'timeStamp': '1625120582169', 'password': 'uhbhkh223123', @@ -3093,7 +3084,7 @@ export default { explanation: '返回结果集(status为“1”时,result包含正确的结果数据;status为“非1”时, result可能为空,也可能包含其他提示数据)' } ], - returnParameterDescription_answer:[//返回应答参数 + returnParameterDescription_answer: [//返回应答参数 { name: 'iccidList', requiredType: '是', From 491c39f0d1f3029b95dacbe9e1bab0556a8f4627 Mon Sep 17 00:00:00 2001 From: wqz Date: Fri, 29 Nov 2024 16:55:55 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E5=8D=A1=E5=88=97=E8=A1=A8=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/yunze/flowcard/card/index.vue | 4061 ++++++++++------- 1 file changed, 2344 insertions(+), 1717 deletions(-) diff --git a/yunze-ui/src/views/yunze/flowcard/card/index.vue b/yunze-ui/src/views/yunze/flowcard/card/index.vue index c9f2a43..7800872 100644 --- a/yunze-ui/src/views/yunze/flowcard/card/index.vue +++ b/yunze-ui/src/views/yunze/flowcard/card/index.vue @@ -14,10 +14,20 @@ />
- 展开/折叠 - 全选/全不选 + 展开/折叠 + 全选/全不选 - 父子联动 + 父子联动 -
- - + - + - + - - - - + + + + + + - + - 起止条件 + 起止条件 + - 分组 + 分组 - - - - + - 运营商 + 运营商 - 所属通道 + 所属通道 - @@ -340,82 +374,91 @@ /> - - - - + + - - -
- - - - - - - + + - - - - {{ buttonText }} - -
-
- + + + + + + + + + + - 搜索 + 搜索 + + + + + + 重置 - 重置 - - - 公司所属 + 公司所属 @@ -447,18 +510,6 @@ >导入 - 导出 + + + + + + + + + + + + + + + + 取消 + 确定 + +
- - + - 操作方式 - -
- 上传文件:更具下载模板上传卡号;文本域操作赋值卡号进行操作; -
- -
-
+ 操作方式 + +
+ 上传文件:更具下载模板上传卡号;文本域操作赋值卡号进行操作; +
+ +
+ - 文本操作 + 文本操作
- + - +
- 物联卡号 + + 物联卡号 -
- 卡号之间以换行隔开 -
+
卡号之间以换行隔开
+
-
提示:卡号之间以换行隔开 !
(大于100条/次操作禁止使用卡号输入方式充值!) +
+ 提示:卡号之间以换行隔开 !
(大于100条/次操作禁止使用卡号输入方式充值!)
- +
- 确 定 + 确 定 取消 - 文件操作 + 文件操作 点击上传
- 下载模板 + 下载模板
-
+
提示:仅允许导入“xls”或“xlsx”格式文件!
-
-
+
+
- 确 定 + 确 定 取消 @@ -772,122 +957,283 @@ - - - - - - - - - - - - + - + + + + + + + + + + - - @@ -1397,21 +1935,27 @@ import { singleCardInfo, singFlexibleState, showhistoryUsed, - AutoPolling, updOther, cardDia -} from '@/api/yunze/flowcard/card/card' -import {getToken} from '@/utils/auth' -import {treeselect} from '@/api/system/dept' -import Treeselect from '@riophae/vue-treeselect' -import '@riophae/vue-treeselect/dist/vue-treeselect.css' -import tools from '@/utils/yunze/tools' -import cardInfoDetails from './cardInfoDetails' -import cardInfoBrief from './cardInfoBrief' -import toBeRenewed from './toBeRenewed' -import {operatorName} from '@/api/yunze/flowcard/card/change' -import {packageName, channelName} from '@/api/yunze/flowcard/TariffGroup' -import {exportCardInfo} from '../../../../api/yunze/flowcard/card/card' -import CardSynDia from "@/views/yunze/flowcard/card/cardSynDia.vue"; -import {getUserProfile} from "@/api/system/user"; + AutoPolling, + updOther, + cardDia +} from '@/api/yunze/flowcard/card/card'; +import { getToken } from '@/utils/auth'; +import { treeselect } from '@/api/system/dept'; +import Treeselect from '@riophae/vue-treeselect'; +import '@riophae/vue-treeselect/dist/vue-treeselect.css'; +import tools from '@/utils/yunze/tools'; +import cardInfoDetails from './cardInfoDetails'; +import cardInfoBrief from './cardInfoBrief'; +import toBeRenewed from './toBeRenewed'; +import { operatorName } from '@/api/yunze/flowcard/card/change'; +import { packageName, channelName } from '@/api/yunze/flowcard/TariffGroup'; +import { + BatchModifyExpireDate, + exportCardInfo +} from '../../../../api/yunze/flowcard/card/card'; +import CardSynDia from '@/views/yunze/flowcard/card/cardSynDia.vue'; +import { getUserProfile } from '@/api/system/user'; + export default { name: 'Card', components: { @@ -1425,21 +1969,27 @@ export default { computed: { buttonText() { if (this.switch) { - return '单行' + return '单行'; } else { - return '多行' + return '多行'; } } }, data() { return { - isStopNetwork: '',//开关状态 默认关(0断网1开网) + isDatePickerVisible: false, // 控制时间选择器模态框的显示状态 + selectedTime: null, // 存储用户选择的时间 + dueTime: '',//欣桥自定义到期时间 + isStopNetwork: '',//开关状态 默认关(1断网0开网) level: '',//设置阈值 + //activateDate: '',//激活日期参数 iccidStr: '',//iccid 文本域充值字符串 uploadType: true,//上传文件方式 showczcList: [], //历史用量List showhistoryUsed: false, vo: '', + updateOthers: false, + changeDate: false, balance: { num: null }, //余额修改表单对象 @@ -1470,28 +2020,28 @@ export default { { text: '最近一周', onClick(picker) { - const end = new Date() - const start = new Date() - start.setTime(start.getTime() - 3600 * 1000 * 24 * 7) - picker.$emit('pick', [start, end]) + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); + picker.$emit('pick', [start, end]); } }, { text: '最近一个月', onClick(picker) { - const end = new Date() - const start = new Date() - start.setTime(start.getTime() - 3600 * 1000 * 24 * 30) - picker.$emit('pick', [start, end]) + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); + picker.$emit('pick', [start, end]); } }, { text: '最近三个月', onClick(picker) { - const end = new Date() - const start = new Date() - start.setTime(start.getTime() - 3600 * 1000 * 24 * 90) - picker.$emit('pick', [start, end]) + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); + picker.$emit('pick', [start, end]); } } ] @@ -1502,19 +2052,19 @@ export default { { text: '今天', onClick(picker) { - picker.$emit('pick', tools.gitData()) + picker.$emit('pick', tools.gitData()); } }, { text: '昨天', onClick(picker) { - picker.$emit('pick', tools.getBeforeDate(1)) + picker.$emit('pick', tools.getBeforeDate(1)); } }, { text: '一周前', onClick(picker) { - picker.$emit('pick', tools.getBeforeDate(7)) + picker.$emit('pick', tools.getBeforeDate(7)); } } ] @@ -1631,7 +2181,7 @@ export default { cardSortValue: [], FlowData: [], - selIccid: [{FlowData: []}], + selIccid: [{ FlowData: [] }], activeNames: [0], //卡状态 @@ -1668,7 +2218,8 @@ export default { //操作参数 Operation: { Stopped: null, - iccids: null + iccids: null, + selectedTime: null }, formDivide: { dept_id: '', @@ -1696,14 +2247,18 @@ export default { // 是否更新已经存在的用户数据 updateSupport: 0, // 设置上传的请求头部 - //url: process.env.VUE_APP_BASE_API + '/yunze/card/importData', + url: process.env.VUE_APP_BASE_API + '/yunze/card/importData', //导入地址 - url: process.env.VUE_APP_BASE_API + '/yunze/card/importCardInfoData', + // url: process.env.VUE_APP_BASE_API + '/yunze/card/importCardInfoData', //达量断网 - uploadCardInfo: process.env.VUE_APP_BASE_API + '/yunze/card/importCardInfoData', - headers: {Authorization: 'Bearer ' + getToken()}, + uploadCardInfo: + process.env.VUE_APP_BASE_API + '/yunze/card/importCardInfoData', + headers: { Authorization: 'Bearer ' + getToken() }, // 上传的地址 - stopNetWork: process.env.VUE_APP_BASE_API + '/yunze/cardNetWorkStop' + stopNetWork: process.env.VUE_APP_BASE_API + '/yunze/cardNetWorkStop', + //mulUpdateActivateDate: process.env.VUE_APP_BASE_API + '/yunze/mulUpdateActivateDate', + otherUrl: process.env.VUE_APP_BASE_API + '/yunze/card/otherImport', + changeDateUrl: process.env.VUE_APP_BASE_API + '/yunze/card/changeDateImport' }, // 卡号 导入参数 @@ -1717,7 +2272,7 @@ export default { // 是否更新已经存在的用户数据 updateSupport: 0, // 设置上传的请求头部 - headers: {Authorization: 'Bearer ' + getToken()}, + headers: { Authorization: 'Bearer ' + getToken() }, // 上传的地址 url: process.env.VUE_APP_BASE_API + '/yunze/card/cardNumber', Pstr: '' //携带参数 @@ -1739,6 +2294,7 @@ export default { user: {}, // 查询参数 queryParams: { + due_expire_time_xq: '', level: '', isStopNetWork: '0', Bcvalue: '', // 文本域字符串 @@ -1780,28 +2336,31 @@ export default { }, showTotal: 0, columns: [ - {key: 0, label: `虚拟编号`, visible: false}, - {key: 1, label: `MSISDN`, visible: true}, - {key: 2, label: `ICCID`, visible: true}, - {key: 3, label: `IMSI`, visible: true}, - {key: 4, label: `卡状态`, visible: true}, - {key: 5, label: `备注信息`, visible: true}, - {key: 6, label: `开卡日期`, visible: false}, - {key: 7, label: `所属公司`, visible: true}, - {key: 8, label: `入库日期`, visible: false}, - {key: 9, label: `同步时间`, visible: false}, - {key: 10, label: `用量`, visible: true}, - {key: 11, label: `分组`, visible: false}, - {key: 12, label: `通道`, visible: true}, - {key: 13, label: `发货日期`, visible: false}, - {key: 14, label: `到期日期`, visible: true}, - {key: 15, label: `资费组`, visible: true}, - {key: 16, label: `卡状态描述`, visible: false}, - {key: 17, label: `激活日期`, visible: true}, - {key: 18, label: `最近一次同步用量时间`, visible: false}, - {key: 19, label: `最近一次同步状态时间`, visible: false}, - {key: 20, label: `余额`, visible: true}, - {key: 21, label: `周期时间`, visible: true} + { key: 0, label: `虚拟编号`, visible: false }, + { key: 1, label: `MSISDN`, visible: true }, + { key: 2, label: `ICCID`, visible: true }, + { key: 3, label: `IMSI`, visible: true }, + { key: 4, label: `卡状态`, visible: true }, + { key: 5, label: `备注信息`, visible: true }, + { key: 6, label: `开卡日期`, visible: false }, + { key: 7, label: `所属公司`, visible: true }, + { key: 8, label: `入库日期`, visible: false }, + { key: 9, label: `同步时间`, visible: false }, + { key: 10, label: `用量`, visible: true }, + { key: 11, label: `分组`, visible: false }, + { key: 12, label: `通道`, visible: true }, + { key: 13, label: `发货日期`, visible: false }, + { key: 14, label: `到期日期`, visible: true }, + { key: 15, label: `资费组`, visible: true }, + { key: 16, label: `卡状态描述`, visible: false }, + { key: 17, label: `激活日期`, visible: true }, + { key: 18, label: `最近一次同步用量时间`, visible: false }, + { key: 19, label: `最近一次同步状态时间`, visible: false }, + { key: 20, label: `余额`, visible: true }, + { key: 21, label: `其他备注`, visible: true }, + { key: 22, label: `达量阈值`, visible: true }, + { key: 23, label: `到期日期(已修改)`, visible: true }, + { key: 24, label: `修改周期时间`, visible: true } ], BriefEditexecute: false, //【卡基础信息】加载是否 已执行 DetailsEditexecute: false, //【卡详情】加载是否 已执行 @@ -1810,18 +2369,18 @@ export default { // 表单校验 rules: { userName: [ - {required: true, message: '用户名称不能为空', trigger: 'blur'} + { required: true, message: '用户名称不能为空', trigger: 'blur' } ], nickName: [ - {required: true, message: '用户昵称不能为空', trigger: 'blur'} + { required: true, message: '用户昵称不能为空', trigger: 'blur' } ], password: [ - {required: true, message: '用户密码不能为空', trigger: 'blur'} + { required: true, message: '用户密码不能为空', trigger: 'blur' } ], email: [ { type: 'email', - message: '\'请输入正确的邮箱地址', + message: "'请输入正确的邮箱地址", trigger: ['blur', 'change'] } ], @@ -1833,16 +2392,16 @@ export default { } ] } - } + }; }, watch: { // 根据名称筛选企业树 deptName(val) { - this.$refs.dept.filter(val) + this.$refs.dept.filter(val); }, // 根据名称筛选企业树 treeName(val) { - this.$refs.tree.filter(val) + this.$refs.tree.filter(val); }, //高级查询 是否显示 showSearch(val) { @@ -1853,12 +2412,12 @@ export default { window['dimensionTypeOptions'] != null && window['dimensionTypeOptions'] != '' ) { - this.dimensionTypeOptions = window['dimensionTypeOptions'] + this.dimensionTypeOptions = window['dimensionTypeOptions']; } else { - this.getDicts('yunze_card_dimensionType').then(response => { - window['dimensionTypeOptions'] = response.data - this.dimensionTypeOptions = window['dimensionTypeOptions'] - }) + this.getDicts('yunze_card_dimensionType').then((response) => { + window['dimensionTypeOptions'] = response.data; + this.dimensionTypeOptions = window['dimensionTypeOptions']; + }); } //加载 维度字段 @@ -1867,12 +2426,12 @@ export default { window['dimensionFieldOptions'] != null && window['dimensionFieldOptions'] != '' ) { - this.dimensionFieldOptions = window['dimensionFieldOptions'] + this.dimensionFieldOptions = window['dimensionFieldOptions']; } else { - this.getDicts('yunze_card_dimensionField').then(response => { - window['dimensionFieldOptions'] = response.data - this.dimensionFieldOptions = window['dimensionFieldOptions'] - }) + this.getDicts('yunze_card_dimensionField').then((response) => { + window['dimensionFieldOptions'] = response.data; + this.dimensionFieldOptions = window['dimensionFieldOptions']; + }); } if ( this.CardGrouping != null && @@ -1880,7 +2439,7 @@ export default { this.CardGrouping.length > 0 ) { } else { - this.loadCardGrouping() //加载 分组 + this.loadCardGrouping(); //加载 分组 } } } @@ -1888,21 +2447,21 @@ export default { created() { this.getUser(); - let str = this.$route.params.Pstr + let str = this.$route.params.Pstr; //console.log(str) - this.queryParams.batch_query_type = '0' + this.queryParams.batch_query_type = '0'; //加载 电信CMP接入类型 if ( window['DxCMP_RAT'] != undefined && window['DxCMP_RAT'] != null && window['DxCMP_RAT'] != '' ) { - this.DxCMP_RAT = window['DxCMP_RAT'] + this.DxCMP_RAT = window['DxCMP_RAT']; } else { - this.getDicts('DianXin_CMP_RAT').then(response => { - window['DxCMP_RAT'] = response.data - this.DxCMP_RAT = window['DxCMP_RAT'] - }) + this.getDicts('DianXin_CMP_RAT').then((response) => { + window['DxCMP_RAT'] = response.data; + this.DxCMP_RAT = window['DxCMP_RAT']; + }); } //加载 排序条件 @@ -1911,12 +2470,12 @@ export default { window['yz_card_sort'] != null && window['yz_card_sort'] != '' ) { - this.cardSort = window['yz_card_sort'] + this.cardSort = window['yz_card_sort']; } else { - this.getDicts('yz_card_sort').then(response => { - window['yz_card_sort'] = response.data - this.cardSort = window['yz_card_sort'] - }) + this.getDicts('yz_card_sort').then((response) => { + window['yz_card_sort'] = response.data; + this.cardSort = window['yz_card_sort']; + }); } //加载 排序值 if ( @@ -1924,12 +2483,12 @@ export default { window['yz_card_sortValue'] != null && window['yz_card_sortValue'] != '' ) { - this.cardSortValue = window['yz_card_sortValue'] + this.cardSortValue = window['yz_card_sortValue']; } else { - this.getDicts('yz_card_sortValue').then(response => { - window['yz_card_sortValue'] = response.data - this.cardSortValue = window['yz_card_sortValue'] - }) + this.getDicts('yz_card_sortValue').then((response) => { + window['yz_card_sortValue'] = response.data; + this.cardSortValue = window['yz_card_sortValue']; + }); } //加载 API通道名称 内部用 @@ -1939,19 +2498,19 @@ export default { window['findCr_RouteOptions'] != null && window['findCr_RouteOptions'] != '' ) { - this.findCr_RouteOptions = window['findCr_RouteOptions'] + this.findCr_RouteOptions = window['findCr_RouteOptions']; this.findCr_RouteOptions_change = JSON.parse( JSON.stringify(window['findCr_RouteOptions']) - ) + ); } else { - findCr().then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) - window['findCr_RouteOptions'] = jsonobj.Data - this.findCr_RouteOptions = window['findCr_RouteOptions'] + findCr().then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); + window['findCr_RouteOptions'] = jsonobj.Data; + this.findCr_RouteOptions = window['findCr_RouteOptions']; this.findCr_RouteOptions_change = JSON.parse( JSON.stringify(window['findCr_RouteOptions']) - ) - }) + ); + }); } } @@ -1961,12 +2520,12 @@ export default { window['card_seltype'] != null && window['card_seltype'] != '' ) { - this.typeOptions = window['card_seltype'] + this.typeOptions = window['card_seltype']; } else { - this.getDicts('yunze_card_seltype').then(response => { - window['card_seltype'] = response.data - this.typeOptions = window['card_seltype'] - }) + this.getDicts('yunze_card_seltype').then((response) => { + window['card_seltype'] = response.data; + this.typeOptions = window['card_seltype']; + }); } //加载 批量 查询条件 if ( @@ -1974,14 +2533,14 @@ export default { window['card_sel_batch_type'] != null && window['card_sel_batch_type'] != '' ) { - this.card_sel_batch_type = window['card_sel_batch_type'] + this.card_sel_batch_type = window['card_sel_batch_type']; } else { - this.getDicts('card_sel_batch_type').then(response => { - window['card_sel_batch_type'] = response.data - this.card_sel_batch_type = window['card_sel_batch_type'] - }) - console.log('card_sel_batch_type ↓') - console.log(this.card_sel_batch_type) + this.getDicts('card_sel_batch_type').then((response) => { + window['card_sel_batch_type'] = response.data; + this.card_sel_batch_type = window['card_sel_batch_type']; + }); + console.log('card_sel_batch_type ↓'); + console.log(this.card_sel_batch_type); } //加载 资费组名称 @@ -1990,40 +2549,40 @@ export default { window['packageOptions'] != null && window['packageOptions'] != '' ) { - this.packageOptions = window['packageOptions'] + this.packageOptions = window['packageOptions']; this.packageOptions_change = JSON.parse( JSON.stringify(window['packageOptions']) - ) + ); if (!tools.IsArrInside(this.packageOptions, 'package_id', 'IsNull')) { this.packageOptions.push({ package_id: 'IsNull', package_agentname: '未划分资费' - }) + }); this.packageOptions_change.push({ package_id: 'IsNull', package_agentname: '未划分资费' - }) + }); } } else { - queryPackageSimple().then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) + queryPackageSimple().then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); //console.log(jsonobj); - window['packageOptions'] = jsonobj.Data - this.packageOptions = window['packageOptions'] + window['packageOptions'] = jsonobj.Data; + this.packageOptions = window['packageOptions']; this.packageOptions_change = JSON.parse( JSON.stringify(window['packageOptions']) - ) + ); if (!tools.IsArrInside(this.packageOptions, 'package_id', 'IsNull')) { this.packageOptions.push({ package_id: 'IsNull', package_agentname: '未划分资费' - }) + }); this.packageOptions_change.push({ package_id: 'IsNull', package_agentname: '未划分资费' - }) + }); } - }) + }); } //加载 通用是否带空选项 @@ -2032,12 +2591,12 @@ export default { window['timetypeOptions'] != null && window['timetypeOptions'] != '' ) { - this.timetypeOptions = window['timetypeOptions'] + this.timetypeOptions = window['timetypeOptions']; } else { - this.getDicts('yunze_card_sel_timetype').then(response => { - window['timetypeOptions'] = response.data - this.timetypeOptions = window['timetypeOptions'] - }) + this.getDicts('yunze_card_sel_timetype').then((response) => { + window['timetypeOptions'] = response.data; + this.timetypeOptions = window['timetypeOptions']; + }); } //加载轮询类型 @@ -2046,12 +2605,12 @@ export default { window['pollingOptions'] != null && window['pollingOptions'] != '' ) { - this.pollingOptions = window['pollingOptions'] + this.pollingOptions = window['pollingOptions']; } else { - this.getDicts('yz_cm_whether').then(response => { - window['pollingOptions'] = response.data - this.pollingOptions = window['pollingOptions'] - }) + this.getDicts('yz_cm_whether').then((response) => { + window['pollingOptions'] = response.data; + this.pollingOptions = window['pollingOptions']; + }); } //加载 运营商类型 @@ -2060,12 +2619,12 @@ export default { window['operators_type'] != null && window['operators_type'] != '' ) { - this.operators_type = window['operators_type'] + this.operators_type = window['operators_type']; } else { - this.getDicts('yunze_card_operators_type').then(response => { - window['operators_type'] = response.data - this.operators_type = window['operators_type'] - }) + this.getDicts('yunze_card_operators_type').then((response) => { + window['operators_type'] = response.data; + this.operators_type = window['operators_type']; + }); } //加载 卡状态描述 @@ -2074,12 +2633,12 @@ export default { window['stateOptions'] != null && window['stateOptions'] != '' ) { - this.stateOptions = window['stateOptions'] + this.stateOptions = window['stateOptions']; } else { - this.getDicts('yunze_card_status_type').then(response => { - window['stateOptions'] = response.data - this.stateOptions = window['stateOptions'] - }) + this.getDicts('yunze_card_status_type').then((response) => { + window['stateOptions'] = response.data; + this.stateOptions = window['stateOptions']; + }); } //加载 卡状态 if ( @@ -2087,12 +2646,12 @@ export default { window['stateShowId'] != null && window['stateShowId'] != '' ) { - this.stateShowId = window['stateShowId'] + this.stateShowId = window['stateShowId']; } else { - this.getDicts('yunze_card_status_ShowId').then(response => { - window['stateShowId'] = response.data - this.stateShowId = window['stateShowId'] - }) + this.getDicts('yunze_card_status_ShowId').then((response) => { + window['stateShowId'] = response.data; + this.stateShowId = window['stateShowId']; + }); } //加载 断开网状态 @@ -2101,12 +2660,12 @@ export default { window['cardConnectionTypeOptions'] != null && window['cardConnectionTypeOptions'] != '' ) { - this.cardConnectionTypeOptions = window['cardConnectionTypeOptions'] + this.cardConnectionTypeOptions = window['cardConnectionTypeOptions']; } else { - this.getDicts('yz_cardConnection_type').then(response => { - window['cardConnectionTypeOptions'] = response.data - this.cardConnectionTypeOptions = window['cardConnectionTypeOptions'] - }) + this.getDicts('yz_cardConnection_type').then((response) => { + window['cardConnectionTypeOptions'] = response.data; + this.cardConnectionTypeOptions = window['cardConnectionTypeOptions']; + }); } //加载 卡类型 @@ -2115,12 +2674,12 @@ export default { window['card_types'] != null && window['card_types'] != '' ) { - this.card_types = window['card_types'] + this.card_types = window['card_types']; } else { - this.getDicts('yunze_card_card_type').then(response => { - window['card_types'] = response.data - this.card_types = window['card_types'] - }) + this.getDicts('yunze_card_card_type').then((response) => { + window['card_types'] = response.data; + this.card_types = window['card_types']; + }); } //加载 卡板网络类型 @@ -2129,12 +2688,12 @@ export default { window['network_types'] != null && window['network_types'] != '' ) { - this.network_types = window['network_types'] + this.network_types = window['network_types']; } else { - this.getDicts('yunze_card_network_type').then(response => { - window['network_types'] = response.data - this.network_types = window['network_types'] - }) + this.getDicts('yunze_card_network_type').then((response) => { + window['network_types'] = response.data; + this.network_types = window['network_types']; + }); } //加载 卡板在线状态 @@ -2143,12 +2702,12 @@ export default { window['online_status'] != null && window['online_status'] != '' ) { - this.online_status = window['online_status'] + this.online_status = window['online_status']; } else { - this.getDicts('yunze_card_online_status').then(response => { - window['online_status'] = response.data - this.online_status = window['online_status'] - }) + this.getDicts('yunze_card_online_status').then((response) => { + window['online_status'] = response.data; + this.online_status = window['online_status']; + }); } //加载 卡板接入方式 @@ -2157,12 +2716,12 @@ export default { window['access_type'] != null && window['access_type'] != '' ) { - this.access_type = window['access_type'] + this.access_type = window['access_type']; } else { - this.getDicts('yunze_card_access_type').then(response => { - window['access_type'] = response.data - this.access_type = window['access_type'] - }) + this.getDicts('yunze_card_access_type').then((response) => { + window['access_type'] = response.data; + this.access_type = window['access_type']; + }); } //加载 移动 归属地 @@ -2171,12 +2730,12 @@ export default { window['YDcard_attributionOptions'] != null && window['YDcard_attributionOptions'] != '' ) { - this.YDcard_attributionOptions = window['YDcard_attributionOptions'] + this.YDcard_attributionOptions = window['YDcard_attributionOptions']; } else { - this.getDicts('yz_YDcard_attribution').then(response => { - window['YDcard_attributionOptions'] = response.data - this.YDcard_attributionOptions = window['YDcard_attributionOptions'] - }) + this.getDicts('yz_YDcard_attribution').then((response) => { + window['YDcard_attributionOptions'] = response.data; + this.YDcard_attributionOptions = window['YDcard_attributionOptions']; + }); } //加载 自定义 是否 0 1 否 是 @@ -2185,12 +2744,12 @@ export default { window['customize_whether'] != null && window['customize_whether'] != '' ) { - this.customize_whether = window['customize_whether'] + this.customize_whether = window['customize_whether']; } else { - this.getDicts('yunze_customize_whether').then(response => { - window['customize_whether'] = response.data - this.customize_whether = window['customize_whether'] - }) + this.getDicts('yunze_customize_whether').then((response) => { + window['customize_whether'] = response.data; + this.customize_whether = window['customize_whether']; + }); } //加载 企业名称 @@ -2199,13 +2758,13 @@ export default { window['DeptOptions'] != null && window['DeptOptions'] != '' ) { - this.DeptOptions = window['DeptOptions'] + this.DeptOptions = window['DeptOptions']; } else { - this.getDeptName().then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) - window['DeptOptions'] = jsonobj.Data - this.DeptOptions = window['DeptOptions'] - }) + this.getDeptName().then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); + window['DeptOptions'] = jsonobj.Data; + this.DeptOptions = window['DeptOptions']; + }); } //加载 API通道名称 @@ -2214,33 +2773,33 @@ export default { window['RouteOptions'] != null && window['RouteOptions'] != '' ) { - this.RouteOptions = window['RouteOptions'] + this.RouteOptions = window['RouteOptions']; this.RouteOptions_change = JSON.parse( JSON.stringify(window['RouteOptions']) - ) + ); if (!tools.IsArrInside(this.RouteOptions, 'cd_id', 'IsNull')) { - this.RouteOptions.push({cd_id: 'IsNull', cd_alias: '未划分通道'}) + this.RouteOptions.push({ cd_id: 'IsNull', cd_alias: '未划分通道' }); this.RouteOptions_change.push({ cd_id: 'IsNull', cd_alias: '未划分通道' - }) + }); } } else { - this.findSp().then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) - window['RouteOptions'] = jsonobj.Data - this.RouteOptions = window['RouteOptions'] + this.findSp().then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); + window['RouteOptions'] = jsonobj.Data; + this.RouteOptions = window['RouteOptions']; this.RouteOptions_change = JSON.parse( JSON.stringify(window['RouteOptions']) - ) + ); if (!tools.IsArrInside(this.RouteOptions, 'cd_id', 'IsNull')) { - this.RouteOptions.push({cd_id: 'IsNull', cd_alias: '未划分通道'}) + this.RouteOptions.push({ cd_id: 'IsNull', cd_alias: '未划分通道' }); this.RouteOptions_change.push({ cd_id: 'IsNull', cd_alias: '未划分通道' - }) + }); } - }) + }); } //加载 电信CMP无线接入模式 @@ -2249,12 +2808,12 @@ export default { window['DxCMP_netModel_type'] != null && window['DxCMP_netModel_type'] != '' ) { - this.DxCMP_netModel_type = window['DxCMP_netModel_type'] + this.DxCMP_netModel_type = window['DxCMP_netModel_type']; } else { - this.getDicts('DianXin_CMP_netModel').then(response => { - window['DxCMP_netModel_type'] = response.data - this.DxCMP_netModel_type = window['DxCMP_netModel_type'] - }) + this.getDicts('DianXin_CMP_netModel').then((response) => { + window['DxCMP_netModel_type'] = response.data; + this.DxCMP_netModel_type = window['DxCMP_netModel_type']; + }); } //加载 电信CMP在线状态 @@ -2263,12 +2822,12 @@ export default { window['DxCMP_online'] != null && window['DxCMP_online'] != '' ) { - this.DxCMP_online = window['DxCMP_online'] + this.DxCMP_online = window['DxCMP_online']; } else { - this.getDicts('DianXin_CMP_online').then(response => { - window['DxCMP_online'] = response.data - this.DxCMP_online = window['DxCMP_online'] - }) + this.getDicts('DianXin_CMP_online').then((response) => { + window['DxCMP_online'] = response.data; + this.DxCMP_online = window['DxCMP_online']; + }); } //加载 起止条件查询类别 @@ -2277,137 +2836,137 @@ export default { window['StartAndEndOptions'] != null && window['StartAndEndOptions'] != '' ) { - this.StartAndEndOptions = window['StartAndEndOptions'] + this.StartAndEndOptions = window['StartAndEndOptions']; } else { - this.getDicts('yunze_card_StartAndEnd_type').then(response => { - window['StartAndEndOptions'] = response.data - this.StartAndEndOptions = window['StartAndEndOptions'] - }) + this.getDicts('yunze_card_StartAndEnd_type').then((response) => { + window['StartAndEndOptions'] = response.data; + this.StartAndEndOptions = window['StartAndEndOptions']; + }); } - this.getTreeselect() + this.getTreeselect(); if (str != null && str != '' && str.length > 0) { - var reg_1 = new RegExp('%2F', 'g') - var reg_2 = new RegExp(' ', 'g') - str = str.replace(reg_1, '/') //转义 / - str = str.replace(reg_2, '+') //转义 [ ] 》 + + var reg_1 = new RegExp('%2F', 'g'); + var reg_2 = new RegExp(' ', 'g'); + str = str.replace(reg_1, '/'); //转义 / + str = str.replace(reg_2, '+'); //转义 [ ] 》 + - let jsonobj = JSON.parse(tools.Decrypt(str)) + let jsonobj = JSON.parse(tools.Decrypt(str)); //console.log(jsonobj) if (jsonobj != null) { if (tools.Is_null(jsonobj.UpType)) { - this.queryParams.UpType = jsonobj.UpType - this.showSearch = true + this.queryParams.UpType = jsonobj.UpType; + this.showSearch = true; } if (tools.Is_null(jsonobj.type)) { - this.queryParams.type = jsonobj.type + this.queryParams.type = jsonobj.type; } if (tools.Is_null(jsonobj.value)) { - this.queryParams.value = jsonobj.value + this.queryParams.value = jsonobj.value; } if (tools.Is_null(jsonobj.timetype)) { - this.queryParams.timetype = jsonobj.timetype - this.showSearch = true + this.queryParams.timetype = jsonobj.timetype; + this.showSearch = true; } if (tools.Is_null(jsonobj.agent_id)) { - this.queryParams.agent_id = jsonobj.agent_id - this.showSearch = true + this.queryParams.agent_id = jsonobj.agent_id; + this.showSearch = true; } if (tools.Is_null(jsonobj.is_pool)) { - this.queryParams.is_pool = jsonobj.is_pool - this.showSearch = true + this.queryParams.is_pool = jsonobj.is_pool; + this.showSearch = true; } if (tools.Is_null(jsonobj.pool_id)) { - this.queryParams.pool_id = jsonobj.pool_id - this.showSearch = true + this.queryParams.pool_id = jsonobj.pool_id; + this.showSearch = true; } if ( jsonobj.channel_id != undefined && jsonobj.channel_id != null && jsonobj.channel_id.length > 0 ) { - this.queryParams.channel_id = jsonobj.channel_id - this.showSearch = true + this.queryParams.channel_id = jsonobj.channel_id; + this.showSearch = true; } if (tools.Is_null(jsonobj.del_flag)) { - this.queryParams.del_flag = jsonobj.del_flag - this.showSearch = true + this.queryParams.del_flag = jsonobj.del_flag; + this.showSearch = true; } if (tools.Is_null(jsonobj.status_id)) { - this.queryParams.status_id = jsonobj.status_id - this.showSearch = true + this.queryParams.status_id = jsonobj.status_id; + this.showSearch = true; } if ( jsonobj.package_id != undefined && jsonobj.package_id != null && jsonobj.package_id.length > 0 ) { - this.queryParams.package_id = jsonobj.package_id - this.showSearch = true + this.queryParams.package_id = jsonobj.package_id; + this.showSearch = true; } if (tools.Is_null(jsonobj.StartAndEndtype)) { - this.queryParams.StartAndEndtype = jsonobj.StartAndEndtype - this.showSearch = true + this.queryParams.StartAndEndtype = jsonobj.StartAndEndtype; + this.showSearch = true; } if (tools.Is_null(jsonobj.StartValue)) { - this.queryParams.StartValue = jsonobj.StartValue - this.showSearch = true + this.queryParams.StartValue = jsonobj.StartValue; + this.showSearch = true; } if (tools.Is_null(jsonobj.EndValue)) { - this.queryParams.EndValue = jsonobj.EndValue - this.showSearch = true + this.queryParams.EndValue = jsonobj.EndValue; + this.showSearch = true; } if ( jsonobj.cd_operator_type != undefined && jsonobj.cd_operator_type != null && jsonobj.cd_operator_type.length > 0 ) { - this.queryParams.cd_operator_type = jsonobj.cd_operator_type - this.showSearch = true + this.queryParams.cd_operator_type = jsonobj.cd_operator_type; + this.showSearch = true; } if (tools.Is_null(jsonobj.cardNumber)) { - this.queryParams.cardNumber = jsonobj.cardNumber - this.showSearch = true + this.queryParams.cardNumber = jsonobj.cardNumber; + this.showSearch = true; } if ( jsonobj.UpArr != undefined && jsonobj.UpArr != null && jsonobj.UpArr.length > 0 ) { - this.queryParams.UpArr = jsonobj.UpArr - this.showSearch = true + this.queryParams.UpArr = jsonobj.UpArr; + this.showSearch = true; } if (tools.Is_null(jsonobj.rat)) { - this.queryParams.rat = jsonobj.rat - this.showSearch = true + this.queryParams.rat = jsonobj.rat; + this.showSearch = true; } if (tools.Is_null(jsonobj.customize_grouping)) { - this.queryParams.customize_grouping = jsonobj.customize_grouping - this.showSearch = true + this.queryParams.customize_grouping = jsonobj.customize_grouping; + this.showSearch = true; } if (tools.Is_null(jsonobj.deliver_date)) { - this.queryParams.deliver_date = jsonobj.deliver_date - this.showSearch = true + this.queryParams.deliver_date = jsonobj.deliver_date; + this.showSearch = true; } if (tools.Is_null(jsonobj.status_ShowId)) { - this.queryParams.status_ShowId = jsonobj.status_ShowId - this.showSearch = true + this.queryParams.status_ShowId = jsonobj.status_ShowId; + this.showSearch = true; } if (tools.Is_null(jsonobj.dimensionField)) { - this.queryParams.dimensionField = jsonobj.dimensionField - this.showSearch = true + this.queryParams.dimensionField = jsonobj.dimensionField; + this.showSearch = true; } if (tools.Is_null(jsonobj.dimensionType)) { - this.queryParams.dimensionType = jsonobj.dimensionType - this.showSearch = true + this.queryParams.dimensionType = jsonobj.dimensionType; + this.showSearch = true; } if (tools.Is_null(jsonobj.dimensionValue)) { - this.queryParams.dimensionValue = jsonobj.dimensionValue - this.showSearch = true + this.queryParams.dimensionValue = jsonobj.dimensionValue; + this.showSearch = true; } if (tools.Is_null(jsonobj.exceedsThreshold)) { - this.queryParams.exceedsThreshold = jsonobj.exceedsThreshold - this.showSearch = true + this.queryParams.exceedsThreshold = jsonobj.exceedsThreshold; + this.showSearch = true; } if ( @@ -2415,8 +2974,8 @@ export default { jsonobj.staTime != null && jsonobj.staTime.length > 0 ) { - this.selTime[0] = jsonobj.staTime - this.selTime[1] = jsonobj.endTime + this.selTime[0] = jsonobj.staTime; + this.selTime[1] = jsonobj.endTime; } //加 if判断 是否获取到了 树形空间的 @@ -2425,12 +2984,12 @@ export default { jsonobj.trreAgent_id != null && jsonobj.trreAgent_id.length > 0 ) { - this.queryParams.agent_id = jsonobj.trreAgent_id + this.queryParams.agent_id = jsonobj.trreAgent_id; //console.log(this.queryParams) - this.deptCheckStrictly = false + this.deptCheckStrictly = false; this.$nextTick(() => { - this.$refs.dept.setCheckedKeys(jsonobj.trreAgent_id) - }) + this.$refs.dept.setCheckedKeys(jsonobj.trreAgent_id); + }); } // 把传过来的值放入到新的数组 if ( @@ -2438,12 +2997,12 @@ export default { jsonobj.cArr != null && jsonobj.cArr.length > 0 ) { - let cArrId = [] + let cArrId = []; for (let i = 0; i < jsonobj.cArr.length; i++) { - let obj = jsonobj.cArr[i] - cArrId.push(Number(obj)) + let obj = jsonobj.cArr[i]; + cArrId.push(Number(obj)); } - this.queryParams.channel_id = cArrId + this.queryParams.channel_id = cArrId; } /* if(jsonobj.exceedsThreshold!=undefined && jsonobj.exceedsThreshold!=null && jsonobj.exceedsThreshold.length>0){ this.loadexceedsThresholdBoolShow = false; @@ -2452,10 +3011,10 @@ export default { }*/ } - this.getList() + this.getList(); // this.loadexceedsThresholdBoolShow = true; } else { - this.getList() + this.getList(); } }, @@ -2463,72 +3022,191 @@ export default { switchMode() { //切换搜索方式 - let sw = this.switch + let sw = this.switch; if (sw == true) { - this.switch = false + this.switch = false; } if (sw != true) { - this.switch = true + this.switch = true; } }, reDiaLogFun() { - this.$refs.tree.setCheckedKeys([]) + this.$refs.tree.setCheckedKeys([]); + }, + updatePeriodic() { + this.updateOthers = true; + }, + updateChangeDate(){ + this.changeDate = true; + }, + //TODO 文本域提交申请 + subTextarea() { + this.submitFileFormBtn = false; // 禁用提交按钮 + let _this = this; + if ( + tools.VerificationsText(_this, this.level, '请输入阈值!') == true && + tools.VerificationsText(_this, this.isStopNetwork, '请输入开关状态!') == + true + ) { + let rMap = tools.textareaGetNotRepeating(this.iccidStr); // 调用工具函数获取非重复ICCID的映射 + // 获取非重复的ICCID数组 + let iccidArr = rMap.rArr; + let repeatCount = rMap.repeatCount; // 获取重复ICCID的数量 + + // 显示重复号码的提示信息 + if (repeatCount > 0) { + tools.open(_this, '已过滤重复号码 [ ' + repeatCount + ' ] 条!'); + } + + // 检查iccidArr是否为非空数组且长度大于0 + if (iccidArr && iccidArr.length > 0) { + // 进一步检查iccidArr的长度是否小于等于100 + if (iccidArr.length <= 100) { + // 如果长度合适,更新查询参数 + let map = _this.queryParams; + map.level = this.level; + map.isStopNetwork = this.isStopNetwork; + map.iccidArr = iccidArr; + let Pwd_Str = tools.encrypt(JSON.stringify(map)); + cardNetWorkStop(Pwd_Str).then((response) => { + this.BROneLoading = false; + if (response.code == 200) { + this.msgSuccess(response.msg); + } else { + this.msgError(response.msg); + } + this.submitFileFormBtn = true; + }); + } else { + this.msgError('ICCID数量超过限制(最多100条)!'); + } + } else { + this.msgError('请输入所属ICCID卡号!'); + } + } }, //加入待续费 loadToBeRenewed() { - let _this = this - _this.selIccid = _this.$refs.multipleTable.selection + let _this = this; + _this.selIccid = _this.$refs.multipleTable.selection; if (_this.selIccid.length > 0) { - let addArr = [] - let repeatArr = [] - let addCount = 0 - let nullPackgeCount = 0 //未划分资费组卡号 + let addArr = []; + let repeatArr = []; + let addCount = 0; + let nullPackgeCount = 0; //未划分资费组卡号 for (let i = 0; i < _this.selIccid.length; i++) { - let row = _this.selIccid[i] + let row = _this.selIccid[i]; if ( !tools.VerificationValIsArray(_this.toBeRenewedICCIDArr, row.iccid) ) { if (tools.Is_null(row.package_id)) { - _this.toBeRenewedICCIDArr.push(row.iccid) - _this.toBeRenewedArr.push(row) // 待续费数组 - addCount += 1 + _this.toBeRenewedICCIDArr.push(row.iccid); + _this.toBeRenewedArr.push(row); // 待续费数组 + addCount += 1; } else { - nullPackgeCount += 1 + nullPackgeCount += 1; } } else { - repeatArr.push(row.iccid) + repeatArr.push(row.iccid); } } - let rMsg = '' + let rMsg = ''; if (repeatArr.length > 0) { - rMsg += ' 重复号码过滤 [' + repeatArr.length + '] 条!!!' + rMsg += ' 重复号码过滤 [' + repeatArr.length + '] 条!!!'; } if (nullPackgeCount > 0) { - rMsg += ' 已过滤未划分资费组 [' + nullPackgeCount + '] 条!!!' + rMsg += ' 已过滤未划分资费组 [' + nullPackgeCount + '] 条!!!'; } if (addCount > 0) { - _this.toBeRenewedCount = _this.toBeRenewedICCIDArr.length // 待续费数组长度 - rMsg += ' 已加入待续费[' + addCount + ']条!' - this.msgSuccess(rMsg) + _this.toBeRenewedCount = _this.toBeRenewedICCIDArr.length; // 待续费数组长度 + rMsg += ' 已加入待续费[' + addCount + ']条!'; + this.msgSuccess(rMsg); } else { - this.msgError(rMsg) + this.msgError(rMsg); } } else { - tools.open(_this, '请勾选需要操作的卡号!') + tools.open(_this, '请勾选需要操作的卡号!'); } }, + /** 下载模板操作 */ + importTemplate() { + this.downloadConversion('/getcsv/ImportCardSave.cvs'); + }, + importChangeDate() { + this.downloadConversion('/getcsv/importChangeDate.cvs'); + }, + importChangeOther() { + this.downloadConversion('/getcsv/importChangeOther.cvs'); + }, + importNetWorkTemplate() { + this.downloadConversion('/getcsv/importStopNetWork.cvs'); + }, + importCardSel() { + this.downloadConversion('/getcsv/ImportCardSel.cvs'); + }, + // 提交上传文件 + submitFileForm() { + this.updateOthers = false; + this.changeDate=false; + this.submitFileFormBtn = false; + this.$refs.upload.submit(); + }, + handleCancel() { + // 直接关闭弹框,不需要询问 + this.dialogVisible = false; + }, + downloadConversion(path) { + let map = {}; + map.path = path; + map.token = getToken(); + let Pwd_Str = tools.encrypt(JSON.stringify(map)); + //console.log(map); + window.open( + process.env.VUE_APP_BASE_API + + '/yunze/ExecutionTask/downloadConversion?Pstr=' + + Pwd_Str, + '_blank' + ); + }, + //同步用量和状态 + ConsumptionAndState() { + this.PublicMethod(); + let _this = this; + let title = ''; + if (_this.selIccid.length > 0) { + _this + .$confirm( + '批量【同步用量和状态】-->卡信息 [' + + _this.Operation.iccids.length + + '] 张, ' + + title + + '是否继续?', + '提示', + { + type: 'warning' + } + ) + .then(() => { + //console.log("upd"); + console.log(_this.Operation); + _this.ConsumptionAndStateArrs(); + }); + } else { + tools.open(_this, '请勾选需要同步用量和状态的卡号!'); + } + }, //查看待续费 ShowToBeRenewed() { if (this.toBeRenewedICCIDArr.length > 0) { - this.BeRenewedexecute = false - this.show_BeRenewed = true + this.BeRenewedexecute = false; + this.show_BeRenewed = true; } else { - this.msgError('请先勾选需要操作的卡号!') + this.msgError('请先勾选需要操作的卡号!'); } }, @@ -2536,55 +3214,54 @@ export default { selTypChange(data) { switch (data) { case '1': - this.selValueplaceholder = 'MSISDN/ICCID/IMSI/虚拟编号' - break + this.selValueplaceholder = 'MSISDN/ICCID/IMSI/虚拟编号'; + break; case '2': - this.selValueplaceholder = '备注内容' - break + this.selValueplaceholder = '备注内容'; + break; case '3': - this.selValueplaceholder = 'IMEI设备号' - break + this.selValueplaceholder = 'IMEI设备号'; + break; } }, - //通道选择后加载出对应的资费计划 TariffId() { - let isSel = this.queryParams.package_id.length //获取 是否已选择 + let isSel = this.queryParams.package_id.length; //获取 是否已选择 // console.log(index) if (isSel == 0) { - let ischannelSel = this.queryParams.channel_id.length //获取 是否已选择 + let ischannelSel = this.queryParams.channel_id.length; //获取 是否已选择 if (ischannelSel == 1) { // 通道长度 == 1 加载 - let map = {} - map.channel_id = this.queryParams.channel_id + let map = {}; + map.channel_id = this.queryParams.channel_id; // console.log(map) - let Pwd_Str = tools.encrypt(JSON.stringify(map)) - channelName(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) + let Pwd_Str = tools.encrypt(JSON.stringify(map)); + channelName(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); // console.log(jsonobj); if (jsonobj.code == 200) { // console.log(jsonobj.Data) if (jsonobj.Data.length > 0) { - this.packageOptions_change = [] + this.packageOptions_change = []; for (let i = 0; i < jsonobj.Data.length; i++) { - let obj = jsonobj.Data[i] - for (let j = 0; j < window["packageOptions"].length; j++) { - let cObj = window['packageOptions'][j] + let obj = jsonobj.Data[i]; + for (let j = 0; j < window['packageOptions'].length; j++) { + let cObj = window['packageOptions'][j]; // console.log(cObj) if (obj.package_id == cObj.package_id) { - this.packageOptions_change.push(cObj) + this.packageOptions_change.push(cObj); } } } } else { - this.packageOptions_change = [] + this.packageOptions_change = []; } } else { - this.packageOptions_change = [] + this.packageOptions_change = []; } - }) + }); } else if (ischannelSel == 0) { - this.packageOptions_change = window['packageOptions'] + this.packageOptions_change = window['packageOptions']; } } }, @@ -2594,61 +3271,61 @@ export default { if (this.internalBool) { //console.log( this.findCr_RouteOptions_change) //console.log(this.RouteOptions_change) - let isSel = this.queryParams.channel_id.length //获取 是否已选择 + let isSel = this.queryParams.channel_id.length; //获取 是否已选择 //console.log(isSel) if (isSel == 0) { - let ispackageSel = this.queryParams.cd_operator_type.length //获取 资费组长度 + let ispackageSel = this.queryParams.cd_operator_type.length; //获取 资费组长度 if (ispackageSel == 1) { - let map = {} + let map = {}; // console.log(this.queryParams) - map.cd_operator_type = this.queryParams.cd_operator_type + map.cd_operator_type = this.queryParams.cd_operator_type; // console.log(map) - let Pwd_Str = tools.encrypt(JSON.stringify(map)) - operatorName(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) + let Pwd_Str = tools.encrypt(JSON.stringify(map)); + operatorName(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); // console.log(jsonobj); if (jsonobj.code == 200) { // console.log(jsonobj.Data) if (jsonobj.Data.length > 0) { - this.findCr_RouteOptions_change = [] - this.RouteOptions_change = [] + this.findCr_RouteOptions_change = []; + this.RouteOptions_change = []; for (let i = 0; i < jsonobj.Data.length; i++) { - let obj = jsonobj.Data[i] + let obj = jsonobj.Data[i]; if (jsonobj.deptId == '100') { for ( let j = 0; - j < window["findCr_RouteOptions"].length; + j < window['findCr_RouteOptions'].length; j++ ) { - let cObj = window['findCr_RouteOptions'][j] + let cObj = window['findCr_RouteOptions'][j]; if (obj.cd_id == cObj.dictValue) { - this.findCr_RouteOptions_change.push(cObj) + this.findCr_RouteOptions_change.push(cObj); } } } else { - for (let j = 0; j < window["RouteOptions"].length; j++) { - let cObj = window['RouteOptions'][j] + for (let j = 0; j < window['RouteOptions'].length; j++) { + let cObj = window['RouteOptions'][j]; if (obj.cd_id == cObj.cd_id) { - this.RouteOptions_change.push(cObj) + this.RouteOptions_change.push(cObj); } } } } } else { - this.findCr_RouteOptions_change = [] - this.RouteOptions_change = [] + this.findCr_RouteOptions_change = []; + this.RouteOptions_change = []; } } else { - this.findCr_RouteOptions_change = [] - this.RouteOptions_change = [] + this.findCr_RouteOptions_change = []; + this.RouteOptions_change = []; } - }) + }); } else if (ispackageSel == 0) { if (this.internalBool) { - this.findCr_RouteOptions_change = window['findCr_RouteOptions'] + this.findCr_RouteOptions_change = window['findCr_RouteOptions']; } else { - this.RouteOptions_change = window['RouteOptions_change'] + this.RouteOptions_change = window['RouteOptions_change']; } } } @@ -2659,82 +3336,80 @@ export default { Passageway() { if (this.internalBool) { // this.$forceUpdate() - let isSel = this.queryParams.channel_id.length //获取 是否已选择 + let isSel = this.queryParams.channel_id.length; //获取 是否已选择 // console.log(index) if (isSel == 0) { - let ispackageSel = this.queryParams.package_id.length //获取 资费组长度 + let ispackageSel = this.queryParams.package_id.length; //获取 资费组长度 if (ispackageSel == 1) { - let map = {} + let map = {}; // console.log(this.queryParams) - map.package_id = this.queryParams.package_id + map.package_id = this.queryParams.package_id; // console.log(map) - let Pwd_Str = tools.encrypt(JSON.stringify(map)) - packageName(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) + let Pwd_Str = tools.encrypt(JSON.stringify(map)); + packageName(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); // console.log(jsonobj); if (jsonobj.code == 200) { // console.log(jsonobj.Data) if (jsonobj.Data.length > 0) { - this.findCr_RouteOptions_change = [] - this.RouteOptions_change = [] + this.findCr_RouteOptions_change = []; + this.RouteOptions_change = []; for (let i = 0; i < jsonobj.Data.length; i++) { - let obj = jsonobj.Data[i] + let obj = jsonobj.Data[i]; if (jsonobj.deptId == '100') { for ( let j = 0; - j < window["findCr_RouteOptions"].length; + j < window['findCr_RouteOptions'].length; j++ ) { - let cObj = window['findCr_RouteOptions'][j] + let cObj = window['findCr_RouteOptions'][j]; if (obj.cd_id == cObj.dictValue) { - this.findCr_RouteOptions_change.push(cObj) + this.findCr_RouteOptions_change.push(cObj); } } } else { - for (let j = 0; j < window["RouteOptions"].length; j++) { - let cObj = window['RouteOptions'][j] + for (let j = 0; j < window['RouteOptions'].length; j++) { + let cObj = window['RouteOptions'][j]; if (obj.cd_id == cObj.cd_id) { - this.RouteOptions_change.push(cObj) + this.RouteOptions_change.push(cObj); } } } } } else { - this.findCr_RouteOptions_change = [] - this.RouteOptions_change = [] + this.findCr_RouteOptions_change = []; + this.RouteOptions_change = []; } } else { - this.findCr_RouteOptions_change = [] - this.RouteOptions_change = [] + this.findCr_RouteOptions_change = []; + this.RouteOptions_change = []; } - }) + }); } else if (ispackageSel == 0) { if (this.internalBool) { - this.findCr_RouteOptions_change = window['findCr_RouteOptions'] + this.findCr_RouteOptions_change = window['findCr_RouteOptions']; } else { - this.RouteOptions_change = window['RouteOptions_change'] + this.RouteOptions_change = window['RouteOptions_change']; } } } } }, getUser() { - getUserProfile().then(response => { + getUserProfile().then((response) => { this.user = response.data; if (this.user.deptId == '304' || this.user.deptId == '1173') { this.showImages = false; } else { this.showImages = true; - } this.roleGroup = response.roleGroup; this.postGroup = response.postGroup; }); }, //标签页 - handleClick(tab, event) { - }, + handleClick(tab, event) {}, //已达量停机阈值 变更 changeExceedsThreshold() { @@ -2746,41 +3421,41 @@ export default { //console.log(obj); switch (Key) { case 'SetBriefEditexecute': - this.BriefEditexecute = obj //设置 编辑 是否已经加载 [提供给子组件使用] - break + this.BriefEditexecute = obj; //设置 编辑 是否已经加载 [提供给子组件使用] + break; case 'SetDetailsEditexecute': - this.DetailsEditexecute = obj //设置 编辑 是否已经加载 [提供给子组件使用] - break + this.DetailsEditexecute = obj; //设置 编辑 是否已经加载 [提供给子组件使用] + break; case 'Setshow_ds': - this.show_ds = obj // 设置 drawer - break + this.show_ds = obj; // 设置 drawer + break; case 'SetqueryParams': - this.queryParams = obj // 设置 drawer - break + this.queryParams = obj; // 设置 drawer + break; case 'SetSel': - this.sel = obj // 设置 drawer - break + this.sel = obj; // 设置 drawer + break; case 'SetBeRenewedexecute': - this.BeRenewedexecute = obj // 设置 是否已经加载 [提供给子组件使用] - break + this.BeRenewedexecute = obj; // 设置 是否已经加载 [提供给子组件使用] + break; case 'SetToBeRenewedCount': - this.toBeRenewedCount = obj // 设置 待续费总数 [提供给子组件使用] - break + this.toBeRenewedCount = obj; // 设置 待续费总数 [提供给子组件使用] + break; case 'SetToBeRenewedArr': - this.toBeRenewedArr = obj // 设置 待续费数组 [提供给子组件使用] - break + this.toBeRenewedArr = obj; // 设置 待续费数组 [提供给子组件使用] + break; case 'SettoBeRenewedICCIDArr': - this.toBeRenewedICCIDArr = obj // 设置 待续费Vid数组 [提供给子组件使用] - break + this.toBeRenewedICCIDArr = obj; // 设置 待续费Vid数组 [提供给子组件使用] + break; case 'ToBrcloseAll': - this.show_BeRenewed = obj // 设置 待续费 是否显示 - break + this.show_BeRenewed = obj; // 设置 待续费 是否显示 + break; case 'SetTablefromPush': - this.tablefrom.push(obj) // 设置 卡详情 - break + this.tablefrom.push(obj); // 设置 卡详情 + break; case 'SetTablefromIMEI': - this.tablefrom[0].value4 = obj // 设置 卡详情 - break + this.tablefrom[0].value4 = obj; // 设置 卡详情 + break; } }, @@ -2832,10 +3507,10 @@ export default { // tree单选 treeNodeClick(data, checked) { - this.userArr = [] - const node = this.$refs.tree.getNode(data) + this.userArr = []; + const node = this.$refs.tree.getNode(data); //console.log(node) - const str = [] + const str = []; /*function filterName (node) { if (node) { if (node.parent) { @@ -2845,103 +3520,103 @@ export default { } }*/ // 获取当前选择的id在数组中的索引 - const indexs = this.selectList.indexOf(data.id) + const indexs = this.selectList.indexOf(data.id); // 如果不存在数组中,并且数组中已经有一个id并且checked为true的时候,代表不能再次选择。 if (indexs < 0 && this.selectList.length === 1 && checked) { - this.msgError('单选操作请勿多选!') + this.msgError('单选操作请勿多选!'); // 设置已选择的节点为false 很重要 - this.$refs.tree.setChecked(data, false) + this.$refs.tree.setChecked(data, false); } else if (this.selectList.length === 0 && checked) { // 发现数组为空 并且是已选择 // 防止数组有值,首先清空,再push - this.selectList = [] - this.formDivide.dept_id = '' - this.selectList.push(data.id) + this.selectList = []; + this.formDivide.dept_id = ''; + this.selectList.push(data.id); //filterName(node); //this.formDivide.dept_id = str.reverse().join('/'); //this.formDivide.dept_id = str[0]; - this.formDivide.dept_id = data.id - this.formDivide.dept_name = data.label + this.formDivide.dept_id = data.id; + this.formDivide.dept_name = data.label; //获取企业下用户 - this.userArr = [] - this.formDivide.user_id = null - let map = {} - map.dept_id = this.formDivide.dept_id - let Pwd_Str = tools.encrypt(JSON.stringify(map)) - findDeptUser(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) + this.userArr = []; + this.formDivide.user_id = null; + let map = {}; + map.dept_id = this.formDivide.dept_id; + let Pwd_Str = tools.encrypt(JSON.stringify(map)); + findDeptUser(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); //console.log(jsonobj); if (jsonobj.code == 200) { - this.userArr = jsonobj.Data + this.userArr = jsonobj.Data; } else { - this.msgError(jsonobj.msg) + this.msgError(jsonobj.msg); } - this.loading = false - }) + this.loading = false; + }); //console.log(this.formDivide.dept_id); } else if (indexs >= 0 && this.selectList.length === 1 && !checked) { // 再次直接进行赋值为空操作 - this.selectList = [] - this.formDivide.dept_id = '' + this.selectList = []; + this.formDivide.dept_id = ''; } }, SelectChange() { - this.getPwd_Str() + this.getPwd_Str(); //console.log("SelectChange"); }, // 加密数据 getPwd_Str() { - let Pwd_Str = tools.encrypt(JSON.stringify(this.queryParams)) - this.updatel.Pstr = Pwd_Str + let Pwd_Str = tools.encrypt(JSON.stringify(this.queryParams)); + this.updatel.Pstr = Pwd_Str; }, // 文件上传中处理 handleFileUploadProgress(event, file, fileList) { - this.updatel.isUploading = true + this.updatel.isUploading = true; }, //导入查询 handlenumberFileSuccess(response, file, fileList) { - let jsonobj = JSON.parse(tools.Decrypt(response.msg)) + let jsonobj = JSON.parse(tools.Decrypt(response.msg)); //console.log(jsonobj.Pmap) if (response.code == 200) { - this.cardList = jsonobj.Data - this.total = jsonobj.Pu.rowCount - this.queryParams = jsonobj.Pmap + this.cardList = jsonobj.Data; + this.total = jsonobj.Pu.rowCount; + this.queryParams = jsonobj.Pmap; } else { - this.msgError(jsonobj.msg) + this.msgError(jsonobj.msg); } - this.updatel.Number = false - this.updatel.isUploading = false - this.$refs.number.clearFiles() - this.submitFileFormBtn = true + this.updatel.Number = false; + this.updatel.isUploading = false; + this.$refs.number.clearFiles(); + this.submitFileFormBtn = true; }, // 文件上传成功处理 handleFileSuccess(response, file, fileList) { - this.upload.open = false - this.upload.isUploading = false - this.$refs.upload.clearFiles() - this.$alert(response.msg, '导入结果', {dangerouslyUseHTMLString: true}) - this.getList() + this.upload.open = false; + this.upload.isUploading = false; + this.$refs.upload.clearFiles(); + this.$alert(response.msg, '导入结果', { dangerouslyUseHTMLString: true }); + this.getList(); }, // 提交上传文件 submitNumber() { - let _this = this - this.SelectChange() - this.submitFileFormBtn = false + let _this = this; + this.SelectChange(); + this.submitFileFormBtn = false; if (tools.Is_null(this.queryParams.UpType)) { - this.titleUp(_this) + this.titleUp(_this); } else { - this.submitFileFormBtn = true - tools.open(this, '请选择需要设置更新的属性条件!') + this.submitFileFormBtn = true; + tools.open(this, '请选择需要设置更新的属性条件!'); } }, titleUp(_this) { - let msg = '' + let msg = ''; if (tools.Is_null(_this.queryParams.UpType)) { msg += ' 导入查询 卡号类型 ' + @@ -2949,10 +3624,10 @@ export default { packageOptions, _this.queryParams.UpType ) + - ' ' + ' '; } - msg += ' 是否确定以上操作 ? ' + msg += ' 是否确定以上操作 ? '; tools.openAsk( this, 'warning', @@ -2961,23 +3636,23 @@ export default { _this, this.FalseFun, null - ) + ); }, uploadUp(_this) { // console.log("number") - _this.$refs.number.submit() + _this.$refs.number.submit(); }, FalseFun(Pwd_Str) { - this.submitFileFormBtn = true + this.submitFileFormBtn = true; }, // 树权限(展开/折叠) handleCheckedTreeExpand(value, type) { if (type == 'dept') { - let treeList = this.deptOptions + let treeList = this.deptOptions; for (let i = 0; i < treeList.length; i++) { - this.$refs.dept.store.nodesMap[treeList[i].id].expanded = value + this.$refs.dept.store.nodesMap[treeList[i].id].expanded = value; } } }, @@ -2985,55 +3660,55 @@ export default { handleCheckedTreeNodeAll(value, type) { if (type == 'dept') { //console.log(value); - this.$refs.dept.setCheckedNodes(value ? this.deptOptions : []) + this.$refs.dept.setCheckedNodes(value ? this.deptOptions : []); } }, // 树权限(父子联动) handleCheckedTreeConnect(value, type) { if (type == 'menu') { - this.menuCheckStrictly = value ? true : false + this.menuCheckStrictly = value ? true : false; } else if (type == 'dept') { - this.$refs.dept.setCheckedNodes(false ? this.deptOptions : []) - this.deptCheckStrictly = value ? true : false + this.$refs.dept.setCheckedNodes(false ? this.deptOptions : []); + this.deptCheckStrictly = value ? true : false; } }, /*加载当前 套餐包*/ loadCar(item, index, NotExpired) { // - let _this = this + let _this = this; // console.log(item); // console.log(index); - let map = {} - map.iccid = this.sel.iccid - map.$index = index1111 - map.agent_id = this.sel.agent_id - map.package_id = this.sel.package_id + let map = {}; + map.iccid = this.sel.iccid; + map.$index = index1111; + map.agent_id = this.sel.agent_id; + map.package_id = this.sel.package_id; map.NotExpired = - NotExpired != undefined && NotExpired != null ? '0' : '1' + NotExpired != undefined && NotExpired != null ? '0' : '1'; // console.log(map); - _this.SetMealImport = false - _this.queryflow(map) + _this.SetMealImport = false; + _this.queryflow(map); }, queryflow(map) { //查询现有流量包 - let _this = this - _this.FlowData = [] //重置 + let _this = this; + _this.FlowData = []; //重置 //console.log(map); - let Pwd_Str = tools.encrypt(JSON.stringify(map)) + let Pwd_Str = tools.encrypt(JSON.stringify(map)); //console.log(Pwd_Str); - queryflowData(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) + queryflowData(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); //console.log(jsonobj); if (jsonobj.code == '200') { //tools.open(_this, response.data.data); - let arr = jsonobj.Data + let arr = jsonobj.Data; var new_map = {}, - dest = [] + dest = []; for (var i = 0; i < arr.length; i++) { - var ai = arr[i] + var ai = arr[i]; if (!new_map[ai.ord_no]) { //依赖分组字段可自行更改! dest.push({ @@ -3048,68 +3723,68 @@ export default { true_flow: ai.true_flow, error_flow: ai.error_flow, data: [ai] - }) - new_map[ai.ord_no] = ai //依赖分组字段可自行更改! + }); + new_map[ai.ord_no] = ai; //依赖分组字段可自行更改! } else { for (var j = 0; j < dest.length; j++) { - var dj = dest[j] + var dj = dest[j]; if (dj.ord_no == ai.ord_no) { //依赖分组字段可自行更改! - dj.data.push(ai) - break + dj.data.push(ai); + break; } } } } //console.log(dest); - _this.FlowData = dest - _this.data = dest + _this.FlowData = dest; + _this.data = dest; //console.log(_this.selIccid); - _this.selIccid[0].iccid = map.iccid - _this.selIccid[0].FlowData = dest - _this.SetMealImport = true + _this.selIccid[0].iccid = map.iccid; + _this.selIccid[0].FlowData = dest; + _this.SetMealImport = true; //window[map.iccid] = _this.FlowData; - this.cardPackageTitle = '资费信息 (已同步数据)' + this.cardPackageTitle = '资费信息 (已同步数据)'; } else { //tools.open(_this, jsonobj.msg); - tools.MessageShow(_this, jsonobj.msg, 'error') + tools.MessageShow(_this, jsonobj.msg, 'error'); } - }) + }); }, loadCardGrouping() { - this.CardGrouping = [] - let map = {} + this.CardGrouping = []; + let map = {}; if ( (this.$refs.dept != undefined) & (this.$refs.dept != null) & (this.$refs.dept != 'undefined') ) { if (this.$refs.dept.getCheckedKeys().length > 0) { - map.agent_id = this.$refs.dept.getCheckedKeys() + map.agent_id = this.$refs.dept.getCheckedKeys(); } } - let Pwd_Str = tools.encrypt(JSON.stringify(map)) - getCardGrouping(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) + let Pwd_Str = tools.encrypt(JSON.stringify(map)); + getCardGrouping(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); if (jsonobj.code == 200) { - this.CardGrouping = jsonobj.Data + this.CardGrouping = jsonobj.Data; } else { - this.msgError(jsonobj.msg) + this.msgError(jsonobj.msg); } - this.loading = false - }) + this.loading = false; + }); }, /*获取查询参数*/ getParams() { - this.queryParams.staTime = null - this.queryParams.endTime = null + this.queryParams.staTime = null; + this.queryParams.endTime = null; //this.queryParams.agent_id = null; if (tools.Is_null(this.queryParams.timetype) && this.selTime != null) { //console.log(this.selTime); - this.queryParams.staTime = this.selTime[0] - this.queryParams.endTime = this.selTime[1] + this.queryParams.staTime = this.selTime[0]; + this.queryParams.endTime = this.selTime[1]; } if ( (this.$refs.dept != undefined) & @@ -3118,24 +3793,24 @@ export default { ) { //console.log(this.$refs.dept.getCheckedKeys()); if (this.$refs.dept.getCheckedKeys().length > 0) { - this.queryParams.agent_id = this.$refs.dept.getCheckedKeys() + this.queryParams.agent_id = this.$refs.dept.getCheckedKeys(); } } - this.queryParams.batch_query_arr = [] + this.queryParams.batch_query_arr = []; if (this.switch == false) { if ( (this.queryParams.Bcvalue != '') & (this.queryParams.Bcvalue != null) ) { - let rMap = tools.textareaGetNotRepeating(this.queryParams.Bcvalue) - let repeatCount = rMap.repeatCount + let rMap = tools.textareaGetNotRepeating(this.queryParams.Bcvalue); + let repeatCount = rMap.repeatCount; if (repeatCount > 0) { - tools.open(this, '已过滤重复号码 [ ' + repeatCount + ' ] 条!') + tools.open(this, '已过滤重复号码 [ ' + repeatCount + ' ] 条!'); } - this.queryParams.batch_query_arr = rMap.rArr - this.queryParams.type = null - this.queryParams.value = null + this.queryParams.batch_query_arr = rMap.rArr; + this.queryParams.type = null; + this.queryParams.value = null; } } @@ -3143,31 +3818,30 @@ export default { this.queryParams.batch_query_arr ) ? this.queryParams.batch_query_arr - : null + : null; this.queryParams.StartValue = tools.Is_null(this.queryParams.StartValue) ? this.queryParams.StartValue - : null + : null; this.queryParams.EndValue = tools.Is_null(this.queryParams.EndValue) ? this.queryParams.EndValue - : null + : null; this.queryParams.cardSort = tools.Is_null(this.cardSort) ? this.cardSort - : null + : null; this.queryParams.cardSortValue = tools.Is_null(this.cardSortValue) ? this.cardSortValue - : null + : null; }, /** 查询列表 */ getList() { - this.loading = true - this.getParams() - let Pwd_Str = tools.encrypt(JSON.stringify(this.queryParams)) - listCard(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) - + this.loading = true; + this.getParams(); + let Pwd_Str = tools.encrypt(JSON.stringify(this.queryParams)); + listCard(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); if (jsonobj.code == 200) { - this.internalBool = jsonobj.Data.Pmap.is_Internal + this.internalBool = jsonobj.Data.Pmap.is_Internal; //加载 API通道名称 内部用 if (this.internalBool == true) { if ( @@ -3175,18 +3849,18 @@ export default { window['findCr_RouteOptions'] != null && window['findCr_RouteOptions'] != '' ) { - this.findCr_RouteOptions = window['findCr_RouteOptions'] + this.findCr_RouteOptions = window['findCr_RouteOptions']; this.findCr_RouteOptions_change = JSON.parse( JSON.stringify(window['findCr_RouteOptions']) - ) + ); } else { - findCr().then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) - window['findCr_RouteOptions'] = jsonobj.Data - this.findCr_RouteOptions = window['findCr_RouteOptions'] + findCr().then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); + window['findCr_RouteOptions'] = jsonobj.Data; + this.findCr_RouteOptions = window['findCr_RouteOptions']; this.findCr_RouteOptions_change = JSON.parse( JSON.stringify(window['findCr_RouteOptions']) - ) + ); if ( !tools.IsArrInside( this.findCr_RouteOptions, @@ -3197,104 +3871,105 @@ export default { this.findCr_RouteOptions.push({ cd_id: 'IsNull', cd_alias: '未划分通道' - }) + }); this.findCr_RouteOptions_change.push({ dictValue: 'IsNull', dictLabel: '未划分通道' - }) + }); } - }) + }); } } else { //部门树全选 //this.handleCheckedTreeNodeAll(true,'dept'); } - this.cardList = jsonobj.Data.Data - - console.log('getlist获取数据↓') - console.log(jsonobj.Data) - this.total = jsonobj.Data.Pu.rowCount + this.cardList = jsonobj.Data.Data; + console.log('getlist获取数据↓'); + console.log(jsonobj.Data); + this.total = jsonobj.Data.Pu.rowCount; } else { - this.msgError(jsonobj.msg) + this.msgError(jsonobj.msg); } - this.loading = false - }) - console.log('传往后端的参数↓') - console.log(this.queryParams) + this.loading = false; + }); + console.log('传往后端的参数↓'); + console.log(this.queryParams); }, /*代理查询拓展*/ agentShow() { - let _this = this - _this.option_show = !_this.option_show - _this.mainwidth = _this.option_show ? 20 : 24 + let _this = this; + _this.option_show = !_this.option_show; + _this.mainwidth = _this.option_show ? 20 : 24; }, /** 查询企业下拉树结构 */ getTreeselect() { - treeselect().then(response => { - this.deptOptions = response.data + treeselect().then((response) => { + this.deptOptions = response.data; //console.log(this.deptOptions) - }) + }); }, // 筛选节点 filterNode(value, data) { - if (!value) return true - return data.label.indexOf(value) !== -1 + if (!value) return true; + return data.label.indexOf(value) !== -1; }, // 节点单击事件 handleNodeClick(data) { - this.queryParams.agent_id = [data.id] - this.getList() + this.queryParams.agent_id = [data.id]; + this.getList(); }, // 取消按钮 cancel() { - this.open = false - this.fill = false + this.open = false; + this.fill = false; + this.updateOthers = false; + this.changeDate=false; // this.reset(); }, /** 搜索按钮操作 */ handleQuery() { - this.queryParams.page = 1 - this.getList() + this.queryParams.page = 1; + this.getList(); }, /**关闭按钮 */ Close() { - this.show_ds = false + this.show_ds = false; }, /** 重置按钮操作 */ resetQuery() { - this.queryParams = {} - this.queryParams.pageNum = 1 - this.queryParams.pageSize = 10 - this.selTime = null - this.handleQuery() + this.queryParams = {}; + this.queryParams.pageNum = 1; + this.queryParams.pageSize = 10; + this.selTime = null; + this.handleQuery(); }, // 多选框选中数据 handleSelectionChange(selection) { - console.log(selection) - this.showTotal = selection.length - this.queryParams.Bcvalue = selection.map(item => item.iccid).join(',') - console.log(this.queryParams.Bcvalue) + console.log(selection); + this.showTotal = selection.length; + this.queryParams.Bcvalue = selection.map((item) => item.iccid).join(','); + console.log(this.queryParams.Bcvalue); - this.ids = selection.map(item => item.userId) - console.log(this.ids) - this.single = selection.length != 1 - this.multiple = !selection.length - console.log(selection.length) + this.ids = selection.map((item) => item.userId); + console.log(this.ids); + this.single = selection.length != 1; + this.multiple = !selection.length; + console.log(selection.length); - this.openTotle = selection.length + this.openTotle = selection.length; }, /** 详情按钮操作 */ ViewDetails(row) { - const userId = row.userId - this.ifsel = true - this.BriefEditexecute = false - this.DetailsEditexecute = false - this.show_ds = true - this.tablefrom = [] //清空卡详情已加载过的数据 - this.sel.iccid = row.iccid + const userId = row.userId; + this.ifsel = true; + this.BriefEditexecute = false; + this.DetailsEditexecute = false; + this.show_ds = true; + this.tablefrom = []; //清空卡详情已加载过的数据 + this.sel.iccid = row.iccid; /* this.sel.agent_id = row.agent_id; this.sel.package_id = row.package_id; @@ -3321,35 +3996,35 @@ export default { /** 提交按钮 */ submitForm: function () { - this.$refs['form'].validate(valid => { + this.$refs['form'].validate((valid) => { if (valid) { if (this.form.userId != undefined) { - updateUser(this.form).then(response => { - this.msgSuccess('修改成功') - this.open = false - this.getList() - }) + updateUser(this.form).then((response) => { + this.msgSuccess('修改成功'); + this.open = false; + this.getList(); + }); } else { - addUser(this.form).then(response => { - this.msgSuccess('新增成功') - this.open = false - this.getList() - }) + addUser(this.form).then((response) => { + this.msgSuccess('新增成功'); + this.open = false; + this.getList(); + }); } } - }) + }); }, /** 导出按钮操作 */ handleExport() { - this.loading = true - this.getParams() - let Pwd_Str = tools.encrypt(JSON.stringify(this.queryParams)) - listCard(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) + this.loading = true; + this.getParams(); + let Pwd_Str = tools.encrypt(JSON.stringify(this.queryParams)); + listCard(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); // console.log(jsonobj); if (jsonobj.code == 200) { - this.internalBool = jsonobj.Data.Pmap.is_Internal + this.internalBool = jsonobj.Data.Pmap.is_Internal; /* this.setColumns();*/ //加载 API通道名称 内部用 if (this.internalBool == true) { @@ -3358,18 +4033,18 @@ export default { window['findCr_RouteOptions'] != null && window['findCr_RouteOptions'] != '' ) { - this.findCr_RouteOptions = window['findCr_RouteOptions'] + this.findCr_RouteOptions = window['findCr_RouteOptions']; this.findCr_RouteOptions_change = JSON.parse( JSON.stringify(window['findCr_RouteOptions']) - ) + ); } else { - findCr().then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) - window['findCr_RouteOptions'] = jsonobj.Data - this.findCr_RouteOptions = window['findCr_RouteOptions'] + findCr().then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); + window['findCr_RouteOptions'] = jsonobj.Data; + this.findCr_RouteOptions = window['findCr_RouteOptions']; this.findCr_RouteOptions_change = JSON.parse( JSON.stringify(window['findCr_RouteOptions']) - ) + ); if ( !tools.IsArrInside( this.findCr_RouteOptions, @@ -3380,17 +4055,17 @@ export default { this.findCr_RouteOptions.push({ cd_id: 'IsNull', cd_alias: '未划分通道' - }) + }); this.findCr_RouteOptions_change.push({ dictValue: 'IsNull', dictLabel: '未划分通道' - }) + }); } - }) + }); } } - this.cardList = jsonobj.Data.Data - this.total = jsonobj.Data.Pu.rowCount + this.cardList = jsonobj.Data.Data; + this.total = jsonobj.Data.Pu.rowCount; if (this.total > 5000) { //大于该值提示确认 【为防止筛选条件下卡号数据不一致先确定卡号总数】 @@ -3404,41 +4079,40 @@ export default { } ) .then(() => { - this.outCard() - }) - .catch(() => { + this.outCard(); }) + .catch(() => {}); } else { - this.outCard() + this.outCard(); } } else { - this.msgError(jsonobj.msg) + this.msgError(jsonobj.msg); } - this.loading = false - }) + this.loading = false; + }); }, outCard() { - this.getParams() - let Pwd_Str = tools.encrypt(JSON.stringify(this.queryParams)) - exportCard(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) + this.getParams(); + let Pwd_Str = tools.encrypt(JSON.stringify(this.queryParams)); + exportCard(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); //console.log(jsonobj); if (jsonobj.code == 200) { - this.msgSuccess(jsonobj.Data) + this.msgSuccess(jsonobj.Data); } else { let msg = jsonobj.Data != null && jsonobj.Data != '' ? jsonobj.Data - : jsonobj.msg - this.msgError(msg) + : jsonobj.msg; + this.msgError(msg); } - }) + }); }, /**划卡*/ handleDivide() { - this.Divide_show = true - this.vo = 0 + this.Divide_show = true; + this.vo = 0; //这里是将划卡弹出面板的现实打开,name在打开的时候将数据清空 /*this.formDivide.dept_id ='' ; this.formDivide.user_id ='' ;*/ @@ -3446,25 +4120,25 @@ export default { /**操作/划卡*/ handleDividebatch() { // this.PublicMethod(); - let _this = this - let title = '' - this.vo = 1 + let _this = this; + let title = ''; + this.vo = 1; if (_this.$refs.multipleTable.selection.length > 0) { - this.Divide_show = true + this.Divide_show = true; } else { - tools.open(_this, '请勾选需要划卡的卡号!') + tools.open(_this, '请勾选需要划卡的卡号!'); } }, /**每列操作/划卡*/ handleDivideRow(iccid) { - console.log(iccid) - let _this = this - let title = '' - this.vo = 2 - console.log(this.vo) + console.log(iccid); + let _this = this; + let title = ''; + this.vo = 2; + console.log(this.vo); - this.Divide_show = true - this.queryParams.Bcvalue = iccid + this.Divide_show = true; + this.queryParams.Bcvalue = iccid; }, /**保存划卡*/ Divide() { @@ -3486,19 +4160,19 @@ export default { //1.先按当期筛选条件查询出数据 询问是否保存 if (this.vo == 0) { - this.handleQuery() - let map = this.queryParams - console.log(map) + this.handleQuery(); + let map = this.queryParams; + console.log(map); let user_name = tools.getUserNamekeyValue( this.userArr, this.formDivide.user_id - ) - map.set_dept_id = this.formDivide.dept_id - map.set_user_id = this.formDivide.user_id - map.set_dept_name = this.formDivide.dept_name - map.set_user_name = user_name + ); + map.set_dept_id = this.formDivide.dept_id; + map.set_user_id = this.formDivide.user_id; + map.set_dept_name = this.formDivide.dept_name; + map.set_user_name = user_name; //console.log(map) - let Pwd_Str = tools.encrypt(JSON.stringify(map)) + let Pwd_Str = tools.encrypt(JSON.stringify(map)); tools.openAsk( this, @@ -3512,21 +4186,21 @@ export default { ' ] 吗?', this.DivideSave, Pwd_Str - ) + ); } else if (this.vo == 1) { - this.handleQuery() - let map = this.queryParams + this.handleQuery(); + let map = this.queryParams; // console.log(map) let user_name = tools.getUserNamekeyValue( this.userArr, this.formDivide.user_id - ) - map.set_dept_id = this.formDivide.dept_id - map.set_user_id = this.formDivide.user_id - map.set_dept_name = this.formDivide.dept_name - map.set_user_name = user_name + ); + map.set_dept_id = this.formDivide.dept_id; + map.set_user_id = this.formDivide.user_id; + map.set_dept_name = this.formDivide.dept_name; + map.set_user_name = user_name; // console.log(map); - let Pwd_Str = tools.encrypt(JSON.stringify(map)) + let Pwd_Str = tools.encrypt(JSON.stringify(map)); tools.openAsk( this, 'warning', @@ -3539,21 +4213,21 @@ export default { ' ] 吗?', this.DivideSave, Pwd_Str - ) + ); } else { // this.handleQuery(); - let map = this.queryParams - console.log(map) + let map = this.queryParams; + console.log(map); let user_name = tools.getUserNamekeyValue( this.userArr, this.formDivide.user_id - ) - map.set_dept_id = this.formDivide.dept_id - map.set_user_id = this.formDivide.user_id - map.set_dept_name = this.formDivide.dept_name - map.set_user_name = user_name - console.log(map) - let Pwd_Str = tools.encrypt(JSON.stringify(map)) + ); + map.set_dept_id = this.formDivide.dept_id; + map.set_user_id = this.formDivide.user_id; + map.set_dept_name = this.formDivide.dept_name; + map.set_user_name = user_name; + console.log(map); + let Pwd_Str = tools.encrypt(JSON.stringify(map)); tools.openAsk( this, 'warning', @@ -3564,7 +4238,7 @@ export default { ' ] 吗?', this.DivideSave, Pwd_Str - ) + ); } //2022年8月18日10:12:01 @@ -3573,187 +4247,187 @@ export default { }, //余额修改 updBalance(row) { - this.dialogBalance = true - this.balance.num = row.balance - this.balance.card = row.iccid + this.dialogBalance = true; + this.balance.num = row.balance; + this.balance.card = row.iccid; }, addAutoPolling(row) { //将卡添加至自动轮训表 - this.loading = true - let Pwd_Str = tools.encrypt(JSON.stringify(row)) - AutoPolling(Pwd_Str).then(res => { - this.loading = false - let jsonobj = JSON.parse(tools.Decrypt(res)) - this.msgSuccess(jsonobj.msg) - }) + this.loading = true; + let Pwd_Str = tools.encrypt(JSON.stringify(row)); + AutoPolling(Pwd_Str).then((res) => { + this.loading = false; + let jsonobj = JSON.parse(tools.Decrypt(res)); + this.msgSuccess(jsonobj.msg); + }); }, //查询历史用量卡板 historyUsed(row) { - this.loading = true + this.loading = true; - let Pwd_Str = tools.encrypt(JSON.stringify(row)) - showhistoryUsed(Pwd_Str).then(res => { - let jsonobj = JSON.parse(tools.Decrypt(res)) - console.log(jsonobj) + let Pwd_Str = tools.encrypt(JSON.stringify(row)); + showhistoryUsed(Pwd_Str).then((res) => { + let jsonobj = JSON.parse(tools.Decrypt(res)); + console.log(jsonobj); if (jsonobj.code == 200) { if (jsonobj.Data.rList != null) { //有数据 - this.showczcList = jsonobj.Data.rList - this.loading = false - this.showhistoryUsed = true + this.showczcList = jsonobj.Data.rList; + this.loading = false; + this.showhistoryUsed = true; } else { //没有数据 - this.loading = false - this.msgError('功能调用频繁请稍后重试!') + this.loading = false; + this.msgError('功能调用频繁请稍后重试!'); } } - }) + }); }, //余额修改提交那妞 buttonUpdBalance() { - let Pwd_Str = tools.encrypt(JSON.stringify(this.balance)) - console.log(Pwd_Str) - console.log(this.balance) - updBalance(Pwd_Str).then(res => { - let jsonobj = JSON.parse(tools.Decrypt(res)) - console.log(jsonobj) + let Pwd_Str = tools.encrypt(JSON.stringify(this.balance)); + console.log(Pwd_Str); + console.log(this.balance); + updBalance(Pwd_Str).then((res) => { + let jsonobj = JSON.parse(tools.Decrypt(res)); + console.log(jsonobj); if (jsonobj.code == 200) { - this.msgSuccess(jsonobj.msg) - this.getList() + this.msgSuccess(jsonobj.msg); + this.getList(); } else { - this.msgError('余额修改失败') + this.msgError('余额修改失败'); } - }) - this.dialogBalance = false + }); + this.dialogBalance = false; }, //同步卡状态 SynStatus(iccid) { - let map = {} - map.iccid = iccid - let Pwd_Str = tools.encrypt(JSON.stringify(map)) - SynCarStatus(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) + let map = {}; + map.iccid = iccid; + let Pwd_Str = tools.encrypt(JSON.stringify(map)); + SynCarStatus(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); //console.log(jsonobj); if (jsonobj.code == 200) { - this.msgSuccess(jsonobj.msg) - this.getList() + this.msgSuccess(jsonobj.msg); + this.getList(); } else { - this.msgError(jsonobj.msg) + this.msgError(jsonobj.msg); } - }) + }); }, //同步用量 SynFlow(iccid) { - this.loading = true - let map = {} - map.iccid = iccid - let Pwd_Str = tools.encrypt(JSON.stringify(map)) - SynCarFlow(Pwd_Str).then(response => { - this.loading = false - let jsonobj = JSON.parse(tools.Decrypt(response)) + this.loading = true; + let map = {}; + map.iccid = iccid; + let Pwd_Str = tools.encrypt(JSON.stringify(map)); + SynCarFlow(Pwd_Str).then((response) => { + this.loading = false; + let jsonobj = JSON.parse(tools.Decrypt(response)); //console.log(jsonobj); if (jsonobj.code == 200) { - this.msgSuccess(jsonobj.msg) - this.getList() + this.msgSuccess(jsonobj.msg); + this.getList(); } else { - this.msgError(jsonobj.msg) + this.msgError(jsonobj.msg); } - }) + }); }, // 单卡同步用量和状态 InfoFlow(iccid) { - let map = {} - map.iccid = iccid - let Pwd_Str = tools.encrypt(JSON.stringify(map)) - CardInfoFlow(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) + let map = {}; + map.iccid = iccid; + let Pwd_Str = tools.encrypt(JSON.stringify(map)); + CardInfoFlow(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); if (jsonobj.code == 200) { - this.msgSuccess(jsonobj.Data) - this.getList() + this.msgSuccess(jsonobj.Data); + this.getList(); } else { - this.msgError(jsonobj.msg) + this.msgError(jsonobj.msg); } - }) + }); }, // 单卡变更分组及备注 SynRemarks(row) { //console.log(row) - this.notfilledin = '单卡变更分组及备注' - this.fill = true - this.manyCard = false //控制分组及备注 - this.singleCard = true //控制分组及备注 - this.UpdInfo.iccids = row + this.notfilledin = '单卡变更分组及备注'; + this.fill = true; + this.manyCard = false; //控制分组及备注 + this.singleCard = true; //控制分组及备注 + this.UpdInfo.iccids = row; }, // 单卡灵活变更状态 InfoStatus(row) { - this.biange = '单卡灵活变更状态' - this.Flexible = true - this.FlexiblePy = false - this.singleCardSc = true - this.ParamsShowId.iccid = row - this.loadStatusFlexible() //加载 灵活变更状态 + this.biange = '单卡灵活变更状态'; + this.Flexible = true; + this.FlexiblePy = false; + this.singleCardSc = true; + this.ParamsShowId.iccid = row; + this.loadStatusFlexible(); //加载 灵活变更状态 // console.log(this.ParamsShowId.iccids = row) }, //智能诊断 SynCardDia(va) { this.sel.iccid = va; - this.$refs.goToDia.refData(this.sel.iccid) + this.$refs.goToDia.refData(this.sel.iccid); }, //同步激活时间 SynActivateDate(iccid, opType) { - this.loading = true - let map = {} - map.iccid = iccid - map.opType = opType - let Pwd_Str = tools.encrypt(JSON.stringify(map)) - SynCardActivateDate(Pwd_Str).then(response => { - this.loading = false - let jsonobj = JSON.parse(tools.Decrypt(response)) + this.loading = true; + let map = {}; + map.iccid = iccid; + map.opType = opType; + let Pwd_Str = tools.encrypt(JSON.stringify(map)); + SynCardActivateDate(Pwd_Str).then((response) => { + this.loading = false; + let jsonobj = JSON.parse(tools.Decrypt(response)); //console.log(jsonobj); if (jsonobj.code == 200) { - this.msgSuccess(jsonobj.msg) - this.getList() + this.msgSuccess(jsonobj.msg); + this.getList(); } else { - this.msgError(jsonobj.msg) + this.msgError(jsonobj.msg); } - }) + }); }, //机卡解绑 界面打开 CardBinding(iccid) { - this.CardBindingShow = true - this.CardBindingForm.iccid = iccid + this.CardBindingShow = true; + this.CardBindingForm.iccid = iccid; //获取解绑 联系人信息 if (tools.Is_null(this.CardBindingForm.contactName) == false) { - this.getConfigKey('yunze.card.contactName').then(response => { - this.CardBindingForm.contactName = response.msg - }) + this.getConfigKey('yunze.card.contactName').then((response) => { + this.CardBindingForm.contactName = response.msg; + }); } if (tools.Is_null(this.CardBindingForm.contactPhone) == false) { - this.getConfigKey('yunze.card.contactPhone').then(response => { - this.CardBindingForm.contactPhone = response.msg - }) + this.getConfigKey('yunze.card.contactPhone').then((response) => { + this.CardBindingForm.contactPhone = response.msg; + }); } }, //机卡解绑 MyCarUntie() { - let Pwd_Str = tools.encrypt(JSON.stringify(this.CardBindingForm)) - CarUntie(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) + let Pwd_Str = tools.encrypt(JSON.stringify(this.CardBindingForm)); + CarUntie(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); //console.log(jsonobj); if (jsonobj.code == 200) { - this.msgSuccess(jsonobj.Data) - this.getList() + this.msgSuccess(jsonobj.Data); + this.getList(); } else { - this.msgError(jsonobj.msg) + this.msgError(jsonobj.msg); } - }) + }); }, //机卡解绑 保存 CardBindingSave() { - let _this = this + let _this = this; if ( tools.VerificationsText( _this, @@ -3767,103 +4441,106 @@ export default { ) == true ) { //机卡解绑 - this.CardBindingSaveBtn = false - _this.MyCarUntie() + this.CardBindingSaveBtn = false; + _this.MyCarUntie(); } }, //划卡保存 DivideSave(Pwd_Str) { if (this.vo == 0) { - DivideCard(Pwd_Str).then(response => { - this.Dividebtn = true - this.CardBindingSaveBtn = true - let jsonobj = JSON.parse(tools.Decrypt(response)) + DivideCard(Pwd_Str).then((response) => { + this.Dividebtn = true; + this.CardBindingSaveBtn = true; + let jsonobj = JSON.parse(tools.Decrypt(response)); //console.log(jsonobj); if (jsonobj.code == 200) { let msg = jsonobj.Data != null && jsonobj.Data != '' ? jsonobj.Data - : jsonobj.msg - this.msgSuccess(msg) - this.handleQuery() + : jsonobj.msg; + this.msgSuccess(msg); + this.handleQuery(); } else { let msg = jsonobj.Data != null && jsonobj.Data != '' ? jsonobj.Data - : jsonobj.msg - this.msgError(msg) + : jsonobj.msg; + this.msgError(msg); } - }) + }); } else { - DivideCardOne(Pwd_Str).then(response => { - this.Dividebtn = true - this.CardBindingSaveBtn = true - let jsonobj = JSON.parse(tools.Decrypt(response)) + DivideCardOne(Pwd_Str).then((response) => { + this.Dividebtn = true; + this.CardBindingSaveBtn = true; + let jsonobj = JSON.parse(tools.Decrypt(response)); //console.log(jsonobj); if (jsonobj.code == 200) { let msg = jsonobj.Data != null && jsonobj.Data != '' ? jsonobj.Data - : jsonobj.msg - this.msgSuccess(msg) - this.handleQuery() + : jsonobj.msg; + this.msgSuccess(msg); + this.handleQuery(); } else { let msg = jsonobj.Data != null && jsonobj.Data != '' ? jsonobj.Data - : jsonobj.msg - this.msgError(msg) + : jsonobj.msg; + this.msgError(msg); } - }) + }); } }, //TODO 导出卡板信息 toExportCardInfo() { // alert('正在导出卡信息,请稍后') - this.getParams() - this.loading = true + this.getParams(); + this.loading = true; if (this.total > 20000) { - alert('注意:导出时限制2万条以内的数据!') - this.loading = false + alert('注意:导出时限制2万条以内的数据!'); + this.loading = false; } else { - let Pwd_Str = tools.encrypt(JSON.stringify(this.queryParams)) - exportCardInfo(Pwd_Str).then(response => { - // 请求成功返回后,获取到Excel文件的二进制数据 - const blob = new Blob([response], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'}) - // 创建下载链接 - const downloadUrl = URL.createObjectURL(blob) - // 创建一个隐藏的a标签,设置下载链接和文件名,模拟点击下载 - const link = document.createElement('a') - link.style.display = 'none' - link.href = downloadUrl - link.download = '卡表信息导出.xls' - document.body.appendChild(link) - link.click() - document.body.removeChild(link) - this.loading = false - alert('导出成功,请在下载文件中查看') - }).catch(error => { - // 请求失败处理 - console.error(error) - }) + let Pwd_Str = tools.encrypt(JSON.stringify(this.queryParams)); + exportCardInfo(Pwd_Str) + .then((response) => { + // 请求成功返回后,获取到Excel文件的二进制数据 + const blob = new Blob([response], { + type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' + }); + // 创建下载链接 + const downloadUrl = URL.createObjectURL(blob); + // 创建一个隐藏的a标签,设置下载链接和文件名,模拟点击下载 + const link = document.createElement('a'); + link.style.display = 'none'; + link.href = downloadUrl; + link.download = '卡表信息导出.xls'; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + this.loading = false; + alert('导出成功,请在下载文件中查看'); + }) + .catch((error) => { + // 请求失败处理 + console.error(error); + }); } - }, /** 导入按钮操作 */ handleImport() { - this.upload.title = '导入' - this.upload.open = true - this.submitFileFormBtn = true + this.upload.title = '导入'; + this.upload.open = true; + this.submitFileFormBtn = true; }, /** 导入查询按钮操作 */ Importquery() { - this.updatel.title = '导入查询' - this.queryParams.UpArr = [] - this.queryParams.UpType = '' - this.updatel.Number = true + this.updatel.title = '导入查询'; + this.queryParams.UpArr = []; + this.queryParams.UpType = ''; + this.updatel.Number = true; - this.loadCardNumber() + this.loadCardNumber(); }, //加载 卡号类别 loadCardNumber() { @@ -3873,82 +4550,107 @@ export default { window['cardNumber'] != null && window['cardNumber'] != '' ) { - this.cardNumber = window['cardNumber'] + this.cardNumber = window['cardNumber']; } else { - this.getDicts('cardNumber').then(response => { - window['cardNumber'] = response.data - this.cardNumber = window['cardNumber'] - }) + this.getDicts('cardNumber').then((response) => { + window['cardNumber'] = response.data; + this.cardNumber = window['cardNumber']; + }); } }, ShowUpdInfo() { - this.IsUpdInfo = !this.IsUpdInfo + this.IsUpdInfo = !this.IsUpdInfo; + }, + //TODO 批量修改到期时间 + MulChangeDueTime() { + this.PublicMethod(); + let _this = this; + let title = ''; + if (_this.selIccid.length > 0) { + _this + .$confirm( + '批量【修改到期日期】-->卡信息 [' + + _this.Operation.iccids.length + + '] 张, ' + + title + + '是否继续?', + '提示', + { + type: 'warning' + } + ) + .then(() => { + //弹出时间选择器 + this.isDatePickerVisible = true; + }); + } else { + tools.open(_this, '请勾选需要修改到期日期的卡号!'); + } }, - /**是否更新未填写属性*/ Updatenotfilledin() { - this.notfilledin = '更新基础信息' + this.notfilledin = '更新基础信息'; // this.fill=true; - this.manyCard = true //控制分组及备注 - this.singleCard = false //控制分组及备注 - let _this = this - _this.selIccid = _this.$refs.multipleTable.selection //ref传值 + this.manyCard = true; //控制分组及备注 + this.singleCard = false; //控制分组及备注 + let _this = this; + _this.selIccid = _this.$refs.multipleTable.selection; //ref传值 if (_this.selIccid.length > 0) { - let max = 500 + let max = 500; if (_this.selIccid.length <= max) { - this.$refs.multipleTable.clearSelection() //清除选中 - let iccids = [] + this.$refs.multipleTable.clearSelection(); //清除选中 + let iccids = []; for (let i = 0; i < _this.selIccid.length; i++) { - iccids.push(_this.selIccid[i].iccid) + iccids.push(_this.selIccid[i].iccid); } - _this.UpdInfo.iccids = iccids - _this.UpdInfo.customize_grouping = '' - _this.UpdInfo.remarks = '' - _this.UpdInfo.deliver_date = '' - _this.fill = true + _this.UpdInfo.iccids = iccids; + _this.UpdInfo.customize_grouping = ''; + _this.UpdInfo.remarks = ''; + _this.UpdInfo.deliver_date = ''; + _this.fill = true; // console.log(iccids); } else { - tools.open(_this, '一次最多操作更新' + max + '个号码!') + tools.open(_this, '一次最多操作更新' + max + '个号码!'); } } else { - tools.open(_this, '请勾选需要操作的卡号!') + tools.open(_this, '请勾选需要操作的卡号!'); } }, //修改提交确定按钮 fillForm() { - let _this = this + let _this = this; if ((_this, _this.UpdInfo.iccids.length > 0)) { //console.log(_this.form); - let Button = _this.UpdInfo.Button + let Button = _this.UpdInfo.Button; - let customize_grouping = _this.UpdInfo.customize_grouping - let remarks = _this.UpdInfo.remarks - let deliver_date = _this.UpdInfo.deliver_date + let customize_grouping = _this.UpdInfo.customize_grouping; + let remarks = _this.UpdInfo.remarks; + let deliver_date = _this.UpdInfo.deliver_date; - let title = '' + let title = ''; // 单选按钮 1 是 if (Button == '1') { - console.log(Button) + console.log(Button); if (customize_grouping.length > 0) { - title += ' 分组: [' + customize_grouping + ']' + title += ' 分组: [' + customize_grouping + ']'; } else { - title += ' 分组: []' - this.UpdInfo.customize_grouping = '' + title += ' 分组: []'; + this.UpdInfo.customize_grouping = ''; } if (remarks.length > 0) { - title += ' 备注: [' + remarks + ']' + title += ' 备注: [' + remarks + ']'; } else { - title += ' 备注: []' - this.UpdInfo.remarks = '' + title += ' 备注: []'; + this.UpdInfo.remarks = ''; } if (deliver_date.length > 0) { - title += ' 发货日期: [' + deliver_date + ']' + title += ' 发货日期: [' + deliver_date + ']'; } else { - title += ' 发货日期: []' - this.UpdInfo.deliver_date = '' + title += ' 发货日期: []'; + this.UpdInfo.deliver_date = ''; } _this .$confirm( @@ -3966,12 +4668,12 @@ export default { ) .then(() => { //console.log("upd"); - console.log(_this.UpdInfo) - _this.UpdateCardinfo(_this.UpdInfo) - }) + console.log(_this.UpdInfo); + _this.UpdateCardinfo(_this.UpdInfo); + }); } else { // 单选按钮 0 否 - console.log(Button) + console.log(Button); if ( customize_grouping.length > 0 || @@ -3979,19 +4681,19 @@ export default { deliver_date.length > 0 ) { customize_grouping = - customize_grouping.length > 0 ? customize_grouping : null - remarks = remarks.length > 0 ? remarks : null - deliver_date = deliver_date.length > 0 ? deliver_date : null + customize_grouping.length > 0 ? customize_grouping : null; + remarks = remarks.length > 0 ? remarks : null; + deliver_date = deliver_date.length > 0 ? deliver_date : null; title += customize_grouping != null ? ' 分组: [' + customize_grouping + ']' - : '' - title += remarks != null ? ' 备注: [' + remarks + ']' : '' + : ''; + title += remarks != null ? ' 备注: [' + remarks + ']' : ''; title += - deliver_date != null ? ' 发货日期: [' + deliver_date + ']' : '' - this.UpdInfo.customize_grouping = customize_grouping - this.UpdInfo.remarks = remarks - this.UpdInfo.deliver_date = deliver_date + deliver_date != null ? ' 发货日期: [' + deliver_date + ']' : ''; + this.UpdInfo.customize_grouping = customize_grouping; + this.UpdInfo.remarks = remarks; + this.UpdInfo.deliver_date = deliver_date; _this .$confirm( '批量更新卡信息 [' + @@ -4008,69 +4710,69 @@ export default { ) .then(() => { //console.log("upd"); - console.log(_this.UpdInfo) - _this.UpdateCardinfo(_this.UpdInfo) - }) + console.log(_this.UpdInfo); + _this.UpdateCardinfo(_this.UpdInfo); + }); } else { this.$message({ type: 'info', message: '请填写需要更新的数据或选择更新未填写属性!' - }) + }); } } } else { this.$message({ type: 'info', message: '请选择需要操作的号码' - }) + }); } }, UpdateCardinfo(map) { - let Pwd_Str = tools.encrypt(JSON.stringify(map)) - UpdateFill(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) + let Pwd_Str = tools.encrypt(JSON.stringify(map)); + UpdateFill(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); // console.log(jsonobj); if (jsonobj.code == 200) { - this.msgSuccess(jsonobj.msg) - this.getList() + this.msgSuccess(jsonobj.msg); + this.getList(); } else { - let msg = jsonobj.Data.msg - this.msgError(msg) + let msg = jsonobj.Data.msg; + this.msgError(msg); } - this.fill = false - }) + this.fill = false; + }); }, //单卡执行分组及备注 singleForm(row) { - let _this = this - let Button = _this.UpdInfo.Button - let customize_grouping = _this.UpdInfo.customize_grouping - let remarks = _this.UpdInfo.remarks - let deliver_date = _this.UpdInfo.deliver_date + let _this = this; + let Button = _this.UpdInfo.Button; + let customize_grouping = _this.UpdInfo.customize_grouping; + let remarks = _this.UpdInfo.remarks; + let deliver_date = _this.UpdInfo.deliver_date; - let title = '' + let title = ''; // 单选按钮 1 是 if (Button == '1') { //console.log(Button) if (customize_grouping != null) { - title += ' 分组: [' + customize_grouping + ']' + title += ' 分组: [' + customize_grouping + ']'; } else { - title += ' 分组: []' - this.UpdInfo.customize_grouping = '' + title += ' 分组: []'; + this.UpdInfo.customize_grouping = ''; } if (remarks != null) { - title += ' 备注: [' + remarks + ']' + title += ' 备注: [' + remarks + ']'; } else { - title += ' 备注: []' - this.UpdInfo.remarks = '' + title += ' 备注: []'; + this.UpdInfo.remarks = ''; } if (deliver_date != null) { - title += ' 发货日期: [' + deliver_date + ']' + title += ' 发货日期: [' + deliver_date + ']'; } else { - title += ' 发货日期: []' - this.UpdInfo.deliver_date = '' + title += ' 发货日期: []'; + this.UpdInfo.deliver_date = ''; } _this .$confirm('以下操作, ' + title + '是否继续?', '提示', { @@ -4080,33 +4782,32 @@ export default { }) .then(() => { // console.log(_this.UpdInfo); - _this.UpdateCard(_this.UpdInfo) + _this.UpdateCard(_this.UpdInfo); }) - .catch(() => { - }) // 添加错误捕获 + .catch(() => {}); // 添加错误捕获 } else { // 单选按钮 0 否 - console.log(Button) + console.log(Button); if ( (customize_grouping != null && customize_grouping != '') || (remarks != null && remarks != '') || (deliver_date != null && deliver_date != '') ) { customize_grouping = - customize_grouping != null ? customize_grouping : null - remarks = remarks != null ? remarks : null - deliver_date = deliver_date != null ? deliver_date : null + customize_grouping != null ? customize_grouping : null; + remarks = remarks != null ? remarks : null; + deliver_date = deliver_date != null ? deliver_date : null; title += customize_grouping != null ? ' 分组: [' + customize_grouping + ']' - : '' - title += remarks != null ? ' 备注: [' + remarks + ']' : '' + : ''; + title += remarks != null ? ' 备注: [' + remarks + ']' : ''; title += - deliver_date != null ? ' 发货日期: [' + deliver_date + ']' : '' - this.UpdInfo.customize_grouping = customize_grouping - this.UpdInfo.remarks = remarks - this.UpdInfo.deliver_date = deliver_date + deliver_date != null ? ' 发货日期: [' + deliver_date + ']' : ''; + this.UpdInfo.customize_grouping = customize_grouping; + this.UpdInfo.remarks = remarks; + this.UpdInfo.deliver_date = deliver_date; _this .$confirm('以下操作, ' + title + '是否继续?', '提示', { confirmButtonText: '确定', @@ -4114,60 +4815,59 @@ export default { type: 'warning' }) .then(() => { - console.log(_this.UpdInfo) - _this.UpdateCard(_this.UpdInfo) + console.log(_this.UpdInfo); + _this.UpdateCard(_this.UpdInfo); }) - .catch(() => { - }) // 添加错误捕获 + .catch(() => {}); // 添加错误捕获 } else { this.$message({ type: 'info', message: '请填写需要更新的数据或选择更新未填写属性!' - }) + }); } } }, UpdateCard(map) { - let Pwd_Str = tools.encrypt(JSON.stringify(map)) - singleCardInfo(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) + let Pwd_Str = tools.encrypt(JSON.stringify(map)); + singleCardInfo(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); // console.log(jsonobj); if (jsonobj.code == 200) { - this.msgSuccess(jsonobj.msg) - this.getList() + this.msgSuccess(jsonobj.msg); + this.getList(); } else { - let msg = jsonobj.Data.msg - this.msgError(msg) + let msg = jsonobj.Data.msg; + this.msgError(msg); } - this.fill = false - }) + this.fill = false; + }); }, /**下面是勾选操作*/ //下面公共的的方法 PublicMethod(index) { - let _this = this - _this.selIccid = _this.$refs.multipleTable.selection + let _this = this; + _this.selIccid = _this.$refs.multipleTable.selection; - let max = 500 + let max = 500; if (_this.selIccid.length <= max) { - this.$refs.multipleTable.clearSelection() //清除选中 - let iccids = [] + this.$refs.multipleTable.clearSelection(); //清除选中 + let iccids = []; for (let i = 0; i < _this.selIccid.length; i++) { - iccids.push({iccid: _this.selIccid[i].iccid}) + iccids.push({ iccid: _this.selIccid[i].iccid }); } - _this.Operation.iccids = iccids - _this.Operation.iccid = '' + _this.Operation.iccids = iccids; + _this.Operation.iccid = ''; // console.log(iccids); } else { - tools.open(_this, '一次最多操作更新' + max + '个号码!') + tools.open(_this, '一次最多操作更新' + max + '个号码!'); } }, //停机 Stopped() { - this.PublicMethod() - let _this = this - let title = '' + this.PublicMethod(); + let _this = this; + let title = ''; if (_this.selIccid.length > 0) { _this .$confirm( @@ -4183,36 +4883,36 @@ export default { ) .then(() => { //console.log("upd"); - console.log(_this.Operation) - _this.StoppedArrs() - }) + console.log(_this.Operation); + _this.StoppedArrs(); + }); } else { - tools.open(_this, '请勾选需要停机的卡号!') + tools.open(_this, '请勾选需要停机的卡号!'); } }, StoppedArrs() { - let Pwd_Str = tools.encrypt(JSON.stringify(this.Operation)) - StoppedArr(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) - console.log(jsonobj) + let Pwd_Str = tools.encrypt(JSON.stringify(this.Operation)); + StoppedArr(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); + console.log(jsonobj); if (jsonobj.code == 200) { let msg = jsonobj.Data != null && jsonobj.Data != '' ? jsonobj.Data - : jsonobj.msg + : jsonobj.msg; // this.cardList = msg; - this.msgSuccess(msg) + this.msgSuccess(msg); } else { - this.msgError(jsonobj.msg) + this.msgError(jsonobj.msg); } - this.handleQuery() - }) + this.handleQuery(); + }); }, //复机 Machine() { - this.PublicMethod() - let _this = this - let title = '' + this.PublicMethod(); + let _this = this; + let title = ''; if (_this.selIccid.length > 0) { _this .$confirm( @@ -4228,35 +4928,35 @@ export default { ) .then(() => { //console.log("upd"); - console.log(_this.Operation) - _this.MachineArrs() - }) + console.log(_this.Operation); + _this.MachineArrs(); + }); } else { - tools.open(_this, '请勾选需要复机的卡号!') + tools.open(_this, '请勾选需要复机的卡号!'); } }, MachineArrs() { - let Pwd_Str = tools.encrypt(JSON.stringify(this.Operation)) - MachineArr(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) + let Pwd_Str = tools.encrypt(JSON.stringify(this.Operation)); + MachineArr(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); if (jsonobj.code == 200) { let msg = jsonobj.Data != null && jsonobj.Data != '' ? jsonobj.Data - : jsonobj.msg + : jsonobj.msg; // this.cardList = msg; - this.msgSuccess(msg) + this.msgSuccess(msg); } else { - this.msgError(jsonobj.msg) + this.msgError(jsonobj.msg); } - this.handleQuery() - }) + this.handleQuery(); + }); }, //断网 DisconnectNetwork() { - this.PublicMethod() - let _this = this - let title = '' + this.PublicMethod(); + let _this = this; + let title = ''; if (_this.selIccid.length > 0) { _this .$confirm( @@ -4272,35 +4972,35 @@ export default { ) .then(() => { //console.log("upd"); - console.log(_this.Operation) - _this.DisconnectNetworkArrs() - }) + console.log(_this.Operation); + _this.DisconnectNetworkArrs(); + }); } else { - tools.open(_this, '请勾选需要断网的卡号!') + tools.open(_this, '请勾选需要断网的卡号!'); } }, DisconnectNetworkArrs() { - let Pwd_Str = tools.encrypt(JSON.stringify(this.Operation)) - DisconnectNetworkArr(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) + let Pwd_Str = tools.encrypt(JSON.stringify(this.Operation)); + DisconnectNetworkArr(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); if (jsonobj.code == 200) { //this.cardList = jsonobj.Data.Data; let msg = jsonobj.Data != null && jsonobj.Data != '' ? jsonobj.Data - : jsonobj.msg - this.msgSuccess(msg) + : jsonobj.msg; + this.msgSuccess(msg); } else { - this.msgError(jsonobj.msg) + this.msgError(jsonobj.msg); } - this.handleQuery() - }) + this.handleQuery(); + }); }, //开网 OpenNetwork() { - this.PublicMethod() - let _this = this - let title = '' + this.PublicMethod(); + let _this = this; + let title = ''; if (_this.selIccid.length > 0) { _this .$confirm( @@ -4316,36 +5016,36 @@ export default { ) .then(() => { //console.log("upd"); - console.log(_this.Operation) - _this.OpenNetworkArrs() - }) + console.log(_this.Operation); + _this.OpenNetworkArrs(); + }); } else { - tools.open(_this, '请勾选需要开网的卡号!') + tools.open(_this, '请勾选需要开网的卡号!'); } }, OpenNetworkArrs() { - let Pwd_Str = tools.encrypt(JSON.stringify(this.Operation)) - OpenNetworkArr(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) + let Pwd_Str = tools.encrypt(JSON.stringify(this.Operation)); + OpenNetworkArr(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); if (jsonobj.code == 200) { //this.cardList = jsonobj.Data.Data; let msg = jsonobj.Data != null && jsonobj.Data != '' ? jsonobj.Data - : jsonobj.msg - this.msgSuccess(msg) + : jsonobj.msg; + this.msgSuccess(msg); } else { - this.msgError(jsonobj.msg) + this.msgError(jsonobj.msg); } - this.handleQuery() - }) + this.handleQuery(); + }); }, //同步用量 Consumption() { - this.PublicMethod() - let _this = this - let title = '' + this.PublicMethod(); + let _this = this; + let title = ''; if (_this.selIccid.length > 0) { _this .$confirm( @@ -4360,34 +5060,34 @@ export default { } ) .then(() => { - _this.ConsumptionArrs() - }) + _this.ConsumptionArrs(); + }); } else { - tools.open(_this, '请勾选需要同步用量的卡号!') + tools.open(_this, '请勾选需要同步用量的卡号!'); } }, ConsumptionArrs(index) { - let Pwd_Str = tools.encrypt(JSON.stringify(this.Operation)) - ConsumptionArr(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) + let Pwd_Str = tools.encrypt(JSON.stringify(this.Operation)); + ConsumptionArr(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); if (jsonobj.code == 200) { //this.cardList = jsonobj.Data.Data; let msg = jsonobj.Data != null && jsonobj.Data != '' ? jsonobj.Data - : jsonobj.msg - this.msgSuccess(msg) + : jsonobj.msg; + this.msgSuccess(msg); } else { - this.msgError(jsonobj.msg) + this.msgError(jsonobj.msg); } - this.handleQuery() - }) + this.handleQuery(); + }); }, //同步状态 State() { - this.PublicMethod() - let _this = this - let title = '' + this.PublicMethod(); + let _this = this; + let title = ''; if (_this.selIccid.length > 0) { _this .$confirm( @@ -4404,309 +5104,236 @@ export default { .then(() => { //console.log("upd"); // console.log(_this.Operation); - _this.PublicMethodArrs() - }) + _this.PublicMethodArrs(); + }); } else { - tools.open(_this, '请勾选需要同步状态的卡号!') + tools.open(_this, '请勾选需要同步状态的卡号!'); } }, - PublicMethodArrs() { - let Pwd_Str = tools.encrypt(JSON.stringify(this.Operation)) - PublicMethodArr(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) - if (jsonobj.code == 200) { - //this.cardList = jsonobj.Data.Data; - let msg = - jsonobj.Data != null && jsonobj.Data != '' - ? jsonobj.Data - : jsonobj.msg - this.msgSuccess(msg) - } else { - this.msgError(jsonobj.msg) - } - this.handleQuery() - }) + //控制时间选择器弹窗 + showTimePicker() { + this.isDatePickerVisible = true; }, - - loadStatusFlexible() { - //加载 灵活变更状态 - if ( - window['status_Flexible'] != undefined && - window['status_Flexible'] != null && - window['status_Flexible'] != '' - ) { - this.status_Flexible = window['status_Flexible'] + //校验是否选择了修改时间 + confirmTimeSelection() { + // 用户点击确定按钮时调用 + if (this.selectedTime) { + // 用户已经选择了时间,调用后端API + this.BatchModifyExpireDate(this.selectedTime); + this.isDatePickerVisible = false; // 隐藏时间选择器模态框 } else { - this.getDicts('yunze_status_Flexible').then(response => { - window['status_Flexible'] = response.data - this.status_Flexible = window['status_Flexible'] - }) + this.$message.warning('请选择一个有效的时间!'); } }, - - /*灵活变更状态*/ - FlexibleChange() { - this.biange = '灵活变更' - let _this = this - - this.loadStatusFlexible() //加载 灵活变更状态 - - _this.selIccid = _this.$refs.multipleTable.selection - if (_this.selIccid.length > 0) { - let max = 500 - if (_this.selIccid.length <= max) { - this.$refs.multipleTable.clearSelection() //清除选中 - let iccids = [] - for (let i = 0; i < _this.selIccid.length; i++) { - iccids.push(_this.selIccid[i].iccid) - } - this.FlexiblePy = true - this.singleCardSc = false - _this.ParamsShowId.iccids = iccids - _this.ParamsShowId.status_ShowId = [] - _this.Flexible = true - } else { - tools.open(_this, '一次最多操作更新' + max + '个号码!') - } - } else { - tools.open(_this, '请勾选需要操作的卡号!') - } - }, - /*灵活变更状态 确定按钮*/ - FlexibleAdd(row) { - let _this = this //tools.getDkeyValue(status_Flexible,_this.ParamsShowId.status_ShowId) - if ( - _this.ParamsShowId.status_ShowId != null && - _this.ParamsShowId.status_ShowId != '' - ) { - let title = '' - _this - .$confirm( - tools.getDkeyValue( - status_Flexible, - _this.ParamsShowId.status_ShowId - ) + - ' [' + - _this.ParamsShowId.iccids.length + - '] 张, ' + - title + - '是否继续?', - '提示', - { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - } - ) - .then(() => { - //console.log("upd"); - // console.log(_this.ParamsShowId); - _this.Flexle(_this.ParamsShowId) - }) - } else { - this.$message({ - type: 'info', - message: '请选择你要变更的属性' - }) - } - }, - Flexle() { - let Pwd_Str = tools.encrypt(JSON.stringify(this.ParamsShowId)) - FlexibleState(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) + //批量修改到期时间 + BatchModifyExpireDate(time) { + //将时间参数赋值后转为json格式 + this.Operation.selectedTime = time; + let Pwd_Str = tools.encrypt(JSON.stringify(this.Operation)); + BatchModifyExpireDate(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); if (jsonobj.code == 200) { let msg = jsonobj.Data != null && jsonobj.Data != '' ? jsonobj.Data - : jsonobj.msg - this.msgSuccess(msg) - this.Flexible = false + : jsonobj.msg; + this.msgSuccess(msg); } else { - this.msgError(jsonobj.msg) + this.msgError(jsonobj.msg); } - this.handleQuery() - }) - }, - //单卡灵活变更状态 - singleCardAdd() { - let _this = this - - if ( - _this.ParamsShowId.status_ShowId != null && - _this.ParamsShowId.status_ShowId != '' - ) { - let title = '' - _this - .$confirm( - tools.getDkeyValue( - status_Flexible, - _this.ParamsShowId.status_ShowId - ) + - '[' + - this.ParamsShowId.iccid + - ']' + - title + - '---->是否继续?', - '提示', - { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - } - ) - .then(() => { - let Pwd_Str = tools.encrypt(JSON.stringify(this.ParamsShowId)) - singFlexibleState(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) - if (jsonobj.code == 200) { - let msg = - jsonobj.Data != null && jsonobj.Data != '' - ? jsonobj.Data - : jsonobj.msg - this.msgSuccess(msg) - this.Flexible = false - this.getList() - } else { - this.msgError(jsonobj.msg) - } - }) - }) - } else { - this.$message({ - type: 'info', - message: '请选择你要变更的属性' - }) - } - }, - //同步用量和状态 - ConsumptionAndState() { - this.PublicMethod() - let _this = this - let title = '' - if (_this.selIccid.length > 0) { - _this - .$confirm( - '批量【同步用量和状态】-->卡信息 [' + - _this.Operation.iccids.length + - '] 张, ' + - title + - '是否继续?', - '提示', - { - type: 'warning' - } - ) - .then(() => { - //console.log("upd"); - console.log(_this.Operation) - _this.ConsumptionAndStateArrs() - }) - } else { - tools.open(_this, '请勾选需要同步用量和状态的卡号!') - } - }, - ConsumptionAndStateArrs() { - let Pwd_Str = tools.encrypt(JSON.stringify(this.Operation)) - ConsumptionAndStateArr(Pwd_Str).then(response => { - let jsonobj = JSON.parse(tools.Decrypt(response)) - if (jsonobj.code == 200) { - //this.cardList = jsonobj.Data.Data; - let msg = - jsonobj.Data != null && jsonobj.Data != '' - ? jsonobj.Data - : jsonobj.msg - this.msgSuccess(msg) - } else { - this.msgError(jsonobj.msg) - } - this.handleQuery() - }) - }, - /** 下载模板操作 */ - importTemplate() { - this.downloadConversion('/getcsv/ImportCardSave.cvs') - }, - importNetWorkTemplate() { - this.downloadConversion('/getcsv/importStopNetWork.cvs') - }, - importCardSel() { - this.downloadConversion('/getcsv/ImportCardSel.cvs') - }, - - downloadConversion(path) { - let map = {} - map.path = path - map.token = getToken() - let Pwd_Str = tools.encrypt(JSON.stringify(map)) - //console.log(map); - window.open( - process.env.VUE_APP_BASE_API + - '/yunze/ExecutionTask/downloadConversion?Pstr=' + - Pwd_Str, - '_blank' - ) - }, - //TODO excel上传 - // 提交上传文件 - submitFileForm() { - this.submitFileFormBtn = false - this.$refs.upload.submit() - }, - updatePeriodic() { - this.updateOthers = true; - }, - //TODO 文本域提交申请 - subTextarea() { - this.submitFileFormBtn = false // 禁用提交按钮 - let _this = this - if (tools.VerificationsText(_this, this.level, '请输入阈值!') == true && - tools.VerificationsText(_this, this.isStopNetwork, '请输入开关状态!') == true) { - let rMap = tools.textareaGetNotRepeating(this.iccidStr) // 调用工具函数获取非重复ICCID的映射 - // 获取非重复的ICCID数组 - let iccidArr = rMap.rArr - let repeatCount = rMap.repeatCount // 获取重复ICCID的数量 - - // 显示重复号码的提示信息 - if (repeatCount > 0) { - tools.open(_this, '已过滤重复号码 [ ' + repeatCount + ' ] 条!') - } - - // 检查iccidArr是否为非空数组且长度大于0 - if (iccidArr && iccidArr.length > 0) { - // 进一步检查iccidArr的长度是否小于等于100 - if (iccidArr.length <= 100) { - // 如果长度合适,更新查询参数 - let map = _this.queryParams - map.level = this.level - map.isStopNetwork = this.isStopNetwork - map.iccidArr = iccidArr - let Pwd_Str = tools.encrypt(JSON.stringify(map)) - cardNetWorkStop(Pwd_Str).then(response => { - this.BROneLoading = false - if (response.code == 200) { - this.msgSuccess(response.msg) - } else { - this.msgError(response.msg) - } - this.submitFileFormBtn = true - } - ) - } else { - this.msgError('ICCID数量超过限制(最多100条)!') - } - } else { - this.msgError('请输入所属ICCID卡号!') - } - } - }, - handleCancel() { - // 直接关闭弹框,不需要询问 - this.dialogVisible = false + }); } + }, - } -} + //批量同步卡状态 + PublicMethodArrs() { + let Pwd_Str = tools.encrypt(JSON.stringify(this.Operation)); + PublicMethodArr(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); + if (jsonobj.code == 200) { + //this.cardList = jsonobj.Data.Data; + let msg = + jsonobj.Data != null && jsonobj.Data != '' + ? jsonobj.Data + : jsonobj.msg; + this.msgSuccess(msg); + } else { + this.msgError(jsonobj.msg); + } + this.handleQuery(); + }); + }, + loadStatusFlexible() { + //加载 灵活变更状态 + if ( + window['status_Flexible'] != undefined && + window['status_Flexible'] != null && + window['status_Flexible'] != '' + ) { + this.status_Flexible = window['status_Flexible']; + } else { + this.getDicts('yunze_status_Flexible').then((response) => { + window['status_Flexible'] = response.data; + this.status_Flexible = window['status_Flexible']; + }); + } + }, + + /*灵活变更状态*/ + FlexibleChange() { + this.biange = '灵活变更'; + let _this = this; + + this.loadStatusFlexible(); //加载 灵活变更状态 + + _this.selIccid = _this.$refs.multipleTable.selection; + if (_this.selIccid.length > 0) { + let max = 500; + if (_this.selIccid.length <= max) { + this.$refs.multipleTable.clearSelection(); //清除选中 + let iccids = []; + for (let i = 0; i < _this.selIccid.length; i++) { + iccids.push(_this.selIccid[i].iccid); + } + this.FlexiblePy = true; + this.singleCardSc = false; + _this.ParamsShowId.iccids = iccids; + _this.ParamsShowId.status_ShowId = []; + _this.Flexible = true; + } else { + tools.open(_this, '一次最多操作更新' + max + '个号码!'); + } + } else { + tools.open(_this, '请勾选需要操作的卡号!'); + } + }, + /*灵活变更状态 确定按钮*/ + FlexibleAdd(row) { + let _this = this; //tools.getDkeyValue(status_Flexible,_this.ParamsShowId.status_ShowId) + if ( + _this.ParamsShowId.status_ShowId != null && + _this.ParamsShowId.status_ShowId != '' + ) { + let title = ''; + _this + .$confirm( + tools.getDkeyValue( + status_Flexible, + _this.ParamsShowId.status_ShowId + ) + + ' [' + + _this.ParamsShowId.iccids.length + + '] 张, ' + + title + + '是否继续?', + '提示', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + } + ) + .then(() => { + //console.log("upd"); + // console.log(_this.ParamsShowId); + _this.Flexle(_this.ParamsShowId); + }); + } else { + this.$message({ + type: 'info', + message: '请选择你要变更的属性' + }); + } + }, + Flexle() { + let Pwd_Str = tools.encrypt(JSON.stringify(this.ParamsShowId)); + FlexibleState(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); + if (jsonobj.code == 200) { + let msg = + jsonobj.Data != null && jsonobj.Data != '' + ? jsonobj.Data + : jsonobj.msg; + this.msgSuccess(msg); + this.Flexible = false; + } else { + this.msgError(jsonobj.msg); + } + this.handleQuery(); + }); + }, + //单卡灵活变更状态 + singleCardAdd() { + let _this = this; + + if ( + _this.ParamsShowId.status_ShowId != null && + _this.ParamsShowId.status_ShowId != '' + ) { + let title = ''; + _this + .$confirm( + tools.getDkeyValue( + status_Flexible, + _this.ParamsShowId.status_ShowId + ) + + '[' + + this.ParamsShowId.iccid + + ']' + + title + + '---->是否继续?', + '提示', + { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + } + ) + .then(() => { + let Pwd_Str = tools.encrypt(JSON.stringify(this.ParamsShowId)); + singFlexibleState(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); + if (jsonobj.code == 200) { + let msg = + jsonobj.Data != null && jsonobj.Data != '' + ? jsonobj.Data + : jsonobj.msg; + this.msgSuccess(msg); + this.Flexible = false; + this.getList(); + } else { + this.msgError(jsonobj.msg); + } + }); + }); + } else { + this.$message({ + type: 'info', + message: '请选择你要变更的属性' + }); + } + }, + + ConsumptionAndStateArrs() { + let Pwd_Str = tools.encrypt(JSON.stringify(this.Operation)); + ConsumptionAndStateArr(Pwd_Str).then((response) => { + let jsonobj = JSON.parse(tools.Decrypt(response)); + if (jsonobj.code == 200) { + //this.cardList = jsonobj.Data.Data; + let msg = + jsonobj.Data != null && jsonobj.Data != '' + ? jsonobj.Data + : jsonobj.msg; + this.msgSuccess(msg); + } else { + this.msgError(jsonobj.msg); + } + this.handleQuery(); + }); + }, + +}; - diff --git a/yunze-web-ui/public/MP_verify_ZDbMOlQdWzasvols.txt b/yunze-web-ui/public/MP_verify_ZDbMOlQdWzasvols.txt new file mode 100644 index 0000000..3ee9421 --- /dev/null +++ b/yunze-web-ui/public/MP_verify_ZDbMOlQdWzasvols.txt @@ -0,0 +1 @@ +ZDbMOlQdWzasvols \ No newline at end of file