sale-client 3.6.155 → 3.6.156

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.
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
  var path = require('path')
2
- const [ serverRul, localUrl ] = ['http://192.168.50.4:8400/', 'http://localhost:8080/']
2
+ const [ serverRul, localUrl ] = ['http://192.168.50.4:8400/', 'http://192.168.50.4:8400/']
3
3
  var merge = require('webpack-merge')
4
4
  var baseConfig = require('./webpack.dev.conf')
5
5
  var devConfig = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.155",
3
+ "version": "3.6.156",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -5,7 +5,8 @@
5
5
  <div class="row">
6
6
  <div class="col-sm-4 form-group " :class="[$v.f_user_name.required ? 'has-error' : '']">
7
7
  <label for="f_user_name" class="font_normal_body">*客户姓名</label>
8
- <input type="text" v-model="baseinfo.base.f_user_name" v-validate:f_user_name='{required: true }'
8
+ <input type="text" v-model="baseinfo.base.f_user_name"
9
+ v-validate:f_user_name='()=>getConfigValidate("f_user_name",true)'
9
10
  class="input_search" style="width:60%" placeholder="客户名称" v-next-el="phone">
10
11
  </div>
11
12
  <div style="" class="col-sm-4 form-group"
@@ -242,7 +243,7 @@
242
243
 
