sale-client 4.2.36 → 4.2.38

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.
@@ -1,7 +1,7 @@
1
1
  var path = require('path')
2
2
  var checkVersion = require('./versionCheck.js')
3
3
  checkVersion()
4
- const [ serverRul, localUrl ] = ['http://116.204.75.91:31467/', 'http://127.0.0.1:9026']
4
+ const [ serverRul, localUrl ] = ['http://192.168.50.67:31567/', 'http://127.0.0.1:9026']
5
5
  var merge = require('webpack-merge')
6
6
  var baseConfig = require('./webpack.dev.conf')
7
7
  var devConfig = {
@@ -19,51 +19,51 @@ var devConfig = {
19
19
  children: false // 不输出子模块构建信息
20
20
  },
21
21
  proxy: {
22
- // '/api/af-revenue/logic/depositCharge': {
23
- // pathRewrite: {
24
- // '/api/af-revenue/logic': '/logic'
25
- // },
26
- // target: 'http://127.0.0.1:9026'
27
- // },
28
- // '/api/af-revenue/logic': {
29
- // pathRewrite: {
30
- // '/api/af-revenue/logic': '/logic'
31
- // },
32
- // target: localUrl
33
- // },
34
- // '/api/af-revenue/file': {
35
- // pathRewrite: {
36
- // '/api/af-revenue/file': '/file'
37
- // },
38
- // target: localUrl
39
- // },
40
- // 'api/af-revenue/entity/save': {
41
- // pathRewrite: {
42
- // '/api/af-revenue/entity/save': '/entity/save'
43
- // },
44
- // target: localUrl
45
- // },
46
- // '/singlepage': {
47
- // // pathRewrite: {
48
- // // '/weixin2/rs': '/rs'
49
- // // },
50
- // target: localUrl
51
- // },
52
- // '/weixin2/rs': {
53
- // pathRewrite: {
54
- // '/weixin2/rs': '/singlepage/weixin2/rs'
55
- // },
56
- // target: localUrl
57
- // },
58
- // '/api/af-revenue/sql': {
59
- // pathRewrite: {
60
- // '/api/af-revenue/sql': '/sql'
61
- // },
62
- // target: localUrl
63
- // },
64
- // '/rs/pay': {
65
- // target: serverRul
66
- // },
22
+ '/api/af-revenue/logic/depositCharge': {
23
+ pathRewrite: {
24
+ '/api/af-revenue/logic': '/logic'
25
+ },
26
+ target: 'http://127.0.0.1:9026'
27
+ },
28
+ '/api/af-revenue/logic': {
29
+ pathRewrite: {
30
+ '/api/af-revenue/logic': '/logic'
31
+ },
32
+ target: localUrl
33
+ },
34
+ '/api/af-revenue/file': {
35
+ pathRewrite: {
36
+ '/api/af-revenue/file': '/file'
37
+ },
38
+ target: localUrl
39
+ },
40
+ 'api/af-revenue/entity/save': {
41
+ pathRewrite: {
42
+ '/api/af-revenue/entity/save': '/entity/save'
43
+ },
44
+ target: localUrl
45
+ },
46
+ '/singlepage': {
47
+ // pathRewrite: {
48
+ // '/weixin2/rs': '/rs'
49
+ // },
50
+ target: localUrl
51
+ },
52
+ '/weixin2/rs': {
53
+ pathRewrite: {
54
+ '/weixin2/rs': '/singlepage/weixin2/rs'
55
+ },
56
+ target: localUrl
57
+ },
58
+ '/api/af-revenue/sql': {
59
+ pathRewrite: {
60
+ '/api/af-revenue/sql': '/sql'
61
+ },
62
+ target: localUrl
63
+ },
64
+ '/rs/pay': {
65
+ target: serverRul
66
+ },
67
67
  '/api': {
68
68
  target: serverRul,
69
69
  changeOrigin: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "4.2.36",
3
+ "version": "4.2.38",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -38,6 +38,17 @@
38
38
  </div>
39
39
  </div>
40
40
  <div class="row" style="margin-top:10px;" v-if="model.f_type == '卡表退费'">
41
+ <div class="col-sm-4 form-group">
42
+ <label for="f_print" class="font_normal_body">打印格式</label>
43
+ <v-select id="print"
44
+ v-model="model.f_print"
45
+ style="width:60%"
46
+ placeholder='请选择'
47
+ :value.sync="model.f_print"
48
+ :options='printstyle'
49
+ close-on-select clear-button>
50
+ </v-select>
51
+ </div>
41
52
  <div class="col-sm-4 form-group" :class="[$v.f_pregas.required || $v.f_pregas.dctest ? 'has-error' : 'has-success']">
42
53
  <label for="f_pregas" class="font_normal_body">退费气量</label>
43
54
  <input class="input_search" style="width:60%" type="number"
@@ -61,7 +72,8 @@
61
72
  <button class="button_clear btn-gn" @click="clean()">取消</button>
62
73
  </div>
63
74
  </validator>
64
- <!--<print-bill :show="print" :bill-manager='config.hasBillManage' v-ref:printbill :bill-url='billUrl' v-on:toggle="clean" @printok="printok" :data='printModel'></print-bill>-->
75
+ <validate-bill v-if="hasValidateBill" :data="row" @validate-bill="validateBill"></validate-bill>
76
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' @toggle="clean" @printok="printok" :data='row' v-ref:printbill></print-bill>
65
77
  <modal :show.sync="modalShow" v-ref:modalShow backdrop="false">
66
78
  <article slot="modal-body" class="modal-body">
67
79
  <div class="modal_class flex">
@@ -109,6 +121,13 @@
109
121
 
110
122
 
111
123
  <script>
124
+ let readyGen = async function (self) {
125
+ await self.$getConfig(self, 'OtherRefundConfig')
126
+ self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
127
+ self.model.f_payment = [self.config.payment]
128
+ self.hasValidateBill = self.config.hasBillManage
129
+ console.log('其他退费config', self.config, self.model)
130
+ }
112
131
  export default {
113
132
  title: '退保证金',
114
133
  data () {
@@ -116,9 +135,17 @@
116
135
  model: {
117
136
  f_refund_fee: '',
118
137
  f_comments: '',
138
+ f_print: '',
139
+ f_payment: '',
119
140
  f_price: 0,
120
141
  f_pregas: 0
121
142
  },
143
+ config: {
144
+ hasPrint: false, // 默认打票
145
+ hasBillManage: false, // 默认不启用发票管理
146
+ printType: '普通收据',
147
+ payment: '现金缴费'
148
+ },
122
149
  dis: false,
123
150
  blodid: '',
124
151
  hasValidateBill: false,
@@ -142,11 +169,13 @@
142
169
  modalData: {
143
170
  rows: []
144
171
  },
145
- modalShow: false
172
+ modalShow: false,
173
+ printstyle: this.$appdata.getParam('打印格式')
146
174
  }
147
175
  },
148
176
  props: ['row'],
149
177
  ready () {
178
+ readyGen(this)
150
179
  },
151
180
  watch: {
152
181
  async 'model.f_type' (val) {
@@ -279,12 +308,36 @@
279
308
  } else {
280
309
  url = 'api/af-revenue/logic/yajincancel'
281
310
  }
282
- await this.$resetpost(url, {data: param}, {
311
+ let res = await this.$resetpost(url, {data: param}, {
283
312
  warnMsg: `确定要进行${this.model.f_type}操作吗?`,
284
313
  resolveMsg: `${this.model.f_type}操作成功!!`,
285
314
  rejectMsg: `${this.model.f_type}操作失败!!请重试!!`
286
315
  })
287
- this.$dispatch('success')
316
+ if (this.model.f_type == '卡表退费') {
317
+ if (this.model.f_print.indexOf('电子发票') == -1 && this.config.hasPrint) {
318
+ console.log('this.config.hasBillManage', this.config.hasBillManage)
319
+ if (this.config.hasBillManage) {
320
+ // 启用发票管理,获取票据管理中的票号并存储记录
321
+ this.row.id = res.data.id
322
+ this.row.f_bill_type = '卡表退费'
323
+ this.row.f_bill_style = this.model.f_print[0]
324
+ this.print = true
325
+ } else {
326
+ this.row.id = res.data.id
327
+ this.print = true
328
+ }
329
+ } else if (this.config.printType === '国税发票') {
330
+ // TODO
331
+ this.$dispatch('success')
332
+ } else if (this.config.printType === '电子发票') {
333
+ // TODO
334
+ this.$dispatch('success')
335
+ } else {
336
+ this.$dispatch('success')
337
+ }
338
+ } else {
339
+ this.$dispatch('success')
340
+ }
288
341
  }
289
342
  },
290
343
  clean () {
@@ -340,7 +340,7 @@
340
340
  }
341
341
  }
342
342
  if (row.type === '物联网收费' || row.type === '卡表赠气' || row.type === '物联网赠费' || row.type === '卡表赠费' || row.type === '物联网赠气') {
343
- let table_name = this.$appdata.getSingleValue('新抄表')? 't_web_handplan' : 't_handplan'
343
+ let table_name = this.$appdata.getSingleValue('新抄表') ? 't_web_handplan' : 't_handplan'
344
344
  let getWebHand = await this.$SqlService.singleTable(table_name, `f_hand_state = '有效' and f_input_date > '${row.f_operate_date}' and f_userfiles_id = '${row.f_userfiles_id}'`)
345
345
  console.log('长度', getWebHand)
346
346
  if (getWebHand.data.length > 0) {
@@ -474,7 +474,7 @@
474
474
  name = 'api/af-revenue/report/pre_sell'
475
475
  } else if (type === '调价预存') {
476
476
  name = 'api/af-revenue/report/refund_sell'
477
- } else if (type === '退费') {
477
+ } else if (type === '退费' || type === '卡表退费') {
478
478
  name = 'api/af-revenue/report/refund_sell'
479
479
  } else if (type === '调价补费') {
480
480
  name = 'api/af-revenue/report/compensation_bill'
@@ -340,7 +340,7 @@
340
340
  }
341
341
  }
342
342
  if (row.type === '物联网收费' || row.type === '卡表赠气' || row.type === '物联网赠费' || row.type === '卡表赠费' || row.type === '物联网赠气') {
343
- let table_name = this.$appdata.getSingleValue('新抄表')? 't_web_handplan' : 't_handplan'
343
+ let table_name = this.$appdata.getSingleValue('新抄表') ? 't_web_handplan' : 't_handplan'
344
344
  let getWebHand = await this.$SqlService.singleTable(table_name, `f_hand_state = '有效' and f_input_date > '${row.f_operate_date}' and f_userfiles_id = '${row.f_userfiles_id}'`)
345
345
  console.log('长度', getWebHand)
346
346
  if (getWebHand.data.length > 0) {
@@ -474,7 +474,7 @@
474
474
  name = 'api/af-revenue/report/pre_sell'
475
475
  } else if (type === '调价预存') {
476
476
  name = 'api/af-revenue/report/refund_sell'
477
- } else if (type === '退费') {
477
+ } else if (type === '退费' || type === '卡表退费') {
478
478
  name = 'api/af-revenue/report/refund_sell'
479
479
  } else if (type === '调价补费') {
480
480
  name = 'api/af-revenue/report/compensation_bill'
@@ -73,6 +73,7 @@ let loadGen = async function (self) {
73
73
  let owes = res.data
74
74
  self.refreshCenter(owes)
75
75
  }
76
+ console.log('垃圾费收费config', self.config, self.model)
76
77
  }
77
78
  /**
78
79
  *售气收费
@@ -91,13 +92,13 @@ export default {
91
92
  payment: '现金',
92
93
  billType: '燃气费'
93
94
  },
94
- print:false,
95
+ print: false,
95
96
  paytype: this.$appdata.getParam('付款方式'),
96
97
  printstyle: this.$appdata.getParam('打印格式'),
97
98
  printInvoiceType: this.$appdata.getSingleValue('电子票打印类型') ? this.$appdata.getSingleValue('电子票打印类型') : '电子发票',
98
99
  garbagelist: [],
99
100
  billData: {
100
- url: 'api/af-revenue/report/sendCard_bill',
101
+ url: 'api/af-revenue/report/garbageChargeReport',
101
102
  bill: ''
102
103
  },
103
104
  garbagefee: 0,
@@ -109,7 +110,7 @@ export default {
109
110
  chargeView: false
110
111
  }
111
112
  },
112
- props: ['row','cardData'],
113
+ props: ['row', 'cardData'],
113
114
  ready () {
114
115
  this.initData(this.row)
115
116
  this.blodid = this.row.f_userinfo_id
@@ -152,11 +153,9 @@ export default {
152
153
  this.row.id = res.data.recordId
153
154
  this.row.f_bill_type = '垃圾费'
154
155
  this.row.f_bill_style = this.model.f_print
155
- this.billData.url = 'api/af-revenue/report/garbageChargeReport'
156
156
  this.print = true
157
157
  } else {
158
158
  this.row.id = res.data.recordId
159
- this.billData.url = 'api/af-revenue/report/garbageChargeReport'
160
159
  this.print = true
161
160
  }
162
161
  } else if (this.config.printType === '国税发票') {
@@ -305,3 +305,15 @@
305
305
  }
306
306
  }
307
307
  </script>
308
+
309
+ <style scoped>
310
+ .auto {
311
+ min-height: 900px; /* 给足够的高度让下拉框显示 */
312
+ overflow: visible !important;
313
+ }
314
+
315
+ /* 确保下拉菜单显示完整 */
316
+ .v-select .dropdown-menu {
317
+ z-index: 1050 !important;
318
+ }
319
+ </style>
@@ -243,8 +243,9 @@ export default {
243
243
  'f_audit_date': '审核时间',
244
244
  'f_orgname': '所属公司',
245
245
  'f_depname': '所属部门',
246
- 'f_operator':'操作人',
247
- 'f_operatorid':'操作人ID'
246
+ 'f_operator': '操作人',
247
+ 'f_operatorid': '操作人ID',
248
+ 'f_comments': '备注'
248
249
  }
249
250
  }
250
251
  },
@@ -330,12 +331,12 @@ export default {
330
331
  if (this.model.f_meter_classify.indexOf('卡表') >= 0) {
331
332
  this.model.f_result_state = this.model.f_hand_state
332
333
  this.model.f_hand_date = this.model.f_input_date
333
- await this.$resetpost('api/af-revenue/entity/t_cardhand', this.model, {
334
+ await this.$resetpost('api/af-revenue/entity/save/t_cardhand', this.model, {
334
335
  resolveMsg: '修改成功',
335
336
  rejectMsg: '未通过,修改出错!!!'
336
337
  })
337
338
  } else {
338
- await this.$resetpost('api/af-revenue/entity/t_handplan', this.model, {
339
+ await this.$resetpost('api/af-revenue/entity/save/t_handplan', this.model, {
339
340
  resolveMsg: '修改成功',
340
341
  rejectMsg: '未通过,修改出错!!!'
341
342
  })
@@ -0,0 +1,318 @@
1
+ <template>
2
+ <div class="auto">
3
+ <validator name='a' @valid="addressValid(true)" @invalid="addressValid(false)">
4
+ <form class="form-horizontal">
5
+ <div class="row">
6
+ <div class="col-sm-4">
7
+ <label class="font_normal_body">表编号&nbsp;&nbsp;&nbsp;</label>
8
+ <input type="text" v-model="model.f_userinfo_id" disabled=disabled style="width: 60%" class="input_search">
9
+ </div>
10
+ <div class="col-sm-4">
11
+ <label class="font_normal_body">用户编号</label>
12
+ <input type="text" v-model="model.f_user_id" disabled=disabled style="width: 60%" class="input_search">
13
+ </div>
14
+ <div class="col-sm-4">
15
+ <label class="font_normal_body">用户姓名</label>
16
+ <input type="text" v-model="model.f_user_name" disabled=disabled style="width: 60%" class="input_search">
17
+ </div>
18
+ <!--<div class="col-sm-4">-->
19
+ <!--<label class="font_normal_body">收据类型</label>-->
20
+ <!--<input type="text" v-model="model.f_bill_style" style="width: 60%" class="input_search">-->
21
+ <!--</div>-->
22
+ </div>
23
+ <div class="row">
24
+ <div class="col-sm-4">
25
+ <label class="font_normal_body">用户类型</label>
26
+ <input type="text" v-model="model.f_user_type" disabled=disabled style="width: 60%" class="input_search">
27
+ </div>
28
+ <div class="col-sm-4">
29
+ <label class="font_normal_body">用气性质</label>
30
+ <input type="text" v-model="model.f_gasproperties" disabled=disabled style="width: 60%" class="input_search">
31
+ </div>
32
+ <div class="col-sm-4">
33
+ <label class="font_normal_body">补卡类型</label>
34
+ <input type="text" v-model="model.f_type" disabled=disabled style="width: 60%" class="input_search">
35
+ </div>
36
+
37
+ </div>
38
+ <div class="row">
39
+ <div class="col-sm-4">
40
+ <label class="font_normal_body">卡&nbsp;&nbsp;&nbsp;号&nbsp;&nbsp;&nbsp;</label>
41
+ <input type="text" v-model="model.f_card_id" disabled=disabled style="width: 60%" class="input_search">
42
+ </div>
43
+ <div class="col-sm-4">
44
+ <label class="font_normal_body">卡&nbsp;&nbsp;&nbsp;费&nbsp;&nbsp;&nbsp;</label>
45
+ <input type="text" v-model="model.f_cardfees" style="width: 60%" class="input_search">
46
+ </div>
47
+ <div class="col-sm-4">
48
+ <!-- <label class="font_normal_body">付款方式</label>-->
49
+ <!-- <input type="text" v-model="model.f_payment" style="width: 60%" class="input_search">-->
50
+ <label class="font_normal_body" title="参数:付款方式">付款方式</label>
51
+ <v-select id="f_payment"
52
+ v-model="model.f_payment" :value-single="true"
53
+ class="select_list select"
54
+ :value.sync="model.f_payment"
55
+ :options='paytype'
56
+ close-on-select >
57
+ </v-select>
58
+ </div>
59
+ </div>
60
+ <div class="row">
61
+ <div class="col-sm-4">
62
+ <label class="font_normal_body" title="参数:票据类型">票据类型</label>
63
+ <v-select :value.sync="model.f_bill_style" v-model="model.f_bill_style"
64
+ :options='papertype' :value-single="true"
65
+ class="select_list select"
66
+ close-on-select></v-select>
67
+ <!-- <label class="font_normal_body">票据类型</label>-->
68
+ <!-- <input type="text" v-model="model.f_bill_style" style="width: 60%" class="input_search">-->
69
+ </div>
70
+ <div class="col-sm-4">
71
+ <label class="font_normal_body">是否接表</label>
72
+ <input type="text" v-model="model.f_ispick_table" disabled=disabled style="width: 60%" class="input_search">
73
+ </div>
74
+ <div class="col-sm-4">
75
+ <label class="font_normal_body">补卡原因</label>
76
+ <input type="text" v-model="model.f_comments" style="width: 60%" class="input_search">
77
+ </div>
78
+ </div>
79
+ <div class="row">
80
+ <div class="col-sm-4">
81
+ <label class="font_normal_body">补卡日期</label>
82
+ <datepicker id="f_fillcard_date" placeholder="补卡日期" style="width:60%"
83
+ v-model="model.f_operate_date"
84
+ :value.sync="model.f_operate_date"
85
+ :format="'yyyy-MM-dd'"
86
+ :show-reset-button="true">
87
+ </datepicker>
88
+ </div>
89
+ <div class="col-sm-4">
90
+ <label class="font_normal_body">补卡状态</label>
91
+ <!-- <input type="text" v-model="model.f_fillcard_state" disabled=disabled style="width: 60%" class="input_search">-->
92
+ <v-select :value.sync="model.f_state" v-model="model.f_state"
93
+ :options='fillcard_state' :value-single="true"
94
+ class="select_list select"
95
+ close-on-select></v-select>
96
+ </div>
97
+ <div class="col-sm-4">
98
+ <label class="font_normal_body">组&nbsp;&nbsp;&nbsp;织&nbsp;&nbsp;&nbsp;</label>
99
+ <input type="text" v-model="model.f_orgname" disabled=disabled style="width: 60%" class="input_search">
100
+ </div>
101
+
102
+ </div>
103
+ <div class="row">
104
+ <div class="col-sm-4">
105
+ <label class="font_normal_body">部&nbsp;&nbsp;&nbsp;门&nbsp;&nbsp;&nbsp;</label>
106
+ <input type="text" v-model="model.f_depname" disabled=disabled style="width: 60%" class="input_search">
107
+ </div>
108
+ <div class="col-sm-4 ">
109
+ <label class="font_normal_body" title="参数:操作人员查询">操作人员</label>
110
+ <v-select :value.sync="model.f_operatorid"
111
+ v-model="model.f_operatorid"
112
+ :value-single="true" @change="selectoperator()"
113
+ :options='foperator'
114
+ close-on-select></v-select>
115
+ </div>
116
+ <div class="col-sm-4">
117
+ <label class="font_normal_body">流水号&nbsp;&nbsp;&nbsp;</label>
118
+ <input type="text" v-model="model.f_serial_id" disabled=disabled style="width: 60%" class="input_search">
119
+ </div>
120
+ </div>
121
+ </form>
122
+ <div style="float: right">
123
+ <button class="button_search" @click="save">保存</button>
124
+ <button class="button_clear" @click="cancel">取消</button>
125
+ </div>
126
+ </validator>
127
+ <!--<modal :show.sync="showfiles" width="80%" style="width:auto;" v-ref:modal middle backdrop="false">-->
128
+ <!--<article slot="modal-body">-->
129
+ <!--<upload :blodid="model.f_userinfo_id" :businessid="model.id" v-ref:upload fusetype="收费" isremark="true" style="width:auto" ></upload>-->
130
+ <!--</article>-->
131
+ <!--<footer slot="modal-footer" class="modal-footer">-->
132
+ <!--</footer>-->
133
+ <!--</modal>-->
134
+ <!--&lt;!&ndash;文件上传按钮&ndash;&gt;-->
135
+ <!--<button class="button_search" style="width: max-content" @click="uploadFiles()">上传附件</button>-->
136
+ </div>
137
+ </template>
138
+
139
+ <script>
140
+ import Vue from 'vue'
141
+ import {HttpResetClass} from 'vue-client'
142
+ import * as Util from "../../Util";
143
+ var data
144
+ let readyGen = async function (self) {
145
+ await self.$LoadParams.loadParam(self.f_filialeid)
146
+ await self.$GetSaleParam.initinputtor()
147
+ await self.initoperator()
148
+ }
149
+ export default {
150
+ title: '基本信息',
151
+ data () {
152
+ return {
153
+ equipmentType: this.$appdata.getParam('打印格式') ? [{label: '', value: ''}, ...this.$appdata.getParam('打印格式')] : [],
154
+ // 构建数组来存储对象
155
+ editbank: true,
156
+ uploadText: '收费',
157
+ papertype: this.$appdata.getParam('票据类型') ? [{label: '', value: ''}, ...this.$appdata.getParam('票据类型')] : [],
158
+ paytype: this.$appdata.getParam('付款方式') ? [{label: '', value: ''}, ...this.$appdata.getParam('付款方式')] : [],
159
+ showfiles: false,
160
+ recordList: [],
161
+ foperator:[],
162
+ fileNameSet: {
163
+ // 要更改字段的中文名
164
+ 'f_cardfees': '卡费',
165
+ 'f_payment': '付款方式',
166
+ 'f_bill_style': '票据类型',
167
+ 'f_reason': '补卡原因',
168
+ 'f_fillcard_date': '补卡日期',
169
+ 'f_state':'补卡状态',
170
+ 'f_operator':'操作人',
171
+ },
172
+ }
173
+ },
174
+ props: {
175
+ oldmodel: Object,
176
+ model: Object
177
+ },
178
+
179
+ ready () {
180
+ if (this.$login.r.includes('维护补卡信息')) {
181
+ this.editbank = true
182
+ }
183
+ this.oldmodel = JSON.parse(JSON.stringify(this.model))
184
+ this.model.f_bill_state = [this.oldmodel]
185
+ readyGen(this)
186
+ },
187
+ created () {
188
+ },
189
+ methods: {
190
+ initoperator(){
191
+ this.foperator=[]
192
+ console.log("this.$login-------------------------",this.$login,this.oldmodel,this.model)
193
+ let arr = this.$GetSaleParam.inputtors.filter((res) => {
194
+ if (res.rolestr != null && res.rolestr != '') {
195
+ return res.rolestr.indexOf('营业员') > -1 && res.f_department_name == this.model.f_depname
196
+ }
197
+ })
198
+ arr.forEach((res) => {
199
+ this.foperator.push({label: res.name, value: res.id})
200
+ })
201
+ // 若当前记录的操作人员ID不在选项中,则补入,防止下拉显示为ID
202
+ if (this.model && this.model.f_operatorid) {
203
+ const exists = this.foperator.some(op => op.value === this.model.f_operatorid)
204
+ if (!exists) {
205
+ this.foperator.push({label: this.model.f_operator || this.model.f_operatorid, value: this.model.f_operatorid})
206
+ }
207
+ }
208
+ },
209
+ selectoperator () {
210
+ let id = this.model.f_operatorid
211
+ if(!this.model.f_operatorid){
212
+ return
213
+ }
214
+ let http = new HttpResetClass()
215
+ http.load('POST', 'api/af-revenue/sql/saleSingleTable',
216
+ {data:{tablename: 't_user',
217
+ condition: `id = '${id}'`}},
218
+ {resolveMsg: null, rejectMsg: null}).then((res) => {
219
+ console.log('kanak,res', res)
220
+ if(res.data.length>0){
221
+ this.model.f_operator = res.data[0].name
222
+ }else{
223
+ this.model.f_operatorid=''
224
+ this.$showAlert('操作员信息未找到','warning',2000)
225
+ }
226
+ console.log('this.f_operatorid', this.model.f_operator)
227
+ })
228
+ },
229
+ cancel () {
230
+ this.$dispatch('close')
231
+ },
232
+ uploadFiles () {
233
+ this.showfiles = !this.showfiles
234
+ },
235
+ addressValid (val) {
236
+ },
237
+ save () {
238
+ // console.log(this.model.key)
239
+ this.recordList = [] // 清空,防止重复提交
240
+ console.log('newdate' + new Date())
241
+ console.log('MODEL BEFORE:', this.model)
242
+ for (var item in this.model) {
243
+ if (this.model[item] instanceof Array) {
244
+ this.model[item] = this.model[item].length > 0 ? this.model[item][0] : ''
245
+ }
246
+ if (this.model[item] != this.oldmodel[item] && this.model[item] !='s_timestamp') {
247
+ var car = { // 需要更改的字段
248
+ // t_fillcard
249
+ id: this.model.id,
250
+ f_user_id: this.model.f_user_id,
251
+ chinesename: this.fileNameSet[item],
252
+ fieldname: item,
253
+ tablename: 't_fillcard',
254
+ oldvalue: this.oldmodel[item],
255
+ newvalue: this.model[item],
256
+ state: '有效',
257
+ modifitime: Util.toStandardTimeString(),
258
+ operator: this.$login.f.name,
259
+ changemeter_id: this.model.id,
260
+ f_operate_date: this.model.f_operate_date,
261
+ f_cardfees: this.model.f_cardfees?this.model.f_cardfees:null,
262
+ f_payment: this.model.f_payment,
263
+ f_bill_style: this.model.f_bill_style,
264
+ f_reason: this.model.f_comments ? this.model.f_comments : '',
265
+ f_fillcard_date: this.model.f_operate_date,
266
+ f_operator : this.$login.f.name,
267
+ f_operatorid : this.$login.f.id,
268
+ f_orgid : this.$login.f.orgid,
269
+ f_orgname : this.$login.f.orgs,
270
+ f_depid : this.$login.f.depids,
271
+ f_depname : this.$login.f.deps
272
+ }
273
+ this.recordList.push(car)
274
+ // 该方法并未对chinesename fieldname operator等进行判断赋值,此暂写为定值
275
+ console.log('看看car的值', car)
276
+ }
277
+ }
278
+
279
+ this.model.f_reason=this.model.f_comments ? this.model.f_comments : ''
280
+ this.model.f_fillcard_date=this.model.f_operate_date
281
+ console.log('model--------abc-', this.model)
282
+ this.$resetpost('api/af-revenue/logic/replacementCardSaving', {data: {recordlist: this.recordList, newData: this.model}}).then((res) => {
283
+ console.log('this.model', this.model)
284
+ })
285
+ this.$dispatch('close')
286
+ }
287
+ },
288
+ computed: {
289
+ fillcard_state () {
290
+ return [...this.$appdata.getParam('补卡状态')]
291
+ },
292
+ },
293
+ watch: {
294
+ 'model'(){
295
+ this.initoperator()
296
+ }
297
+ }
298
+ }
299
+ </script>
300
+
301
+ <style scoped>
302
+ /* 列内使用弹性布局,标签固定,控件自适应 */
303
+ .form-horizontal .col-sm-4 { display: flex; align-items: center; flex-wrap: nowrap; }
304
+ .form-horizontal .col-sm-4 > label { margin-right: 8px; white-space: nowrap; }
305
+
306
+ /* 控件在列内占满剩余宽度,避免缩放错乱 */
307
+ .form-horizontal .col-sm-4 .input_search { flex: 1 1 auto; width: 100% !important; min-width: 0; box-sizing: border-box; }
308
+ .form-horizontal .col-sm-4 .select_list { flex: 1 1 auto; width: 100% !important; min-width: 0; box-sizing: border-box; }
309
+ .form-horizontal .col-sm-4 datepicker { flex: 1 1 auto; width: 100% !important; display: block; min-width: 0; box-sizing: border-box; }
310
+
311
+ /* 选择器内部输入区域也需要铺满(兼容部分版本的 vue-select)*/
312
+ .form-horizontal .col-sm-4 .select_list .selected-tag,
313
+ .form-horizontal .col-sm-4 .select_list .vs__dropdown-toggle,
314
+ .form-horizontal .col-sm-4 .select_list input { width: 100%; box-sizing: border-box; }
315
+
316
+ /* 底部操作按钮区域:在缩放时不与表单重叠 */
317
+ .auto > div[style*="float: right"] { clear: both; margin-top: 8px; }
318
+ </style>
@@ -69,4 +69,8 @@ export default function () {
69
69
  Vue.component('icTable', (resolve) => { require(['./icTable'], resolve) })
70
70
  // 机表收费
71
71
  Vue.component('machine-meter-center', (resolve) => { require(['./MachineMeterCenter'], resolve) })
72
+ // 其他记录具体信息 OperationRecord.vue
73
+ Vue.component('specific-information', (resolve) => { require(['./specificInformation.vue'], resolve) })
74
+ // 单条记录维护界面
75
+ Vue.component('replacement-single-info-operation', (resolve) => { require(['./replacementSingleInfoOperation'], resolve) })
72
76
  }
@@ -0,0 +1,552 @@
1
+ <template>
2
+ <div class="auto"> <validator name='a' @valid="addressValid(true)" @invalid="addressValid(false)" >
3
+ <form class="form-horizontal">
4
+ <div class="row">
5
+ <div class="col-sm-4">
6
+ <label class="font_normal_body">用户姓名</label>
7
+ <input type="text" v-model="model.f_user_name" disabled=disabled style="width: 60%" class="input_search">
8
+ </div>
9
+ <div class="col-sm-4">
10
+ <label class="font_normal_body">付款方式</label>
11
+ <v-select :value.sync="model.f_payment" :value-single="true"
12
+ v-model="model.f_payment"
13
+ class="select_list select"
14
+ :options='payments'
15
+ close-on-select>
16
+ </v-select>
17
+ </div>
18
+ <!-- <div class="col-sm-4">-->
19
+ <!-- <label class="font_normal_body">缴费类型</label>-->
20
+ <!-- <input type="text" v-model="model.payment" style="width: 60%" class="input_search">-->
21
+ <!-- </div>-->
22
+ <div class="col-sm-4">
23
+ <label class="font_normal_body">收据类型</label>
24
+ <v-select :value.sync="model.f_bill_style" :value-single="true"
25
+ v-model="model.f_bill_style"
26
+ class="select_list select"
27
+ :options='bill_styles'
28
+ close-on-select>
29
+ </v-select>
30
+ </div>
31
+ <!-- <div class="col-sm-4">-->
32
+ <!-- <label class="font_normal_body">收据类型</label>-->
33
+ <!-- <input type="text" v-model="model.bill_style" style="width: 60%" class="input_search">-->
34
+ <!-- </div>-->
35
+ <div class="col-sm-4" title="参数:操作时间, 权限:【其他收费金额修改】">
36
+ <label class="font_normal_body">缴费金额</label>
37
+ <input type="text" v-model="model.f_collection" :disabled="!editcollection" style="width: 60%" class="input_search">
38
+ </div>
39
+ <div class="col-sm-4">
40
+ <label class="font_normal_body">收费时间</label>
41
+ <datepicker id="operate_date"
42
+ placeholder="收费时间"
43
+ style="width:60%"
44
+ v-model="model.f_operate_date"
45
+ :value.sync="model.f_operate_date"
46
+ :format="'yyyy-MM-dd HH:mm:ss'"
47
+ >
48
+ </datepicker>
49
+ </div>
50
+ <div class="col-sm-4 form-group">
51
+ <label class="font_normal_body" title="参数:操作人员">操作人员</label>
52
+ <v-select :value.sync="model.f_operator"
53
+ v-model="model.f_operator"
54
+ :value-single="true" @change="selectoperator()"
55
+ :options='foperator'
56
+ close-on-select></v-select>
57
+ <!-- @click="selectoperator"-->
58
+ </div>
59
+ <div class="col-sm-4 form-group">
60
+ <label class="font_normal_body" >支付流水号</label>
61
+ <input type="text" v-model="model.f_serial_id" style="width: 60%" class="input_search">
62
+ </div>
63
+ <div class="col-sm-12 form-group">
64
+ <label class="font_normal_body">备&emsp;&emsp;注</label>
65
+ <input type="text" v-model="model.f_comments" style="width: 60%" class="input_search">
66
+
67
+ </div>
68
+ </div>
69
+ </form>
70
+ <div style="float: right">
71
+ <button class="button_search" @click="save">保存</button>
72
+ <button class="button_clear" @click="cancel">取消</button>
73
+ </div>
74
+ <form novalidate class="form-horizontal">
75
+ <p></p>
76
+ <p class="bg-info text-center" style="padding: 8px;font-size: 20px">其他维护明细</p>
77
+ <div class="responsive-table">
78
+ <table class="auto-table">
79
+ <tr>
80
+ <th style="text-align: center">序号</th>
81
+ <th style="text-align: center">品牌及类别</th>
82
+ <th style="text-align: center">数量</th>
83
+ <th style="text-align: center">单价</th>
84
+ <th style="text-align: center">规格</th>
85
+ <th style="text-align: center"> 型号</th>
86
+ <th style="text-align: center"> 操作</th>
87
+ </tr>
88
+ <tr v-for="row in recordlist ">
89
+ <td style="text-align: center;">{{$index + 1}}</td>
90
+ <td style="text-align: center;" >{{row.brand_spec}}</td>
91
+ <td style="text-align: center;">{{row.number}}</td>
92
+ <td style="text-align: center;" >{{row.unitprice}}</td>
93
+ <td style="text-align: center;" >{{row.typename}}</td>
94
+ <td style="text-align: center;">{{row.typenumber}}</td>
95
+ <td style="text-align: center;">
96
+
97
+ <button class="button_new nowrap-btn" type="button" @click="editBeizhu(row)">编辑</button>
98
+ </td>
99
+ </tr>
100
+ </table>
101
+ </div>
102
+ </form>
103
+ <modal :show.sync="editshow" v-ref:modal backdrop='false'>
104
+ <article slot="modal-body" class="modal-body">
105
+ <div class="row auto">
106
+ <div class="form-group form-input-group">
107
+ <label for="" class="control-label">品牌:</label>
108
+ <v-select :value.sync="mingxi.brand_spec" :value-single="true"
109
+ v-model="mingxi.brand_spec"
110
+ class="select_list select"
111
+ :options='materialTypeList'
112
+ @change="setTypename(mingxi.brand_spec)"
113
+ close-on-select clear-button>
114
+ </v-select>
115
+ </div>
116
+ </div>
117
+ <div class="row auto">
118
+ <div class="form-group form-input-group" title="权限:【其他收费金额修改】">
119
+ <label for="" class="control-label">数量:</label>
120
+ <input type="text" width="300px" class="form-control" v-model="mingxi.number" :disabled="!editcollection">
121
+ </div>
122
+ </div>
123
+ <div class="row auto">
124
+ <div class="form-group form-input-group" title="权限:【其他收费金额修改】">
125
+ <label for="" class="control-label">单价:</label>
126
+ <input type="text" width="300px" class="form-control" v-model="mingxi.unitprice" :disabled="!editcollection" >
127
+ </div>
128
+ </div>
129
+ <div class="row auto">
130
+ <div class="form-group form-input-group">
131
+ <label for="" class="control-label">规格:</label>
132
+ <v-select :value.sync="mingxi.typename" :value-single="true"
133
+ v-model="mingxi.typename"
134
+ class="select_list select"
135
+ :options='typeNameList'
136
+ @change="setTypenumber(mingxi.typename)"
137
+ close-on-select clear-button>
138
+ </v-select>
139
+ </div>
140
+ </div>
141
+ <div class="row auto">
142
+ <div class="form-group form-input-group">
143
+ <label for="" class="control-label">型号:</label>
144
+ <v-select :value.sync="mingxi.typenumber" :value-single="true"
145
+ v-model="mingxi.typenumber"
146
+ class="select_list select"
147
+ :options='typenumberList'
148
+ @change="setTypeprice(mingxi.typenumber)"
149
+ close-on-select clear-button>
150
+ </v-select>
151
+ </div>
152
+ </div>
153
+ </article>
154
+ <footer slot="modal-footer" class="modal-footer">
155
+ <button type="button" class="btn btn-default" @click='editclose' id="vc-messagebox-close">取消</button>
156
+ <button type="button" class="btn btn-success" @click='updatedefail' id="vc-messagebox-confirm">确认</button>
157
+ </footer>
158
+ </modal>
159
+ <!--<split-price :showdata="model" :pricesplit="priceSplit" v-if="priceSplit" ></split-price>-->
160
+ </validator>
161
+ </div>
162
+ </template>
163
+ <script>
164
+ import Vue from 'vue'
165
+ import {HttpResetClass, PagedList} from 'vue-client'
166
+ import * as Util from "../../Util";
167
+ // var data
168
+ export default {
169
+ title: '基本信息',
170
+
171
+ data () {
172
+ return {
173
+ // 物料联动数据
174
+ materialList: [],
175
+ materialTypeList: [],
176
+ materialsLoading: false,
177
+ materialsLoaded: false,
178
+ materialsPromise: null,
179
+ editingInit: false,
180
+ bill_styles: this.$appdata.getParam('打印格式') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('打印格式')] : [],
181
+ payments: this.$appdata.getParam('付款方式') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('付款方式')] : [],
182
+ editshow: false,
183
+ editcollection: false,
184
+ mingxi: '',
185
+ oldmingxi: '',
186
+ brand_spec: '',
187
+ unitprice: '',
188
+ typeNameList: [],
189
+ typenumberList: [],
190
+ // 操作记录表
191
+ recordList3: [],
192
+ total: '',
193
+ // 明细操作记录
194
+ recordList2: [],
195
+ // 其他记录
196
+ fileNameSet: {
197
+ f_payment: '缴费类型',
198
+ f_bill_style: '收据类型',
199
+ f_collection: '缴费金额',
200
+ f_serial_id: '支付流水号',
201
+ f_operate_date: '缴费时间',
202
+ f_comments: '备注',
203
+ name: '用户姓名',
204
+ f_operator: '操作人'
205
+ },
206
+ // 其他记录明细
207
+ fileNameSet2: {
208
+ brand_spec: '品牌类别',
209
+ number: '数量',
210
+ unitprice: '单价',
211
+ typename: '规格',
212
+ typenumber: '型号',
213
+ operator: '操作人'
214
+ },
215
+ brand_specs: []
216
+ }
217
+ },
218
+ props: {
219
+ model: Object,
220
+ oldmodel: Object,
221
+ // recordList:Array
222
+ recordlist: Array
223
+ },
224
+ ready () {
225
+ if (this.$login.r.includes('其他收费金额修改')) {
226
+ this.editcollection = true
227
+ }
228
+ this.cou()
229
+ this.oldmodel = JSON.parse(JSON.stringify(this.model))
230
+ console.log('126456',this.model)
231
+ this.getMaterialList()
232
+ },
233
+ created () {
234
+ },
235
+ methods: {
236
+ async getMaterialList () {
237
+ if (this.materialsLoaded) return
238
+ if (this.materialsLoading && this.materialsPromise) { await this.materialsPromise; return }
239
+ // 先尝试使用全局/会话缓存,避免触发后端判重
240
+ if (window.__materialListCache && Array.isArray(window.__materialListCache.data)) {
241
+ this.materialList = window.__materialListCache.data
242
+ this.materialTypeList = window.__materialListCache.types
243
+ this.materialsLoaded = true
244
+ return
245
+ }
246
+ this.materialsLoading = true
247
+ const nonce = Date.now() + '-' + Math.random().toString(16).slice(2)
248
+ console.log('getMaterialList request')
249
+ this.materialsPromise = this.$resetpost('api/af-revenue/sql/saleSingleTable', {
250
+ data: { tablename: 't_material_management', condition: '1=1', __nonce: nonce }
251
+ }, {resolveMsg: null, rejectMsg: '获取物料信息失败!'})
252
+ .then((res) => {
253
+ console.log('getMaterialList ok')
254
+ this.materialList = res.data || []
255
+ this.materialTypeList = [...new Set(this.materialList.filter(i => i.f_material_type).map(i => i.f_material_type))]
256
+ .map(type => ({ label: type, value: type }))
257
+ // 写入全局缓存
258
+ window.__materialListCache = { data: this.materialList, types: this.materialTypeList, ts: Date.now() }
259
+ this.materialsLoaded = true
260
+ })
261
+ .catch((e) => {
262
+ console.log('getMaterialList error', e)
263
+ // 若后端返回603且有其他页面已缓存,则直接读取缓存
264
+ if (String(e.status) === '603' && window.__materialListCache && Array.isArray(window.__materialListCache.data)) {
265
+ this.materialList = window.__materialListCache.data
266
+ this.materialTypeList = window.__materialListCache.types
267
+ this.materialsLoaded = true
268
+ return
269
+ }
270
+ // 退避一段时间后再试一次(避免与其它同路径请求撞车)
271
+ this.materialsPromise = new Promise((resolve) => setTimeout(resolve, 1200))
272
+ .then(async () => {
273
+ const nonce2 = Date.now() + '-' + Math.random().toString(16).slice(2)
274
+ const res2 = await this.$resetpost('api/af-revenue/sql/saleSingleTable', {
275
+ data: { tablename: 't_material_management', condition: '1=1', __nonce: nonce2 }
276
+ }, {resolveMsg: null, rejectMsg: '获取物料信息失败!'})
277
+ this.materialList = res2.data || []
278
+ this.materialTypeList = [...new Set(this.materialList.filter(i => i.f_material_type).map(i => i.f_material_type))]
279
+ .map(type => ({ label: type, value: type }))
280
+ window.__materialListCache = { data: this.materialList, types: this.materialTypeList, ts: Date.now() }
281
+ this.materialsLoaded = true
282
+ })
283
+ })
284
+ .finally(() => {
285
+ this.materialsLoading = false
286
+ })
287
+ await this.materialsPromise
288
+ },
289
+ async setTypename (val) {
290
+ const typeLabel = val
291
+ const categories = this.materialList.filter(i => i.f_material_stype === '分类' && i.f_material_type === typeLabel)
292
+ this.typeNameList = categories.map(i => ({ label: i.f_material_name, value: i.f_material_name, id: i.id }))
293
+ if (!this.editingInit) {
294
+ this.mingxi.typename = ''
295
+ this.typenumberList = []
296
+ this.mingxi.typenumber = ''
297
+ this.mingxi.unitprice = ''
298
+ }
299
+ },
300
+ setTypenumber (val) {
301
+ const categoryName = val
302
+ const category = this.typeNameList.find(i => i.value === categoryName)
303
+ const categoryId = category ? category.id : ''
304
+ const models = this.materialList.filter(i => i.f_material_stype === '型号' && String(i.parent_id) === String(categoryId))
305
+ this.typenumberList = models.map(i => ({ label: i.f_material_name, value: i.f_material_name, id: i.id }))
306
+ if (!this.editingInit) {
307
+ this.mingxi.typenumber = ''
308
+ this.mingxi.unitprice = ''
309
+ }
310
+ },
311
+ setTypeprice (val) {
312
+ const modelName = val
313
+ const model = this.typenumberList.find(i => i.value === modelName)
314
+ const modelId = model ? model.id : ''
315
+ const modelObj = this.materialList.find(i => i.f_material_stype === '型号' && String(i.id) === String(modelId))
316
+ if (modelObj && modelObj.f_material_price) this.mingxi.unitprice = Number(modelObj.f_material_price)
317
+ else this.mingxi.unitprice = ''
318
+ },
319
+ selectoperator () {
320
+ let f_operator = this.model.f_operator
321
+ console.log('处理签的this.model.f_operatorid', this.model.f_operator)
322
+ let http = new HttpResetClass()
323
+ http.load('POST', 'api/af-revenue/logic/findOperator',
324
+ {f_operator: f_operator},
325
+ {resolveMsg: null, rejectMsg: null}).then((res) => {
326
+ console.log('kanak,res', res)
327
+ if(res.data.length>0){
328
+ this.model.f_operatorid = res.data[0].id
329
+ }else{
330
+ this.model.f_operator=''
331
+ this.$showAlert('操作员信息未找到,请在参数管理进行添加','warning',2000)
332
+ }
333
+ console.log('this.model.f_operatorid', this.model.f_operatorid)
334
+ })
335
+ },
336
+ editclose () {
337
+ this.mingxi = ''
338
+ this.editshow = false
339
+ },
340
+ async editBeizhu (val) {
341
+ this.editshow = true
342
+ // 深拷贝原始行,保留一份用于对比
343
+ this.mingxi = JSON.parse(JSON.stringify(val))
344
+ this.oldmingxi = JSON.parse(JSON.stringify(val))
345
+ this.editingInit = true
346
+ const origBrand = val.brand_spec || ''
347
+ const origType = val.typename || ''
348
+ const origModel = val.typenumber || ''
349
+ const origPrice = (val.unitprice !== undefined && val.unitprice !== null) ? val.unitprice : ''
350
+ // 强制把当前行值直接回到表单模型
351
+ this.mingxi.brand_spec = origBrand
352
+ this.mingxi.typename = origType
353
+ this.mingxi.typenumber = origModel
354
+ this.mingxi.unitprice = origPrice
355
+ // 简化策略:仅回填现有数据到下拉,不做任何联动与覆盖
356
+ await this.getMaterialList()
357
+ const brandVal = this.mingxi.brand_spec || ''
358
+ if (brandVal && !this.materialTypeList.find(i => i.value === brandVal)) {
359
+ this.materialTypeList = [{label: brandVal, value: brandVal}, ...this.materialTypeList]
360
+ }
361
+ this.mingxi.brand_spec = brandVal
362
+ const typeVal = origType
363
+ this.typeNameList = typeVal ? [{label: typeVal, value: typeVal, id: ''}] : []
364
+ this.mingxi.typename = typeVal
365
+ const modelVal = origModel
366
+ this.typenumberList = modelVal ? [{label: modelVal, value: modelVal, id: ''}] : []
367
+ this.mingxi.typenumber = modelVal
368
+ // 不再根据型号改写单价,保持用户看到的就是当前数据
369
+ this.$nextTick(() => { this.editingInit = false })
370
+ },
371
+ async saveOtherdetail () {
372
+ for (var item in this.mingxi) {
373
+ if (this.mingxi[item] instanceof Array) {
374
+ this.mingxi[item] = this.mingxi[item].length > 0 ? this.mingxi[item][0] : ''
375
+ }
376
+ if (this.mingxi[item] != this.oldmingxi[item]) {
377
+ var car3 = {
378
+ tablename: 't_othercharge_detail',
379
+ chinesename: this.fileNameSet2[item] != '' ? this.fileNameSet2[item] : '',
380
+ // chinesename: this.fileNameSet2[item],
381
+ oldvalue: this.oldmingxi[item],
382
+ newvalue: this.mingxi[item],
383
+ modifitime: Util.toStandardTimeString(),
384
+ fieldname: item,
385
+ state: '有效',
386
+ charge_detail_id:this.mingxi.did,
387
+ operator: this.$login.f.name != '' ? this.$login.f.name : ''
388
+ }
389
+ this.recordList2.push(car3)
390
+ // 该方法并未对chinesename fieldname operator等进行判断赋值,此暂写为定值
391
+ console.log(car3)
392
+ }
393
+ }
394
+ await this.$resetpost('api/af-revenue/logic/savedetailoperting', {
395
+ data: {
396
+ recordlist2: this.recordList2
397
+ }
398
+ }, {
399
+ resolveMsg: '修改成功',
400
+ rejectMsg: '未通过,修改出错!!!'
401
+ })
402
+ },
403
+ // 修改其他记录明细
404
+ async updatedefail () {
405
+ this.editshow = false
406
+ let param={
407
+ f_number:this.mingxi.number,
408
+ f_unitprice:this.mingxi.unitprice,
409
+ f_brand_spec: this.mingxi.brand_spec,
410
+ f_typenumber:this.mingxi.typenumber,
411
+ f_typename:this.mingxi.typename,
412
+ id: this.mingxi.did
413
+ }
414
+ await this.$resetpost('api/af-revenue/logic/updatedetail', {data: param}, {
415
+ resolveMsg: '修改成功',
416
+ rejectMsg: '未通过,修改出错!!!'
417
+ })
418
+ this.saveOtherdetail()
419
+ this.$dispatch('close')
420
+ this.$dispatch('refresh')
421
+ },
422
+ // 计算总金额
423
+ cou () {
424
+ let sum = []
425
+ this.recordlist.forEach((item, index) => {
426
+ var sub = item.number * item.unitprice
427
+ console.log(sub)
428
+ sum.push(sub)
429
+ })
430
+ console.log(sum)
431
+ let res = 0
432
+ for (let i = 0; i < sum.length; i++) {
433
+ res += sum[i]
434
+ }
435
+ console.log(res)
436
+ this.total = res
437
+ },
438
+ cancel () {
439
+ this.$dispatch('close')
440
+ this.$dispatch('refresh')
441
+ },
442
+ // 保存操作记录
443
+ async save2 () {
444
+ for (var item in this.model) {
445
+ if (this.model[item] instanceof Array) {
446
+ this.model[item] = this.model[item].length > 0 ? this.model[item][0] : ''
447
+ }
448
+ if (this.model[item] != this.oldmodel[item]) {
449
+ var car2 = {
450
+ tablename: 't_othercharge',
451
+ chinesename: this.fileNameSet[item],
452
+ oldvalue: this.oldmodel[item],
453
+ newvalue: this.model[item],
454
+ modifitime: Util.toStandardTimeString(),
455
+ fieldname: item,
456
+ state: '有效',
457
+ othercharge_id:this.model.id,
458
+ operator: this.$login.f.name != '' ? this.$login.f.name : '',
459
+ f_operator : this.$login.f.name,
460
+ f_operatorid : this.$login.f.id,
461
+ f_orgid : this.$login.f.orgid,
462
+ f_orgname : this.$login.f.orgs,
463
+ f_depid : this.$login.f.depids,
464
+ f_depname : this.$login.f.deps
465
+ }
466
+ this.recordList3.push(car2)
467
+ // 该方法并未对chinesename fieldname operator等进行判断赋值,此暂写为定值
468
+ console.log(car2)
469
+ }
470
+ }
471
+ let condition = this.model.id
472
+ await this.$resetpost('api/af-revenue/logic/operationRecord', {data: {recordlist3: this.recordList3, condition: condition}}, {
473
+ resolveMsg: '修改成功',
474
+ rejectMsg: '未通过,修改出错!!!'
475
+ })
476
+ console.log('this.model', this.model)
477
+ this.$dispatch('close')
478
+ this.$dispatch('refresh')
479
+ },
480
+ // 修改其他记录
481
+ async save () {
482
+ // let condition = " f_collection='" + this.model.collection + "' , f_unitprice='"+ this.model.collection+"' where f_othercharge_id= '"+this.model.id+"'"
483
+ this.model.f_collection = this.total
484
+ let param={
485
+ f_user_name:this.model.f_user_name,
486
+ f_comments:this.model.f_comments,
487
+ f_payment:this.model.f_payment,
488
+ f_collection:this.model.f_collection,
489
+ f_bill_style:this.model.f_bill_style,
490
+ f_serial_id:this.model.f_serial_id?this.model.f_serial_id:'',
491
+ f_operate_date:this.model.f_operate_date,
492
+ f_operator:this.model.f_operator,
493
+ f_operatorid:this.model.f_operatorid?this.model.f_operatorid:'',
494
+ id:this.model.id
495
+ }
496
+ await this.$resetpost('api/af-revenue/logic/saveotherrecord',{data:param}, {
497
+ resolveMsg: '修改成功',
498
+ rejectMsg: '未通过,修改出错!!!'
499
+ })
500
+ this.save2()
501
+ this.$dispatch('close')
502
+ this.$dispatch('refresh')
503
+ }
504
+ },
505
+ computed: {
506
+ foperator () {
507
+ return [...this.$appdata.getParam('操作人员')]
508
+ }
509
+ },
510
+ watch: {
511
+ 'model.f_user_name' () {
512
+ if (this.model.f_operator) {
513
+ this.selectoperator()
514
+ }
515
+ },
516
+ 'mingxi.brand_spec'(){
517
+ this.setTypename(this.mingxi.brand_spec)
518
+ },
519
+ 'model.operator' () {
520
+ if (this.model.f_operator) {
521
+ this.selectoperator()
522
+ }
523
+ },
524
+ recordlist: {
525
+ handler (val) {
526
+ console.log('数组值有了'),
527
+ this.cou()
528
+ }
529
+ }
530
+ }
531
+
532
+ }
533
+ </script>
534
+
535
+ <style scoped>
536
+ .responsive-table {
537
+ overflow-x: auto;
538
+ -webkit-overflow-scrolling: touch;
539
+ }
540
+ .auto-table {
541
+ width: 100%;
542
+ min-width: 720px;
543
+ border-collapse: collapse;
544
+ }
545
+ .auto-table th, .auto-table td {
546
+ padding: 6px 8px;
547
+ word-break: break-word;
548
+ }
549
+ .nowrap-btn {
550
+ white-space: nowrap;
551
+ }
552
+ </style>
package/src/main.js CHANGED
@@ -2,7 +2,7 @@ import Vue from 'vue'
2
2
  import all from 'vue-client/src/all'
3
3
  import App from './App'
4
4
  import system from 'system-clients/src/system'
5
- import FilialeSale from './filiale/bazhong/sale'
5
+ import FilialeSale from './filiale/jinhong/sale'
6
6
  import sale from './sale'
7
7
  import address from 'address-client/src/address'
8
8
  import ldap from 'ldap-clients/src/ldap'