manage-client 3.3.105 → 3.3.106

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": "manage-client",
3
- "version": "3.3.105",
3
+ "version": "3.3.106",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -0,0 +1,426 @@
1
+ <template>
2
+ <div id="unit" class="flex-row" class="foot_tabset" @keyup.enter="search">
3
+ <div class="basic-main">
4
+ <div class="flex" v-if="!show">
5
+ <criteria-paged :model="model" v-ref:paged @sort="sort">
6
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
7
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
+ <div class="row">
9
+ <div class="col-sm-2 form-group">
10
+ <label class="font_normal_body">开始日期</label>
11
+ <datepicker id="startDate" placeholder="开始日期" style="width:60%"
12
+ v-model="model.startDate"
13
+ :value.sync="model.startDate"
14
+ :format="'yyyy-MM-dd HH:mm:ss'"
15
+ :show-reset-button="true"
16
+ condition="f_operate_date >= '{}'">
17
+ </datepicker>
18
+ </div>
19
+ <div class="col-sm-2 form-group">
20
+ <label class="font_normal_body">结束日期</label>
21
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
22
+ v-model="model.endDate"
23
+ :value.sync="model.endDate"
24
+ :format="'yyyy-MM-dd HH:mm:ss'"
25
+ :show-reset-button="true"
26
+ condition="f_operate_date <= '{}'">
27
+ </datepicker>
28
+ </div>
29
+ <div class="col-sm-2 form-group ">
30
+ <label class="font_normal_body">客户编号</label>
31
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_userinfo_code"
32
+ condition="f_userinfo_code = '{}' " placeholder="客户编号">
33
+ </div>
34
+ <div class="col-sm-2 form-group">
35
+ <label class="font_normal_body" title="旧客户编号">档案编号</label>
36
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_olduserinfo_code"
37
+ condition="f_olduserinfo_code = '{}' " placeholder="档案编号">
38
+ </div>
39
+
40
+
41
+ <div class="span" style="float:right;">
42
+ <button class="button_search button_spacing" @click="search()">查询</button>
43
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
44
+ <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->
45
+
46
+ <export-excel :data="$parent.$parent.getCondition"
47
+ :field="$parent.$parent.getfield"
48
+ :header="$parent.$parent.other"
49
+ v-if="$parent.$parent.authArr.includes('档案查询导出')"
50
+ sqlurl="rs/logic/exportfile" sql-name="changeuserquery" template-name='档案变更导出'
51
+ :choose-col="true"></export-excel>
52
+ <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
53
+ :defaultfield="$parent.$parent.defaultfield"
54
+ titletable="档案变更"
55
+ :sumsmodel="$parent.$parent.sumsmodel"></print-data>
56
+ <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
57
+ </div>
58
+ </div>
59
+
60
+ <div class="row" v-show="$parent.$parent.criteriaShow">
61
+ <res-select-group :initres="$parent.$parent.initres" @re-res="$parent.$parent.getRes" v-ref:sel></res-select-group>
62
+ <div class="col-sm-2 form-group">
63
+ <label class="font_normal_body">客户名称</label>
64
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
65
+ condition="f_user_name like '%{}%'" placeholder="客户名称">
66
+ </div>
67
+ <div class="col-sm-2 form-group">
68
+ <label class="font_normal_body">客户电话</label>
69
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_phone"
70
+ condition="f_user_phone like '%{}%'" placeholder="客户电话">
71
+ </div>
72
+ <div class="col-sm-2 form-group">
73
+ <label class="font_normal_body">表&emsp;&emsp;号</label>
74
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_meter_number"
75
+ condition="f_meternumber = '{}'" placeholder='表号'>
76
+ </div>
77
+ <div class="col-sm-2 form-group">
78
+ <label class="font_normal_body">卡&emsp;&emsp;号</label>
79
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_card_id"
80
+ condition="f_card_id = '{}'" placeholder='卡号'>
81
+ </div>
82
+ <div class="col-sm-2 form-group">
83
+ <label class="font_normal_body">更改内容</label>
84
+ <v-select :value.sync="model.f_field_name"
85
+ v-model="model.f_field_name"
86
+ :options='$parent.$parent.field_name' placeholder='请选择'
87
+ condition="f_field_name = '{}'"
88
+ close-on-select></v-select>
89
+ </div>
90
+ <div class="col-sm-2 form-group">
91
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;社区&nbsp;&nbsp;&nbsp;</label>
92
+ <v-select :value.sync="model.f_community_id"
93
+ v-model="model.f_community_id"
94
+ condition="f_community_id = '{}'"
95
+ :options='$parent.$parent.communitys'
96
+ placeholder='请选择'
97
+ close-on-select></v-select>
98
+ </div>
99
+ </div>
100
+ </div>
101
+ </criteria>
102
+
103
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid @dblclick="$parent.$parent.toBusiness">
104
+ <template partial='head'>
105
+ <tr>
106
+ <th>
107
+ <!--<nobr>客户编号</nobr>-->
108
+ <data-order field="f_userinfo_code" name="客户编号" :order.sync="$parent.$parent.$parent.orderFields.f_userinfo_code"></data-order>
109
+ </th>
110
+ <th>
111
+ <nobr>客户名称</nobr>
112
+ </th>
113
+ <th>
114
+ <nobr>档案编号</nobr>
115
+ </th>
116
+ <th>
117
+ <nobr>客户电话</nobr>
118
+ </th>
119
+ <th>
120
+ <nobr>更改内容</nobr>
121
+ </th>
122
+ <th>
123
+ <nobr>更改前</nobr>
124
+ </th>
125
+ <th>
126
+ <nobr>更改后</nobr>
127
+ </th>
128
+ <th>
129
+ <nobr>操作人</nobr>
130
+ </th>
131
+ <th>
132
+ <!--<nobr>操作日期</nobr>-->
133
+ <data-order field="f_operate_date" name="操作日期" :order.sync="$parent.$parent.$parent.orderFields.f_operate_date"></data-order>
134
+ </th>
135
+ <th>
136
+ <nobr>部门</nobr>
137
+ </th>
138
+ <th>
139
+ <nobr>公司</nobr>
140
+ </th>
141
+ <th>
142
+ <nobr>修改原因</nobr>
143
+ </th>
144
+ </tr>
145
+ </template>
146
+ <template partial='body'>
147
+ <td style="text-align: center;"><nobr>
148
+ <span @click="$parent.$parent.$parent.showmsg(row)"><a>{{row.f_userinfo_code}}</a></span>
149
+ </nobr> </td>
150
+ <td style="text-align: center;">
151
+ <nobr>{{row.f_user_name}}</nobr>
152
+ </td>
153
+ <td style="text-align: center;">
154
+ <nobr>{{row.f_olduserinfo_code}}</nobr>
155
+ </td>
156
+ <td style="text-align: center;">
157
+ <nobr>{{row.f_user_phone}}</nobr>
158
+ </td>
159
+ <td style="text-align: center;">
160
+ <nobr>{{row.f_field_name}}</nobr>
161
+ </td>
162
+ <td style="text-align: center;">
163
+ <nobr>{{row.f_used_content}}</nobr>
164
+ </td>
165
+ <td style="text-align: center;">
166
+ <nobr>{{row.f_new_content}}</nobr>
167
+ </td>
168
+ <td style="text-align: center;">
169
+ <nobr>{{row.f_operator}}</nobr>
170
+ </td>
171
+ <td style="text-align: center;">
172
+ <nobr>{{row.f_operate_date}}</nobr>
173
+ </td>
174
+ <td style="text-align: center;">
175
+ <nobr>{{row.f_depname}}</nobr>
176
+ </td>
177
+ <td style="text-align: center;">
178
+ <nobr>{{row.f_orgname}}</nobr>
179
+ </td>
180
+ <td style="text-align: center;">
181
+ <nobr>{{row.f_comments}}</nobr>
182
+ </td>
183
+ </template>
184
+ <template partial='foot'></template>
185
+ </data-grid>
186
+ </criteria-paged>
187
+ </div>
188
+ <div class="flex" v-if="show">
189
+ <user-info-detail-manage-new :f_userinfo_id="rowdata.f_userinfo_id" @cancel-main="cancel"></user-info-detail-manage-new>
190
+ </div>
191
+ </div>
192
+ </div>
193
+ </template>
194
+
195
+ <script>
196
+ import {HttpResetClass, PagedList} from 'vue-client'
197
+ import defaultPrint from '../../components/sale/config/DefaultPrint'
198
+ import exportConfig from './exportConfig'
199
+
200
+ let readySomething = async function (self) {
201
+
202
+ self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
203
+ self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
204
+ // self.$refs.paged.$refs.cri.search()
205
+ await self.$MagLoadParams.loadParam()
206
+ self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
207
+ self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
208
+ }
209
+ export default {
210
+ title: '档案变更记录',
211
+ data() {
212
+ return {
213
+ data: {},
214
+ other:[],
215
+ footer:[],
216
+ meterbrands: [],
217
+ pricenames: [],
218
+ model: new PagedList('rs/sql/changeuserquery', 20, {orderitem: this.orderitem?'"' + this.orderitem + ' "':`'f_operate_date desc'`}),
219
+ criteriaShow: false,
220
+ orgCondtionStr: '',
221
+ modelval: [],
222
+ printshow: false,
223
+ all: false,
224
+ fields: {},
225
+ //排序
226
+ orderitem:'f_operate_date desc',
227
+ orderFields: {
228
+ f_operate_date: 'no'
229
+ },
230
+ initres: {
231
+ org:[this.$login.f.orgid],
232
+ dep:[],
233
+ user:[],
234
+ },
235
+ communitys:[],
236
+ defaultfield: [],
237
+ config: {
238
+ defaultPrint: ['f_userinfo_code', 'f_user_name', 'f_user_phone']
239
+ },
240
+ show:false,
241
+ rowdata:{},
242
+ thead: '',
243
+ tfoot: '',
244
+
245
+ // tablestate: [{label: '全部', value: ''}, {label: '正常', value: '正常'}, {label: '停用', value: '停用'}],
246
+
247
+
248
+ //合计数据
249
+ sumsmodel: {}
250
+ }
251
+ },
252
+ ready() {
253
+ this.initcommunitys()
254
+ readySomething(this)
255
+ },
256
+ methods: {
257
+ //初始化社区
258
+ async initcommunitys(){
259
+ this.communitys = []
260
+ let HttpReset = new HttpResetClass()
261
+ let req = await HttpReset.load('POST', 'rs/sql/manage_singleTable', {
262
+ data: {
263
+ items: 'id,f_community_name',
264
+ tablename: 't_community',
265
+ orderitem: 'id',
266
+ condition: `1=1`
267
+ }
268
+ }, {resolveMsg: null, rejectMsg: '获取社区失败!'})
269
+ let redata = [{label: "全部", value: ""}]
270
+ req.data.forEach((row, n) => {
271
+ redata.push({
272
+ label: row.f_community_name,
273
+ value: row.id
274
+ })
275
+ })
276
+ this.communitys=redata
277
+ },
278
+ getotherfooter () {
279
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData = [];
280
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData = [];
281
+ this.other = [];
282
+ this.footer = [];
283
+ let exportdata = this.getCondition;
284
+ let otherInData = [];
285
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
286
+ // let footerData = [], exportfield = this.getfield;
287
+ // footerData.push("合计");
288
+ // let self = this;
289
+ // for (var field in self.sumsmodel) {
290
+ // footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`);
291
+ // }
292
+ // this.footer.push(footerData);
293
+ this.other.push(otherInData);
294
+ },
295
+ search(){
296
+ this.$refs.paged.$refs.cri.search()
297
+ },
298
+ cancel() {
299
+ this.show = false
300
+ },
301
+ showmsg(obj){
302
+ this.rowdata=obj
303
+ this.show=true
304
+ },
305
+
306
+ selfSearch(args) {
307
+ args.condition = `${args.condition}` + this.orgCondtionStr
308
+ this.model.search(args.condition, args.model)
309
+ this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
310
+ },
311
+ clear() {
312
+ //清空部门和人员
313
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].selectres = []
314
+ //部门和人员变为全选
315
+ this.$refs.paged.$refs.cri.$refs.sel.$children[1].$children[0].isSelectAll = false
316
+ this.$refs.paged.$refs.cri.$refs.sel.$children[2].$children[0].isSelectAll = false
317
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
318
+ this.$refs.paged.$refs.cri.model[key] = []
319
+ })
320
+ },
321
+ show() {
322
+ this.criteriaShow = true
323
+ },
324
+ hidden() {
325
+ this.criteriaShow = !this.criteriaShow
326
+ },
327
+ getRes(obj) {
328
+ console.log(obj,"========")
329
+ this.orgCondtionStr = obj
330
+ },
331
+ stamp() {
332
+ this.all = false
333
+ //默认选择要打印的列
334
+ this.modelval = defaultPrint.config
335
+ this.fields = this.getfield
336
+ console.log('所有打印字段', this.fields)
337
+ this.printshow = true
338
+ this.put()
339
+ },
340
+ dealmsg(val) {
341
+ console.log('---------------dealmsg')
342
+ val.model = this.model.model
343
+ this.$dispatch('deal-msg', val)
344
+ },
345
+ put() {
346
+ // 对Modelval进行排序
347
+ this.sortModelval()
348
+ this.thead = `<tr><th colspan=${this.modelval.length}>换表查询统计报表</th></tr><tr>`
349
+ for (let key of this.modelval) {
350
+ this.thead += '<th>' + this.fields[key] + '</th>'
351
+ }
352
+ this.thead += '</tr>'
353
+ },
354
+ print() {
355
+ this.$refs.print.PrintAsFile()
356
+ this.printshow = false
357
+ },
358
+ close() {
359
+ this.printshow = false
360
+ this.all = false
361
+ },
362
+ // 对选择的列进行排序
363
+ sortModelval() {
364
+ let sortModel = []
365
+ Object.keys(this.fields).forEach((key) => {
366
+ if (this.modelval.includes(key)) {
367
+ sortModel.push(key)
368
+ }
369
+ })
370
+ this.modelval = sortModel
371
+ console.log('选择的打印的字段', this.modelval)
372
+ },
373
+ sort (field, rule) {
374
+ // 将所有排序方式设为不排序,实现相互排斥
375
+ for (let key in this.orderFields) {
376
+ if (key === field) {
377
+ this.orderFields[key] = rule
378
+ } else {
379
+ this.orderFields[key] = 'no'
380
+ }
381
+ }
382
+ // 如果新规则不排序,还原为默认排序
383
+ if (rule === 'no') {
384
+ this.model.paramSource.orderitem = `'${this.orderitem}'`
385
+ } else {
386
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
387
+ }
388
+
389
+ this.search()
390
+ }
391
+ },
392
+ watch: {
393
+ 'all'(val) {
394
+ if (val) {
395
+ this.modelval = this.bodyData
396
+ } else {
397
+ this.modelval = defaultPrint.config
398
+ this.put()
399
+ }
400
+ },
401
+ 'modelval.length'() {
402
+ this.put()
403
+ },
404
+ sumsmodel:{
405
+ handler: function(val) {
406
+ this.getotherfooter();
407
+ },
408
+ deep: true
409
+ },
410
+ },
411
+ computed: {
412
+ authArr () {
413
+ return this.$login.r ? this.$login.r : []
414
+ },
415
+ getCondition() {
416
+ return {condition: `${this.$refs.paged.$refs.cri.condition}` + this.orgCondtionStr,orderitem:this.orderitem}
417
+ },
418
+ getfield() {
419
+ return exportConfig.changUserConfig
420
+ },
421
+ field_name() {
422
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('更改内容')]
423
+ }
424
+ }
425
+ }
426
+ </script>