sale-client 3.6.528 → 3.6.529

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": "sale-client",
3
- "version": "3.6.528",
3
+ "version": "3.6.529",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/Util.js CHANGED
@@ -123,6 +123,12 @@ export function toStandardTimeStringForLastDay () {
123
123
  let date = dt.getDate()
124
124
  return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + +(date < 10 ? '0' + date : date) + ' 23:59:59'
125
125
  }
126
+ export function toStandardTimeStringForTodayEnd () {
127
+ let dt = new Date()
128
+ let month = dt.getMonth() + 1
129
+ let date = dt.getDate()
130
+ return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date) + ' 23:59:59'
131
+ }
126
132
 
127
133
  export function to3339TimeString () {
128
134
  let dt = new Date()
@@ -52,11 +52,11 @@
52
52
  >
53
53
  </div>
54
54
  <div class="form-group col-sm-2">
55
- <label for="startDate" class="font_normal_body">开始日期</label>
56
- <datepicker id="startDate" placeholder="开始日期"
55
+ <label for="startDate" class="font_normal_body">开始时间</label>
56
+ <datepicker id="startDate" placeholder="开始时间"
57
57
  v-model="model.startDate"
58
58
  :value.sync="model.startDate"
59
- :format="'yyyy-MM-dd 00:00:00'"
59
+ :format="'yyyy-MM-dd HH:mm:ss'"
60
60
  :disabled-days-of-Week="[]"
61
61
  condition="f_operate_date >='{}'"
62
62
  style="width:60%"
@@ -64,11 +64,11 @@
64
64
  </datepicker>
65
65
  </div>
66
66
  <div class="form-group col-sm-2">
67
- <label for="endDate" class="font_normal_body">结束日期</label>
68
- <datepicker id="endDate" placeholder="结束日期"
67
+ <label for="endDate" class="font_normal_body">结束时间</label>
68
+ <datepicker id="endDate" placeholder="结束时间"
69
69
  v-model="model.endDate"
70
70
  :value.sync="model.endDate"
71
- :format="'yyyy-MM-dd 23:59:59'"
71
+ :format="'yyyy-MM-dd HH:mm:ss'"
72
72
  :disabled-days-of-Week="[]"
73
73
  condition="f_operate_date <='{}'"
74
74
  style="width:60%"
@@ -203,6 +203,7 @@
203
203
  */
204
204
  import {HttpResetClass, PagedList} from 'vue-client'
205
205
  import Vue from 'vue'
206
+ import * as Util from "../../../Util";
206
207
  export default {
207
208
  title: '结算开票',
208
209
  data () {
@@ -230,8 +231,8 @@
230
231
  mid: [{label: '全部', value: ''}, {label: '是', value: ' > 0 '}, {label: '否', value: ' is null'}],
231
232
  initres: {
232
233
  org: [this.$login.f.orgid],
233
- dep: [],
234
- user: []
234
+ dep: [this.$login.f.depids],
235
+ user: [this.$login.f.id]
235
236
  },
236
237
  sumsmodel: {},
237
238
  other: [],
@@ -255,8 +256,8 @@
255
256
  }
256
257
  },
257
258
  ready () {
258
- this.$refs.paged.$refs.cri.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
259
- this.$refs.paged.$refs.cri.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
259
+ this.$refs.paged.$refs.cri.model.startDate = Util.toStandardTimeStringForFirstDay()
260
+ this.$refs.paged.$refs.cri.model.endDate = Util.toStandardTimeStringForTodayEnd()
260
261
  this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
261
262
  },
262
263
  methods: {
@@ -50,7 +50,7 @@
50
50
  </div>
51
51
  <div class="col-sm-4 col-sm-2">
52
52
  <label class="font_normal_body">&nbsp;开始时间</label>
53
- <datepicker :format="'yyyy-MM-dd 00:00:00'" :value.sync="model.f_start_date"
53
+ <datepicker :format="'yyyy-MM-dd HH:mm:ss'" :value.sync="model.f_start_date"
54
54
  class="datepicker"
55
55
  condition="s.f_operate_date >= '{}'"
56
56
  placeholder="起始时间"
@@ -60,7 +60,7 @@
60
60
  </div>
61
61
  <div class="col-sm-4 col-sm-2">
62
62
  <label class="font_normal_body">结束时间</label>
63
- <datepicker :format="'yyyy-MM-dd 23:59:59'" :value.sync="model.f_end_date"
63
+ <datepicker :format="'yyyy-MM-dd HH:mm:ss'" :value.sync="model.f_end_date"
64
64
  class="datepicker"
65
65
  condition="s.f_operate_date <= '{}'"
66
66
  placeholder="结束时间"
@@ -201,8 +201,8 @@
201
201
  import {HttpResetClass, PagedList} from 'vue-client'
202
202
  import * as Util from '../../../Util'
203
203
  let asyncReadyGen = async function (self) {
204
- self.$refs.paged.$refs.cri.model.f_start_date = Util.toStandardDateString().substr(0, 5) + '01-01'
205
- self.$refs.paged.$refs.cri.model.f_end_date = Util.toStandardDateString()
204
+ self.$refs.paged.$refs.cri.model.f_start_date = Util.toStandardTimeStringForFirstDay()
205
+ self.$refs.paged.$refs.cri.model.f_end_date = Util.toStandardTimeStringForTodayEnd()
206
206
  await self.search()
207
207
  self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
208
208
  }
@@ -225,8 +225,8 @@ export default {
225
225
  is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
226
226
  initres: {
227
227
  org: [this.$login.f.orgid],
228
- dep: [],
229
- user: []
228
+ dep: [this.$login.f.depids],
229
+ user: [this.$login.f.id]
230
230
  },
231
231
  fields: {
232
232
  'f_userinfo_code': '客户编号',
@@ -50,7 +50,7 @@
50
50
  </div>
51
51
  <div class="col-sm-4 col-sm-2">
52
52
  <label class="font_normal_body">&nbsp;开始时间</label>
53
- <datepicker :format="'yyyy-MM-dd 00:00:00'" :value.sync="model.f_start_date"
53
+ <datepicker :format="'yyyy-MM-dd HH:mm:ss'" :value.sync="model.f_start_date"
54
54
  class="datepicker"
55
55
  condition="s.f_operate_date >= '{}'"
56
56
  placeholder="起始时间"
@@ -60,7 +60,7 @@
60
60
  </div>
61
61
  <div class="col-sm-4 col-sm-2">
62
62
  <label class="font_normal_body">结束时间</label>
63
- <datepicker :format="'yyyy-MM-dd 23:59:59'" :value.sync="model.f_end_date"
63
+ <datepicker :format="'yyyy-MM-dd HH:mm:ss'" :value.sync="model.f_end_date"
64
64
  class="datepicker"
65
65
  condition="s.f_operate_date <= '{}'"
66
66
  placeholder="结束时间"
@@ -205,10 +205,11 @@
205
205
  <script>
206
206
  import {HttpResetClass, PagedList} from 'vue-client'
207
207
  import * as Util from '../../../Util'
208
+ import {toStandardTimeString, toStandardTimeStringForFirstDay, toStandardTimeStringForLastDay} from "../../../Util";
208
209
 
209
210
  let asyncReadyGen = async function (self) {
210
- self.$refs.paged.$refs.cri.model.f_start_date = Util.toStandardDateString().substr(0, 5) + '01-01'
211
- self.$refs.paged.$refs.cri.model.f_end_date = Util.toStandardDateString()
211
+ self.$refs.paged.$refs.cri.model.f_start_date = Util.toStandardTimeStringForFirstDay()
212
+ self.$refs.paged.$refs.cri.model.f_end_date = Util.toStandardTimeStringForTodayEnd()
212
213
  await self.search()
213
214
  self.sumsmodel = self.$refs.paged.$refs.grid.model.sums
214
215
  }
@@ -0,0 +1,488 @@
1
+ <template>
2
+ <partial-view v-ref:pv>
3
+ <div class="panel panel-info auto" style="margin-top: auto">
4
+ <div class="panel-heading" style="height: 35px">
5
+ <h4 style="display:inline-block;margin-top: auto">档案信息</h4>
6
+ </div>
7
+ <div class="auto info-content">
8
+ <div class="row" v-if="warninginfo.data.insMsg">
9
+ <p align="center"><font color="red" style="font-weight: bold">{{ warninginfo.data.insMsg }}</font></p>
10
+ </div>
11
+
12
+ <div class="row" :class="[config.f_userinfo_code ? 'highlight' : '']">
13
+ <label class="col-sm-5">客户编号</label>
14
+ <span class="col-sm-7"><a
15
+ @click="dealmsg(data)">{{ data ? data.f_userinfo_code : dafault.f_userinfo_code }}</a></span>
16
+ </div>
17
+ <div class="row" :class="[config.f_user_name ? 'highlight' : '']">
18
+ <label class="col-sm-5">客户名称</label>
19
+ <span class="col-sm-7">{{ data ? data.f_user_name : dafault.f_user_name }}</span>
20
+ </div>
21
+ <div class="row" v-if="data.f_name_pinyin">
22
+ <label class="col-sm-5">名称首拼</label>
23
+ <span class="col-sm-7">{{ data ? data.f_name_pinyin : dafault.f_name_pinyin }}</span>
24
+ </div>
25
+ <div class="row" :class="[config.f_user_type ? 'highlight' : '']">
26
+ <label class="col-sm-5">客户类型</label>
27
+ <span class="col-sm-7">{{ data ? data.f_user_type : dafault.f_user_type }}</span>
28
+ </div>
29
+ <div class="row">
30
+ <label class="col-sm-5">账户余额</label>
31
+ <span class="col-sm-7">{{ data ? data.f_balance : dafault.f_user_type }}</span>
32
+ </div>
33
+ <div class="row" v-show="data.f_project_money && data.f_project_money > 0">
34
+ <label class="col-sm-5">未结金额</label>
35
+ <span class="col-sm-7">{{ data ?data.f_project_money: '' }} | {{ data ?data.f_gas_type: '' }}</span>
36
+ </div>
37
+ <div class="row" v-show="data && data.f_sys_balance !== 0">
38
+ <label class="col-sm-5">系统余额</label>
39
+ <span class="col-sm-7">{{ data.f_sys_balance ? data.f_sys_balance : dafault.f_user_type }}</span>
40
+ </div>
41
+ <div class="row" :class="[config.f_idnumber ? 'highlight' : '']">
42
+ <label class="col-sm-5" style="color: brown">证件号码</label>
43
+ <span class="col-sm-7" style="word-break: break-all;color: brown">{{ data ? data.f_idnumber : dafault.f_idnumber }}
44
+ <span v-if="data"
45
+ @click.stop="changeuseridnumber"
46
+ class="glyphicon glyphicon-pencil clickchange"
47
+ title="修正客户证件号码">
48
+ </span>
49
+ </span>
50
+ </div>
51
+ <div class="row" :class="[config.f_user_phone ? 'highlight' : '']">
52
+ <label class="col-sm-5" style="color: brown">客户电话</label>
53
+ <span class="col-sm-7" style="color: brown">{{ data ? data.f_user_phone : dafault.f_user_phone }}
54
+ <span v-if="data" @click.stop="changeuserphone"
55
+ class="glyphicon glyphicon-pencil clickchange" title="修正客户电话"></span>
56
+ </span>
57
+ </div>
58
+ <div class="row">
59
+ <label class="col-sm-5" style="color: brown">备用电话</label>
60
+ <span class="col-sm-7" style="color: brown">{{ data ? data.f_rent_phone : dafault.f_rent_phone }}
61
+ <span v-if="data" @click.stop="changerentphone"
62
+ class="glyphicon glyphicon-pencil clickchange" title="修正备用电话"></span>
63
+ </span>
64
+ </div>
65
+ <div class="row" :class="[config.f_user_state ? 'highlight' : '']">
66
+ <label class="col-sm-5">客户状态</label>
67
+ <span class="col-sm-7">{{ data ? data.f_user_state : dafault.f_user_state }}</span>
68
+ </div>
69
+ <div class="row" :class="[config.f_comments ? 'highlight' : '']">
70
+ <label class="col-sm-5" style="color: brown">备注信息</label>
71
+ <span class="col-sm-7" style="color: brown">{{ data ? data.f_comments : dafault.f_comments }}
72
+ <span v-if="data" @click.stop="change_reason"
73
+ class="glyphicon glyphicon-pencil clickchange" title="修改备注信息"></span>
74
+ </span>
75
+ </div>
76
+ <div class="row" :class="[config.f_address ? 'highlight' : '']">
77
+ <label class="col-sm-5" style="color: brown">客户地址</label>
78
+ <span class="col-sm-7" style="color: brown">{{ data ? data.f_address : dafault.f_address }}
79
+ <span v-if="data" @click.stop="changeuseraddress"
80
+ class="glyphicon glyphicon-pencil clickchange" title="修改客户地址"></span>
81
+ </span>
82
+ </div>
83
+ <div class="row" :class="[config.f_open_date ? 'highlight' : '']">
84
+ <label class="col-sm-5">开户时间</label>
85
+ <span class="col-sm-7">{{ data ? data.f_open_date.substr(0, 10) : dafault.f_open_date }}</span>
86
+ </div>
87
+ <div class="row" :class="[config.f_input_date ? 'highlight' : '']">
88
+ <label class="col-sm-5">安装时间</label>
89
+ <span class="col-sm-7">{{ data ? data.f_install_date.substr(0, 10) : dafault.f_input_date }}</span>
90
+ </div>
91
+ <div class="row" :class="[config.f_people_num ? 'highlight' : '']">
92
+ <label class="col-sm-5">&emsp;人&ensp;口&ensp;数</label>
93
+ <span class="col-sm-7"
94
+ style="word-break: break-all">{{ data ? data.f_people_num : dafault.f_people_num }}</span>
95
+ </div>
96
+ <div class="row">
97
+ <label class="col-sm-5">客户等级</label>
98
+ <span class="col-sm-7"
99
+ style="word-break: break-all">{{ data ? data.f_user_level : dafault.f_people_num }}</span>
100
+ </div>
101
+ <div class="row">
102
+ <label class="col-sm-5">旧客户编号</label>
103
+ <span class="col-sm-7">{{ data ? data.f_olduserinfo_code : dafault.f_userinfo_code }}</span>
104
+ </div>
105
+ <div class="row">
106
+ <label class="col-sm-5">合同编号</label>
107
+ <span class="col-sm-7">{{ data ? data.f_contract_id : dafault.f_contract_id }}</span>
108
+ </div>
109
+ <modal v-if="showselectncuserinfo" :show.sync="showselectncuserinfo" width="40%" title="修正客户电话号码"
110
+ v-ref:modal large backdrop="false">
111
+ <article slot="modal-body" class="modal-body">
112
+ <div class="form-horizontal">
113
+ <div class="row">
114
+ <div class="col-sm-12 form-group">
115
+ <label class="font_normal_body">旧客户电话</label>
116
+ <input disabled readonly type="text" style="width:80%" class="input_search"
117
+ v-model="data.f_user_phone" placeholder='旧客户电话'>
118
+ </div>
119
+ </div>
120
+ <div class="row">
121
+ <div class="col-sm-12 form-group">
122
+ <label class="font_normal_body">新客户电话</label>
123
+ <input type="text" style="width:80%" class="input_search" v-model="newuserphone"
124
+ placeholder='新客户电话'>
125
+ </div>
126
+ </div>
127
+ </div>
128
+ </article>
129
+ <footer slot="modal-footer" class="modal-footer">
130
+ <button class="button_search" :disabled='!$m.valid ' @click="modifyUser">确定</button>
131
+ <button type="button" class="button_clear" @click='close'>取消</button>
132
+ </footer>
133
+ </modal>
134
+ <modal v-if="showselectncuserrent" :show.sync="showselectncuserrent" width="40%" title="修正客户备用电话"
135
+ v-ref:modal large backdrop="false">
136
+ <article slot="modal-body" class="modal-body">
137
+ <div class="form-horizontal">
138
+ <div class="row">
139
+ <div class="col-sm-12 form-group">
140
+ <label class="font_normal_body">旧客户备用电话</label>
141
+ <input disabled readonly type="text" style="width:80%" class="input_search"
142
+ v-model="data.f_rent_phone" placeholder='旧客户备用电话'>
143
+ </div>
144
+ </div>
145
+ <div class="row">
146
+ <div class="col-sm-12 form-group">
147
+ <label class="font_normal_body">新客户备用电话</label>
148
+ <input type="text" style="width:80%" class="input_search" v-model="newrentphone"
149
+ placeholder='新客户备用电话'>
150
+ </div>
151
+ </div>
152
+ </div>
153
+ </article>
154
+ <footer slot="modal-footer" class="modal-footer">
155
+ <button class="button_search" :disabled='!$m.valid ' @click="modifyUserRent">确定</button>
156
+ <button type="button" class="button_clear" @click='close'>取消</button>
157
+ </footer>
158
+ </modal>
159
+ <modal v-if="reason_show" :show.sync="reason_show" width="40%" title="修改备注信息"
160
+ v-ref:modal large backdrop="false">
161
+ <article slot="modal-body" class="modal-body">
162
+ <div class="form-horizontal">
163
+ <div class="row">
164
+ <div class="col-sm-12 form-group">
165
+ <label class="font_normal_body">旧备注信息</label>
166
+ <input disabled readonly type="text" style="width:80%" class="input_search"
167
+ v-model="data.f_comments" placeholder='旧备注信息'>
168
+ </div>
169
+ </div>
170
+ <div class="row">
171
+ <div class="col-sm-12 form-group">
172
+ <label class="font_normal_body">新备注信息</label>
173
+ <input type="text" style="width:80%" class="input_search" v-model="new_reason"
174
+ placeholder='新备注信息'>
175
+ </div>
176
+ </div>
177
+ </div>
178
+ </article>
179
+ <footer slot="modal-footer" class="modal-footer">
180
+ <button class="button_search" :disabled='!$m.valid ' @click="modifyUserSpecialReson">确定</button>
181
+ <button type="button" class="button_clear" @click='close'>取消</button>
182
+ </footer>
183
+ </modal>
184
+ <modal v-if="showselectncuseridnumber" :show.sync="showselectncuseridnumber" width="40%" title="修改证件号码"
185
+ v-ref:modal large backdrop="false">
186
+ <article slot="modal-body" class="modal-body">
187
+ <div class="form-horizontal">
188
+ <div class="row">
189
+ <div class="col-sm-12 form-group">
190
+ <label class="font_normal_body">旧证件号码</label>
191
+ <input readonly type="text" style="width:80%" class="input_search"
192
+ v-model="data.f_idnumber" placeholder='旧证件号码'>
193
+ </div>
194
+ </div>
195
+ <div class="row">
196
+ <div class="col-sm-12 form-group">
197
+ <label class="font_normal_body">新证件号码</label>
198
+ <input type="text" style="width:80%" class="input_search" v-model="newuseridnumber"
199
+ placeholder='新证件号码'>
200
+ </div>
201
+ </div>
202
+ </div>
203
+ </article>
204
+ <footer slot="modal-footer" class="modal-footer">
205
+ <button class="button_search" :disabled='!newuseridnumber' @click="modifyUserIdNumberReason">确定</button>
206
+ <button type="button" class="button_clear" @click='close'>取消</button>
207
+ </footer>
208
+ </modal>
209
+
210
+ </div>
211
+ </div>
212
+ </partial-view>
213
+
214
+ <!-- 添加修改地址弹窗 -->
215
+ <modal v-if="showAddressModal" :show.sync="showAddressModal" large backdrop="false" :width="900">
216
+ <header slot="modal-header" class="modal-header">
217
+ <h4 class="modal-title">修改客户地址</h4>
218
+ </header>
219
+ <article slot="modal-body" class="modal-body">
220
+ <user-address
221
+ :f_filialeids="f_filialeids"
222
+ :row="addressData"
223
+ :usertype="addressData && addressData.f_special === '1'"
224
+ :disable-building="true"
225
+ :disable-floor="true"
226
+ @confirm="onAddressConfirm"
227
+ @cancel="onAddressCancel">
228
+ </user-address>
229
+ </article>
230
+ <footer slot="modal-footer" class="modal-footer" style="display: none"></footer>
231
+ </modal>
232
+ </template>
233
+
234
+ <script>
235
+ /**
236
+ *用户档案相关信息组件
237
+ */
238
+
239
+ export default {
240
+ ready () {
241
+ console.log('看看userinfo里面接收的data数据:', this.data)
242
+ this.$getConfig(this, 'getUserInfo')
243
+ },
244
+ title: '客户基本信息',
245
+ data () {
246
+ return {
247
+ dafault: {
248
+ f_user_name: '***',
249
+ f_userinfo_code: '********',
250
+ f_people_num: '**',
251
+ f_idnumber: '****',
252
+ f_user_phone: '************',
253
+ f_address: '*****',
254
+ f_user_type: '***',
255
+ f_open_date: '****年**月**日',
256
+ f_input_date: '****年**月**日',
257
+ f_hand_date: '****年**月**日',
258
+ f_rent_phone: '************',
259
+ f_comments: '**',
260
+ f_user_state: '****',
261
+ f_contract_id: '*************'
262
+ },
263
+ config: {
264
+ f_user_name: false,
265
+ f_userinfo_code: false,
266
+ f_people_num: false,
267
+ f_idnumber: false,
268
+ f_user_phone: false,
269
+ f_address: false,
270
+ f_user_type: false,
271
+ f_open_date: false,
272
+ f_input_date: false,
273
+ f_comments: false,
274
+ f_user_state: false
275
+ },
276
+ model: null,
277
+ showselectncuserinfo: false,
278
+ showselectncuserrent: false,
279
+ showselectncuseridnumber: false,
280
+ newuserphone: '',
281
+ newrentphone: '',
282
+ newuseridnumber: '',
283
+ reason_show: false,
284
+ new_reason: '',
285
+ showAddressModal: false,
286
+ addressData: null,
287
+ f_filialeids: ''
288
+ }
289
+ },
290
+ props: ['data', 'warninginfo'],
291
+ methods: {
292
+ async modifyUserSpecialReson () {
293
+ let param = {
294
+ new_reason: this.new_reason,
295
+ f_userinfo_id: this.data.f_userinfo_id,
296
+ f_user_id: this.data.f_user_id,
297
+ f_operator: this.$login.f.name,
298
+ f_operatorid: this.$login.f.id,
299
+ f_orgid: this.$login.f.orgid,
300
+ f_orgname: this.$login.f.orgs,
301
+ f_depid: this.$login.f.depids,
302
+ f_depname: this.$login.f.deps
303
+ }
304
+ await this.$resetpost('/rs/logic/changeuserinfo', {data: param}, {resolveMsg: '修正成功', rejectMsg: null})
305
+ this.data.f_comments = this.new_reason
306
+ this.$parent.$parent.close()
307
+ this.$parent.$parent.clean()
308
+ this.$parent.$parent.$refs.list.searchNoData()
309
+ this.close()
310
+ },
311
+ async modifyUserIdNumberReason () {
312
+ let param = {
313
+ new_idnumber: this.newuseridnumber,
314
+ f_userinfo_id: this.data.f_userinfo_id,
315
+ f_user_id: this.data.f_user_id,
316
+ f_operator: this.$login.f.name,
317
+ f_operatorid: this.$login.f.id,
318
+ f_orgid: this.$login.f.orgid,
319
+ f_orgname: this.$login.f.orgs,
320
+ f_depid: this.$login.f.depids,
321
+ f_depname: this.$login.f.deps
322
+ }
323
+ await this.$resetpost('/rs/logic/changeuserinfo', {data: param}, {resolveMsg: '修正成功', rejectMsg: null})
324
+ this.data.f_idnumber = this.newuseridnumber
325
+ this.$parent.$parent.close()
326
+ this.$parent.$parent.clean()
327
+ this.$parent.$parent.$refs.list.searchNoData()
328
+ this.close()
329
+ },
330
+ change_reason () {
331
+ // 修正客户电话
332
+ this.reason_show = true
333
+ this.new_reason = ''
334
+ },
335
+ dealmsg (val) {
336
+ if (val.f_userinfo_code !== '********') {
337
+ this.$dispatch('deal-msg', val)
338
+ }
339
+ },
340
+ changeuserphone () {
341
+ // 修正客户电话
342
+ this.showselectncuserinfo = true
343
+ this.newuserphone = ''
344
+ },
345
+ async changeuseraddress () {
346
+ // 先查询用户地址信息
347
+ let req = await this.$resetpost('api/af-revenue/sql/address_getAddress', {
348
+ data: {
349
+ items: '*',
350
+ tablename: 't_user_address',
351
+ orderitem: 'id desc',
352
+ condition: ` 1=1 and a.f_filialeid = '${this.data.f_filialeid}' and a.f_userinfo_id = '${this.data.f_userinfo_id}'`
353
+ }
354
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
355
+
356
+ if(req.data && req.data.length > 0) {
357
+ let addressInfo = req.data[0]
358
+ // 修改客户地址
359
+ this.addressData = {
360
+ id: addressInfo.id,
361
+ f_pcd_id: addressInfo.f_pcd_id,
362
+ f_street_id: addressInfo.f_street_id,
363
+ f_residential_area_id: addressInfo.f_residential_area_id,
364
+ f_address: addressInfo.f_address,
365
+ f_building: addressInfo.f_building,
366
+ f_unit: addressInfo.f_unit,
367
+ f_room: addressInfo.f_room,
368
+ f_slice_area: addressInfo.f_slice_area,
369
+ f_address_state: addressInfo.f_address_state,
370
+ f_comments: addressInfo.f_comments,
371
+ f_comments1: addressInfo.f_comments1,
372
+ f_userinfo_id: this.data.f_userinfo_id,
373
+ f_user_id: this.data.f_user_id,
374
+ f_filialeid: this.data.f_filialeid,
375
+ f_operator: this.$login.f.name,
376
+ f_operatorid: this.$login.f.id,
377
+ f_orgid: this.$login.f.orgid,
378
+ f_orgname: this.$login.f.orgs,
379
+ f_depid: this.$login.f.depids,
380
+ f_depname: this.$login.f.deps,
381
+ f_special: addressInfo.f_special,
382
+ f_floor: '',
383
+ f_floor_suffix: ''
384
+ }
385
+ this.f_filialeids = this.data.f_filialeid
386
+ this.showAddressModal = true
387
+ } else {
388
+ this.$showAlert('未找到用户地址信息', 'warning', 2000)
389
+ }
390
+ },
391
+ changeuseridnumber () {
392
+ // 修正客户证件号码
393
+ this.showselectncuseridnumber = true
394
+ this.newuseridnumber = ''
395
+ },
396
+ changerentphone () {
397
+ // 修正客户电话
398
+ this.showselectncuserrent = true
399
+ this.newrentphone = ''
400
+ },
401
+ async modifyUser () {
402
+ let param = {
403
+ new_userphone: this.newuserphone,
404
+ f_userinfo_id: this.data.f_userinfo_id,
405
+ f_user_id: this.data.f_user_id,
406
+ f_operator: this.$login.f.name,
407
+ f_operatorid: this.$login.f.id,
408
+ f_orgid: this.$login.f.orgid,
409
+ f_orgname: this.$login.f.orgs,
410
+ f_depid: this.$login.f.depids,
411
+ f_depname: this.$login.f.deps
412
+ }
413
+ await this.$resetpost('/rs/logic/changeuserinfo', {data: param}, {resolveMsg: '修正成功', rejectMsg: null})
414
+ this.data.f_user_phone = this.newuserphone
415
+ this.$parent.$parent.close()
416
+ this.$parent.$parent.clean()
417
+ this.$parent.$parent.$refs.list.searchNoData()
418
+ this.close()
419
+ },
420
+ async modifyUserRent () {
421
+ let param = {
422
+ new_rentphone: this.newrentphone,
423
+ f_userinfo_id: this.data.f_userinfo_id,
424
+ f_user_id: this.data.f_user_id,
425
+ f_operator: this.$login.f.name,
426
+ f_operatorid: this.$login.f.id,
427
+ f_orgid: this.$login.f.orgid,
428
+ f_orgname: this.$login.f.orgs,
429
+ f_depid: this.$login.f.depids,
430
+ f_depname: this.$login.f.deps
431
+ }
432
+ await this.$resetpost('/rs/logic/changeuserinfo', {data: param}, {resolveMsg: '修正成功', rejectMsg: null})
433
+ this.data.f_rent_phone = this.newrentphone
434
+ this.$parent.$parent.close()
435
+ this.$parent.$parent.clean()
436
+ this.$parent.$parent.$refs.list.searchNoData()
437
+ this.close()
438
+ },
439
+ close () {
440
+ this.showselectncuserinfo = false
441
+ this.showselectncuserrent = false
442
+ this.reason_show = false
443
+ this.showselectncuseridnumber = false
444
+ this.newuserphone = ''
445
+ this.new_reason = ''
446
+ this.new_idnumber = ''
447
+ },
448
+ async onAddressConfirm() {
449
+ // 重新查询用户地址信息
450
+ let req = await this.$resetpost('api/af-revenue/sql/address_getAddress', {
451
+ data: {
452
+ items: '*',
453
+ tablename: 't_user_address',
454
+ orderitem: 'id desc',
455
+ condition: ` 1=1 and a.f_filialeid = '${this.data.f_filialeid}' and a.f_userinfo_id = '${this.data.f_userinfo_id}'`
456
+ }
457
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
458
+
459
+ if(req.data && req.data.length > 0) {
460
+ // 更新本地显示的地址
461
+ this.data.f_address = req.data[0].f_address
462
+ }
463
+
464
+ this.showAddressModal = false
465
+ this.$parent.$parent.close()
466
+ this.$parent.$parent.clean()
467
+ this.$parent.$parent.$refs.list.searchNoData()
468
+ },
469
+ onAddressCancel() {
470
+ this.showAddressModal = false
471
+ }
472
+ },
473
+ watch: {
474
+ 'data' (val) {
475
+ }
476
+ }
477
+ }
478
+ </script>
479
+ <style scoped>
480
+ .clickchange:hover {
481
+ color: #3592ef;
482
+ cursor: pointer;
483
+ }
484
+ .highlight {
485
+ color: brown;
486
+ }
487
+
488
+ </style>
@@ -48,5 +48,6 @@ export default function () {
48
48
  Vue.component('garbage-add', (resolve) => { require(['./GarbageAdd'], resolve) })
49
49
  // 补费扣费
50
50
  Vue.component('deduction-manage', (resolve) => { require(['./FeeDeduction/deductionManage'], resolve) })
51
-
51
+ // 当前选择用户的用户基本信息
52
+ Vue.component('sale-userinfo', (resolve) => { require(['./Userinfo'], resolve) })
52
53
  }