|
|
@@ -66,48 +66,48 @@ export default {
|
|
|
components: {
|
|
|
dicSelect,
|
|
|
reportContainer,
|
|
|
- mailComponent
|
|
|
+ mailComponent,
|
|
|
},
|
|
|
props: {
|
|
|
id: {
|
|
|
- type: String
|
|
|
+ type: String,
|
|
|
},
|
|
|
disabled: {
|
|
|
type: Boolean,
|
|
|
- default: false
|
|
|
+ default: false,
|
|
|
},
|
|
|
businessValue: {
|
|
|
type: String,
|
|
|
- default: ""
|
|
|
+ default: "",
|
|
|
},
|
|
|
classifyCode: {
|
|
|
type: String,
|
|
|
- default: ""
|
|
|
+ default: "",
|
|
|
},
|
|
|
groupCode: {
|
|
|
type: String,
|
|
|
- default: ""
|
|
|
+ default: "",
|
|
|
},
|
|
|
reportCode: {
|
|
|
type: String,
|
|
|
- default: ""
|
|
|
+ default: "",
|
|
|
},
|
|
|
selecList: {
|
|
|
type: Array,
|
|
|
- default: []
|
|
|
+ default: [],
|
|
|
},
|
|
|
itemIds: {
|
|
|
type: String,
|
|
|
- default: null
|
|
|
+ default: null,
|
|
|
},
|
|
|
type: {
|
|
|
type: Boolean,
|
|
|
- default: false
|
|
|
+ default: false,
|
|
|
},
|
|
|
printUpdate: {
|
|
|
type: Boolean,
|
|
|
- default: true
|
|
|
- }
|
|
|
+ default: true,
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -115,16 +115,16 @@ export default {
|
|
|
curCodeList: [
|
|
|
{
|
|
|
key: null,
|
|
|
- code: "全部"
|
|
|
+ code: "全部",
|
|
|
},
|
|
|
{
|
|
|
key: "CNY",
|
|
|
- code: "CNY"
|
|
|
+ code: "CNY",
|
|
|
},
|
|
|
{
|
|
|
key: "USD",
|
|
|
- code: "USD"
|
|
|
- }
|
|
|
+ code: "USD",
|
|
|
+ },
|
|
|
],
|
|
|
userList: [],
|
|
|
previewDialog: false,
|
|
|
@@ -133,13 +133,13 @@ export default {
|
|
|
form: {},
|
|
|
formReport: {},
|
|
|
query: {
|
|
|
- classifyCode: "业务"
|
|
|
+ classifyCode: "业务",
|
|
|
},
|
|
|
loading: true,
|
|
|
page: {
|
|
|
pageSize: 10,
|
|
|
currentPage: 1,
|
|
|
- total: 0
|
|
|
+ total: 0,
|
|
|
},
|
|
|
optionPrinting: {
|
|
|
stripe: true,
|
|
|
@@ -169,14 +169,14 @@ export default {
|
|
|
{
|
|
|
label: "客户名称",
|
|
|
prop: "cnName",
|
|
|
- overHidden: true
|
|
|
+ overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "客户编号",
|
|
|
prop: "code",
|
|
|
- overHidden: true
|
|
|
- }
|
|
|
- ]
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
selectionList: [],
|
|
|
option: {},
|
|
|
@@ -203,14 +203,14 @@ export default {
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请输入组别",
|
|
|
- trigger: "blur"
|
|
|
- }
|
|
|
- ]
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
label: "业务类别",
|
|
|
prop: "classifyCode",
|
|
|
- overHidden: true
|
|
|
+ overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "报表编码",
|
|
|
@@ -220,9 +220,9 @@ export default {
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请输入报表编码",
|
|
|
- trigger: "blur"
|
|
|
- }
|
|
|
- ]
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
label: "中文名称",
|
|
|
@@ -232,14 +232,14 @@ export default {
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请输入中文名称",
|
|
|
- trigger: "blur"
|
|
|
- }
|
|
|
- ]
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
label: "英文名称",
|
|
|
prop: "enName",
|
|
|
- overHidden: true
|
|
|
+ overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "报表格式",
|
|
|
@@ -249,27 +249,28 @@ export default {
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请输入报表格式",
|
|
|
- trigger: "blur"
|
|
|
- }
|
|
|
- ]
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
label: "备注",
|
|
|
prop: "remarks",
|
|
|
- overHidden: true
|
|
|
- }
|
|
|
- ]
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
- data: []
|
|
|
+ data: [],
|
|
|
+ queryData: {},
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
|
// this.option = await this.getColumnData(this.getColumnName(397), this.optionBack);
|
|
|
- getUserApprovalList().then(res => {
|
|
|
+ getUserApprovalList().then((res) => {
|
|
|
this.findObject(this.option.column, "authorizedUsersId").dicData = res.data.data;
|
|
|
});
|
|
|
// 获取业务类型
|
|
|
- bbusinesstypeList(1, 20).then(res => {
|
|
|
+ bbusinesstypeList(1, 20).then((res) => {
|
|
|
this.findObject(this.option.column, "businessType").dicData = res.data.data.records;
|
|
|
});
|
|
|
},
|
|
|
@@ -280,20 +281,20 @@ export default {
|
|
|
addBtn: this.vaildData(this.permission.reports_add, false),
|
|
|
viewBtn: this.vaildData(this.permission.reports_view, false),
|
|
|
delBtn: this.vaildData(this.permission.reports_delete, false),
|
|
|
- editBtn: this.vaildData(this.permission.reports_edit, false)
|
|
|
+ editBtn: this.vaildData(this.permission.reports_edit, false),
|
|
|
};
|
|
|
},
|
|
|
ids() {
|
|
|
let ids = [];
|
|
|
- this.selectionList.forEach(ele => {
|
|
|
+ this.selectionList.forEach((ele) => {
|
|
|
ids.push(ele.id);
|
|
|
});
|
|
|
return ids.join(",");
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
methods: {
|
|
|
openDialog(query) {
|
|
|
- this.query=query
|
|
|
+ this.queryData = query;
|
|
|
this.previewDialog = true;
|
|
|
this.onLoad(this.page, this.query);
|
|
|
},
|
|
|
@@ -326,7 +327,7 @@ export default {
|
|
|
|
|
|
let designer = new Stimulsoft.Designer.StiDesigner(options, "StiDesigner", false);
|
|
|
|
|
|
- designer.onSaveReport = e => {
|
|
|
+ designer.onSaveReport = (e) => {
|
|
|
console.log("onSaveReport");
|
|
|
// let jsObject = this.jsObject
|
|
|
|
|
|
@@ -600,7 +601,7 @@ export default {
|
|
|
const res = await getReportDataStatistics({
|
|
|
reportCode: this.reportCode,
|
|
|
groupCode: this.groupCode,
|
|
|
- reportType: this.businessValue
|
|
|
+ reportType: this.businessValue,
|
|
|
});
|
|
|
// 获取的数据赋值
|
|
|
console.log(res.data.data, 584);
|
|
|
@@ -635,7 +636,7 @@ export default {
|
|
|
this.createDesignerButtons();
|
|
|
}, 50);
|
|
|
},
|
|
|
- () => {}
|
|
|
+ () => {},
|
|
|
);
|
|
|
},
|
|
|
// 打印报表获取数据
|
|
|
@@ -661,16 +662,16 @@ export default {
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请选择日期",
|
|
|
- trigger: "blur"
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- ]
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
- beforeClose: done => {
|
|
|
+ beforeClose: (done) => {
|
|
|
done();
|
|
|
},
|
|
|
- callback: res => {
|
|
|
+ callback: (res) => {
|
|
|
res.done();
|
|
|
// if (this.printUpdate) {
|
|
|
// printingUpdate({ id: this.id });
|
|
|
@@ -683,16 +684,17 @@ export default {
|
|
|
groupCode: row.groupCode,
|
|
|
itemIds: this.itemIds,
|
|
|
type: this.businessValue,
|
|
|
- date: res.data.date
|
|
|
+ date: res.data.date,
|
|
|
};
|
|
|
} else {
|
|
|
obj = {
|
|
|
+ ...this.queryData,
|
|
|
reportCode: this.businessValue,
|
|
|
groupCode: "统计",
|
|
|
- reportType: "决策分析"
|
|
|
+ reportType: "决策分析",
|
|
|
};
|
|
|
}
|
|
|
- getReportDataStatistics(obj).then(res => {
|
|
|
+ getReportDataStatistics(obj).then((res) => {
|
|
|
if (this.selecList.length || this.type) {
|
|
|
this.handleReportPreview(url, res.data.data.data);
|
|
|
} else {
|
|
|
@@ -700,7 +702,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
res.close();
|
|
|
- }
|
|
|
+ },
|
|
|
});
|
|
|
} else if (row.code == "PickUp") {
|
|
|
this.$DialogForm.show({
|
|
|
@@ -723,16 +725,16 @@ export default {
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请选择日期",
|
|
|
- trigger: "blur"
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- ]
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
- beforeClose: done => {
|
|
|
+ beforeClose: (done) => {
|
|
|
done();
|
|
|
},
|
|
|
- callback: res => {
|
|
|
+ callback: (res) => {
|
|
|
res.done();
|
|
|
// if (this.printUpdate) {
|
|
|
// printingUpdate({ id: this.id });
|
|
|
@@ -745,19 +747,20 @@ export default {
|
|
|
groupCode: row.groupCode,
|
|
|
itemIds: this.itemIds,
|
|
|
type: this.businessValue,
|
|
|
- date: res.data.date
|
|
|
+ date: res.data.date,
|
|
|
};
|
|
|
} else {
|
|
|
obj = {
|
|
|
+ ...this.queryData,
|
|
|
reportCode: this.reportCode,
|
|
|
groupCode: this.groupCode,
|
|
|
- reportType: this.businessValue
|
|
|
+ reportType: this.businessValue,
|
|
|
};
|
|
|
}
|
|
|
if (this.businessValue == "YYFY") {
|
|
|
getPrint({ id: this.id });
|
|
|
}
|
|
|
- getReportDataStatistics(obj).then(res => {
|
|
|
+ getReportDataStatistics(obj).then((res) => {
|
|
|
if (this.selecList.length || this.type) {
|
|
|
this.handleReportPreview(url, res.data.data.data);
|
|
|
} else {
|
|
|
@@ -765,7 +768,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
res.close();
|
|
|
- }
|
|
|
+ },
|
|
|
});
|
|
|
} else {
|
|
|
// if (this.printUpdate) {
|
|
|
@@ -778,19 +781,19 @@ export default {
|
|
|
obj = {
|
|
|
reportCode: this.reportCode,
|
|
|
groupCode: this.groupCode,
|
|
|
- reportType: this.businessValue
|
|
|
+ reportType: this.businessValue,
|
|
|
};
|
|
|
} else {
|
|
|
obj = {
|
|
|
reportCode: this.reportCode,
|
|
|
groupCode: this.groupCode,
|
|
|
- reportType: this.businessValue
|
|
|
+ reportType: this.businessValue,
|
|
|
};
|
|
|
}
|
|
|
if (this.businessValue == "YYFY") {
|
|
|
getPrint({ id: this.id });
|
|
|
}
|
|
|
- getReportDataStatistics(obj).then(res => {
|
|
|
+ getReportDataStatistics(obj).then((res) => {
|
|
|
if (this.selecList.length || this.type) {
|
|
|
this.handleReportPreview(url, res.data.data.data);
|
|
|
} else {
|
|
|
@@ -920,7 +923,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
let boxs = "";
|
|
|
- boxMap.forEach(function(value, key, map) {
|
|
|
+ boxMap.forEach(function (value, key, map) {
|
|
|
boxs += value + "x" + key + ", ";
|
|
|
});
|
|
|
boxs = boxs.substring(0, boxs.length - 2);
|
|
|
@@ -970,17 +973,14 @@ export default {
|
|
|
this.createViewerButtons(viewer);
|
|
|
}, 50);
|
|
|
},
|
|
|
- () => {}
|
|
|
+ () => {},
|
|
|
);
|
|
|
|
|
|
console.log("加载成功完成!");
|
|
|
},
|
|
|
|
|
|
loadReport(report, content, data) {
|
|
|
- var mimeString = content
|
|
|
- .split(",")[0]
|
|
|
- .split(":")[1]
|
|
|
- .split(";")[0];
|
|
|
+ var mimeString = content.split(",")[0].split(":")[1].split(";")[0];
|
|
|
var byteString = atob(content.split(",")[1]);
|
|
|
|
|
|
var ab = new ArrayBuffer(byteString.length);
|
|
|
@@ -991,11 +991,11 @@ export default {
|
|
|
}
|
|
|
|
|
|
var blob = new Blob([ab]);
|
|
|
- JSZip.loadAsync(blob).then(function(unziped) {
|
|
|
+ JSZip.loadAsync(blob).then(function (unziped) {
|
|
|
unziped
|
|
|
.file("reportfile.json")
|
|
|
.async("string")
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
report.load(res);
|
|
|
|
|
|
if (!!data) {
|
|
|
@@ -1029,13 +1029,13 @@ export default {
|
|
|
toolBarRow.appendChild(buttonCell);
|
|
|
|
|
|
let that = this;
|
|
|
- customButton.action = function(e) {
|
|
|
+ customButton.action = function (e) {
|
|
|
let jsObject = this.jsObject;
|
|
|
|
|
|
if (jsObject.options.reportIsModified) {
|
|
|
var messageForm = jsObject.MessageFormForSave();
|
|
|
messageForm.changeVisibleState(true);
|
|
|
- messageForm.action = function(state) {
|
|
|
+ messageForm.action = function (state) {
|
|
|
if (state) {
|
|
|
jsObject.SendCommandSaveReport();
|
|
|
setTimeout(() => {
|
|
|
@@ -1071,11 +1071,11 @@ export default {
|
|
|
const buttonsTablePrint = toolbarTable.rows[0].childNodes[0].lastChild; // 打印按钮
|
|
|
const userButtonPrint = buttonsTablePrint.rows[0].childNodes[0]; // 打印按钮dom位置
|
|
|
|
|
|
- userButtonPrint.addEventListener("click", event => {
|
|
|
+ userButtonPrint.addEventListener("click", (event) => {
|
|
|
console.log("打印点击");
|
|
|
// event.preventDefault()
|
|
|
});
|
|
|
- userButtonPrint.addEventListener("mouseover", event => {
|
|
|
+ userButtonPrint.addEventListener("mouseover", (event) => {
|
|
|
console.log("移入打印按钮");
|
|
|
console.log(event, 1035);
|
|
|
});
|
|
|
@@ -1087,7 +1087,7 @@ export default {
|
|
|
|
|
|
let that = this;
|
|
|
// 关闭按钮的监听点击
|
|
|
- closeBtn.action = function() {
|
|
|
+ closeBtn.action = function () {
|
|
|
console.log(that.$refs.reportContainer, "1022");
|
|
|
if (that.$refs.reportContainer) that.$refs.reportContainer.hideContainer();
|
|
|
};
|
|
|
@@ -1133,7 +1133,7 @@ export default {
|
|
|
params.classifyCode = this.reportCode;
|
|
|
if (this.selecList.length || this.type) {
|
|
|
getList(page.currentPage, page.pageSize, Object.assign(params, this.query))
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
this.page.total = res.data.data.total;
|
|
|
this.data = res.data.data.records;
|
|
|
this.selectionClear();
|
|
|
@@ -1145,11 +1145,11 @@ export default {
|
|
|
getFeeCenterCorpIds({
|
|
|
billId: this.id,
|
|
|
dc: this.groupCode == "应收" ? "D" : "C",
|
|
|
- type: this.businessValue
|
|
|
+ type: this.businessValue,
|
|
|
})
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
this.data = res.data.data;
|
|
|
- getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
|
|
|
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
|
|
|
this.url = res.data.data.records.length ? res.data.data.records[0].url : null;
|
|
|
});
|
|
|
this.selectionClear();
|
|
|
@@ -1194,8 +1194,8 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
return back;
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|