|
@@ -21,6 +21,7 @@ import TableItem from "@/components/Table";
|
|
|
import { getMail } from "@/api/hotline";
|
|
|
import { lcInfo } from "staticPub/config";
|
|
|
import axios from "axios";
|
|
|
+import commonMe from '@/utils/common'
|
|
|
|
|
|
export default {
|
|
|
name: "HistoricalWO",
|
|
@@ -42,25 +43,45 @@ export default {
|
|
|
// label: "水表表号",
|
|
|
// prop: "telephone",
|
|
|
// },
|
|
|
+ // {
|
|
|
+ // label: "缴费金额",
|
|
|
+ // prop: "paymoney",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: "缴费渠道",
|
|
|
+ // prop: "sfy",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: "缴费日期",
|
|
|
+ // prop: "paydate",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: "缴费类型",
|
|
|
+ // prop: "paytypeid",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: "财务日期",
|
|
|
+ // prop: "kptime",
|
|
|
+ // },
|
|
|
{
|
|
|
label: "缴费金额",
|
|
|
- prop: "paymoney",
|
|
|
+ prop: "PayMoney",
|
|
|
},
|
|
|
{
|
|
|
label: "缴费渠道",
|
|
|
- prop: "sfy",
|
|
|
+ prop: "SFY",
|
|
|
},
|
|
|
{
|
|
|
label: "缴费日期",
|
|
|
- prop: "paydate",
|
|
|
+ prop: "PayDate",
|
|
|
},
|
|
|
{
|
|
|
label: "缴费类型",
|
|
|
- prop: "paytypeid",
|
|
|
+ prop: "PayTypeName",
|
|
|
},
|
|
|
{
|
|
|
label: "财务日期",
|
|
|
- prop: "kptime",
|
|
|
+ prop: "KPTime",
|
|
|
},
|
|
|
],
|
|
|
total: 0,
|
|
@@ -77,6 +98,22 @@ export default {
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ //时间戳转换
|
|
|
+ timeChange(val) {
|
|
|
+ if(val){
|
|
|
+ const date = new Date(val);
|
|
|
+ const year = date.getFullYear();
|
|
|
+ const month = date.getMonth() + 1;
|
|
|
+ const day = date.getDate();
|
|
|
+
|
|
|
+ const formattedDatetime = `${year}-${month}-${day}`;
|
|
|
+ // console.log(formattedDatetime);
|
|
|
+ return formattedDatetime;
|
|
|
+ }else{
|
|
|
+ return "-"
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
handleCurrentChange(currentPage) {
|
|
|
// if (currentPage == 1) {
|
|
|
// this.pagination.current = 0;
|
|
@@ -95,45 +132,77 @@ export default {
|
|
|
async fetchData(data) {
|
|
|
try {
|
|
|
// const tableData = await getMail(this.pagination);
|
|
|
+ const startTime = commonMe.getDayAppend(commonMe.getPreYaerDate('day'), 'start')
|
|
|
+ const endTime = commonMe.getDayAppend(commonMe.getCurrentDate('day'), 'end')
|
|
|
const newaxios = axios.create({
|
|
|
withCredentials: true, // 跨域请求时发送cookiesokies
|
|
|
timeout: 60000, // 请求超时
|
|
|
});
|
|
|
if (this.userId) {
|
|
|
+ // newaxios({
|
|
|
+ // method: "get",
|
|
|
+ // url: lcInfo.otherUrlWater,
|
|
|
+ // headers: {
|
|
|
+ // "Content-Type": "application/x-www-form-urlencoded",
|
|
|
+ // Appkey: "sz8ihx4tyyf56h2jn1zunhj7",
|
|
|
+ // AppSecret: "ihzzm4cgog275557bw84jqfwwn2dggxt",
|
|
|
+ // },
|
|
|
+ // params: {
|
|
|
+ // UserId: this.userId,
|
|
|
+ // // userId: "9031204",
|
|
|
+ // limit: this.pagination.size,
|
|
|
+ // start: this.pagination.current,
|
|
|
+ // // limit: 10,
|
|
|
+ // // start: 1,
|
|
|
+ // },
|
|
|
+ // })
|
|
|
newaxios({
|
|
|
- method: "get",
|
|
|
- url: lcInfo.otherUrlWater,
|
|
|
- headers: {
|
|
|
- "Content-Type": "application/x-www-form-urlencoded",
|
|
|
- Appkey: "sz8ihx4tyyf56h2jn1zunhj7",
|
|
|
- AppSecret: "ihzzm4cgog275557bw84jqfwwn2dggxt",
|
|
|
- },
|
|
|
- params: {
|
|
|
- UserId: this.userId,
|
|
|
- // userId: "9031204",
|
|
|
- limit: this.pagination.size,
|
|
|
- start: this.pagination.current,
|
|
|
- // limit: 10,
|
|
|
- // start: 1,
|
|
|
- },
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- console.log("浪潮接口用户缴费信息", res);
|
|
|
- let tableList = res.data.result;
|
|
|
- // console.log("浪潮接口JSON转换", tableList);
|
|
|
+ method: "get",
|
|
|
+ // url: lcInfo.otherUrlUserdetail,
|
|
|
+ // url: lcInfo.getWaterUserInfosDetails,
|
|
|
+ // headers: {
|
|
|
+ // "Content-Type": "application/x-www-form-urlencoded",
|
|
|
+ // Appkey: "oievemzt7bowa9v9sf2iczmg",
|
|
|
+ // AppSecret: "9rbbnwcs3idyyzfpvs2xv9aqr2g28hd7",
|
|
|
+ // // Appkey: "sz8ihx4tyyf56h2jn1zunhj7",
|
|
|
+ // // AppSecret: "ihzzm4cgog275557bw84jqfwwn2dggxt",
|
|
|
+ // },
|
|
|
+ url:lcInfo.getWaterUserInfosDetails2,
|
|
|
+ headers: {
|
|
|
+ // "Content-Type": "application/x-www-form-urlencoded",
|
|
|
+ // Appkey: "sz8ihx4tyyf56h2jn1zunhj7",
|
|
|
+ // AppSecret: "ihzzm4cgog275557bw84jqfwwn2dggxt",
|
|
|
+ Appkey:lcInfo.client_id2,
|
|
|
+ AppSecret: lcInfo.client_secret2,
|
|
|
+ },
|
|
|
+ params: {
|
|
|
+ userId: this.userId,
|
|
|
+ startTime: startTime,
|
|
|
+ endTime: endTime
|
|
|
+ // userid: "0101012064",
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ console.log("浪潮接口用户缴费信息1", res);
|
|
|
+ // let tableList = res.data.result;
|
|
|
+ let tableList = JSON.parse(res.data.result);
|
|
|
+ console.log("浪潮接口JSON转换", tableList);
|
|
|
|
|
|
- tableList.data.forEach((item) => {
|
|
|
- item.userCode = item.UserID;
|
|
|
- item.userName = item.UserName;
|
|
|
- item.meterReadingArea = item.AreaName;
|
|
|
- item.userAddress = item.Address;
|
|
|
- item.meterReadingBook = item.CbNo;
|
|
|
- item.waterMeterCode = item.WaterTabID;
|
|
|
- // item.waterMeterNature = item.watertype1;
|
|
|
- // item.waterMeterCaliber = item.caliber;
|
|
|
- });
|
|
|
+ // tableList.data.forEach((item) => {
|
|
|
+ // item.userCode = item.UserID;
|
|
|
+ // item.userName = item.UserName;
|
|
|
+ // item.meterReadingArea = item.AreaName;
|
|
|
+ // item.userAddress = item.Address;
|
|
|
+ // item.meterReadingBook = item.CbNo;
|
|
|
+ // item.waterMeterCode = item.WaterTabID;
|
|
|
+ // // item.waterMeterNature = item.watertype1;
|
|
|
+ // // item.waterMeterCaliber = item.caliber; timeChange
|
|
|
+ // });
|
|
|
+ tableList.data.forEach(item=>{
|
|
|
+ item.PayDate = this.timeChange(item.PayDate)
|
|
|
+ item.KPTime = this.timeChange(item.KPTime)
|
|
|
+ })
|
|
|
this.list = tableList.data;
|
|
|
- this.total = Number(res.data.result.total);
|
|
|
+ this.total = Number(tableList.data.length);
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
this.userTableLoading = false;
|