apply-clients 5.0.35-33 → 5.0.35-34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apply-clients",
3
- "version": "5.0.35-33",
3
+ "version": "5.0.35-34",
4
4
  "description": "报建前端模块",
5
5
  "main": "src/index.js",
6
6
  "directories": {
package/src/apply.js CHANGED
@@ -151,4 +151,6 @@ export default function () {
151
151
  Vue.component('apply-stop', (resolve) => { require(['./components/product/stopInfo/ApplyStopInfo'], resolve) })
152
152
 
153
153
  Vue.component('apply-report', (resolve) => { require(['./components/product/applyReport/ApplyReport'], resolve) })
154
+
155
+ Vue.component('print-report-order', (resolve) => { require(['./components/product/applyReport/PrintApplyReport'], resolve) })
154
156
  }
@@ -5,14 +5,19 @@
5
5
  <criteria partial='criteria' @condition-changed='search' v-ref:cri style="padding: 20px;background-color: #f6f6f6;">
6
6
  <form novalidate class="" partial>
7
7
  <div class="row">
8
- <div class="col-sm-4">
8
+ <button type="button" class="btn btn-success" @click='$parent.$parent.showQuery=!$parent.$parent.showQuery'>
9
+ 打印
10
+ </button>
11
+ <export-excel :data="$parent.$parent.getCondition"
12
+ :field="$parent.$parent.getfield"
13
+ sqlurl="rs/logic/exportfile"
14
+ sql-name="checkuserReport"
15
+ template-name='报装统计导出'
16
+ :choose-col="true"></export-excel>
9
17
  <button class="btn btn-primary btn-sm" type="button" @click="search(),$parent.$parent.showpager()" style="margin-left:10%">
10
- <span class="glyphicon glyphicon-search"></span>查询</button>
11
-
12
- <!-- <button class="btn-primary btn btn-sm" @click.prevent="$parent.$parent.clear()">清空</button>-->
13
- </div>
18
+ <span class="glyphicon glyphicon-search"></span>查询
19
+ </button>
14
20
  </div>
15
-
16
21
  </form>
17
22
  </criteria>
18
23
  <data-grid :model="model" partial='list' v-ref:grid class="list_area" is-fixed='false'>
@@ -69,6 +74,18 @@
69
74
  </data-grid>
70
75
  </criteria-paged>
71
76
  </div>
77
+ <modal :show.sync="showQuery" v-ref:modal :large="true" :backdrop="false" title="打印预览">
78
+ <header slot="modal-header" class="modal-header">
79
+ <button type="button" class="close" @click="showQuery = !showQuery"><span>&times;</span></button>
80
+ <h4 class="modal-title">打印预览</h4>
81
+ </header>
82
+ <article slot="modal-body" class="modal-body clearfix">
83
+ <print-report-order :purchase-records="purchaseRecords" :report="model.rows" v-ref:print></print-report-order>
84
+ </article>
85
+ <footer slot="modal-footer" class="modal-footer">
86
+ <button type="button" class="btn btn-primary" @click="print()">打印</button>
87
+ </footer>
88
+ </modal>
72
89
  </div>
73
90
  </template>
74
91
  <script>
@@ -101,12 +118,21 @@
101
118
  model: new PagedList('rs/sql/checkuserReport', 20, {
102
119
  data: {
103
120
  id: this.$login.f.id,
104
- fengongsi: this.$login.f.f_fengongsi
121
+ fengongsi: this.$login.f.f_fengongsi,
105
122
  }
106
123
  }),
107
124
  condition: '',
125
+ showQuery:false,
108
126
  showstopinfoflag:false,
109
- stopremarks:""
127
+ stopremarks:"",
128
+ getfield: {
129
+ 'username': '报装人员',
130
+ 'gsurvey_name': '个体报建踏勘次数',
131
+ 'gconstruction_unit': '个体报建安装次数',
132
+ 'jsurvey_name': '集体报建踏勘次数',
133
+ 'jconstruction_unit': '集体报建安装次数',
134
+ 'jgas_name': '集体报建通气次数'
135
+ }
110
136
  }
111
137
  },
