|
@@ -106,71 +106,176 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
exportAllExcel() {
|
|
exportAllExcel() {
|
|
- let startTime = null
|
|
|
|
- let endTime = null
|
|
|
|
- let orgCode = null
|
|
|
|
- let carrierSsoId = null
|
|
|
|
- if (this.startTime && this.endTime) {
|
|
|
|
- startTime = sjTime(this.startTime)
|
|
|
|
- endTime = sjTime(this.endTime)
|
|
|
|
- }
|
|
|
|
- if (getCookie('orgCode') == 'chengyunshang') {
|
|
|
|
- carrierSsoId = getCookie('userId')
|
|
|
|
|
|
+ let startTime = null;
|
|
|
|
+ let endTime = null;
|
|
|
|
+ if (this.startTime) {
|
|
|
|
+ startTime = sjTime(this.startTime);
|
|
}
|
|
}
|
|
- if (
|
|
|
|
- getCookie('orgCode') == 'dagangadmin' ||
|
|
|
|
- getCookie('orgCode') == 'zidonghuabu' ||
|
|
|
|
- getCookie('orgCode') == 'wuliuchuyunzhongxin'
|
|
|
|
- ) {
|
|
|
|
- orgCode = null
|
|
|
|
- } else {
|
|
|
|
- orgCode = getCookie('orgCode')
|
|
|
|
|
|
+ if (this.endTime) {
|
|
|
|
+ endTime = sjTime(this.endTime);
|
|
}
|
|
}
|
|
if (this.activeName == 'first') {
|
|
if (this.activeName == 'first') {
|
|
this.tableTitle = '未结算计费详单'
|
|
this.tableTitle = '未结算计费详单'
|
|
- this.axios
|
|
|
|
- .post(
|
|
|
|
- "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=0" +
|
|
|
|
- "&startTime=" +
|
|
|
|
- startTime +
|
|
|
|
- "&endTime=" +
|
|
|
|
- endTime +
|
|
|
|
- "&i" +
|
|
|
|
- new Date()
|
|
|
|
- )
|
|
|
|
- .then(res => {
|
|
|
|
- console.log(res.data.data)
|
|
|
|
- console.log(res.data.data)
|
|
|
|
- this.exportAllList = res.data.data.list
|
|
|
|
- this.noSettleDetailsColumn=res.data.data.columnData
|
|
|
|
- this.exportAllReportToExcel(
|
|
|
|
- this.tableTitle,
|
|
|
|
- this.exportAllList,
|
|
|
|
- this.noSettleDetailsColumn
|
|
|
|
- )
|
|
|
|
- })
|
|
|
|
|
|
+ if (startTime && endTime) {
|
|
|
|
+ if (startTime < endTime) {
|
|
|
|
+ if (
|
|
|
|
+ getCookie("orgCode") == "dagangadmin" ||
|
|
|
|
+ getCookie("orgCode") == "zidonghuabu" ||
|
|
|
|
+ getCookie("orgCode") == "wuliuchuyunzhongxin"
|
|
|
|
+ ) {
|
|
|
|
+ this.axios
|
|
|
|
+ .post(
|
|
|
|
+ "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=0" +
|
|
|
|
+ "&startTime=" +
|
|
|
|
+ startTime +
|
|
|
|
+ "&endTime=" +
|
|
|
|
+ endTime +
|
|
|
|
+ "&i" +
|
|
|
|
+ new Date()
|
|
|
|
+ )
|
|
|
|
+ .then(res => {
|
|
|
|
+ console.log(res.data.data)
|
|
|
|
+ this.exportAllList = res.data.data.list
|
|
|
|
+ this.noSettleDetailsColumn=res.data.data.columnData
|
|
|
|
+ this.exportAllReportToExcel(
|
|
|
|
+ this.tableTitle,
|
|
|
|
+ this.exportAllList,
|
|
|
|
+ this.noSettleDetailsColumn
|
|
|
|
+ )
|
|
|
|
+ })
|
|
|
|
+ }else if (getCookie("orgCode") == "chengyunshang"){
|
|
|
|
+ this.axios
|
|
|
|
+ .post(
|
|
|
|
+ "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=0&carrierSsoId=" +
|
|
|
|
+ getCookie("userId") +
|
|
|
|
+ "&startTime=" +
|
|
|
|
+ startTime +
|
|
|
|
+ "&endTime=" +
|
|
|
|
+ endTime +
|
|
|
|
+ "&i" +
|
|
|
|
+ new Date()
|
|
|
|
+ )
|
|
|
|
+ .then(res => {
|
|
|
|
+ console.log(res.data.data)
|
|
|
|
+ this.exportAllList = res.data.data.list
|
|
|
|
+ this.noSettleDetailsColumn=res.data.data.columnData
|
|
|
|
+ this.exportAllReportToExcel(
|
|
|
|
+ this.tableTitle,
|
|
|
|
+ this.exportAllList,
|
|
|
|
+ this.noSettleDetailsColumn
|
|
|
|
+ )
|
|
|
|
+ })
|
|
|
|
+ }else {
|
|
|
|
+ this.axios
|
|
|
|
+ .post(
|
|
|
|
+ "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=0&userId=" +
|
|
|
|
+ getCookie("orgCode") +
|
|
|
|
+ "&startTime=" +
|
|
|
|
+ startTime +
|
|
|
|
+ "&endTime=" +
|
|
|
|
+ endTime +
|
|
|
|
+ "&i" +
|
|
|
|
+ new Date()
|
|
|
|
+ )
|
|
|
|
+ .then(res => {
|
|
|
|
+ console.log(res.data.data)
|
|
|
|
+ this.exportAllList = res.data.data.list
|
|
|
|
+ this.noSettleDetailsColumn=res.data.data.columnData
|
|
|
|
+ this.exportAllReportToExcel(
|
|
|
|
+ this.tableTitle,
|
|
|
|
+ this.exportAllList,
|
|
|
|
+ this.noSettleDetailsColumn
|
|
|
|
+ )
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ this.startTime = null;
|
|
|
|
+ this.endTime = null;
|
|
|
|
+ this.$message.warning("开始时间要比结束时间早");
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ }
|
|
} else if (this.activeName == 'second') {
|
|
} else if (this.activeName == 'second') {
|
|
this.tableTitle = '已结算计费详单'
|
|
this.tableTitle = '已结算计费详单'
|
|
- this.axios
|
|
|
|
- .post(
|
|
|
|
- "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=0" +
|
|
|
|
- "&startTime=" +
|
|
|
|
- startTime +
|
|
|
|
- "&endTime=" +
|
|
|
|
- endTime +
|
|
|
|
- "&i" +
|
|
|
|
- new Date()
|
|
|
|
- )
|
|
|
|
- .then(res => {
|
|
|
|
- console.log(res.data.data)
|
|
|
|
- this.exportAllList = res.data.data.list
|
|
|
|
- this.noSettleDetailsColumn=res.data.data.columnData
|
|
|
|
- this.exportAllReportToExcel(
|
|
|
|
- this.tableTitle,
|
|
|
|
- this.exportAllList,
|
|
|
|
- this.settleDetailsColumn
|
|
|
|
- )
|
|
|
|
- })
|
|
|
|
|
|
+ if (startTime && endTime) {
|
|
|
|
+ if (startTime < endTime) {
|
|
|
|
+ if (
|
|
|
|
+ getCookie("orgCode") == "dagangadmin" ||
|
|
|
|
+ getCookie("orgCode") == "zidonghuabu" ||
|
|
|
|
+ getCookie("orgCode") == "wuliuchuyunzhongxin"
|
|
|
|
+ ) {
|
|
|
|
+ this.axios
|
|
|
|
+ .post(
|
|
|
|
+ "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=1" +
|
|
|
|
+ "&startTime=" +
|
|
|
|
+ startTime +
|
|
|
|
+ "&endTime=" +
|
|
|
|
+ endTime +
|
|
|
|
+ "&i" +
|
|
|
|
+ new Date()
|
|
|
|
+ )
|
|
|
|
+ .then(res => {
|
|
|
|
+ console.log(res.data.data)
|
|
|
|
+ this.exportAllList = res.data.data.list
|
|
|
|
+ this.noSettleDetailsColumn=res.data.data.columnData
|
|
|
|
+ this.exportAllReportToExcel(
|
|
|
|
+ this.tableTitle,
|
|
|
|
+ this.exportAllList,
|
|
|
|
+ this.noSettleDetailsColumn
|
|
|
|
+ )
|
|
|
|
+ })
|
|
|
|
+ }else if (getCookie("orgCode") == "chengyunshang"){
|
|
|
|
+ this.axios
|
|
|
|
+ .post(
|
|
|
|
+ "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=1&carrierSsoId=" +
|
|
|
|
+ getCookie("userId") +
|
|
|
|
+ "&startTime=" +
|
|
|
|
+ startTime +
|
|
|
|
+ "&endTime=" +
|
|
|
|
+ endTime +
|
|
|
|
+ "&i" +
|
|
|
|
+ new Date()
|
|
|
|
+ )
|
|
|
|
+ .then(res => {
|
|
|
|
+ console.log(res.data.data)
|
|
|
|
+ this.exportAllList = res.data.data.list
|
|
|
|
+ this.noSettleDetailsColumn=res.data.data.columnData
|
|
|
|
+ this.exportAllReportToExcel(
|
|
|
|
+ this.tableTitle,
|
|
|
|
+ this.exportAllList,
|
|
|
|
+ this.noSettleDetailsColumn
|
|
|
|
+ )
|
|
|
|
+ })
|
|
|
|
+ }else {
|
|
|
|
+ this.axios
|
|
|
|
+ .post(
|
|
|
|
+ "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=1&userId=" +
|
|
|
|
+ getCookie("orgCode") +
|
|
|
|
+ "&startTime=" +
|
|
|
|
+ startTime +
|
|
|
|
+ "&endTime=" +
|
|
|
|
+ endTime +
|
|
|
|
+ "&i" +
|
|
|
|
+ new Date()
|
|
|
|
+ )
|
|
|
|
+ .then(res => {
|
|
|
|
+ console.log(res.data.data)
|
|
|
|
+ this.exportAllList = res.data.data.list
|
|
|
|
+ this.noSettleDetailsColumn=res.data.data.columnData
|
|
|
|
+ this.exportAllReportToExcel(
|
|
|
|
+ this.tableTitle,
|
|
|
|
+ this.exportAllList,
|
|
|
|
+ this.noSettleDetailsColumn
|
|
|
|
+ )
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ this.startTime = null;
|
|
|
|
+ this.endTime = null;
|
|
|
|
+ this.$message.warning("开始时间要比结束时间早");
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//导出excel
|
|
//导出excel
|