sale-client 3.6.67 → 3.6.68-s

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.67",
3
+ "version": "3.6.68-s",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -85,7 +85,7 @@
85
85
  await this.$resetpost('rs/logic/editBook', {
86
86
  f_book_no: this.data.f_book_no,
87
87
  f_userinfo_id: this.data.f_userinfo_id,
88
- f_zzhh: this.data.f_zzhh == -1 ? 13 : this.data.f_zzhh == 24 ? 1 : this.data.f_zzhh + 1
88
+ f_zzhh: this.data.f_zzhh == -1 ? 13 : this.data.f_zzhh == 24 ? 1 : (parseInt(this.data.f_zzhh) + 1)
89
89
  }, {
90
90
  resolveMsg: null,
91
91
  rejectMsg: '折子打印出错!!'
@@ -81,6 +81,9 @@
81
81
  <saletab header="表使用量图表">
82
82
  <table-usage-chart :row="row" v-if="show == '表使用量图表'" @deal-msg="dealMsg"></table-usage-chart>
83
83
  </saletab>
84
+ <saletab header="用户设备查询" v-if="permission('用户设备查看')">
85
+ <user-device-query :row="row" v-if="show == '用户设备查询'" @deal-msg="dealMsg"></user-device-query>
86
+ </saletab>
84
87
  </saletabbut>
85
88
  </div>
86
89
  </div>
@@ -104,6 +107,7 @@
104
107
  import WebAutomaticPurse from './ic_detail/WebAutomaticPurse'
105
108
  import WebChargeQueryUser from './ic_detail/WebChargeQueryUser'
106
109
  import WebHandQueryUser from './ic_detail/WebHandQueryUser'
110
+ import UserDeviceQuery from './ic_detail/UserDeviceQuery'
107
111
 
108
112
  // 导入物联网相关查询
109
113
  import QueryInstruct from './iot_detail/QueryInstruct'
@@ -142,7 +146,8 @@ export default {
142
146
  CardHandRecord,
143
147
  MeterParam,
144
148
  DeveiceRecord,
145
- MachineRecordQuery
149
+ MachineRecordQuery,
150
+ UserDeviceQuery
146
151
  },
147
152
  data () {
148
153
  return {
@@ -0,0 +1,252 @@
1
+ <template>
2
+ <div class="flex" style="justify-content: space-between;">
3
+ <div @keyup.enter="search" style="">
4
+ <criteria-paged :model="model" v-ref:paged>
5
+ <criteria @condition-changed='$parent.search' partial='criteria' v-ref:criteria>
6
+ <div class="form-horizontal select-overspread container-fluid auto" novalidate partial>
7
+ <div class="row">
8
+ <div style="float: right">
9
+ <button @click="search()" class="button_search" style="margin-right: 10px" v-el:cba>查询</button>
10
+ <print-data :defaultfield="$parent.$parent.defaultfield" :field="$parent.$parent.fields"
11
+ :is-selected="true" :model="$parent.$parent.printModel"
12
+ @print-data="$parent.$parent.print()" print-name="用户设备查询"></print-data>
13
+ </div>
14
+ </div>
15
+ </div>
16
+ </criteria>
17
+ <data-grid :model="model" class="list_area table_sy" partial='list' v-ref:grid>
18
+ <template partial='head'>
19
+ <tr>
20
+ <th>
21
+ <nobr>设备类型</nobr>
22
+ </th>
23
+ <th>
24
+ <nobr>设备编号</nobr>
25
+ </th>
26
+ <th>
27
+ <nobr>设备品牌</nobr>
28
+ </th>
29
+ <th>
30
+ <nobr>设备型号</nobr>
31
+ </th>
32
+ <th>
33
+ <nobr>管道类型</nobr>
34
+ </th>
35
+ <th>
36
+ <nobr>安装人</nobr>
37
+ </th>
38
+ <th>
39
+ <nobr>安装方式</nobr>
40
+ </th>
41
+ <th>
42
+ <nobr>安装日期</nobr>
43
+ </th>
44
+ <th>
45
+ <nobr>生产日期</nobr>
46
+ </th>
47
+ <th>
48
+ <nobr>设备状态</nobr>
49
+ </th>
50
+ <th>
51
+ <nobr>备注</nobr>
52
+ </th>
53
+ </tr>
54
+ </template>
55
+ <template partial='body' partial='list' v-ref:grid>
56
+ <tr>
57
+ <td style="text-align: center;">
58
+ <nobr>{{ row.f_devices_type }}</nobr>
59
+ </td>
60
+ <td style="text-align: center;">
61
+ <nobr>{{ row.f_devices_no }}</nobr>
62
+ </td>
63
+ <td style="text-align: center;">
64
+ <nobr>{{ row.f_brand }}</nobr>
65
+ </td>
66
+ <td style="text-align: center;">
67
+ <nobr>{{ row.f_devices_model }}</nobr>
68
+ </td>
69
+ <td style="text-align: center;">
70
+ <nobr>{{ row.f_pipe_type }}</nobr>
71
+ </td>
72
+ <td style="text-align: center;">
73
+ <nobr>{{ row.f_input_person }}</nobr>
74
+ </td>
75
+ <td style="text-align: center;">
76
+ <nobr>{{ row.f_install_type }}</nobr>
77
+ </td>
78
+ <td style="text-align: center;">
79
+ <nobr>{{ row.f_input_date }}</nobr>
80
+ </td>
81
+ <td style="text-align: center;">
82
+ <nobr>{{ row.f_make_date }}</nobr>
83
+ </td>
84
+ <td style="text-align: center;">
85
+ <nobr>{{ row.f_userinfodevices_state }}</nobr>
86
+ </td>
87
+ <td style="text-align: center;">
88
+ <nobr>{{ row.f_comments }}</nobr>
89
+ </td>
90
+ </tr>
91
+ </template>
92
+ <template partial='foot'></template>
93
+ </data-grid>
94
+ </criteria-paged>
95
+ </div>
96
+ </div>
97
+ </template>
98
+
99
+ <script>
100
+ import {HttpResetClass, PagedList} from 'vue-client'
101
+
102
+ export default {
103
+ title: '用户设备查询',
104
+ data () {
105
+ return {
106
+ condition: '1=1',
107
+ model: new PagedList('rs/sql/singleTable_OrderBy', 8, {
108
+ items: '"*"',
109
+ tablename: '"t_devices"',
110
+ orderitem: '"id"'
111
+ }),
112
+ // 控制单选
113
+ radio: [],
114
+ // 选中的页
115
+ all: [],
116
+ // row数据
117
+ rowsdata: [],
118
+ fields: {
119
+ 'f_devices_type': '设备类型',
120
+ 'f_devices_no': '设备编号',
121
+ 'f_brand': '设备品牌',
122
+ 'f_devices_model': '设备型号',
123
+ 'f_pipe_type': '管道类型',
124
+ 'f_input_person': '安装人',
125
+ 'f_install_type': '安装方式',
126
+ 'f_input_date': '安装日期',
127
+ 'f_make_date': '生产日期',
128
+ 'f_userinfodevices_state': '设备状态'
129
+ },
130
+ defaultfield: [
131
+ ],
132
+ printModel: {
133
+ rows: []
134
+ }
135
+ }
136
+ },
137
+ props: ['row'],
138
+ ready () {
139
+ this.$refs.paged.$refs.criteria.search()
140
+ },
141
+ methods: {
142
+ async search () {
143
+ this.condition = `${this.$refs.paged.$refs.criteria.condition} and f_userfiles_id = '${this.row.f_userfiles_id}'`
144
+ this.model.search(this.condition, this.model)
145
+ let http = new HttpResetClass()
146
+ let res = await http.load('POST', 'rs/sql/singleTable_OrderBy', {
147
+ data: {
148
+ items: '"*"',
149
+ tablename: '"t_devices"',
150
+ orderitem: '"id"',
151
+ condition: this.condition
152
+ }
153
+ }, {resolveMsg: null, rejectMsg: null})
154
+ this.printModel.rows = res.data
155
+ },
156
+ // 多选框初始化
157
+ selectInit () {
158
+ this.rowsdata = []
159
+ this.all = []
160
+ this.radio = []
161
+ },
162
+ print () {
163
+ this.selectInit()
164
+ },
165
+ select () {
166
+ let index = this.model.pageIndex - 1
167
+ if (!this.radio[index]) {
168
+ this.radio.$set(index, [])
169
+ }
170
+ if (this.all[index]) {
171
+ // 数据
172
+ this.rowsdata[index] = Object.assign([], this.model.rows)
173
+ // 勾选
174
+ for (var i = 0; i < this.model.rows.length; i++) {
175
+ this.radio[index].$set(i, true)
176
+ }
177
+ } else {
178
+ // 数据
179
+ this.rowsdata[index] = []
180
+ // 不勾选
181
+ for (var i = 0; i < this.model.rows.length; i++) {
182
+ this.radio[index].$set(i, false)
183
+ }
184
+ }
185
+ let z = 0
186
+ this.printModel.rows = []
187
+ for (let i = 0; i < this.all.length; i++) {
188
+ for (let j = 0; this.rowsdata[i] && j < this.rowsdata[i].length; j++) {
189
+ if (this.rowsdata[i][j] && this.rowsdata[i][j].f_user_id) {
190
+ this.printModel.rows[z++] = this.rowsdata[i][j]
191
+ }
192
+ }
193
+ }
194
+ },
195
+ selectOne (event, row, i) {
196
+ let index = this.model.pageIndex - 1
197
+ if (!this.rowsdata[index]) {
198
+ this.rowsdata[index] = []
199
+ }
200
+ if (!this.radio[index]) {
201
+ this.radio.$set(index, [])
202
+ }
203
+ if (event.target.checked) {
204
+ // 数据
205
+ this.rowsdata[index][i] = row
206
+ // 勾选
207
+ this.radio[index].$set(i, true)
208
+ // 判断是否全部选中
209
+ var allState = true
210
+ if (this.model.rows.length != this.radio[index].length) {
211
+ allState = false
212
+ }
213
+ for (var state of this.radio[index]) {
214
+ if (!state) {
215
+ allState = false
216
+ }
217
+ }
218
+ this.all.$set(index, allState)
219
+ } else {
220
+ // 数据
221
+ this.rowsdata[index][i] = []
222
+ // 不勾选
223
+ this.radio[index].$set(i, false)
224
+ // 任意取消一个则全选状态设为false
225
+ this.all.$set(index, false)
226
+ }
227
+ let z = 0
228
+ this.printModel.rows = []
229
+ for (let i = 0; i < this.all.length; i++) {
230
+ for (let j = 0; this.rowsdata[i] && j < this.rowsdata[i].length; j++) {
231
+ if (this.rowsdata[i][j] && this.rowsdata[i][j].f_user_id) {
232
+ this.printModel.rows[z++] = this.rowsdata[i][j]
233
+ }
234
+ }
235
+ }
236
+ }
237
+ },
238
+ computed: {
239
+ ischecked() {
240
+ return function (index, i) {
241
+ if (!this.radio[index]) {
242
+ return false
243
+ }
244
+ return this.radio[index][i]
245
+ }
246
+ },
247
+ changeType() {
248
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam('换表类型')]
249
+ }
250
+ }
251
+ }
252
+ </script>
@@ -156,6 +156,8 @@
156
156
  <td style="text-align:center;" v-if="row.f_instruct_state !== '待发送' && row.f_instruct_state !== '取消发送'">
157
157
  <nobr>
158
158
  {{row.f_receive_state}}
159
+
160
+ <button v-if="$login.r.includes('指令重发')" @click="$parent.$parent.$parent.reSend(row)" class="button_search" style="margin-left:1rem" v-el:cba>指令重发</button>
159
161
  </nobr>
160
162
  </td>
161
163
  <td style="text-align:center;" v-if="row.f_instruct_state === '取消发送'">
@@ -233,6 +235,7 @@ export default {
233
235
  },
234
236
 
235
237
  async ready () {
238
+ console.log(this.$login.r)
236
239
  await this.$refs.paged.$refs.criteria.search()
237
240
  // if (this.row.f_meter_brand === '承德NB物联网表') {
238
241
  // // if (true) {
@@ -261,6 +264,11 @@ export default {
261
264
  await this.$refs.paged.$refs.criteria.search()
262
265
  }
263
266
  },
267
+ async reSend (row) {
268
+ let sql = `update t_instruct set f_instruct_state = '待发送' WHERE id = ${row.id}`
269
+ await this.$resetpost('rs/logic/runSQL', {sql: sql}, {resolveMsg: '操作成功', rejectMsg: '操作失败'})
270
+ this.$refs.paged.$refs.criteria.search()
271
+ },
264
272
  stateFlow: function (row) {
265
273
  console.log(row)
266
274
  let state = ''