243
244
  export default {
244
245
  title: '基本信息',
245
- props: ['baseinfo', 'addressinfo', 'isedit', 'userphonelist'],
246
+ props: ['baseinfo', 'addressinfo', 'isedit', 'userphonelist', 'formconfig'],
246
247
  data () {
247
248
  return {
248
249
  showselectaddress: false,
@@ -282,6 +283,46 @@
282
283
  // this.highMeterPlugin.Stop()
283
284
  },
284
285
  methods: {
286
+ getConfigValidate (name, defaultVal) {
287
+ if (this.formconfig && this.formconfig[name]) {
288
+ let Validate = {}
289
+ if (this.formconfig[name].required) {
290
+ Object.assign(Validate, {required: true})
291
+ }
292
+ if (this.formconfig[name].minlength || this.formconfig[name].minlength === 0) {
293
+ Object.assign(Validate, {minlength: this.formconfig[name].minlength})
294
+ }
295
+ if (this.formconfig[name].maxlength) {
296
+ Object.assign(Validate, {maxlength: this.formconfig[name].maxlength})
297
+ }
298
+ console.log("==================",Validate)
299
+ return Validate
300
+ } else if (defaultVal) {
301
+ return {required: defaultVal}
302
+ }
303
+ return {}
304
+ },
305
+ getConfigShowItem (name) {
306
+ if (this.formconfig && this.formconfig[name]) {
307
+ return this.formconfig[name].showItem
308
+ } else {
309
+ return false
310
+ }
311
+ },
312
+ getConfigLabelName (name) {
313
+ if (this.formconfig && this.formconfig[name]) {
314
+ return this.formconfig[name].labelName
315
+ } else {
316
+ return ''
317
+ }
318
+ },
319
+ getConfigPlaceholder (name) {
320
+ if (this.formconfig && this.formconfig[name]) {
321
+ return this.formconfig[name].placeholder
322
+ } else {
323
+ return ''
324
+ }
325
+ },
285
326
  selectaddress () {
286
327
  this.showselectaddress = true
287
328
  this.isSelect = true
@@ -10,7 +10,7 @@
10
10
  <button class="button_search" style="width: max-content" @click="uploadPictures()">拍照</button>
11
11
  <button class="button_search" style="width: max-content" @click="openBankAccount()" v-if="data.meterinfo[0].f_user_type[0] === '非民用' && ($login.r.includes('银行开户'))">银行开户</button>
12
12
  </div>
13
- <file-user-essential-info :usertype="row?row.f_user_type:null" :userphonelist="data.baseinfo.userphonelist" :baseinfo="data.baseinfo" :addressinfo="data.addressinfo" @valid="essentialInfo = true"
13
+ <file-user-essential-info :formconfig="config.fileUserEssentialInfo" :usertype="row?row.f_user_type:null" :userphonelist="data.baseinfo.userphonelist" :baseinfo="data.baseinfo" :addressinfo="data.addressinfo" @valid="essentialInfo = true"
14
14
  @invalid="essentialInfo = false" v-ref:useressential :isedit="isedit"></file-user-essential-info>
15
15
  <file-userinfo-device :userinfodevices.sync="userinfodevices" :show_userinfodevices.sync="show_userinfodevices"
16
16
  :userinfoid='data.baseinfo.base.f_userinfo_id'></file-userinfo-device>
@@ -115,6 +115,17 @@ import UserPaperInfoTest from './UserPaperInfoTest'
115
115
  import {HttpResetClass} from 'vue-client'
116
116
  import * as Util from '../../Util'
117
117
 
118
+ let getConfigScope = async function (self, name) {
119
+ try {
120
+ let res = await self.$resetget('/rs/vue/' + name + '.json', {resolveMsg: null, rejectMsg: null, newly: true})
121
+ self.config[name] = res.data
122
+ } catch (error) {
123
+ // 忽略704,文件找不到异常
124
+ if (error.status !== 704) {
125
+ throw error
126
+ }
127
+ }
128
+ }
118
129
  let getFileGen = async function (self, data) {
119
130
  let http = new HttpResetClass()
120
131
  try {
@@ -154,7 +165,11 @@ export default {
154
165
  f_building_suffix: '栋',
155
166
  f_unit_suffix: '单元',
156
167
  f_floor_suffix: '层',
157
- f_room_suffix: '室'
168
+ f_room_suffix: '室',
169
+ fileUserEssentialInfo: {},
170
+ fileUserinfoDevice: {},
171
+ fileUserMeterInfo: {},
172
+ userPaperInfo: {}
158
173
  },
159
174
  data: {
160
175
  baseinfo: {
@@ -229,9 +244,20 @@ export default {
229
244
  }
230
245
  },
231
246
  async ready () {
232
- if (this.data.baseinfo.base.f_userinfo_id){
247
+ try {
248
+ console.log('开始获取配置文件')
249
+ // 获取配置文件 用来展示字段是否展示 是否必填
250
+ await getConfigScope(this, 'fileUserEssentialInfo')
251
+ await getConfigScope(this, 'fileUserinfoDevice')
252
+ await getConfigScope(this, 'fileUserMeterInfo')
253
+ await getConfigScope(this, 'userPaperInfo')
254
+ } catch (e) {
255
+ console.warn(e)
256
+ console.warn('获取展示配置失败,按照默认展示')
257
+ }
258
+ if (this.data.baseinfo.base.f_userinfo_id) {
233
259
  this.blodid = this.data.baseinfo.base.f_userinfo_id
234
- }else {
260
+ } else {
235
261
  this.blodid = '临时id' + Date.now()
236
262
  }
237
263
  console.log('ready,,,', this.row)
@@ -242,7 +268,7 @@ export default {
242
268
  // 将小区信息转化为综合信息的格式
243
269
  await this.areainfoInUser(this.areainfo)
244
270
  }
245
- console.log('this.blodid------------>',this.blodid)
271
+ console.log('this.blodid------------>', this.blodid)
246
272
  },
247
273
  watch: {
248
274
  async 'row' (val) {
@@ -33,6 +33,7 @@
33
33
  messText: '',
34
34
  bill: {data: ''},
35
35
  sellingData: [],
36
+ timeOut: this.$appdata.getSingleValue('打印票据间隔时间') ? this.$appdata.getSingleValue('打印票据间隔时间') : 1000,
36
37
  printControl: null
37
38
  }
38
39
  },
@@ -61,8 +62,15 @@
61
62
  for (let row of this.sellingData) {
62
63
  let bill = await this.$resetpost(this.data.billUrl, {data: {condition: row.id, operator: `'${this.data.f_operator}'`}}, {resolveMsg: null})
63
64
  this.bill.data = bill.data
64
- await this.$nextTick()
65
- await this.asyncPrint(select)
65
+ await new Promise(resolve => {
66
+ this.$nextTick(() => {
67
+ setTimeout(() => {
68
+ // 在延迟后执行打印操作
69
+ this.asyncPrint(select)
70
+ resolve()
71
+ }, parseInt(this.timeOut)) // 延迟1秒钟打印下一张票据,可以根据需要调整延迟时间
72
+ })
73
+ })
66
74
  this.printControl = null
67
75
  }
68
76
  this.$dispatch('reissue-success')
@@ -226,6 +226,7 @@ export default {
226
226
  },
227
227
  ready () {
228
228
  this.getfield = this.config.excelHeaders
229
+ this.$refs.paged.$refs.cri.model.oughtfee = ['> 0']
229
230
  // this.search()
230
231
  this.readCiTiaoCard()
231
232
  },
package/src/main.js CHANGED
@@ -4,7 +4,7 @@ import App from './App'
4
4
  import system from 'system-clients/src/system'
5
5
  import sale from './sale'
6
6
  // import wenxi from './filiale/rizhao/sale'
7
- import FilialeSale from './filiale/qianneng/sale'
7
+ import FilialeSale from './filiale/lixianV3/sale'
8
8
  import address from 'address-client/src/address'
9
9
  import ldap from 'ldap-clients/src/ldap'
10
10
  import VueClipboard from 'vue-clipboard2'