112
138
  ready() {
@@ -115,8 +141,16 @@
115
141
  this.$refs.cp.$refs.cri.search()
116
142
  },
117
143
  methods: {
118
- clear(){
119
- this.$refs.cp.$refs.cri.model = {}
144
+ print () {
145
+ this.$refs.print.$refs.print.PrintTable()
146
+ },
147
+ getCondition() {
148
+ return {
149
+ condition: this.$refs.cp.$refs.cri.condition,
150
+ data: {
151
+ orgid: this.$login.f.orgid
152
+ }
153
+ }
120
154
  },
121
155
  stopinfoshow(index){
122
156
  this.showstopinfoflag = true;
@@ -0,0 +1,111 @@
1
+ <template>
2
+ <style id="style">
3
+ td{
4
+ height: 30px;
5
+ padding: 0px;
6
+ text-align: center;
7
+ }
8
+ .cen{
9
+ text-align: center;
10
+ }
11
+ table{
12
+ margin: auto;
13
+ width: 100%;
14
+ border-collapse:collapse;
15
+ border: 1px solid black;
16
+ }
17
+ h1,h2,h3,h4,h5,h6 {
18
+ text-align: center;
19
+ }
20
+ </style>
21
+ <div id="print">
22
+ <table border="1">
23
+ <tr>
24
+ <th colspan="6"><h4>报装人员勘察 安装 通气 统计查询</h4></th>
25
+ </tr>
26
+ <tr>
27
+ <th colspan="1" rowspan="2" class="cen">报装人员</th>
28
+ <th colspan="2" class="cen">个人报建</th>
29
+ <th colspan="3" class="cen">集体报建</th>
30
+ </tr>
31
+ <tr class="title">
32
+ <th class="cen">
33
+ <nobr>踏勘</nobr>
34
+ </th>
35
+ <th class="cen">
36
+ <nobr>安装</nobr>
37
+ </th>
38
+ <th class="cen">
39
+ <nobr>踏勘</nobr>
40
+ </th>
41
+ <th class="cen">
42
+ <nobr>安装</nobr>
43
+ </th>
44
+ <th class="cen">
45
+ <nobr>通气</nobr>
46
+ </th>
47
+ </tr>
48
+ <tr v-for="item in report">
49
+ <td>{{item.username}}</td>
50
+ <td>{{ item.gsurvey_name }}</td>
51
+ <td>{{ item.gconstruction_unit }}</td>
52
+ <td>{{ item.jsurvey_name }}</td>
53
+ <td>{{ item.jconstruction_unit }}</td>
54
+ <td>{{ item.jgas_name }}</td>
55
+ </tr>
56
+ <tr v-for="item in supplement">
57
+ <td></td>
58
+ <td></td>
59
+ <td></td>
60
+ <td></td>
61
+ <td></td>
62
+ <td></td>
63
+ </tr>
64
+ </table>
65
+ </div>
66
+
67
+ <print-element v-show="false" v-ref:print id='print' styleid='style'
68
+ top='10' left='60' width='100%' height='100%'>
69
+ </print-element>
70
+ </template>
71
+
72
+ <script>
73
+ Date.prototype.Format = function (fmt) {
74
+ var o = {
75
+ "M+": this.getMonth() + 1, //月份
76
+ "d+": this.getDate(), //日
77
+ "H+": this.getHours(), //小时
78
+ "m+": this.getMinutes(), //分
79
+ "s+": this.getSeconds(), //秒
80
+ "q+": Math.floor((this.getMonth() + 3) / 3), //季度
81
+ "S": this.getMilliseconds() //毫秒
82
+ };
83
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
84
+ for (var k in o)
85
+ if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
86
+ return fmt;
87
+ }
88
+ export default {
89
+ title: '打印统计单',
90
+ props: ['report'],
91
+ data () {
92
+ return {}
93
+ },
94
+ ready () {
95
+ },
96
+ methods: {
97
+ },
98
+ computed: {
99
+ supplement () {
100
+ if (this.material.length < 10) {
101
+ return 10 - this.material.length
102
+ }
103
+ return 0
104
+ }
105
+ }
106
+ }
107
+ </script>
108
+
109
+ <style scoped>
110
+
111
+ </style>