sale-client 3.4.179 → 3.4.180

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.
@@ -10,9 +10,9 @@ var compiler = webpack(config)
10
10
 
11
11
  // Define HTTP proxies to your custom API backend
12
12
  // https://github.com/chimurai/http-proxy-middleware
13
- var bendi = 'http://127.0.0.1:8072/',bendi1 = 'http://121.36.106.17:8400/'
13
+ var bendi = 'http://121.36.106.17:8400/',bendi1 = 'http://121.36.106.17:8400/'
14
14
  // 公司测试服务
15
- var fuwu = 'http://192.168.50.4:8400/'
15
+ var fuwu = 'http://121.36.106.17:8400/'
16
16
  //铜川正式
17
17
  // var fuwu = 'http://61.134.55.234:9999/'
18
18
  //铜川测试
@@ -98,8 +98,8 @@ var proxyTable = {
98
98
  },
99
99
  '/rs': {
100
100
  // target: 'http://192.168.30.63:8081/'
101
- // target: 'http://121.36.106.17:8400/'
102
- target: bendi
101
+ target: 'http://121.36.106.17:8400/'
102
+ // target:fuwu
103
103
  }
104
104
  }
105
105
 
@@ -151,7 +151,7 @@ app.use(hotMiddleware)
151
151
  // serve pure static assets
152
152
  app.use('/static', express.static('./static'))
153
153
 
