diff --git a/src/views/enforce/enterpriseBaseInfo.vue b/src/views/enforce/enterpriseBaseInfo.vue index fa2a30a..47bb255 100644 --- a/src/views/enforce/enterpriseBaseInfo.vue +++ b/src/views/enforce/enterpriseBaseInfo.vue @@ -108,10 +108,10 @@ -
{{ item.c301002 }}
************
@@ -320,58 +319,6 @@ }, error => { }) - //查询企业历史检查案件 - // data.searchParam.enterpriseNumber = data.enterpriseInfo.enterpriseNumber; - // queryRegistrationList(data.searchParam,success =>{ - // data.checkDataList = success.data; - // },error =>{}) - - //查询企业历史检查案件 - // queryXzjcjbxxList(success.data.enterpriseNumber, res => { - // console.log("历史检查案件---", res.data) - // data.checkDataList = res.data; - // }, error => {}); - - // //查询历史强制案件 - // queryQZAJList(success.data.enterpriseNumber, res => { - // console.log("历史强制案件---", res.data) - // res.data.forEach(res => { - // var obj = {} - // obj = res; - // obj.cfzl = "罚款"; - // data.forceDataList.push(obj); - // }) - // data.forceDataList = res.data; - // }, error => {}) - - // //历史处罚案件 - // queryCFAJList(success.data.enterpriseNumber, res => { - // console.log("历史处罚案件---", res.data) - // // data.punishDataList = res.data; - // res.data.forEach(res => { - // var obj = {} - // var textArr = ""; - // obj = res; - // - // var arr = res.c206011.split(","); - // console.log(arr) - // for (const key in arr) { - // if (arr[key] == "01") textArr += "警告,"; - // if (arr[key] == "02") textArr += "通报批评,"; - // if (arr[key] == "03") textArr += "罚款,"; - // if (arr[key] == "04") textArr += "没收违法所得,"; - // if (arr[key] == "05") textArr += "没收违法财产,"; - // if (arr[key] == "06") textArr += "责令停业整改,"; - // if (arr[key] == "07") textArr += "暂扣许可证件,"; - // if (arr[key] == "08") textArr += "行政拘留,"; - // if (arr[key] == "09") textArr += "吊销许可证件,"; - // } - // obj.cfzl = textArr; - // - // data.punishDataList.push(obj); - // }) - // // data.forceDataList = res.data; - // }, error => {}) // 获取历史检查案件列表 queryList_check(success.data.enterpriseNumber); @@ -428,10 +375,10 @@ searchParam.enterpriseNumber = enterpriseNumber; searchParam.pageNum = (data.curPage_check-1)*searchParam.pageSize; queryXzjcjbxxList(searchParam, res => { - console.log("历史检查案件---", res.data) + console.log("历史检查案件---", res.rows) data.curPage_check++; data.loading_check = false; // 查出结果停止加载 - if (success.total <= data.dataList.length) { + if (res.total <= data.checkDataList.length) { // 查到最后没数据 data.finished_check = true; return; @@ -463,73 +410,26 @@ }, 1000); }; - // 获取历史强制案件列表 - const queryList_punish = (enterpriseNumber) => { - searchParam.enterpriseNumber = enterpriseNumber; - searchParam.pageNum = (data.curPage_punish-1)*searchParam.pageSize; - queryQZAJList(searchParam, res => { - console.log("历史强制案件---", res.data) - data.curPage_punish++; - data.loading_punish = false; // 查出结果停止加载 - if (success.total <= data.dataList.length) { - // 查到最后没数据 - data.finished_punish = true; - return; - } - res.data.forEach(res => { - var obj = {} - obj = res; - obj.cfzl = "罚款"; - data.forceDataList.push(obj); - }) - data.forceDataList = res.data; - data.forceDataList.push(...res.rows); - }, error => { - - }) - } - //下拉刷新 - const onRefresh_punish = () => { - // 清空列表数据 - data.dataList = []; - data.finished_punish = false; - - // 重新加载数据 - // 将 loading 设置为 true,表示处于加载状态 - data.loading_punish = true; - onLoad_punish(); - }; - // 触底加载 - const onLoad_punish = () => { - setTimeout(() => { - if (data.refreshing_punish) { - data.refreshing_punish = false; - } - queryList(); - }, 1000); - }; - // 获取历史处罚案件列表 const queryList_force = (enterpriseNumber) => { searchParam.enterpriseNumber = enterpriseNumber; searchParam.pageNum = (data.curPage_force-1)*searchParam.pageSize; queryCFAJList(searchParam, res => { - console.log("历史处罚案件---", res.data) + console.log("历史处罚案件---", res.rows) data.curPage_force++; data.loading_force = false; // 查出结果停止加载 - if (success.total <= data.dataList.length) { + if (res.total <= data.forceDataList.length) { // 查到最后没数据 data.finished_force = true; return; } // data.punishDataList = res.data; - res.data.forEach(res => { + res.rows.forEach(res => { var obj = {} var textArr = ""; obj = res; var arr = res.c206011.split(","); - console.log(arr) for (const key in arr) { if (arr[key] == "01") textArr += "警告,"; if (arr[key] == "02") textArr += "通报批评,"; @@ -543,10 +443,10 @@ } obj.cfzl = textArr; - data.punishDataList.push(obj); + data.forceDataList.push(obj); }) // data.forceDataList = res.data; - data.forceDataList.push(...res.rows); + // data.forceDataList.push(...res.rows); }, error => { }) @@ -554,13 +454,13 @@ //下拉刷新 const onRefresh_force = () => { // 清空列表数据 - data.dataList_force = []; + data.forceDataList = []; data.finished_force = false; // 重新加载数据 // 将 loading 设置为 true,表示处于加载状态 data.loading_force = true; - onLoad(); + onLoad_force(); }; // 触底加载 const onLoad_force = () => { @@ -568,7 +468,52 @@ if (data.refreshing_force) { data.refreshing_force = false; } - queryList(); + queryList_force(); + }, 1000); + }; + + // 获取历史强制案件列表 + const queryList_punish = (enterpriseNumber) => { + searchParam.enterpriseNumber = enterpriseNumber; + searchParam.pageNum = (data.curPage_punish-1)*searchParam.pageSize; + queryQZAJList(searchParam, res => { + console.log("历史强制案件---", res.rows) + data.curPage_punish++; + data.loading_punish = false; // 查出结果停止加载 + if (res.total <= data.punishDataList.length) { + // 查到最后没数据 + data.finished_punish = true; + return; + } + res.rows.forEach(res => { + var obj = {} + obj = res; + obj.cfzl = "罚款"; + data.punishDataList.push(obj); + }) + // data.punishDataList.push(...res.rows); + }, error => { + + }) + } + //下拉刷新 + const onRefresh_punish = () => { + // 清空列表数据 + data.punishDataList = []; + data.finished_punish = false; + + // 重新加载数据 + // 将 loading 设置为 true,表示处于加载状态 + data.loading_punish = true; + onLoad_punish(); + }; + // 触底加载 + const onLoad_punish = () => { + setTimeout(() => { + if (data.refreshing_punish) { + data.refreshing_punish = false; + } + queryList_punish(); }, 1000); }; diff --git a/src/views/enforce/enterpriseScanPreview.vue b/src/views/enforce/enterpriseScanPreview.vue index ccd9111..95e2d96 100644 --- a/src/views/enforce/enterpriseScanPreview.vue +++ b/src/views/enforce/enterpriseScanPreview.vue @@ -148,7 +148,7 @@ onMounted(() => { getEnterpriseInformation(data.enterpriseNumber, success => { - if (null != success.data) { + if (null != success.rows) { console.log(success.data); data.searchParam.enterpriseNumber = success.data.enterpriseNumber; data.searchParam.warnType = 1; @@ -165,7 +165,7 @@ }) getEnterpriseMerchantAuthorization({merchantTel: useCommon.phonenumber}, success => { - if (!(success.data == null && success.data.length == 0)) { + if (success.data != null && success.data.length > 0) { useCommon.SET_USER_ENTERPRISE_NUMBER(success.data[0].enterpriseNumber); } }, error => { diff --git a/src/views/enforce/enterpriseWarningInfo.vue b/src/views/enforce/enterpriseWarningInfo.vue index e5c6ad3..04c081d 100644 --- a/src/views/enforce/enterpriseWarningInfo.vue +++ b/src/views/enforce/enterpriseWarningInfo.vue @@ -36,7 +36,7 @@