sale-client 4.2.151 → 4.2.152

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": "4.2.151",
3
+ "version": "4.2.152",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -1,189 +1,172 @@
1
1
  <template>
2
- <div class="panel panel-info auto">
3
- <div class="panel-heading auto" style="height: 35px">
4
- <h4 style="display:inline-block;margin-top: auto" title="参数:维修情况查询">维修情况</h4>
2
+ <div class="panel panel-info repair-panel">
3
+ <div class="panel-heading">
4
+ <h4 class="panel-title" title="参数:维修情况查询">维修情况</h4>
5
5
  </div>
6
- <table class="table table-striped table-bordered" v-if="this.pared==1" >
7
- <thead>
8
- <tr>
9
- <th colspan="4" style="text-align: center;background-color: #8cbce2;">用户维修情况</th>
10
- </tr>
11
- </thead>
12
- <tbody>
13
- <tr>
14
- <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">维修时间:</td>
15
- <td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px;">{{model.f_created_date }}</td>
16
- </tr>
17
- <tr>
18
- <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">完成时间:</td>
19
- <td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ model.f_complete_date }}</td>
20
- </tr>
21
- <tr>
22
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">报修信息:</td>
23
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ model.f_failure_str }}</td>
24
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">维修结果:</td>
25
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ model.f_state }}</td>
26
- </tr>
27
- <tr>
28
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">维修人:</td>
29
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ model.f_order_man }}</td>
30
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">工单类型:</td>
31
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ model.f_workorder_type }}</td>
32
- </tr>
33
- </tbody>
34
- </table>
35
- <!-- 维修照片展示 -->
36
- <table class="table table-striped table-bordered" v-if="pared == 1">
37
- <thead>
38
- <tr>
39
- <th colspan="4" style="text-align: center;background-color: #8cbce2;">维修前照片</th>
40
- </tr>
41
- </thead>
42
- <tbody>
43
- <tr>
44
- <td style="margin: auto;text-align: center">
45
- <div class="container" style="background: #FFFFFF;margin:0;width:100%;">
46
- <div class="img" v-for="img in before">
47
- <img-self v-if="img.f_downloadpath!=='' " :src="img.f_downloadpath" style="float: left" width="100" height="150"></img-self>
48
- </div>
49
- </div>
50
- </td>
51
- </tr>
52
- </tbody>
53
- <thead>
54
- <tr>
55
- <th colspan="4" style="text-align: center;background-color: #8cbce2;">维修后照片</th>
56
- </tr>
57
- </thead>
58
- <tbody>
59
- <tr>
60
- <td style="margin: auto;text-align: center">
61
- <div class="container" style="background: #FFFFFF;margin:0;width:100%;">
62
- <div class="img" v-for="img in after">
63
- <img-self v-if="img.f_downloadpath!=='' " :src="img.f_downloadpath" style="float: left" width="100" height="150"></img-self>
64
- </div>
65
- </div>
66
- </td>
67
- </tr>
68
- </tbody>
69
- <thead>
70
- <tr>
71
- <th colspan="4" style="text-align: center;background-color: #8cbce2;">签名照片</th>
72
- </tr>
73
- </thead>
74
- <tbody>
75
- <tr>
76
- <td style="margin: auto;text-align: center">
77
- <div class="container" style="background: #FFFFFF;margin:0;width:100%;">
78
- <div class="img" v-for="img in sign">
79
- <img-self v-if="img.f_downloadpath!=='' " :src="img.f_downloadpath" style="float: left" width="100" height="150"></img-self>
6
+
7
+ <!-- 有维修记录 -->
8
+ <template v-if="hasRepair">
9
+ <table class="table table-striped table-bordered">
10
+ <thead>
11
+ <tr>
12
+ <th colspan="4" class="table-th">用户维修情况</th>
13
+ </tr>
14
+ </thead>
15
+ <tbody>
16
+ <tr>
17
+ <td class="table-label">维修时间</td>
18
+ <td colspan="3">{{ model.f_created_date }}</td>
19
+ </tr>
20
+ <tr>
21
+ <td class="table-label">完成时间</td>
22
+ <td colspan="3">{{ model.f_complete_date }}</td>
23
+ </tr>
24
+ <tr>
25
+ <td class="table-label">报修信息</td>
26
+ <td>{{ model.f_failure_str }}</td>
27
+ <td class="table-label">维修结果</td>
28
+ <td>{{ model.f_state }}</td>
29
+ </tr>
30
+ <tr>
31
+ <td class="table-label">维修人</td>
32
+ <td>{{ model.f_order_man }}</td>
33
+ <td class="table-label">工单类型</td>
34
+ <td>{{ model.f_workorder_type }}</td>
35
+ </tr>
36
+ </tbody>
37
+ </table>
38
+
39
+ <!-- 照片区域:before / after / sign 统一循环 -->
40
+ <table
41
+ v-for="g in photoGroups"
42
+ :key="g.type"
43
+ class="table table-striped table-bordered"
44
+ >
45
+ <thead>
46
+ <tr>
47
+ <th colspan="4" class="table-th">{{ g.label }}</th>
48
+ </tr>
49
+ </thead>
50
+ <tbody>
51
+ <tr>
52
+ <td class="photo-td">
53
+ <div class="photo-wall">
54
+ <div
55
+ v-for="img in g.list"
56
+ class="img"
57
+ >
58
+ <img-self
59
+ v-if="img.f_downloadpath"
60
+ :src="img.f_downloadpath"
61
+ width="100"
62
+ height="150"
63
+ />
64
+ </div>
80
65
  </div>