154
- module.exports = app.listen(8086, function (err) {
154
+ module.exports = app.listen(8089, function (err) {
155
155
  if (err) {
156
156
  console.log(err)
157
157
  return
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.4.179",
3
+ "version": "3.4.180",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -851,7 +851,7 @@ export default {
851
851
  'curbalance' () {
852
852
  if (this.model.f_preamount) {
853
853
  if (this.row.f_collection_type === '按金额') {
854
- return ((this.model.f_totalcost - 0) + (this.row.f_balance - 0) - (this.model.f_preamount - 0)).toFixed(4)
854
+ return ((this.model.f_collection - 0) + (this.row.f_balance - 0) - (this.model.f_preamount - 0)).toFixed(4)
855
855
  } else {
856
856
  return ((this.model.f_collection - 0) - (this.model.f_totalcost - 0)).toFixed(4)
857
857
  }
@@ -0,0 +1,601 @@
1
+ <template>
2
+ <criteria-paged :model="model" v-ref:paged>
3
+
4
+ <criteria partial='criteria' @condition-changed='$parent.search' v-ref:cri>
5
+ <div class="form-horizontal select-overspread container-fluid auto" novalidate partial>
6
+ <p class="bg-info text-center" style="padding: 8px;font-size: 20px">用户信息</p>
7
+ <div class="row">
8
+ <div class="col-sm-3 form-group">
9
+ <label for="startDate" class="font_normal_body">安装日期</label>
10
+ <datepicker id="startDate" placeholder="开始日期" style="width:60%"
11
+ v-model="model.startDate1"
12
+ :value.sync="model.startDate1"
13
+ condition="f_install_date >= '{}'"
14
+ :format="'yyyy-MM-dd HH:mm:ss'"
15
+ :show-reset-button="true"
16
+ >
17
+ </datepicker>
18
+ </div>
19
+ <div class="col-sm-3 form-group">
20
+ <label for="endDate" class="font_normal_body">&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
21
+ <datepicker id="endDate" placeholder="结束日期" style="width:60%"
22
+ v-model="model.endDate1"
23
+ :value.sync="model.endDate1"
24
+ condition="f_install_date <= '{}'"
25
+ :format="'yyyy-MM-dd HH:mm:ss'"
26
+ :show-reset-button="true"
27
+ >
28
+ </datepicker>
29
+ </div>
30
+ <div class="span" style="float:right;">
31
+ <button class="button_search button_spacing width-60" @click="search()" v-el:cx>查询</button>
32
+ <button class="button_clear button_spacing width-60" @click="$parent.$parent.getcreate()" v-if="$parent.$parent.userdefinedMessage">生成短信</button>
33
+ <button class="button_search button_spacing width-60" @click="$parent.$parent.getsendmodel()">选择模板</button>
34
+ <button class="button_clear button_spacing width-60" @click="$parent.$parent.addsendmodel()">新增模板</button>
35
+ <button v-show="$parent.$parent.rollback" class="button_clear button_spacing width-60" @click="$parent.$parent.retrun()" v-el:cba>返回</button>
36
+ <!-- <export-excel :data="{orderitem: 'f_userinfo_id',condition: condition}" sqlurl="rs/excel/report/getArrearsInfo/欠费记录导出Excel模板"></export-excel> -->
37
+ <div
38
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
39
+ @click="$parent.$parent.hidden()" class="button_spacing" style="float: right">
40
+ </div>
41
+ </div>
42
+ </div>
43
+ <div class="row" v-show="$parent.$parent.criteriaShow">
44
+ <div class="form-group col-sm-3">
45
+ <label class="font_normal_body">用户类型</label>
46
+ <v-select
47
+ v-model="model.f_user_type"
48
+ placeholder='用户类型'
49
+ :value.sync="model.f_user_type"
50
+ :options='$parent.$parent.getusertype'
51
+ condition="uf.f_user_type = '{}'"
52
+ style="width: 60%"
53
+ close-on-select >
54
+ </v-select>
55
+ </div>
56
+ <div class="form-group col-sm-3">
57
+ <label class="font_normal_body">气表类型</label>
58
+ <v-select :value.sync="model.f_meter_classify" v-model="model.f_meter_classify"
59
+ :options='$parent.$parent.meters' placeholder='气表类型'
60
+ close-on-select
61
+ condition="f_meter_classify = '{}'"
62
+ style="width: 60%"
63
+ default-value="'机表'">
64
+
65
+ </v-select>
66
+ </div>
67
+ <div class="form-group col-sm-3">
68
+ <label class="font_normal_body">用气性质</label>
69
+ <v-select
70
+ v-model="model.f_gasproperties"
71
+ placeholder='用气性质'
72
+ :value.sync="model.f_gasproperties"
73
+ :options='$parent.$parent.gasproperties'
74
+ condition="f_gasproperties = '{}'"
75
+ style="width: 60%"
76
+ close-on-select >
77
+ </v-select>
78
+ </div>
79
+ <div class="form-group col-sm-3">
80
+ <label class="font_normal_body">用户编号</label>
81
+ <input type="text" class="form-control " v-model="model.f_userinfo_code" placeholder='用户编号' v-filter v-figure_filter
82
+ condition="u.f_userinfo_code = '{}'" v-next-el='yhxm' style="width: 60%"
83
+ :size="model.f_userinfo_code ? model.f_userinfo_code.length : 4">
84
+ </div>
85
+ <div class="form-group col-sm-3">
86
+ <label class="font_normal_body">用户姓名</label>
87
+ <input type="text" class="form-control" v-model="model.f_user_name" placeholder='用户姓名' v-filter v-cn_filter
88
+ condition="f_user_name like '%{}%'" v-next-el='resentialarea' v-el:yhxm style="width: 60%"
89
+ :size="model.f_user_name ? model.f_user_name.length : 4">
90
+ </div>
91
+ <div class="form-group col-sm-3">
92
+ <label class="font_normal_body">用户电话</label>
93
+ <input type="text" class="form-control" v-model="model.f_user_phone" placeholder='用户电话' v-filter v-cn_filter
94
+ condition="f_user_phone = '{}'" v-next-el='resentialarea' v-el:yhxm style="width: 60%"
95
+ :size="model.f_user_phone ? model.f_user_phone.length : 4">
96
+ </div>
97
+ <div class="form-group col-sm-3">
98
+ <label class="font_normal_body">选择区域</label>
99
+ <v-select
100
+ v-model="model.f_pcd"
101
+ placeholder='选择区域'
102
+ :value.sync="model.f_pcd"
103
+ :options='$parent.$parent.pcdslist'
104
+ condition="f_pcd = '{}'"
105
+ style="width: 60%"
106
+ close-on-select >
107
+ </v-select>
108
+ </div>
109
+ <div class="form-group col-sm-3">
110
+ <label class="font_normal_body">选择小区</label>
111
+ <v-select
112
+ v-model="model.f_residential_area"
113
+ placeholder='选择小区'
114
+ :value.sync="model.f_residential_area"
115
+ :options='$parent.$parent.residentialArea'
116
+ condition="ua.f_residential_area = '{}'"
117
+ style="width: 60%"
118
+ close-on-select >
119
+ </v-select>
120
+ </div>
121
+ <div class="form-group col-sm-3">
122
+ <label class="font_normal_body">用户地址</label>
123
+ <input type="text" class="form-control" v-model="model.f_address" placeholder='用户地址' v-filter
124
+ condition="f_address like '%{}%'" v-next-el='cx' v-el:resentialarea style="width: 60%"
125
+ :size="model.f_address ? model.f_address.length * 2 : 4">
126
+ </div>
127
+ <div class="form-group col-sm-3">
128
+ <label class="font_normal_body">用户余额</label>
129
+ <input type="number" class="form-control " v-model="model.f_balance" placeholder='用户余额' v-filter v-figure_filter
130
+ condition="u.f_balance >= {}" style="width: 60%"
131
+ :size="model.f_balance ? model.f_balance.length : 4">
132
+ </div>
133
+ <div class="form-group col-sm-3">
134
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
135
+ <input type="number" class="form-control " v-model="model.f_balance_cur" placeholder='用户余额' v-filter v-figure_filter
136
+ condition="u.f_balance <= {}" style="width: 60%"
137
+ :size="model.f_balance_cur ? model.f_balance_cur.length : 4">
138
+ </div>
139
+ <div class="form-group col-sm-3">
140
+ <label class="font_normal_body">应交金额</label>
141
+ <v-input :value.sync="$parent.f_oughtfee" :expression.sync = 'model.f_oughtfee'
142
+ condition="f_oughtfee {}" v-model="model.f_oughtfee" style="width: 60%"
143
+ placeholder="应交金额" v-next-el="cx" ></v-input>
144
+ </div>
145
+ <div class="form-group col-sm-3">
146
+ <label class="font_normal_body">违约金</label>
147
+ <v-input :value.sync="$parent.overdue" :expression.sync = 'model.overdue'
148
+ condition="overdue {}" v-model="model.overdue" style="width: 60%"
149
+ placeholder="违约金" v-next-el="cx" ></v-input>
150
+ </div>
151
+ <div class="col-sm-3 form-group">
152
+ <label class="font_normal_body">抄表日期</label>
153
+ <datepicker placeholder="开始日期"
154
+ style="width:60%"
155
+ class="datepicker"
156
+ v-model="model.startDate"
157
+ :value.sync="model.startDate"
158
+ :format="'yyyy-MM-dd HH:mm:ss'"
159
+ ></datepicker>
160
+ </div>
161
+ <div class="col-sm-3 form-group">
162
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;&nbsp;至&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
163
+ <datepicker placeholder="结束日期"
164
+ style="width:60%"
165
+ v-model="model.endDate"
166
+ :value.sync="model.endDate"
167
+ :format="'yyyy-MM-dd HH:mm:ss'"
168
+ ></datepicker>
169
+ </div>
170
+ </div>
171
+ </div>
172
+ </criteria>
173
+
174
+ <data-grid :model="model" partial='list' class="table_sy" v-ref:grid>
175
+ <template partial='head'>
176
+ <tr>
177
+ <th>
178
+ <input type="checkbox" @click="$parent.$parent.$parent.isAll(model.pageIndex)">
179
+ </th>
180
+ <th>序号</th>
181
+ <th>用户编号</th>
182
+ <th>用户姓名</th>
183
+ <th>用户电话</th>
184
+ <th><nobr>用户类型</nobr></th>
185
+ <th><nobr>气表类型</nobr></th>
186
+ <th><nobr>区域</nobr></th>
187
+ <th><nobr>用气性质</nobr></th>
188
+ <th>用户地址</th>
189
+ <th>用户余额</th>
190
+ <th>抄表时间</th>
191
+ <th>上次抄表底数 </th>
192
+ <th>本次抄表底数 </th>
193
+ <th>应交气量</th>
194
+ <th>应交金额</th>
195
+ <th>账户结余</th>
196
+ <th>欠费金额</th>
197
+ <th>违约金</th>
198
+ </tr>
199
+ </template>
200
+ <template partial='body'>
201
+ <td style="text-align:center">
202
+ <input type="checkbox" v-model="$parent.$parent.$parent.ids"
203
+ :value="row.f_userinfo_code">
204
+ </td>
205
+ <td>{{$index+1}}</td>
206
+ <td style="text-align:center">{{row.f_userinfo_code}}</td>
207
+ <td style="text-align:center">{{row.f_user_name}}</td>
208
+ <td style="text-align:center">{{row.f_user_phone}}</td>
209
+ <td style="text-align:center"><nobr>{{row.f_user_type}}</nobr></td>
210
+ <td style="text-align:center"><nobr>{{row.f_meter_classify}}</nobr></td>
211
+ <td style="text-align:center"><nobr>{{row.f_pcd}}</nobr></td>
212
+ <td style="text-align:center"><nobr>{{row.f_gasproperties}}</nobr></td>
213
+ <td style="text-align:center">{{row.f_address}}</td>
214
+ <td style="text-align:center">{{row.f_balance}}</td>
215
+ <td style="text-align:center">{{row.f_hand_date}}</td>
216
+ <td style="text-align:center">{{row.f_last_tablebase.toFixed(2)}}</td>
217
+ <td style="text-align:center">{{row.f_tablebase.toFixed(2)}}</td>
218
+ <td style="text-align:center">{{row.f_oughtamount.toFixed(2)}}</td>
219
+ <td style="text-align:center">{{row.f_oughtfee.toFixed(2)}}</td>
220
+ <td style="text-align:center">{{row.f_balance.toFixed(2)}}</td>
221
+ <td style="text-align:center">{{row.f_oughtfee_all.toFixed(2)}}</td>
222
+ <td style="text-align:center">{{row.overdue.toFixed(2)}}</td>
223
+ </template>
224
+ </data-grid>
225
+ </criteria-paged>
226
+ <user-defined-message-new :show="definedShow" v-ref:printbill v-on:toggle="close"></user-defined-message-new>
227
+ <modal :show.sync="allshow" v-ref:modal backdrop="false">
228
+ <header slot="modal-header" class="modal-header">
229
+ <h4 class="modal-title">短信发送</h4>
230
+ </header>
231
+ <article slot="modal-body" class="modal-body">
232
+ <div class="form-group row" style="height:auto">
233
+ <label class="label-control">短信内容:</label>{{msg}}
234
+ </div>
235
+ <div class="form-group">
236
+ <label class="label-control">发送截至日期</label>
237
+ <datepicker placeholder="发送截至日期" :value.sync="alldownDate" :disabled-days-of-Week="[]" :format="'yyyy-MM-dd HH:mm:ss'" :show-reset-button="reset"></datepicker>
238
+ </div>
239
+ </article>
240
+
241
+ <footer slot="modal-footer" class="modal-footer">
242
+ <button v-show="allshow" type="button" class="btn btn-default width-60" @click='allclose'>取消</button>
243
+ <button v-show="allshow" type="button" class="btn btn-success width-60" @click='create()'>确认</button>
244
+ </footer>
245
+ </modal>
246
+ <modal :show.sync="infoshow" width="1100px" title="短信模板选择" v-ref:modal large backdrop="false">
247
+ <article slot="modal-body" class="modal-body">
248
+ <criteria-paged :model="model2" v-ref:paged2>
249
+ <data-grid :model="$parent.$parent.model2" v-ref:grid2 partial='list'>
250
+ <template partial='head'>
251
+ <tr>
252
+ <!--<th style="padding: 0;border: 0">
253
+ <input type="checkbox" id="f_operator" v-model="$parent.$parent.$parent.all[model.pageIndex-1]"
254
+ @change="$parent.$parent.$parent.select()" style="width: 22px;height: 22px"/>
255
+ </th>-->
256
+ <th><nobr>选择</nobr></th>
257
+ <th><nobr>短信类型</nobr></th>
258
+ <th><nobr>模板内容</nobr></th>
259
+ <th><nobr>模板状态</nobr></th>
260
+ <th><nobr>模板id</nobr></th>
261
+ <th><nobr><b>创建人</b></nobr></th>
262
+ <th><nobr>操作</nobr></th>
263
+ </tr>
264
+ </template>
265
+ <template partial='body'>
266
+ <td style="text-align: center;"><input type="checkbox" v-model="$parent.$parent.$parent.$parent.sendmodelids" :value="row"></td>
267
+ <td style="text-align: center;">{{row.f_send_type}}</td>
268
+ <td style="text-align: center;" title="{{row.f_user_defined}}" >{{row.f_user_defined}}</td>
269
+ <td style="text-align: center;">{{row.f_state }}</td>
270
+ <td style="text-align: center;">{{row.f_templateid }}</td>
271
+ <td style="text-align: center;"><b>{{row.f_operator}}</b></td>
272
+ <td style="text-align: center;"><nobr>
273
+ <a @click='$parent.$parent.$parent.$parent.edit(row)'>编辑</a>&nbsp;&nbsp;&nbsp;&nbsp;<a @click='$parent.$parent.$parent.$parent.senddelete(row)'>删除</a>
274
+ </nobr></td>
275
+ </template>
276
+ </data-grid>
277
+ </criteria-paged>
278
+ </article>
279
+ <footer slot="modal-footer" class="modal-footer">
280
+ <button type="button" class="btn btn-success width-60" @click='create1'>确定</button>
281
+ <button type="button" class="btn btn-default width-60" @click='infoclose'>关闭</button>
282
+ </footer>
283
+ </modal>
284
+ <modal :show.sync="allshow2" v-ref:modal backdrop="false">
285
+ <header slot="modal-header" class="modal-header">
286
+ <h4 class="modal-title">修正短信内容</h4>
287
+ </header>
288
+ <article slot="modal-body" class="modal-body">
289
+ <div class="form-group row" style="height:auto">
290
+ <label class="label-control">原短信内容:</label>{{msg_old}}
291
+ </div>
292
+ <div class="form-group">
293
+ <label class="label-control">修正为:</label>
294
+ <div class="row auto">
295
+ <textarea class="form-control col-sm-4" v-model="msg_new" rows="8" placeholder=""></textarea>
296
+ </div>
297
+ </div>
298
+ <div class="form-group" style="text-align: center;">
299
+ <h4><b>字数:<span style="color: #5cb85c">{{fontSizeNum}}</span></b></h4>
300
+ </div>
301
+ </article>
302
+ <footer slot="modal-footer" class="modal-footer">
303
+ <button v-show="allshow2" type="button" class="btn btn-default width-60" @click='closeEdit'>取消</button>
304
+ <button v-show="allshow2" type="button" class="btn btn-success width-60" @click='createEdit'>修正</button>
305
+ </footer>
306
+ </modal>
307
+ </template>
308
+
309
+ <script>
310
+ /**
311
+ *阶梯水价查询列表
312
+ */
313
+ import {HttpResetClass, PagedList} from 'vue-client'
314
+ import Vue from 'vue'
315
+
316
+ let readySomething = async function (self) {
317
+ await self.$LoadParams.loadParam(self.f_filialeid)
318
+ self.loadMeterBooks()
319
+ self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString() + ' 00:00:00'
320
+ self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString() + ' 23:59:59'
321
+ }
322
+
323
+ export default {
324
+ data () {
325
+ return {
326
+ model: new PagedList('rs/sql/smsUserInfoNew', 50, {startDate: 'this.model.startDate', endDate: 'this.model.endDate'}),
327
+ model2: new PagedList('rs/sql/getSendModel', 30, {orderitem: " \'id desc\'"}),
328
+ // 短信模板选择
329
+ infoshow: false,
330
+ // 下选后其他查询条件
331
+ criteriaShow: false,
332
+ // 短信发送
333
+ definedShow: false,
334
+ allshow: false,
335
+ allshow2: false,
336
+ alldownDate: '',
337
+ meters: this.$appdata.getParam('气表类型') ? [{
338
+ label: '全部',
339
+ value: ''
340
+ }, ...this.$appdata.getParam('气表类型')] : [],
341
+ startDate: '',
342
+ endDate: '',
343
+ sendtype: '',
344
+ fontSizeNum: 0,
345
+ userdefinedMessage: '',
346
+ f_templateid: '',
347
+ meterbrands: [{label: '全部', value: ''}],
348
+ msg: '',
349
+ ids: [],
350
+ pages: [],
351
+ msg_old: '',
352
+ msg_new: '',
353
+ rowEdit: '',
354
+ sendmodelids: [],
355
+ // 小区
356
+ residentialArea: [],
357
+ getusertype: [{ label: '全部', value: '' },
358
+
359
+ { label: '民用', value: '民用' },
360
+ { label: '非民用', value: '非民用' }],
361
+ gasproperties: this.$appdata.getParam('用气性质') ? [{
362
+ label: '全部',
363
+ value: ''
364
+ }, ...this.$appdata.getParam('用气性质')] : [],
365
+ f_whether: '全部',
366
+ pcdslist: [],
367
+ isFirst: true
368
+ }
369
+ },
370
+ props: {
371
+ orderitem: {
372
+ type: String,
373
+ default: 'f_userinfo_id'
374
+ },
375
+ tablename: {
376
+ type: String,
377
+ default: 't_userinfo'
378
+ },
379
+ items: {
380
+ type: String,
381
+ default: '*'
382
+ },
383
+ rollback: false
384
+ },
385
+ ready () {
386
+ this.getaddress()
387
+ readySomething(this)
388
+ this.$refs.paged.$refs.cri.search()
389
+ },
390
+ watch: {
391
+ 'msg_new' (val) {
392
+ this.fontSizeNum = val.length
393
+ }
394
+ },
395
+ methods: {
396
+ loadMeterBooks () {
397
+ let meterbrand = this.$GetSaleParam.getGasbrand()
398
+ for (let row of meterbrand) {
399
+ this.meterbrands.push({label: row.label, value: row.value.f_meter_brand})
400
+ }
401
+ },
402
+ retrun () {
403
+ this.alllist = false
404
+ this.$dispatch('allchange4')
405
+ },
406
+ async getaddress () {
407
+ console.log('开始获取小区')
408
+ let HttpReset = new HttpResetClass()
409
+ var data = await HttpReset.load('POST', 'rs/sql/address_getarealist', {
410
+ data: {
411
+ condition: `1=1 and s.f_filialeid = '${this.$login.f.orgid}'`
412
+ }
413
+ }, {resolveMsg: null, rejectMsg: '获取小区失败!'})
414
+ console.log('小区', data.data)
415
+ let house = []
416
+ for (let row of data.data) {
417
+ console.log('开始保存小区')
418
+ house.push({label: row.f_residential_area, value: row.f_residential_area})
419
+ }
420
+ this.residentialArea = house
421
+ this.pcdslist = []
422
+ let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
423
+ data: {
424
+ items: '*',
425
+ tablename: 't_pcd',
426
+ orderitem: 'id',
427
+ condition: `1=1 and f_filialeid = '${this.$login.f.orgid}'`
428
+ }
429
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
430
+ let redata = []
431
+ req.data.forEach((row, n) => {
432
+ redata[n] = {
433
+ label: row.f_pcd,
434
+ value: row.id,
435
+ data: row,
436
+ id: row.id
437
+ }
438
+ })
439
+ this.pcdslist = redata
440
+ },
441
+ hidden () {
442
+ this.criteriaShow = !this.criteriaShow
443
+ },
444
+ closeEdit () {
445
+ this.allshow2 = false
446
+ },
447
+ senddelete (row) {
448
+ let setpos = {
449
+ id: row.id,
450
+ f_state: '无效'
451
+ }
452
+ this.$resetpost('rs/entity/t_send_model', setpos, {resolveMsg: '模板删除成功', rejectMsg: '模板删除失败'})
453
+ let condition = "f_state=\'有效\'"
454
+ this.model2.search(condition)
455
+ },
456
+ createEdit () {
457
+ this.allshow2 = false
458
+ let setpos = {
459
+ id: this.rowEdit.id,
460
+ f_user_defined: this.msg_new.replace(/'/g,`''`)
461
+ }
462
+ this.$resetpost('rs/entity/t_send_model', setpos, {resolveMsg: '模板修正成功', rejectMsg: '模板修正失败'})
463
+ this.rowEdit = ''
464
+ this.msg_new = ''
465
+ this.msg_old = ''
466
+ this.sendmodelids = []
467
+ let condition = "f_state=\'有效\' and f_orgid = \'" + Vue.$login.f.orgid + "\'"
468
+ this.model2.search(condition)
469
+ },
470
+ edit (row) {
471
+ this.allshow2 = true
472
+ this.rowEdit = row
473
+ this.msg_old = row.f_user_defined
474
+ this.msg_new = row.f_user_defined
475
+ },
476
+ getsendmodel () {
477
+ let condition = "f_state=\'有效\'"
478
+ let res = this.model2.search(condition)
479
+ console.log('---------------------' + res)
480
+ console.log('this.model2:', this.model2)
481
+ this.infoshow = true
482
+ },
483
+ infoclose () {
484
+ this.infoshow = false
485
+ },
486
+ getcreate () {
487
+ this.allshow = true
488
+ },
489
+ create () {
490
+ this.allshow = false
491
+ this.startDate = this.$refs.paged.$refs.cri.model.startDate
492
+ this.endDate = this.$refs.paged.$refs.cri.model.endDate
493
+ this.model.condition = this.model.condition
494
+ if (this.ids.length !== 0) {
495
+ console.log('ids', this.ids)
496
+ let tems = ''
497
+ for (let i = 0; i < this.ids.length; i++) {
498
+ tems += `'${this.ids[i]}',`
499
+ }
500
+ console.log('tems', tems.substr(0, tems.length - 1), tems)
501
+ this.model.condition = this.model.condition + `and u.f_userinfo_code in (${tems.substr(0, tems.length - 1)})`
502
+ }
503
+ if (this.userdefinedMessage === '' || this.userdefinedMessage === null || this.alldownDate === '' || this.alldownDate === null) {
504
+ this.$showAlert('短信模板及发送截至时间都不能为空!', 'danger', 3000)
505
+ } else {
506
+ this.$dispatch('create', this.model.condition, this.userdefinedMessage, this.f_templateid, this.alldownDate,
507
+ this.sendtype, this.startDate, this.endDate, this.userdefinedMessage)
508
+ this.sendmodelid = []
509
+ this.userdefinedMessage = ''
510
+ this.alldownDate = ''
511
+ this.sendtype = ''
512
+ }
513
+ this.$refs.paged.$refs.cri.search()
514
+ },
515
+ create1 () {
516
+ console.log('kaishi ===', this.sendmodelids)
517
+ if (this.alldownDate === '' || this.alldownDate === null) {
518
+ if (this.sendmodelids.length !== 1) {
519
+ this.$showAlert('短信模板未选择或选择多个!', 'danger', 3000)
520
+ } else {
521
+ console.log('kaishi ===', this.sendmodelids[0])
522
+ this.userdefinedMessage = this.sendmodelids[0].f_user_defined
523
+ this.sendtype = this.sendmodelids[0].f_send_type
524
+ this.f_templateid = this.sendmodelids[0].f_templateid
525
+ this.sendmodelids = []
526
+ this.msg = this.userdefinedMessage
527
+ this.infoshow = false
528
+ this.allshow = true
529
+ }
530
+ }
531
+ },
532
+ search (args) {
533
+ console.log('args1:', args)
534
+ args.condition = `${args.condition} and f_user_state = '正常'`
535
+ args.condition = `${args.condition} and u.f_orgid = '${Vue.$login.f.orgid}'`
536
+ if (this.endDate == '' && this.startDate == '') {
537
+ this.$refs.paged.$refs.cri.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
538
+ this.$refs.paged.$refs.cri.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
539
+ }
540
+ this.startDate = this.$refs.paged.$refs.cri.model.startDate
541
+ this.endDate = this.$refs.paged.$refs.cri.model.endDate
542
+
543
+ console.log('args.model', args.model)
544
+ this.model.search(args.condition, args.model)
545
+ if (this.isFirst) {
546
+ this.isFirst = false
547
+ } else {
548
+ this.$dispatch('allchange3')
549
+ this.alllist = true
550
+ }
551
+ },
552
+ addsendmodel () {
553
+ this.definedShow = true
554
+ },
555
+ allclose () {
556
+ this.allshow = false
557
+ },
558
+ close () {
559
+ this.definedShow = false
560
+ },
561
+ isAll (page) {
562
+ if (this.pages.includes(page)) { // 已添加,取消动作
563
+ // 从ids中删除本页所有数据的ids
564
+ this.addOrRemove(false)
565
+ this.pages = this.pages.filter((item) => {
566
+ return item !== page
567
+ })
568
+ } else { // 未添加
569
+ this.pages.push(page) // 添加id,添加动作
570
+ this.addOrRemove(true)
571
+ }
572
+ },
573
+ addOrRemove (is) {
574
+ let that = this
575
+ if (is) { // 添加本页所有数据到ids中
576
+ this.model.rows.forEach((row) => {
577
+ if (!that.ids.includes(row.f_userinfo_code)) {
578
+ that.ids.push(row.f_userinfo_code)
579
+ }
580
+ })
581
+ } else { // 从ids中取消所有的数据
582
+ this.model.rows.forEach((row) => {
583
+ that.ids = that.ids.filter((item) => {
584
+ return item !== row.f_userinfo_code
585
+ })
586
+ })
587
+ }
588
+ }
589
+ },
590
+ events: {
591
+ 'definedMessage' (val) {
592
+ this.definedShow = false
593
+ }
594
+ }
595
+ }
596
+ </script>
597
+ <style>
598
+ .form-group{
599
+ height: 30px;
600
+ }
601
+ </style>