apply-clients 3.5.5-61 → 3.5.5-62

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.
@@ -5,11 +5,11 @@ var proxyMiddleware = require('http-proxy-middleware')
5
5
  // var httpProxy = require('http-proxy')
6
6
  var app = express()
7
7
  var compiler = webpack(config)
8
+ // var ldap = 'http://125.71.238.50:30789'
9
+ // var applyinstall = 'http://125.71.238.50:30789'
10
+ //测试地址
8
11
  var ldap = 'http://192.168.50.93:31986'
9
12
  var applyinstall = 'http://192.168.50.93:31986'
10
- //测试地址
11
- // var ldap = 'http://192.168.50.93:31986'
12
- // var applyinstall = 'http://192.168.50.93:31986'
13
13
 
14
14
  var proxyTable = {
15
15
  '/rs/logic/getSaleInitData': {
@@ -124,10 +124,10 @@ app.use(hotMiddleware)
124
124
  // serve pure static assets
125
125
  app.use('/static', express.static('./static'))
126
126
 
127
- module.exports = app.listen(31986, function (err) {
127
+ module.exports = app.listen(30789, function (err) {
128
128
  if (err) {
129
129
  console.log(err)
130
130
  return
131
131
  }
132
- console.log('Listening at http://localhost:31986')
132
+ console.log('Listening at http://localhost:30789')
133
133
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apply-clients",
3
- "version": "3.5.5-61",
3
+ "version": "3.5.5-62",
4
4
  "description": "报建前端模块",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -0,0 +1,337 @@
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="basic-main">
4
+ <criteria-paged :model="model" v-ref:cp>
5
+ <criteria partial='criteria' @condition-changed='$parent.searchCondition' v-ref:cri>
6
+ <div class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row">
8
+ <div class="form-group col-sm-3">
9
+ <label class="font_normal_body">组织机构:</label>
10
+ <res-select
11
+ restype='organization'
12
+ :initresid='$parent.$parent.curorgid'
13
+ @res-select="$parent.$parent.getorg"
14
+ is-mul="false"
15
+ ></res-select>
16
+ </div>
17
+ <div class="form-group col-sm-3">
18
+ <label class="font_normal_body">工程编号:</label>
19
+ <input type="text" style="width: 60%" class="input_search" placeholder='工程编号' v-model="model.f_apply_num"
20
+ v-on:keyup.enter="$parent.$parent.search()"
21
+ condition="u.f_apply_num = '{}'">
22
+ </div>
23
+ <div class="form-group col-sm-3">
24
+ <label class="font_normal_body">客户名称:</label>
25
+ <input type="text" style="width: 60%" class="input_search" placeholder='客户名称' v-model="model.f_user_name"
26
+ v-on:keyup.enter="$parent.$parent.search()"
27
+ condition="u.f_user_name = '{}'">
28
+ </div>
29
+ <div class="form-group col-sm-3 button-range">
30
+ <button class="button_export button_spacing" @click="$parent.$parent.batchPrint()">批量打印</button>
31
+ <button class="button_search button_spacing" @click="$parent.$parent.search()" v-el:cx>查询</button>
32
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
33
+ <div
34
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
35
+ @click="$parent.$parent.criteriaShow = !$parent.$parent.criteriaShow"
36
+ class="button_spacing"
37
+ style="float: right">
38
+ </div>
39
+ </div>
40
+ </div>
41
+ <div class="row" v-show="$parent.$parent.criteriaShow">
42
+ <div class="form-group col-sm-3">
43
+ <label class="font_normal_body">电&emsp;&emsp;话:</label>
44
+ <input type="text" style="width: 60%" class="input_search" placeholder='电话' v-model="model.f_phone"
45
+ v-on:keyup.enter="$parent.$parent.search()"
46
+ condition="u.f_phone = '{}'">
47
+ </div>
48
+ <div class="form-group col-sm-3">
49
+ <label class="font_normal_body">地&emsp;&emsp;址:</label>
50
+ <input type="text" style="width: 60%" class="input_search" placeholder='地址' v-model="model.f_address"
51
+ v-on:keyup.enter="$parent.$parent.search()"
52
+ condition="u.f_address like '%{}%'">
53
+ </div>
54
+ <div class="form-group col-sm-3">
55
+ <label class="font_normal_body">安装单位:</label>
56
+ <input type="text" style="width: 60%" class="input_search" placeholder='安装单位' v-model="model.f_construction_unit"
57
+ v-on:keyup.enter="$parent.$parent.search()"
58
+ condition="u.f_construction_unit = '{}'">
59
+ </div>
60
+ <div class="form-group col-sm-3">
61
+ <label class="font_normal_body">是否打印:</label>
62
+ <v-select
63
+ v-model="model.f_prints_number"
64
+ placeholder='是否打印'
65
+ condition=" u.f_prints_number {}"
66
+ :value.sync="model.f_prints_number"
67
+ :options='$parent.$parent.isprints'
68
+ class="select select_list"
69
+ :value-single="true"
70
+ close-on-select ></v-select>
71
+ </div>
72
+ <div class="form-group col-sm-3">
73
+ <label for="startDate" class="font_normal_body">开始时间:</label>
74
+ <datepicker id="startDate" placeholder="开始日期"
75
+ style="width: 60%!important;"
76
+ v-model="model.startDate"
77
+ :value.sync="model.startDate"
78
+ :format="'yyyy-MM-dd 00:00:00'"
79
+ :show-reset-button="true"
80
+ condition="u.f_construction_date >= '{}'">
81
+ </datepicker>
82
+ </div>
83
+ <div class="form-group col-sm-3">
84
+ <label for="endDate" class="font_normal_body">结束时间:</label>
85
+ <datepicker id="endDate" placeholder="结束日期"
86
+ style="width: 60%!important;"
87
+ v-model="model.endDate"
88
+ :value.sync="model.endDate"
89
+ :format="'yyyy-MM-dd 23:59:59'"
90
+ :show-reset-button="true"
91
+ condition="u.f_construction_date <= '{}'">
92
+ </datepicker>
93
+ </div>
94
+
95
+ <div class="form-group col-sm-3">
96
+ <label for="startDate" class="font_normal_body">打印开始时间:</label>
97
+ <datepicker id="startDate1" placeholder="打印开始日期"
98
+ style="width: 60%!important;"
99
+ v-model="model.startDate1"
100
+ :value.sync="model.startDate1"
101
+ :format="'yyyy-MM-dd 00:00:00'"
102
+ :show-reset-button="true"
103
+ condition="u.f_prints_date >= to_char('{}','yyyy-MM-dd hh24:mi:ss')">
104
+ </datepicker>
105
+ </div>
106
+ <div class="form-group col-sm-3">
107
+ <label for="endDate" class="font_normal_body">打印结束时间:</label>
108
+ <datepicker id="endDate1" placeholder="打印结束日期"
109
+ style="width: 60%!important;"
110
+ v-model="model.endDate2"
111
+ :value.sync="model.endDate2"
112
+ :format="'yyyy-MM-dd 23:59:59'"
113
+ :show-reset-button="true"
114
+ condition="u.f_prints_date <= to_char('{}','yyyy-MM-dd hh24:mi:ss')">
115
+ </datepicker>
116
+ </div>
117
+ </div>
118
+ </div>
119
+ </criteria>
120
+ <data-grid :model="model" optional partial='list' v-ref:grid style="overflow: auto" class="list_area table_sy">
121
+ <template partial='head'>
122
+ <tr>
123
+ <th>序号</th>
124
+ <th>工程编号</th>
125
+ <th>客户名称</th>
126
+ <th>电话</th>
127
+ <th>地址</th>
128
+ <th>安装单位</th>
129
+ <th>安装时间</th>
130
+ <th>打印次数</th>
131
+ <th>打印时间</th>
132
+ </tr>
133
+ </template>
134
+ <template partial='body'>
135
+ <tr>
136
+ <td style="text-align: center;">
137
+ <nobr><font>{{$index+1}}</font></nobr>
138
+ </td>
139
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
140
+ <nobr><font>{{row.f_apply_num}}</font></nobr>
141
+ </td>
142
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
143
+ <nobr><font>{{row.f_user_name}}</font></nobr>
144
+ </td>
145
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
146
+ <nobr><font>{{row.f_phone}}</font></nobr>
147
+ </td>
148
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
149
+ <nobr><font>{{row.f_address}}</font></nobr>
150
+ </td>
151
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
152
+ <nobr><font>{{row.f_construction_unit}}</font></nobr>
153
+ </td>
154
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
155
+ <nobr><font>{{row.f_construction_date}}</font></nobr>
156
+ </td>
157
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
158
+ <nobr><font>{{row.f_prints_number}}</font></nobr>
159
+ </td>
160
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
161
+ <nobr><font>{{row.f_prints_date}}</font></nobr>
162
+ </td>
163
+ </tr>
164
+ </template>
165
+ </data-grid>
166
+ </criteria-paged>
167
+
168
+ <modal :show.sync="showPrint" title="打印预览" v-ref:modal :backdrop="false">
169
+ <header slot="modal-header" class="modal-header">
170
+ <button type="button" class="close" @click="colseModal()"><span>&times;</span></button>
171
+ <h4 class="modal-title">打印预览</h4>
172
+ </header>
173
+ <article slot="modal-body" class="modal-body">
174
+ <print-build-order :selectdata="selectdata" :type="type" v-ref:print></print-build-order>
175
+ </article>
176
+ <footer slot="modal-footer" class="modal-footer">
177
+ <button type="button" class="btn btn-primary" @click="print()">打印</button>
178
+ </footer>
179
+ </modal>
180
+
181
+ <modal :show.sync="showProgress" v-ref:progress :backdrop="false">
182
+ <header slot="modal-header" class="modal-header">
183
+ <h4 class="modal-title">发送打印指令中,请耐心等待...</h4>
184
+ </header>
185
+ <article slot="modal-body" class="modal-body">
186
+ <div class="progress" style="margin: 20px">
187
+ <div class="progress-bar progress-bar-success progress-bar-striped active" :style="{width: percent}">
188
+ {{ percent }}
189
+ </div>
190
+ </div>
191
+ </article>
192
+ <footer slot="modal-footer" class="modal-footer">
193
+ </footer>
194
+ </modal>
195
+ </div>
196
+ </div>
197
+ </template>
198
+
199
+ <script>
200
+ import {PagedList} from 'vue-client'
201
+ import {HttpResetClass} from 'vue-client'
202
+ export default {
203
+ title: '安装项目',
204
+ data () {
205
+ return {
206
+ model: new PagedList('rs/sql/buildOrderList', 30, null),
207
+ criteriaShow: false,
208
+ curorgid: [this.$login.f.orgid],
209
+ selectdata: null,
210
+ showPrint: false,
211
+ showProgress: false,
212
+ percent: 0,
213
+ type: 'PREVIEW',
214
+ showRow:false,
215
+ isprints: [{label: '全部', value: ''},{label: '是', value: '>0'},{label: '否', value: '=0'}],
216
+ }
217
+ },
218
+ ready () {
219
+ // 调用查询
220
+ this.search()
221
+ },
222
+ methods: {
223
+ async batchPrint () {
224
+ let selectPrint = this.$refs.cp.$refs.grid.getRowData()
225
+ if (selectPrint.length > 0) {
226
+ let res = await this.$showMessage(`当前数据条数: ${selectPrint.length}, 条数过大时打印时间可能会过长, 是否确认打印?`)
227
+ if (res == 'confirm') {
228
+ for(var i=0;i<selectPrint.length;i++){
229
+ if(selectPrint[i].f_prints_number==null){
230
+ selectPrint[i].f_prints_number=0
231
+ selectPrint[i].f_prints_number ++
232
+ }else{
233
+ selectPrint[i].f_prints_number ++
234
+ }
235
+ }
236
+ console.log('打印内容',selectPrint)
237
+ let http = new HttpResetClass()
238
+ let data = {
239
+ selectPrint:selectPrint
240
+ }
241
+ let res2 = await http.load('POST', 'rs/logic/getPrintsNumber', {data:data}, {
242
+ resolveMsg: null,
243
+ rejectMsg: '保存次数值失败!!!'
244
+ })
245
+ this.showProgress = true
246
+ for (let i = 0; i < selectPrint.length; i++) {
247
+ this.type = 'PRINT'
248
+ await this.getData(selectPrint[i])
249
+ this.print()
250
+ this.percent = this.getPercent(i, selectPrint.length)
251
+ console.log('-------------进度-----------')
252
+ console.log(this.percent)
253
+ }
254
+ this.showProgress = false
255
+ this.percent = 0
256
+ this.$refs.cp.$refs.grid.selectInit()
257
+ }
258
+ } else {
259
+ this.$showAlert('请选择要打印的单子', 'warning', 3000)
260
+ }
261
+ },
262
+ getPercent (num, total){
263
+ num = parseFloat(num);
264
+ total = parseFloat(total);
265
+ if (isNaN(num) || isNaN(total)) {
266
+ return "-";
267
+ }
268
+ return total <= 0? "0%" : Math.round((num / total) * 10000) / 100.0 + "%";
269
+ },
270
+ print () {
271
+ this.$refs.print.print()
272
+ },
273
+ colseModal () {
274
+ this.showPrint = false
275
+ this.selectdata = null
276
+ },
277
+ async click (row) {
278
+ console.log("词条数据",row)
279
+
280
+ this.type = 'PREVIEW'
281
+
282
+ await this.getData(row)
283
+
284
+ this.showPrint = true
285
+ },
286
+ async getData (row) {
287
+ this.selectdata = null
288
+
289
+ let http = new HttpResetClass()
290
+ let data = {
291
+ condition: `u.id=${row.id}`,
292
+ }
293
+ let res = await http.load('POST', 'rs/sql/buildOrderList', {data:data}, {
294
+ resolveMsg: null,
295
+ rejectMsg: '获取施工单失败!!!'
296
+ })
297
+
298
+ this.selectdata = res.data[0]
299
+ console.log("打印数据 ",this.selectdata)
300
+ if(this.selectdata.f_downloadpath !=null){
301
+ let temp = this.selectdata.f_downloadpath
302
+ let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
303
+ this.selectdata.f_downloadpath = "http://" + location.host + "/" + URL
304
+ debugger
305
+ console.log('打印地址',this.selectdata.f_downloadpath)
306
+ }else{
307
+ this.selectdata.f_downloadpath=''
308
+ }
309
+ },
310
+ clear () {
311
+ Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
312
+ this.$refs.cp.$refs.cri.model[key] = ''
313
+ })
314
+ },
315
+ searchCondition (args) {
316
+ args.condition = args.condition + ` and u.f_orgid = '${this.curorgid[0]}'`
317
+ this.model.search(args.condition, args.model)
318
+ },
319
+ // 查询
320
+ search () {
321
+ this.$refs.cp.$refs.cri.search()
322
+ },
323
+ getorg (val) {
324
+ if (val.length <= 0) {
325
+ return
326
+ }
327
+ this.curorgid = val
328
+ this.search()
329
+ }
330
+ },
331
+ computed: {
332
+ }
333
+ }
334
+ </script>
335
+
336
+ <style scoped>
337
+ </style>
@@ -0,0 +1,172 @@
1
+ <template>
2
+ <style id="printBuildOrderStyle">
3
+ #printBuildOrder td{
4
+ height: 30px;
5
+ text-align: center;
6
+ }
7
+ #printBuildOrder table{
8
+ margin: auto;
9
+ width: 100%;
10
+ border-collapse:collapse;
11
+ border: 1px solid black;
12
+ }
13
+ #printBuildOrder h1,h2,h3,h4,h5,h6 {
14
+ text-align: center;
15
+ }
16
+ .sign {
17
+ vertical-align: top;
18
+ padding: 10px;
19
+ }
20
+ .material {
21
+ text-align: left;
22
+ vertical-align: top;
23
+ padding: 10px;
24
+ }
25
+ </style>
26
+
27
+ <div id="printBuildOrder">
28
+ <h2><span style="letter-spacing: 15px">阳春市博能燃气有限公司</span></h2>
29
+ <h2><span style="letter-spacing: 15px">工程派工单</span></h2>
30
+ <table border="1">
31
+ <tr>
32
+ <td>用户编号:</td>
33
+ <td>{{ selectdata.f_userinfo_code }}</td>
34
+ <td>工单编号:</td>
35
+ <td>{{ selectdata.f_child_apply_num }}</td>
36
+ <td>工程编号:</td>
37
+ <td>{{ selectdata.f_apply_num }}</td>
38
+ </tr>
39
+ <tr>
40
+ <td>用户名称:</td>
41
+ <td>{{ selectdata.f_user_name }}</td>
42
+ <td>派工日期:</td>
43
+ <td>{{ selectdata.f_dispatch_date }}</td>
44
+ </tr>
45
+ <tr>
46
+ <td>地址:</td>
47
+ <td colspan="5">{{ selectdata.f_address}}</td>
48
+ </tr>
49
+ <tr>
50
+ <td>户数:</td>
51
+ <td>{{ selectdata.f_apply_count}}</td>
52
+ <td>用气点数量:</td>
53
+ <td>{{ selectdata.f_furnace_num }}</td>
54
+ <td>报建类型:</td>
55
+ <td>{{ selectdata.f_apply_type }}</td>
56
+ </tr>
57
+ <tr>
58
+ <td>区域:</td>
59
+ <td>{{ selectdata.f_apply_region }}</td>
60
+ <td>是否内投:</td>
61
+ <td>{{ selectdata.f_is_inward }}</td>
62
+ <td>报建性质:</td>
63
+ <td>{{ selectdata.f_gas_nature }}</td>
64
+ </tr>
65
+ <tr>
66
+ <td>联系人:</td>
67
+ <td>{{ selectdata.f_user_name }}</td>
68
+ <td>用户电话:</td>
69
+ <td>{{ selectdata.f_phone }}</td>
70
+ <td>预计通气时间:</td>
71
+ <td>{{ selectdata.f_yjgase_time }}</td>
72
+ </tr>
73
+ <tr>
74
+ <td>施工人:</td>
75
+ <td>{{ selectdata.f_budget_people }}</td>
76
+ <td>用气设备:</td>
77
+ <td>{{ selectdata.f_gas_appliances }}</td>
78
+ <td>计划开工时间:</td>
79
+ <td>{{ selectdata.f_release_date }}</td>
80
+ </tr>
81
+ <tr>
82
+ <td>施工内容:</td>
83
+ <td colspan="3">{{ selectdata.f_install_situation }}</td>
84
+ <td>计划完工时间:</td>
85
+ <td>{{ selectdata.f_commencement_date }}</td>
86
+ </tr>
87
+ <tr>
88
+ <td>备注:</td>
89
+ <td colspan="5">{{ selectdata.f_apply_remarks }}</td>
90
+ </tr>
91
+ <tr>
92
+ <td>派单人:</td>
93
+ <td>{{ selectdata.f_dispatcher }}</td>
94
+ <td colspan="2"></td>
95
+ <td>操作人:</td>
96
+ <td>{{ f_operator }}</td>
97
+ </tr>
98
+ </table>
99
+ </div>
100
+ <print-element v-show="false" v-ref:print id='printBuildOrder' styleid='printBuildOrderStyle'
101
+ top='10' left='30' width='100%' height='100%' :type="type">
102
+ </print-element>
103
+ </template>
104
+
105
+ <script>
106
+ Date.prototype.Format = function (fmt) {
107
+ var o = {
108
+ "M+": this.getMonth() + 1, //月份
109
+ "d+": this.getDate(), //日
110
+ "H+": this.getHours(), //小时
111
+ "m+": this.getMinutes(), //分
112
+ "s+": this.getSeconds(), //秒
113
+ "q+": Math.floor((this.getMonth() + 3) / 3), //季度
114
+ "S": this.getMilliseconds() //毫秒
115
+ };
116
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
117
+ for (var k in o)
118
+ if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
119
+ return fmt;
120
+ }
121
+ export default {
122
+ title: '施工安装通知单',
123
+ props: {
124
+ selectdata: {
125
+ type: Object
126
+ },
127
+ type: {
128
+ type: String
129
+ }
130
+ },
131
+ data () {
132
+ return {
133
+ f_operator: this.$login.f.name,
134
+ showModal: false,
135
+ userfile: null
136
+ }
137
+ },
138
+ ready () {
139
+ },
140
+ methods: {
141
+ print () {
142
+ this.$refs.print.PrintTable()
143
+ }
144
+ },
145
+ computed: {
146
+ parse () {
147
+ return JSON.parse(this.selectdata.f_install_project).toString()
148
+ },
149
+ orgs () {
150
+ return this.$login.f.orgs
151
+ }
152
+ }
153
+ }
154
+ </script>
155
+
156
+ <style scoped>
157
+ .control-label-justify {
158
+ display: inline-block;
159
+ vertical-align: top;
160
+ width: 130px;
161
+ text-align: justify;
162
+ font-family: PingFang-SC-Bold;
163
+ }
164
+
165
+ .control-label-justify::after {
166
+ content: "";
167
+ display: inline-block;
168
+ width: 100%;
169
+ overflow: hidden;
170
+ height: 0;
171
+ }
172
+ </style>
@@ -20,6 +20,8 @@ let specialComp = {
20
20
  'supervisory-list': (resolve) => { require(['./pc/SupervisoryList.vue'], resolve) },
21
21
  'supervisory-list-new': (resolve) => { require(['./pc/SupervisoryListNew.vue'], resolve) },
22
22
  'stop-apply-list': (resolve) => { require(['./pc/StopApplyList.vue'], resolve) },
23
- 'supervisory-control-new': (resolve) => { require(['./pc/SupervisoryControlNew'], resolve) }
23
+ 'supervisory-control-new': (resolve) => { require(['./pc/SupervisoryControlNew'], resolve) },
24
+ 'build-order-list': (resolve) => { require(['./pc/buildOrderList'], resolve) },
25
+ 'print-build-order': (resolve) => { require(['./pc/printBuildOrder'], resolve) }
24
26
  }
25
27
  exports.specialComp = specialComp