81
- </div>
82
- </td>
83
- </tr>
84
- </tbody>
85
- </table>
86
- <div class="auto info-content" v-if="pared == 0">
87
- <div class="row">
88
- <strong>暂无维修信息</strong>
89
- </div>
66
+ </td>
67
+ </tr>
68
+ </tbody>
69
+ </table>
70
+ </template>
71
+
72
+ <!-- 无维修记录 -->
73
+ <div v-else class="info-content">
74
+ <strong>暂无维修信息</strong>
90
75
  </div>
91
76
  </div>
92
77
  </template>
93
- <script>
94
- /**
95
- *用户信息
96
- *维修情况
97
- */
98
78
 
99
- import {HttpResetClass} from 'vue-client'
79
+ <script>
80
+ /**
81
+ * 用户信息 - 维修情况
82
+ */
83
+ import { HttpResetClass } from 'vue-client'
100
84
 
101
- export default {
102
- title: '安检维修情况',
85
+ export default {
86
+ name: 'RepairPanel',
87
+ props: {
88
+ data: { type: Object, default: () => ({}) }
89
+ },
90
+ data () {
91
+ return {
92
+ hasRepair: false,
93
+ model: {},
94
+ before: [],
95
+ after: [],
96
+ sign: []
97
+ }
98
+ },
99
+ computed: {
100
+ /* 把三段照片合并成数组,方便模板统一循环 */
101
+ photoGroups () {
102
+ return [
103
+ { type: 'before', label: '维修前照片', list: this.before },
104
+ { type: 'after', label: '维修后照片', list: this.after },
105
+ { type: 'sign', label: '签名照片', list: this.sign }
106
+ ].filter(g => g.list.length)
107
+ }
108
+ },
109
+ watch: {
103
110
  data () {
104
- return {
105
- model: {},
106
- repairList: [], // 所有维修记录列表
107
- before:[],
108
- sign:[],
109
- after:[],
110
- pared: 0,
111
- repairImages: [] // 维修照片列表
112
- }
113
- },
114
- props: ['data'],
115
- ready () {
116
111
  this.getServiceRepair()
117
- },
118
- methods: {
119
- async getServiceRepair () {
120
- if (this.data && this.data.f_userinfo_id) {
121
- let data = {
122
- f_userinfo_id: this.data.f_userinfo_id
123
- }
124
- let http = new HttpResetClass()
125
- let res = await http.load('POST', 'api/af-revenue/logic/getV4ServiceRepair', {data: data}, {resolveMsg: null, rejectMsg: null})
126
- console.log('看看维修情况', res, res.data)
127
- if (res.data && res.data.repair.length > 0) {
128
- this.repairList = res.data.repair
129
- this.model = res.data.repair[0]
130
- this.sign = res.data.sign
131
- this.before = res.data.before
132
- this.after = res.data.after
133
- this.pared = 1
134
- } else {
135
- this.pared = 0
136
- this.repairList = []
137
- // this.repairImages = []
138
- this.sign = []
139
- this.before = []
140
- this.after = []
141
- }
112
+ }
113
+ },
114
+ ready () {
115
+ this.getServiceRepair()
116
+ },
117
+ methods: {
118
+ async getServiceRepair () {
119
+ if (!this.data || !this.data.f_userinfo_id) {
120
+ this.reset()
121
+ return
122
+ }
123
+ try {
124
+ const http = new HttpResetClass()
125
+ const res = await http.load(
126
+ 'POST',
127
+ 'api/af-revenue/logic/getV4ServiceRepair',
128
+ { data: { f_userinfo_id: this.data.f_userinfo_id } },
129
+ { resolveMsg: null, rejectMsg: null }
130
+ )
131
+ if (res.data && res.data.repair.length > 0) {
132
+ this.hasRepair = true
133
+ this.model = res.data.repair[0]
134
+ this.before = res.data.before || []
135
+ this.after = res.data.after || []
136
+ this.sign = res.data.sign || []
142
137
  } else {
143
- this.pared = 0
144
- this.repairList = []
145
- // this.repairImages = []
146
- this.sign = []
147
- this.before = []
148
- this.after = []
138
+ this.reset()
149
139
  }
140
+ } catch (e) {
141
+ console.error('[RepairPanel] 接口异常', e)
142
+ this.reset()
150
143
  }
151
144
  },
152
- watch: {
153
- 'data' () {
154
- console.log('维修情况', this.data)
155
- this.getServiceRepair()
156
- }
145
+ reset () {
146
+ this.hasRepair = false
147
+ this.model = {}
148
+ this.before = []
149
+ this.after = []
150
+ this.sign = []
157
151
  }
158
152
  }
153
+ }
159
154
  </script>
160
- <style scoped>
161
- .img {
162
- border: 1px solid #9773ed;
163
- width: auto;
164
- height: auto;
165
- float: left;
166
- text-align: center;
167
- margin: 6px;
168
- }
169
155
 
170
- img {
171
- margin: 6px;
172
- }
156
+ <style scoped>
157
+ /* 头部 */
158
+ .repair-panel .panel-heading{height:35px;display:flex;align-items:center}
159
+ .panel-title{margin:0;font-size:14px}
173
160
 
161
+ /* 表格 */
162
+ .table-th{background:#8cbce2;text-align:center}
163
+ .table-label{width:17%;text-align:center;background:#fafafa}
174
164
 
175
- .container{
176
- margin: 10px auto;
177
- width: 80%;
178
- height: auto;
179
- }
180
- div::-webkit-scrollbar {
181
- width: 0 !important;
182
- height: 0 !important;
183
- }
165
+ /* 照片区域 */
166
+ .photo-td{padding:10px}
167
+ .photo-wall{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
168
+ .img{border:1px solid #9773ed;margin:0}
184
169
 
185
- div{
186
- -ms-overflow-style: none;
187
- overflow: -moz-scrollbars-none;
188
- }
170
+ /* 无数据提示 */
171
+ .info-content{padding:40px 0;text-align:center;color:#999}
189
172
  </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/meihekou/sale'
5
+ import FilialeSale from './filiale/HuaiLai/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'