handpos-client 1.0.8-lekai → 1.0.9-lekai

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": "handpos-client",
3
- "version": "1.0.8-lekai",
3
+ "version": "1.0.9-lekai",
4
4
  "description": "手持POS",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -1,143 +1,143 @@
1
- <template>
2
- <div style="overflow: hidden">
3
- <div class="mhead" style="height: 8%;padding-top: 2%;">
4
- <ul>
5
- <li>
6
- <text style="position: absolute;right: 0">查询用户</text>
7
- </li>
8
- </ul>
9
- </div>
10
- <div class="searchview auto">
11
- <div class="form-group row auto" style="margin-top:10px;">
12
- <div class="col-xs-9">
13
- <label class="col-xs-4 control-label" style="font-size:18px" ><nobr>缴费编号</nobr></label>
14
- <div class="col-xs-7">
15
- <input type="number" class="form-control" v-model="f_userinfo_Code" placeholder="请输入用户编号"/>
16
- </div>
17
- </div>
18
- <div class="col-xs-3" >
19
- <button type="button" class="btn btn-sm btn-primary" @click="search()"> 查询 </button>
20
- </div>
21
- </div>
22
- <div style="height: 5%;">
23
- <table class="table table-bordered self-table">
24
- <thead style="background-color: #499edf">
25
- <tr class="table-tr-1">
26
- <th style="text-align:center;"><nobr>用户名称</nobr></th>
27
- <th style="text-align:center;"><nobr>用户地址</nobr></th>
28
- <th style="text-align:center;"><nobr>操作</nobr></th>
29
- </tr>
30
- </thead>
31
- <tbody v-for = "row in model">
32
- <tr>
33
- <td style="text-align:center;"><p class="name">{{row.f_user_name}}</p></td>
34
- <td style="text-align:center;"><p class="address">{{row.f_address}}</p></td>
35
- <td style="text-align:center;">
36
- <button type="button" class="btn btn-primary btn-sm" @click='affrim(row)'>确认</button>
37
- </td>
38
- </tr>
39
- </tbody>
40
- </table>
41
- </div>
42
- <div class="foot" style="margin-top: 124%;" @click="back('toMain')">
43
- <text>返回</text>
44
- </div>
45
- </div>
46
- </div>
47
- </template>
48
- <script>
49
- import Vue from 'vue'
50
- import co from 'co'
51
-
52
- // 查询单户用户详细信息
53
- let machineSearch = function * (self, row) {
54
- let condition = 'f_user_id=\'' + row.f_user_id + '\''
55
- // 是否需要拼接分公司条件
56
- if (Vue.PosUtil.posParam.filiale.hasFiliale) {
57
- condition = condition + Vue.PosUtil.posParam.filiale.condition
58
- }
59
- yield self.$pospost(Vue.ProxyUrl + 'rs/logic/' + Vue.PosUtil.posParam.revenue + 'getUserfile', {data: {condition: condition}}, {
60
- resolveMsg: null,
61
- rejectMsg: null
62
- }).then((ret) => {
63
- if (ret.data.userInfo.f_user_state && ret.data.userInfo.f_user_state !== '正常') {
64
- self.$showNewMessage('提示', '该用户状态为"' + ret.data.userInfo.f_user_state + '"不能购气,请联系工作人员', [confirm], 'newmgs')
65
- return
66
- }
67
- if (ret.data.userInfo.f_table_state !== '正常') {
68
- self.$showNewMessage('提示', '该表状态为"' + ret.data.userInfo.f_table_state + '"不能购气,请联系工作人员', [confirm], 'newmgs')
69
- return
70
- }
71
- if (ret.data.userInfo.f_meter_type !== '机表' && ret.data.userInfo.f_meter_type !== '物联网表') {
72
- self.$showNewMessage('提示', '该表为"' + ret.data.userInfo.f_meter_type + '",请返回首页选择卡表缴费业务', ["confirm"], 'newmgs')
73
- return
74
- }
75
- self.userInfo = ret.data.userInfo
76
- if (self.userInfo.f_meter_type === '机表') {
77
- self.$goto('machine-user-info', {
78
- userInfo: self.userInfo,
79
- }, 'self', self.callback)
80
- } else if (self.userInfo.f_meter_type === '物联网表') {
81
- self.$goto('iot-user-info', {
82
- userInfo: self.userInfo,
83
- }, 'self', self.callback)
84
- }
85
- }).catch((ret) => {
86
- let msg = ''
87
- if (ret.status === 404) {
88
- msg = '连接后台服务失败,请检查网络连接或联系工作人员!'
89
- } else if (ret.status === 501) {
90
- msg = ret.data + ',请确认是否为正确的燃气卡!'
91
- } else if (ret.status === 611) {
92
- msg = ret.data + ',请检查网络连接或联系工作人员!'
93
- } else {
94
- msg = '查询档案失败,请重试或联系工作人员!'
95
- }
96
- self.$showNewMessage('提示', msg, ['confirm'], 'newmgs')
97
- })
98
- }
99
- export default {
100
- title: '用户查询',
101
- data () {
102
- return {
103
- f_userinfo_Code:'',
104
- model: [],
105
- }
106
- },
107
- methods: {
108
- search(){
109
- if(this.f_userinfo_Code === ''){
110
- this.$showAlert('请先输入用户编号', 'warning', 1500)
111
- } else {
112
- let that = this
113
- let request = {
114
- condition : '1=1 and f_userinfo_Code=\'' + this.f_userinfo_Code + '\' order by f_user_id desc'
115
- }
116
- this.$resetpost(Vue.ProxyUrl + 'rs/sql/'+Vue.PosUtil.posParam.revenue+'getUserInfo', {data: request}, {resolveMsg: null, rejectMsg: null})
117
- .then(function (ret) {
118
- that.model = ret.data
119
- if (ret.data.length === 0){
120
- that.$showNewMessage('提示', '未查到记录,请您确认您输入的用户编号!', ['confirm'], 'newmgs')
121
- }
122
- }).catch(function (error) {
123
- that.$showNewMessage('提示', '查询数据出错!' + error, ['confirm'], 'newmgs')
124
- })
125
- }
126
- },
127
- // 查询单户详细信息
128
- affrim (row) {
129
- let machine = machineSearch(this, row)
130
- return co(machine)
131
- },
132
- back (param) {
133
- this.$back(param)
134
- },
135
- callBack(param){
136
- if(param === "toMachineMain"){
137
- return
138
- }
139
- this.$back(param)
140
- }
141
- }
142
- }
143
- </script>
1
+ <template>
2
+ <div style="overflow: hidden">
3
+ <div class="mhead" style="height: 8%;padding-top: 2%;">
4
+ <ul>
5
+ <li>
6
+ <text style="position: absolute;right: 0">查询用户</text>
7
+ </li>
8
+ </ul>
9
+ </div>
10
+ <div class="searchview auto">
11
+ <div class="form-group row auto" style="margin-top:10px;">
12
+ <div class="col-xs-9">
13
+ <label class="col-xs-4 control-label" style="font-size:18px" ><nobr>缴费编号</nobr></label>
14
+ <div class="col-xs-7">
15
+ <input type="number" class="form-control" v-model="f_userinfo_Code" placeholder="请输入用户编号"/>
16
+ </div>
17
+ </div>
18
+ <div class="col-xs-3" >
19
+ <button type="button" class="btn btn-sm btn-primary" @click="search()"> 查询 </button>
20
+ </div>
21
+ </div>
22
+ <div style="height: 5%;">
23
+ <table class="table table-bordered self-table">
24
+ <thead style="background-color: #499edf">
25
+ <tr class="table-tr-1">
26
+ <th style="text-align:center;"><nobr>用户名称</nobr></th>
27
+ <th style="text-align:center;"><nobr>用户地址</nobr></th>
28
+ <th style="text-align:center;"><nobr>操作</nobr></th>
29
+ </tr>
30
+ </thead>
31
+ <tbody v-for = "row in model">
32
+ <tr>
33
+ <td style="text-align:center;"><p class="name">{{row.f_user_name}}</p></td>
34
+ <td style="text-align:center;"><p class="address">{{row.f_address}}</p></td>
35
+ <td style="text-align:center;">
36
+ <button type="button" class="btn btn-primary btn-sm" @click='affrim(row)'>确认</button>
37
+ </td>
38
+ </tr>
39
+ </tbody>
40
+ </table>
41
+ </div>
42
+ <div class="foot" style="margin-top: 124%;" @click="back('toMain')">
43
+ <text>返回</text>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ </template>
48
+ <script>
49
+ import Vue from 'vue'
50
+ import co from 'co'
51
+
52
+ // 查询单户用户详细信息
53
+ let machineSearch = function * (self, row) {
54
+ let condition = 'f_user_id=\'' + row.f_user_id + '\''
55
+ // 是否需要拼接分公司条件
56
+ if (Vue.PosUtil.posParam.filiale.hasFiliale) {
57
+ condition = condition + Vue.PosUtil.posParam.filiale.condition
58
+ }
59
+ yield self.$resetpost(Vue.ProxyUrl + 'rs/logic/' + Vue.PosUtil.posParam.revenue + 'getUserfile', {data: {condition: condition}}, {
60
+ resolveMsg: null,
61
+ rejectMsg: null
62
+ }).then((ret) => {
63
+ if (ret.data.userInfo.f_user_state && ret.data.userInfo.f_user_state !== '正常') {
64
+ self.$showNewMessage('提示', '该用户状态为"' + ret.data.userInfo.f_user_state + '"不能购气,请联系工作人员', [confirm], 'newmgs')
65
+ return
66
+ }
67
+ if (ret.data.userInfo.f_table_state !== '正常') {
68
+ self.$showNewMessage('提示', '该表状态为"' + ret.data.userInfo.f_table_state + '"不能购气,请联系工作人员', [confirm], 'newmgs')
69
+ return
70
+ }
71
+ if (ret.data.userInfo.f_meter_type !== '机表' && ret.data.userInfo.f_meter_type !== '物联网表') {
72
+ self.$showNewMessage('提示', '该表为"' + ret.data.userInfo.f_meter_type + '",请返回首页选择卡表缴费业务', ["confirm"], 'newmgs')
73
+ return
74
+ }
75
+ self.userInfo = ret.data.userInfo
76
+ if (self.userInfo.f_meter_type === '机表') {
77
+ self.$goto('machine-user-info', {
78
+ userInfo: self.userInfo,
79
+ }, 'self', self.callback)
80
+ } else if (self.userInfo.f_meter_type === '物联网表') {
81
+ self.$goto('iot-user-info', {
82
+ userInfo: self.userInfo,
83
+ }, 'self', self.callback)
84
+ }
85
+ }).catch((ret) => {
86
+ let msg = ''
87
+ if (ret.status === 404) {
88
+ msg = '连接后台服务失败,请检查网络连接或联系工作人员!'
89
+ } else if (ret.status === 501) {
90
+ msg = ret.data + ',请确认是否为正确的燃气卡!'
91
+ } else if (ret.status === 611) {
92
+ msg = ret.data + ',请检查网络连接或联系工作人员!'
93
+ } else {
94
+ msg = '查询档案失败,请重试或联系工作人员!'
95
+ }
96
+ self.$showNewMessage('提示', msg, ['confirm'], 'newmgs')
97
+ })
98
+ }
99
+ export default {
100
+ title: '用户查询',
101
+ data () {
102
+ return {
103
+ f_userinfo_Code:'',
104
+ model: [],
105
+ }
106
+ },
107
+ methods: {
108
+ search(){
109
+ if(this.f_userinfo_Code === ''){
110
+ this.$showAlert('请先输入用户编号', 'warning', 1500)
111
+ } else {
112
+ let that = this
113
+ let request = {
114
+ condition : '1=1 and f_userinfo_Code=\'' + this.f_userinfo_Code + '\' order by f_user_id desc'
115
+ }
116
+ this.$resetpost(Vue.ProxyUrl + 'rs/sql/'+Vue.PosUtil.posParam.revenue+'getUserInfo', {data: request}, {resolveMsg: null, rejectMsg: null})
117
+ .then(function (ret) {
118
+ that.model = ret.data
119
+ if (ret.data.length === 0){
120
+ that.$showNewMessage('提示', '未查到记录,请您确认您输入的用户编号!', ['confirm'], 'newmgs')
121
+ }
122
+ }).catch(function (error) {
123
+ that.$showNewMessage('提示', '查询数据出错!' + error, ['confirm'], 'newmgs')
124
+ })
125
+ }
126
+ },
127
+ // 查询单户详细信息
128
+ affrim (row) {
129
+ let machine = machineSearch(this, row)
130
+ return co(machine)
131
+ },
132
+ back (param) {
133
+ this.$back(param)
134
+ },
135
+ callBack(param){
136
+ if(param === "toMachineMain"){
137
+ return
138
+ }
139
+ this.$back(param)
140
+ }
141
+ }
142
+ }
143
+ </script>