apply-clients 3.3.46 → 3.3.47

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.
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <app-sign></app-sign>
2
+ <app-sign @sign-success="signSuccess" :file-path="selectdata.f_construction_sign" @sign-clean="signClean"></app-sign>
3
3
  </template>
4
4
  <script>
5
5
  import {getNowDate,isEmpty} from '../../../Util'
@@ -25,6 +25,14 @@ export default {
25
25
  console.log('===========施工签字================')
26
26
  },
27
27
  methods: {
28
+ signClean () {
29
+ this.selectdata.f_construction_sign = null
30
+ },
31
+ signSuccess (fileUrl) {
32
+ console.log('==============签字回调==================')
33
+ console.log(fileUrl)
34
+ this.selectdata.f_construction_sign = fileUrl
35
+ }
28
36
  },
29
37
  events: {
30
38
  },
@@ -0,0 +1,264 @@
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="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="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="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="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="f_construction_unit = '{}'">
59
+ </div>
60
+ <div class="form-group col-sm-3">
61
+ <label for="startDate" class="font_normal_body">开始时间:</label>
62
+ <datepicker id="startDate" placeholder="开始日期"
63
+ style="width: 60%!important;"
64
+ v-model="model.startDate"
65
+ :value.sync="model.startDate"
66
+ :format="'yyyy-MM-dd 00:00:00'"
67
+ :show-reset-button="true"
68
+ condition="f_construction_date >= '{}'">
69
+ </datepicker>
70
+ </div>
71
+ <div class="form-group col-sm-3">
72
+ <label for="endDate" class="font_normal_body">结束时间:</label>
73
+ <datepicker id="endDate" placeholder="结束日期"
74
+ style="width: 60%!important;"
75
+ v-model="model.endDate"
76
+ :value.sync="model.endDate"
77
+ :format="'yyyy-MM-dd 23:59:59'"
78
+ :show-reset-button="true"
79
+ condition="f_construction_date <= '{}'">
80
+ </datepicker>
81
+ </div>
82
+ </div>
83
+ </div>
84
+ </criteria>
85
+ <data-grid :model="model" optional partial='list' v-ref:grid style="overflow: auto" class="list_area table_sy">
86
+ <template partial='head'>
87
+ <tr>
88
+ <th>序号</th>
89
+ <th>工程编号</th>
90
+ <th>客户名称</th>
91
+ <th>电话</th>
92
+ <th>地址</th>
93
+ <th>安装单位</th>
94
+ <th>安装时间</th>
95
+ </tr>
96
+ </template>
97
+ <template partial='body'>
98
+ <tr >
99
+ <td style="text-align: center;">
100
+ <nobr><font>{{$index+1}}</font></nobr>
101
+ </td>
102
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
103
+ <nobr><font>{{row.f_apply_num}}</font></nobr>
104
+ </td>
105
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
106
+ <nobr><font>{{row.f_user_name}}</font></nobr>
107
+ </td>
108
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
109
+ <nobr><font>{{row.f_phone}}</font></nobr>
110
+ </td>
111
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
112
+ <nobr><font>{{row.f_address}}</font></nobr>
113
+ </td>
114
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
115
+ <nobr><font>{{row.f_construction_unit}}</font></nobr>
116
+ </td>
117
+ <td style="text-align: center;" @click="$parent.$parent.$parent.click(row)">
118
+ <nobr><font>{{row.f_construction_date}}</font></nobr>
119
+ </td>
120
+ </tr>
121
+ </template>
122
+ </data-grid>
123
+ </criteria-paged>
124
+
125
+ <modal :show.sync="showPrint" title="打印预览" v-ref:modal :backdrop="false">
126
+ <header slot="modal-header" class="modal-header">
127
+ <button type="button" class="close" @click="colseModal()"><span>&times;</span></button>
128
+ <h4 class="modal-title">打印预览</h4>
129
+ </header>
130
+ <article slot="modal-body" class="modal-body">
131
+ <print-build-order :selectdata="selectdata" :type="type" v-ref:print></print-build-order>
132
+ </article>
133
+ <footer slot="modal-footer" class="modal-footer">
134
+ <button type="button" class="btn btn-primary" @click="print()">打印</button>
135
+ </footer>
136
+ </modal>
137
+
138
+ <modal :show.sync="showProgress" v-ref:progress :backdrop="false">
139
+ <header slot="modal-header" class="modal-header">
140
+ <h4 class="modal-title">发送打印指令中,请耐心等待...</h4>
141
+ </header>
142
+ <article slot="modal-body" class="modal-body">
143
+ <div class="progress" style="margin: 20px">
144
+ <div class="progress-bar progress-bar-success progress-bar-striped active" :style="{width: percent}">
145
+ {{ percent }}
146
+ </div>
147
+ </div>
148
+ </article>
149
+ <footer slot="modal-footer" class="modal-footer">
150
+ </footer>
151
+ </modal>
152
+ </div>
153
+ </div>
154
+ </template>
155
+
156
+ <script>
157
+ import {PagedList} from 'vue-client'
158
+ import {HttpResetClass} from 'vue-client'
159
+ export default {
160
+ title: '安装项目',
161
+ data () {
162
+ return {
163
+ model: new PagedList('rs/sql/buildOrderList', 30, null),
164
+ criteriaShow: false,
165
+ curorgid: [this.$login.f.orgid],
166
+ selectdata: null,
167
+ showPrint: false,
168
+ showProgress: false,
169
+ percent: 0,
170
+ type: 'PREVIEW'
171
+ }
172
+ },
173
+ ready () {
174
+ // 调用查询
175
+ this.search()
176
+ },
177
+ methods: {
178
+ async batchPrint () {
179
+ let selectPrint = this.$refs.cp.$refs.grid.getRowData()
180
+ if (selectPrint.length > 0) {
181
+ let res = await this.$showMessage(`当前数据条数: ${selectPrint.length}, 条数过大时打印时间可能会过长, 是否确认打印?`)
182
+ if (res == 'confirm') {
183
+ this.showProgress = true
184
+ for (let i = 0; i < selectPrint.length; i++) {
185
+ this.type = 'PRINT'
186
+ await this.getData(selectPrint[i])
187
+ this.print()
188
+ this.percent = this.getPercent(i, selectPrint.length)
189
+ console.log('-------------进度-----------')
190
+ console.log(this.percent)
191
+ }
192
+ this.showProgress = false
193
+ this.percent = 0
194
+ this.$refs.cp.$refs.grid.selectInit()
195
+ }
196
+ } else {
197
+ this.$showAlert('请选择要打印的单子', 'warning', 3000)
198
+ }
199
+ },
200
+ getPercent (num, total){
201
+ num = parseFloat(num);
202
+ total = parseFloat(total);
203
+ if (isNaN(num) || isNaN(total)) {
204
+ return "-";
205
+ }
206
+ return total <= 0? "0%" : Math.round((num / total) * 10000) / 100.0 + "%";
207
+ },
208
+ print () {
209
+ this.$refs.print.print()
210
+ },
211
+ colseModal () {
212
+ this.showPrint = false
213
+ this.selectdata = null
214
+ },
215
+ async click (row) {
216
+ this.type = 'PREVIEW'
217
+
218
+ this.getData(row)
219
+
220
+ this.showPrint = true
221
+ },
222
+ async getData (row) {
223
+ this.selectdata = null
224
+
225
+ let http = new HttpResetClass()
226
+ let data = {
227
+ f_process_id: row.f_process_id,
228
+ actid: row.actid
229
+ }
230
+ let res = await http.load('POST', 'rs/sql/getBuildOrder', {data:data}, {
231
+ resolveMsg: null,
232
+ rejectMsg: '获取施工单失败!!!'
233
+ })
234
+
235
+ this.selectdata = res.data[0]
236
+ },
237
+ clear () {
238
+ Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
239
+ this.$refs.cp.$refs.cri.model[key] = ''
240
+ })
241
+ },
242
+ searchCondition (args) {
243
+ args.condition = args.condition + ` and u.f_orgid = '${this.curorgid[0]}'`
244
+ this.model.search(args.condition, args.model)
245
+ },
246
+ // 查询
247
+ search () {
248
+ this.$refs.cp.$refs.cri.search()
249
+ },
250
+ getorg (val) {
251
+ if (val.length <= 0) {
252
+ return
253
+ }
254
+ this.curorgid = val
255
+ this.search()
256
+ }
257
+ },
258
+ computed: {
259
+ }
260
+ }
261
+ </script>
262
+
263
+ <style scoped>
264
+ </style>
@@ -0,0 +1,153 @@
1
+ <template>
2
+ <style id="printBuildOrderStyle">
3
+ td{
4
+ height: 30px;
5
+ text-align: center;
6
+ }
7
+ table{
8
+ margin: auto;
9
+ width: 100%;
10
+ border-collapse:collapse;
11
+ border: 1px solid black;
12
+ }
13
+ 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
+ <table border="1">
30
+ <tr>
31
+ <td>用户姓名</td>
32
+ <td>{{ selectdata.f_user_name }}</td>
33
+ <td>报装编号</td>
34
+ <td>{{ selectdata.f_apply_num }}</td>
35
+ <td>电&emsp;&emsp;&emsp;&emsp;话</td>
36
+ <td>{{ selectdata.f_phone }}</td>
37
+ </tr>
38
+ <tr>
39
+ <td>用户地址</td>
40
+ <td colspan="3">{{ selectdata.f_address }}</td>
41
+ <td>施工安装时间</td>
42
+ <td>{{ selectdata.f_construction_date }}</td>
43
+ </tr>
44
+ <tr>
45
+ <td>安装项目</td>
46
+ <td>{{ parse }}</td>
47
+ <td>通知时间</td>
48
+ <td>{{ selectdata.sendtime }}</td>
49
+ <td>施工安装单位</td>
50
+ <td>{{ selectdata.f_construction_unit }}</td>
51
+ </tr>
52
+ <tr>
53
+ <td>表号</td>
54
+ <td colspan="2">{{ selectdata.f_meternumber }}</td>
55
+ <td>表封号</td>
56
+ <td colspan="2">{{ selectdata.f_metertitles }}</td>
57
+ </tr>
58
+ <tr>
59
+ <td colspan="6" class="material">
60
+ <p style="margin: 0px 0px 10px 0px">施工安装情况</p>
61
+ <p style="margin: 0px 0px 10px 0px">{{ selectdata.f_material }}</p>
62
+ <!-- <p v-for="item in selectdata.onetomany[0].rows" style="width: auto;display: inline-block;margin: 0px 15px 5px 0px">-->
63
+ <!-- <span style="margin-right: 10px">{{$index + 1}}、{{item.f_material_name}}{{item.f_material_style}}</span>{{item.f_material_number}}{{item.f_material_unit}}-->
64
+ <!-- </p>-->
65
+ </td>
66
+ </tr>
67
+ <tr style="height: 80px">
68
+ <td colspan="2" class="sign">施工安装单位(签字)</td>
69
+ <td colspan="2" class="sign">工程验收(签字)</td>
70
+ <td colspan="2" class="sign">用户(签字)</td>
71
+ </tr>
72
+ <tr>
73
+ <td>备&emsp;&emsp;注</td>
74
+ <td colspan="5">{{ selectdata.f_construction_remarks }}</td>
75
+ </tr>
76
+ </table>
77
+ </div>
78
+
79
+ <print-element v-show="false" v-ref:print id='printBuildOrder' styleid='printBuildOrderStyle'
80
+ top='10' left='30' width='100%' height='100%' :type="type">
81
+ </print-element>
82
+
83
+ </template>
84
+
85
+ <script>
86
+ import { isEmpty } from '../../../Util'
87
+ import {HttpResetClass} from "vue-client";
88
+ Date.prototype.Format = function (fmt) {
89
+ var o = {
90
+ "M+": this.getMonth() + 1, //月份
91
+ "d+": this.getDate(), //日
92
+ "H+": this.getHours(), //小时
93
+ "m+": this.getMinutes(), //分
94
+ "s+": this.getSeconds(), //秒
95
+ "q+": Math.floor((this.getMonth() + 3) / 3), //季度
96
+ "S": this.getMilliseconds() //毫秒
97
+ };
98
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
99
+ for (var k in o)
100
+ if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
101
+ return fmt;
102
+ }
103
+ export default {
104
+ title: '施工安装通知单',
105
+ props: {
106
+ selectdata: {
107
+ type: Object
108
+ },
109
+ type: {
110
+ type: String
111
+ }
112
+ },
113
+ data () {
114
+ return {
115
+ showModal: false,
116
+ userfile: null
117
+ }
118
+ },
119
+ ready () {
120
+ },
121
+ methods: {
122
+ print () {
123
+ this.$refs.print.PrintTable()
124
+ }
125
+ },
126
+ computed: {
127
+ parse () {
128
+ return JSON.parse(this.selectdata.f_install_project).toString()
129
+ },
130
+ orgs () {
131
+ return this.$login.f.orgs
132
+ }
133
+ }
134
+ }
135
+ </script>
136
+
137
+ <style scoped>
138
+ .control-label-justify {
139
+ display: inline-block;
140
+ vertical-align: top;
141
+ width: 130px;
142
+ text-align: justify;
143
+ font-family: PingFang-SC-Bold;
144
+ }
145
+
146
+ .control-label-justify::after {
147
+ content: "";
148
+ display: inline-block;
149
+ width: 100%;
150
+ overflow: hidden;
151
+ height: 0;
152
+ }
153
+ </style>
@@ -122,6 +122,18 @@
122
122
  condition="f_apply_date <= '{}'">
