sale-client 3.6.560 → 3.6.562

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.560",
3
+ "version": "3.6.562",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -179,6 +179,7 @@
179
179
  <article slot="modal-body" class="modal-body">
180
180
  <file-upload class="my-file-uploader " name="UploadFile" class="btn btn-success" style="border-radius: 2px;"
181
181
  action="rs/file/uploadFile" tagname="调价导入" v-ref:file :headers="headers" multiple></file-upload>
182
+ <button class="button_clear btn-gn" style="margin-top: 10px;background-color: #6aa6e2;" @click="downloadFiles()">模板下载
182
183
  </article>
183
184
  <footer slot="modal-footer" class="modal-footer">
184
185
  </footer>
@@ -190,7 +191,7 @@ import Vue from 'vue'
190
191
 
191
192
  export default {
192
193
  title: '调价导入',
193
- data() {
194
+ data () {
194
195
  return {
195
196
  model: new PagedList('rs/sql/getsurplus', 20, {items: '"*"', tablename: '"t_meterinfo"', orderitem: '"id"'}),
196
197
  criteriaShow: false,
@@ -213,18 +214,22 @@ export default {
213
214
  show: false
214
215
  }
215
216
  },
216
- ready() {
217
+ ready () {
217
218
  this.search()
218
219
  },
219
220
 
220
221
  methods: {
221
- clear() {
222
+ clear () {
222
223
  Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
223
224
  this.$refs.paged.$refs.criteria.model[key] = []
224
225
  })
225
226
  this.deleteShow = false
226
227
  },
227
- delete() {
228
+ downloadFiles () {
229
+ let downurl = 'rs/downloadfile/file?filename=调价补差导入模板'
230
+ this.$downFile(downurl, '调价补差导入模板.xlsx')
231
+ },
232
+ delete () {
228
233
  if (this.ids.length !== 0) {
229
234
  this.$refs.paged.$refs.criteria.condition = this.$refs.paged.$refs.criteria.condition + 'and id in (' + this.ids + ')'
230
235
  }
@@ -240,14 +245,14 @@ export default {
240
245
  }
241
246
  })
242
247
  },
243
- deleteAdjustImport(condition) {
248
+ deleteAdjustImport (condition) {
244
249
  console.log(condition)
245
250
  return this.$resetpost('rs/logic/deleteAdjustImport', {condition: condition}, {
246
251
  resolveMsg: '删除成功',
247
252
  rejectMsg: '删除失败'
248
253
  })
249
254
  },
250
- isAll(page) {
255
+ isAll (page) {
251
256
  // console.log(this.model.ids)
252
257
  if (this.pages.includes(page)) { // 已添加,取消动作
253
258
  // 从ids中删除本页所有数据的ids
@@ -260,7 +265,7 @@ export default {
260
265
  this.addOrRemove(true)
261
266
  }
262
267
  },
263
- addOrRemove(is) {
268
+ addOrRemove (is) {
264
269
  let that = this
265
270
  if (is) { // 添加本页所有数据到ids中
266
271
  this.ids = []
@@ -278,13 +283,13 @@ export default {
278
283
  })
279
284
  }
280
285
  },
281
- hidden() {
286
+ hidden () {
282
287
  this.criteriaShow = !this.criteriaShow
283
288
  },
284
- search() {
289
+ search () {
285
290
  this.$refs.paged.$refs.criteria.search()
286
291
  },
287
- selfSearch(args) {
292
+ selfSearch (args) {
288
293
  if (!this.f_orgid) {
289
294
  this.getorgCur([this.$login.f.orgid])
290
295
  }
@@ -299,14 +304,14 @@ export default {
299
304
  }
300
305
  },
301
306
 
302
- getorgCur(val) {
307
+ getorgCur (val) {
303
308
  console.log('组织事件返回。。', val[0])
304
309
  this.f_orgid = this.$login.convertToIn(val)
305
310
  this.f_filialeids = val[0]
306
311
  this.$parent.f_filialeid = val[0]
307
312
  this.search()
308
313
  },
309
- importFile() {
314
+ importFile () {
310
315
  this.show = true
311
316
  }
312
317
 
@@ -50,6 +50,7 @@
50
50
  console.log(userinfoid)
51
51
  this.showbuy = true
52
52
  this.f_userinfo_id = userinfoid
53
+ console.log("uuuurl", window.location.href)
53
54
  this.$resetpost('wx/rs/logic/wordToosRept', {f_userinfo_id: this.f_userinfo_id}, {resolveMsg: null, rejectMsg: '获取合同失败!!'}).then(item => {
54
55
  if (item.data.length > 0) {
55
56
  this.scheduleData = item.data[0]
@@ -58,7 +59,8 @@
58
59
  // 2. 对 URL 进行编码
59
60
  let fullUrl = encodeURI(this.url.replace(/\\/g, '/'))
60
61
  this.$resetpost(`rs/convert/convertImg`, {url: fullUrl}, {resolveMsg: null, rejectMsg: null}).then((ret) => {
61
- let img = window.location.href + 'files' + ret.data
62
+ let href = window.location.href.split('#')[0]
63
+ let img = href + 'files' + ret.data
62
64
  this.imgurl = encodeURI(img.replace(/\\/g, '/'))
63
65
  console.log(this.imgurl)
64
66
  this.showbuy = false
@@ -109,7 +109,7 @@
109
109
  v-model="model.f_serial_number" placeholder="业务单号">
110
110
  </div>
111
111
  <div class="col-sm-4">
112
- <label for="f_write_card" style="color: red" class=" font_normal_body">是否写卡</label>
112
+ <label for="f_write_card" style="color: red" class=" font_normal_body">是否写</label>
113
113
  <v-select id="f_write_card"
114
114
  v-model="model.f_write_card"
115
115
  placeholder='是否写卡'
@@ -459,13 +459,21 @@
459
459
  }
460
460
  }
461
461
  },
462
- calText (val) {
463
- let str = ''
462
+ calText(val) {
463
+ let str = '';
464
+ let total = 0; // 用于存储总金额
465
+
464
466
  val.forEach((item) => {
465
- str = str + item.f_price + ' x ' + item.f_gas + '+'
466
- })
467
- str = str.slice(0, str.length - 1)
468
- this.calculatedetail = str
467
+ const price = parseFloat(item.f_price);
468
+ const gas = parseFloat(item.f_gas);
469
+ const result = price * gas; // 计算每项的结果
470
+ total += result; // 累加到总金额
471
+ str += `${price} x ${gas} = ${result.toFixed(3)} + `; // 显示三位小数
472
+ });
473
+
474
+ str = str.slice(0, -2); // 去掉最后的 " + "
475
+ str += ` = ${total.toFixed(3)}`; // 添加总和,并保留三位小数
476
+ this.calculatedetail = str;
469
477
  },
470
478
  close () {
471
479
  this.print = false
@@ -172,7 +172,11 @@ export default {
172
172
  },
173
173
  changeDate () {
174
174
  for (let i = 0; i < this.devicesinfonew.length; i++) {
175
- if (this.devicesinfonew[i].f_devices_type == '报警器') {
175
+ if (this.devicesinfonew[i].f_devices_type == '民用-报警器') {
176
+ this.devicesinfonew[i].f_alarm_type = '民用'
177
+ this.alarmExpireDate(i)
178
+ } else if(this.devicesinfonew[i].f_devices_type == '工商-报警器'){
179
+ this.devicesinfonew[i].f_alarm_type = '工商'
176
180
  this.alarmExpireDate(i)
177
181
  } else if (this.devicesinfonew[i].f_devices_type == '切断阀' || this.devicesinfonew[i].f_devices_type == '自闭阀') {
178
182
  this.expireDate(i)
@@ -200,6 +204,9 @@ export default {
200
204
  } else {
201
205
  let b = new Date(this.devicesinfonew[index].f_firstcheck_date)
202
206
  let year = (b.getFullYear() - 0) + 5
207
+ if(this.devicesinfonew[index].f_alarm_type == '民用'){
208
+ year = (b.getFullYear() - 0) + 3
209
+ }
203
210
  let year2 = (b.getFullYear() - 0) + 1
204
211
  let month = (b.getMonth() - 0) + 1
205
212
  var day = b.getDate()