|
@@ -1,13 +1,13 @@
|
|
<template>
|
|
<template>
|
|
<div class="form-main" id="form-main" >
|
|
<div class="form-main" id="form-main" >
|
|
<div v-if="printTitle" class="no-print" style="text-align: right">
|
|
<div v-if="printTitle" class="no-print" style="text-align: right">
|
|
|
|
+
|
|
|
|
+ <a-button v-if="printMould" :href="printMouldUrl" target="_blank"
|
|
|
|
+ ghost type="primary">模板打印</a-button>
|
|
<a-button v-print="'#printContent'" ghost type="primary">打印</a-button>
|
|
<a-button v-print="'#printContent'" ghost type="primary">打印</a-button>
|
|
</div>
|
|
</div>
|
|
<a-card :body-style="{ padding: '15px 32px' }" :bordered="false" id="printContent" :class="{'abcdefg':true}" >
|
|
<a-card :body-style="{ padding: '15px 32px' }" :bordered="false" id="printContent" :class="{'abcdefg':true}" >
|
|
- <!-- <div style="text-align: center;">
|
|
|
|
- <h3 v-print="'#printContent'" ghost title="点击此处,打印当前页面" >{{printTitle}}</h3>
|
|
|
|
- <br/>
|
|
|
|
- </div> -->
|
|
|
|
|
|
+
|
|
<section ref="print" id="printContent" class="abcdefg">
|
|
<section ref="print" id="printContent" class="abcdefg">
|
|
<!-- <a-form @submit="handleSubmit" :form="form">
|
|
<!-- <a-form @submit="handleSubmit" :form="form">
|
|
<a-form-item
|
|
<a-form-item
|
|
@@ -122,6 +122,8 @@ export default {
|
|
},
|
|
},
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
|
|
+ printMould:false,
|
|
|
|
+ printMouldUrl:'',
|
|
printTitle:false,
|
|
printTitle:false,
|
|
printTitleImg:false,
|
|
printTitleImg:false,
|
|
isSJ: false,
|
|
isSJ: false,
|
|
@@ -198,11 +200,10 @@ export default {
|
|
},
|
|
},
|
|
created () {
|
|
created () {
|
|
// debugger
|
|
// debugger
|
|
- console.log("==============="+this.processData);
|
|
|
|
- console.log("==============="+this.processData.status);
|
|
|
|
- console.log("==============="+this.processData.title);
|
|
|
|
- console.log("==============="+this.processData.businessTable);
|
|
|
|
-
|
|
|
|
|
|
+ // console.log("==============="+this.processData);
|
|
|
|
+ // console.log("==============="+this.processData.status);
|
|
|
|
+ // console.log("==============="+this.processData.title);
|
|
|
|
+ // console.log("==============="+this.processData.businessTable);
|
|
// console.log("==============="+getProjctName());
|
|
// console.log("==============="+getProjctName());
|
|
window.deleteRow = this.deleteRow
|
|
window.deleteRow = this.deleteRow
|
|
// console.log('流程数据', this.processData)
|
|
// console.log('流程数据', this.processData)
|
|
@@ -586,6 +587,19 @@ export default {
|
|
}else{
|
|
}else{
|
|
this.printTitleImg = false;
|
|
this.printTitleImg = false;
|
|
}
|
|
}
|
|
|
|
+ let that = this;
|
|
|
|
+ let businessTable = this.processData.businessTable;
|
|
|
|
+ if(this.printTitleImg){
|
|
|
|
+ businessTable = businessTable+'_img'
|
|
|
|
+ }
|
|
|
|
+ this.getAction('/sys/dict/selectDictByJiMuPrint',{tableName:businessTable}).then(res => {
|
|
|
|
+ if(res !=null && res !=''){
|
|
|
|
+ that.printMouldUrl = res.value+'?'+res.text+'='+that.processData.tableId ;
|
|
|
|
+ this.printMould = true;
|
|
|
|
+ }else{
|
|
|
|
+ this.printMould = false;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
|
|
}else{
|
|
}else{
|
|
this.printTitleImg = false;
|
|
this.printTitleImg = false;
|
|
@@ -1132,9 +1146,13 @@ export default {
|
|
// 通过函数获取数据
|
|
// 通过函数获取数据
|
|
this.$refs.KFB.getData()
|
|
this.$refs.KFB.getData()
|
|
.then(res => {
|
|
.then(res => {
|
|
- let formData1 = JSON.parse(JSON.stringify(res))
|
|
|
|
|
|
+ // let formData1 = JSON.parse(JSON.stringify(res))
|
|
|
|
+ // // 获取数据成功
|
|
|
|
+ // let formData = JSON.parse(JSON.stringify(res))
|
|
|
|
+ let formData1 = JSON.parse(JSON.stringify(res, (key, value) => typeof value === 'undefined' ? '' : value))
|
|
// 获取数据成功
|
|
// 获取数据成功
|
|
- let formData = JSON.parse(JSON.stringify(res))
|
|
|
|
|
|
+ let formData = JSON.parse(JSON.stringify(res, (key, value) => typeof value === 'undefined' ? '' : value))
|
|
|
|
+
|
|
var addForm = 'no'
|
|
var addForm = 'no'
|
|
if(this.processData.businessTable == 'employee_leave'){
|
|
if(this.processData.businessTable == 'employee_leave'){
|
|
var estimate = this.$refs.KFB.form.getFieldValue('leave_days'),
|
|
var estimate = this.$refs.KFB.form.getFieldValue('leave_days'),
|
|
@@ -1254,7 +1272,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
if (!formData.tableName) formData.tableName = this.processData.businessTable
|
|
if (!formData.tableName) formData.tableName = this.processData.businessTable
|
|
- formData.filedNames = _.keys(res).join(',')
|
|
|
|
|
|
+ formData.filedNames = _.keys(formData1).join(',')
|
|
formData.filedNames = getFiledNames(formData) // 获取主表字段,排除子表标识
|
|
formData.filedNames = getFiledNames(formData) // 获取主表字段,排除子表标识
|
|
var url = this.url.addApply
|
|
var url = this.url.addApply
|
|
if (!this.isNew) {
|
|
if (!this.isNew) {
|