123
123
  </datepicker>
124
124
  </div>
125
+ <div class="form-group col-sm-3">
126
+ <label class="font_normal_body">稍后处理:</label>
127
+ <v-select
128
+ v-model="model.f_is_later"
129
+ placeholder='稍后处理'
130
+ condition="f_is_later = '{}'"
131
+ :value.sync="model.f_is_later"
132
+ :options='$parent.$parent.laterList'
133
+ class="select select_list"
134
+ :value-single="true"
135
+ close-on-select ></v-select>
136
+ </div>
125
137
  </div>
126
138
  </div>
127
139
  </criteria>
@@ -139,7 +151,7 @@
139
151
  <th style="white-space: nowrap;">办理环节</th>
140
152
  <th style="white-space: nowrap;">流程状态</th>
141
153
  <th style="white-space: nowrap;">报建日期</th>
142
- <!-- <th style="white-space: nowrap;">操作</th>-->
154
+ <th style="white-space: nowrap;">操作</th>
143
155
  </tr>
144
156
  </template>
145
157
  <template partial='body'>
@@ -177,18 +189,19 @@
177
189
  <td @click="$parent.$parent.$parent.click(row)" :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
178
190
  <nobr><font>{{row.f_apply_date}}</font></nobr>
179
191
  </td>
