Преглед изворни кода

完成员工工资打印

master
Klein Blue пре 2 година
родитељ
комит
b65b950192

+ 1
- 1
public/report/.stimulsoft/infos/gongshi3.mrt.info Прегледај датотеку

@@ -7,5 +7,5 @@
"ContainsDbs": false,
"IsMultiPages": false,
"Orientation": 0,
"Modified": "2022-03-31T02:36:57.8457746Z"
"Modified": "2022-03-31T06:10:18.977359Z"
}

+ 11
- 0
public/report/.stimulsoft/infos/yuangonggongzi.mrt.info Прегледај датотеку

@@ -0,0 +1,11 @@
{
"ReportIcon": null,
"Path": null,
"ReportName": "yuangonggongzi",
"ReportDescription": null,
"IsDbs": false,
"ContainsDbs": false,
"IsMultiPages": false,
"Orientation": 0,
"Modified": "2022-03-31T08:15:01.6015593Z"
}

BIN
public/report/.stimulsoft/thumbnails/yuangonggongzi.thumb Прегледај датотеку


+ 2
- 175
public/report/gongshi3.mrt
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 723
- 0
public/report/yuangonggongzi.mrt
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 1
- 1
src/views/luru/gongshi.vue Прегледај датотеку

@@ -712,7 +712,7 @@ export default {
report.dictionary.synchronize();
report.renderAsync(function () {
var data = report.exportDocument(Stimulsoft.Report.StiExportFormat.Pdf);
Stimulsoft.System.StiObject.saveAs(data, "工时分配表.pdf", "application/pdf");
Stimulsoft.System.StiObject.saveAs(data, (bar.month + bar.staff+"工时分配表.pdf"), "application/pdf");
})
})


+ 47
- 2
src/views/tongji/yuangonggongzi.vue Прегледај датотеку

@@ -10,7 +10,7 @@
size="mini"
type="primary"
icon="el-icon-printer"
@click="PrinterClick"
@click="printReport"
></el-button>
<el-button size="mini" type="primary" @click="excelClick">Excel</el-button>
<el-button size="mini" type="primary" @click="downloadSprintTestReport">PDF</el-button>
@@ -135,6 +135,9 @@ export default {
tableWidth: "", //表格宽度
databak: "", //数据备份
headerMonth:'',//标题时间
User_name:{
user_name:''
}
};
},

@@ -160,7 +163,6 @@ export default {
id: 999999,
user_name: "合计:",
all_money: "",
assign_money: "",
partfull: "",
// name: "合计:",
// salary: "",
@@ -208,6 +210,49 @@ export default {
loading.close();
}, 2000);
},
printReport() {
this.$report.init().then(() => {
//this.report.dialog = true;
//实例化基础类
let report = new Stimulsoft.Report.StiReport();
//加载模板代码

let file = "/report/yuangonggongzi.mrt"
report.loadFile(file)
const bar = {
month: this.month,
staff: this.staffName
}
const User_name ={
User_name: this.user_name
}

//头
let dataSet = new Stimulsoft.System.Data.DataSet('source_0');
dataSet.readJson({ bar: bar });
report.regData(dataSet.dataSetName, "", dataSet);

//明细
let dataSet1 = new Stimulsoft.System.Data.DataSet('source_1');
dataSet1.readJson({ root_gongzi_all: this.showtable });
console.log(this.showtable)
report.regData(dataSet1.dataSetName, "", dataSet1);

//汇总
let dataSet2 = new Stimulsoft.System.Data.DataSet('source_2');
dataSet2.readJson({ User_name: User_name });
console.log();
report.regData(dataSet2.dataSetName, "", dataSet2);

//同步数据源
report.dictionary.synchronize();
//直接打印
report.renderAsync(() => {
report.print();
this.$emit('startPrint', 0);
});
})
},
PrinterClick() {
if(this.gongzi_All.length==0){
this.$Message.error('暂无数据无法打印')

Loading…
Откажи
Сачувај