180
- <!-- <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">-->
181
- <!-- <dropdown>-->
182
- <!-- <button type="button" data-toggle="dropdown" style="border: 0px;background: none;">-->
183
- <!-- <span class="glyphicon glyphicon-th-list" style="position: inherit;"></span>-->
184
- <!-- </button>-->
185
- <!-- <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">-->
186
- <!-- <li>-->
187
- <!-- <a href="#" @click="$parent.$parent.$parent.click(row)">{{row.defname}}</a>-->
188
- <!-- </li>-->
189
- <!-- </ul>-->
190
- <!-- </dropdown>-->
191
- <!-- </td>-->
192
+ <td :class="[ row.isover ==='过期' ? 'p1' : row.isbeforeover === '预期提醒'? 'p':'' ]" style="text-align: center;">
193
+ <dropdown>
194
+ <button type="button" data-toggle="dropdown" style="border: 0px;background: none;">
195
+ <span class="glyphicon glyphicon-th-list" style="position: inherit;"></span>
196
+ </button>
197
+ <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">
198
+ <li>
199
+ <a href="#" @click="$parent.$parent.$parent.click(row)">{{row.defname}}</a>
200
+ <a href="#" @click="$parent.$parent.$parent.later(row)" v-if="row.f_is_later !== '是'">稍后处理</a>
201
+ </li>
202
+ </ul>
203
+ </dropdown>
204
+ </td>
192
205
  </tr>
193
206
  </template>
194
207
  </data-grid>
@@ -257,7 +270,12 @@ import {HttpResetClass, PagedList} from 'vue-client'
257
270
  defnames: [{label: '全部', value: ''}], // 流程节点
258
271
  applyNatures: [{label: '全部', value: ''}], // 报建性质
259
272
  criteriaShow: false,
260
- showFile: false
273
+ showFile: false,
274
+ laterList: [
275
+ {label: '全部', value: ''},
276
+ {label: '是', value: '是'},
277
+ {label: '否', value: '否'}
278
+ ]
261
279
  }
262
280
  },
263
281
  ready () {
@@ -265,6 +283,13 @@ import {HttpResetClass, PagedList} from 'vue-client'
265
283
  this.search()
266
284
  },
267
285
  methods: {
286
+ later (row) {
287
+ this.$showMessage('您确定要将此任务加入稍后处理吗?', ['confirm']).then((res) => {
288
+ if (res === 'confirm') {
289
+ this.$dispatch('later', row)
290
+ }
291
+ })
292
+ },
268
293
  closeFile () {
269
294
  this.showFile = false
270
295
  // 将选的文件清空
@@ -95,6 +95,15 @@
95
95
  })
96
96
 
97
97
  },
98
+ async 'later' (row) {
99
+ row.f_is_later = '是'
100
+ let res = await this.$resetpost(
101
+ 'rs/entity/t_apply',
102
+ row
103
+ )
104
+
105
+ this.$refs.query.loadPage()
106
+ },
98
107
  // 初始化
99
108
  async 'apply' (val) {
100
109
  this.showtotal = false