telephone-clients 4.0.0-1-4 → 4.0.0-1-6

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.
@@ -5,7 +5,9 @@
5
5
 
6
6
  <div class="bq-parent" v-if="shutype == 'heng'">
7
7
  <blockquote class="blockquote">
8
- <p>费用<a @click="mute()" style="float:right" href="javascript:void(0)" class="repair-mute-class"><img src="../../assets/novoice.png" width="25px;" alt=""><span style="margin-left:10px;color: #304A66">关闭声音</span></a></p>
8
+ <p>费用<a @click="mute()" style="float:right" href="javascript:void(0)" class="repair-mute-class"><img
9
+ src="../../assets/novoice.png" width="25px;" alt=""><span
10
+ style="margin-left:10px;color: #304A66">关闭声音</span></a></p>
9
11
  </blockquote>
10
12
  </div>
11
13
  <div class="auto repair-info-content compatible" v-if="materialsumshow">
@@ -40,20 +42,49 @@
40
42
  <!--</div>-->
41
43
  <div class="col-xs-12 col-sm-12 col-md-12 form-input-group">
42
44
  <label class="text-justify lb-left">备注:</label>
43
- <span v-if="show" style="font-weight:bold">{{model.f_remarks}}</span>
44
- <textarea class="form-control" cols="30" rows="4" style="resize: vertical;" v-model="model.f_remarks" v-if="!show" :disabled="issee"></textarea>
45
+ <span v-if="show" style="font-weight:bold">{{ model.f_remarks }}</span>
46
+ <textarea class="form-control" cols="30" rows="4" style="resize: vertical;" v-model="model.f_remarks"
47
+ v-if="!show" :disabled="issee"></textarea>
48
+ </div>
49
+ </div>
50
+ <div class="form-group col-md-12 col-sm-12 col-xs-12">
51
+ <div class="row">
52
+ <label class="text-left">请对我们的服务做出评价:</label>
53
+ </div>
54
+ <div class="col-xs-4 col-sm-4" v-for="item in radios">
55
+ <input v-model="model.f_client_evaluation" :value="item.label" :checked='item.isChecked'
56
+ @click="check(item.value)" type="radio">{{ item.label }}
57
+ </div>
58
+ </div>
59
+
60
+ <div class="form-group col-md-12 col-sm-12 col-xs-12">
61
+ <label class="text-left font">反馈录音:</label>
62
+ <div class="col-md-12 col-sm-12 col-xs-12">
63
+ <button type="button" name="button" class="btn btn-primary btn-voice" @click="record">
64
+ <img src="../../assets/录音.png" style="width: 14%;">
65
+ <span v-if="!model.f_recording_path">开始录音</span>
66
+ <span v-if="model.f_recording_path">已录音</span>
67
+ </button>
68
+ &nbsp;&nbsp;&nbsp;&nbsp;<img src="../../assets/remove.png" style="width: 15px;" :class="style__"
69
+ @click="delAudioFile('f_recording_path', model.f_recording_path)"></img>
70
+ </div>
71
+ </div>
72
+ <div class="row auto">
73
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group">
74
+ <label class="text-justify lb-left">处理前照片</label>
75
+ <img-area :model="model.imgs" :sutitle="处理前照片"></img-area>
45
76
  </div>
46
77
  </div>
47
78
  <div class="row auto" v-if="imgtpe">
48
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" v-for="row in imgstype">
49
- <label class="text-justify lb-left">{{row.title}}</label>
50
- <img-area :model="model.imgs" :sutitle="getsutitle(row.title)" :isxiangce="isxiangce"></img-area>
79
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group" v-for="row in imgstype">
80
+ <label class="text-justify lb-left">{{ row.title }}</label>
81
+ <img-area :model="model.imgs" :sutitle="getsutitle(row.title)" :isxiangce="isxiangce"></img-area>
51
82
  </div>
52
83
  </div>
53
- <!-- <div v-if="pdfurl">-->
54
- <!-- <iframe class="prism-player" :src="pdfurl" width="100%" height="100%"></iframe>-->
55
- <!-- </div>-->
56
- <img-area :model="model.imgs" :sutitle="'总体照片'" v-if="!imgtpe" :isxiangce="isxiangce"></img-area>
84
+ <!-- <div v-if="pdfurl">-->
85
+ <!-- <iframe class="prism-player" :src="pdfurl" width="100%" height="100%"></iframe>-->
86
+ <!-- </div>-->
87
+ <img-area :model="model.imgs" :sutitle="'总体照片'" v-if="!imgtpe" :isxiangce="isxiangce"></img-area>
57
88
  <p style="font-size: 15px;font-weight: bold" v-if="model.f_sign_imgid">客户签名:</p>
58
89
  <div v-if="!show && signType">
59
90
  <Sign :signname="model.f_signname" @input="getSignValue"></Sign>
@@ -62,189 +93,237 @@
62
93
  <new-sign :value="model.f_signname" @input="getSignValue"></new-sign>
63
94
  </div>
64
95
  <div v-if="show && model.f_sign_imgid">
65
- <img :src="'rs/file/getfile/' + model.f_sign_imgid" :width="150" :height="200" >
96
+ <img :src="'rs/file/getfile/' + model.f_sign_imgid" :width="150" :height="200">
66
97
  </div>
67
98
  </div>
68
99
  <material-sum v-if="!materialsumshow" v-on:sumchange="sumchange"
69
- v-on:back="showchenge" :material="model.material" :f_cost_material="model.f_cost_material" :show="show">
100
+ v-on:back="showchenge" :material="model.material" :f_cost_material="model.f_cost_material"
101
+ :show="show">
70
102
  </material-sum>
71
103
  </validator>
72
104
  </div>
73
105
  </template>
74
106
 
75
107
  <script>
76
- import Vue from 'vue'
77
- import * as Util from '../Util'
78
- // import {HttpResetClass} from "vue-client";
79
- export default {
80
- title: '费用',
81
- props: {
82
- // 本次维修, 包含照片数组 材料数组
83
- model: {
84
- type: Object
85
- },
86
- service: {
87
- type: Object
88
- },
89
- show: {
90
- type: Boolean,
91
- default: false
92
- },
93
- f_single_man: {
94
- type: Object
95
- },
96
- system: '',
97
- shutype: 'heng',
98
- issee:''
108
+ import Vue from 'vue'
109
+ import * as Util from '../Util'
110
+ // import {HttpResetClass} from "vue-client";
111
+ export default {
112
+ title: '费用',
113
+ props: {
114
+ // 本次维修, 包含照片数组 材料数组
115
+ model: {
116
+ type: Object
117
+ },
118
+ service: {
119
+ type: Object
120
+ },
121
+ show: {
122
+ type: Boolean,
123
+ default: false
124
+ },
125
+ f_single_man: {
126
+ type: Object
99
127
  },
100
- data () {
101
- return {
102
- // pdfurl:'',
103
- signType:{
104
- type: Boolean,
105
- default: true
128
+ system: '',
129
+ shutype: 'heng',
130
+ issee: ''
131
+ },
132
+ data () {
133
+ return {
134
+ radios: [
135
+ {
136
+ label: '满意',
137
+ value: 0,
138
+ isChecked: false
106
139
  },
107
- // 拍照时的文件名
108
- imgurl: 'http://192.168.2.77:8081',
109
- fileName: '',
110
- materialsumshow: { // 控制明细组件和费用层的 显示 fasle 明细组建显示
111
- type: Boolean,
112
- default: true
140
+ {
141
+ label: '基本满意',
142
+ value: 1,
143
+ isChecked: false
113
144
  },
114
- imgtpe:false,
115
- isxiangce:this.$appdata.getSingleValue('维修-开启相册')?this.$appdata.getSingleValue('维修-开启相册'):'否',
116
- image_length:this.$appdata.getSingleValue('维修图片最大数量')?this.$appdata.getSingleValue('维修图片最大数量'):'99',
117
- imgstype:[]
118
- }
119
- },
120
- methods: {
121
- getSignValue(fileName){
122
- //tag
123
- //tag
124
- this.model.f_signname = fileName
125
- this.model.f_sign_path = this.$androidUtil.getFullFileName(fileName)
126
- },
127
- getsutitle(val){
128
- return val
129
- },
130
- mute () {
131
- HostApp.mute()
132
- },
133
- // 签名回调
134
- signCallback(prop, fileName) {
135
- // HostApp.alert('绑定属性:' + prop + ' 文件全路径如file:///storage/sdcard0/safecheck/abc.jpg:' + fullFileName)
136
- HostApp.__this__.$set('model.f_signname', fileName)
137
- HostApp.__callback__ = null
138
- HostApp.__this__ = null
139
- },
140
- // 用户签名
141
- sign() {
142
- this.delAudioFile('f_signname', this.model.f_signname)
143
- let prop = 'f_signname'
144
- let idx = 'aofeng'
145
- let fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
146
- HostApp.__callback__ = this.signCallback
147
- HostApp.__this__ = this
148
- HostApp.getSignature({
149
- file: fileName,
150
- requestCode: 111,
151
- callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");'
152
- })
153
- },
154
- delAudioFile(prop, fileName) {
155
- if (!fileName)
156
- return
157
- else {
158
- HostApp.delfile(fileName)
159
- this.model[prop] = null
145
+ {
146
+ label: '不满意',
147
+ value: 2,
148
+ isChecked: false
160
149
  }
150
+ ],
151
+ signType: {
152
+ type: Boolean,
153
+ default: true
161
154
  },
162
- // 从图片中删除
163
- remove (row) {
164
- this.$androidUtil.delfile(row.android_file)
165
- let pos = this.model.imgs.findIndex((value) => {
166
- return value === row
167
- })
168
- this.model.imgs.splice(pos, 1)
169
- },
170
- // fileName: 回传文件名,传入的带安卓路径url
171
- // prop: 传入的字段名,没做改动
172
- cameraCallBack(prop, fileName) {
173
- // 当前this只能通过HostApp.__tis__获取
174
- let self = this.$androidUtil.getCallBack(this)
175
- // 添加新图片
176
- self.model.imgs.push({
177
- android_file: self.fileName,
178
- path: fileName
179
- })
180
- },
181
- takePic() {
182
- let prop = 'repair'
183
- let idx = 'aofeng'
184
- this.fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
185
- this.$androidUtil.takePic(this, this.cameraCallBack, this.fileName)
186
- },
187
- // 明细组件显示
188
- sumshow(){
189
- this.materialsumshow = false
190
- },
191
- // 当材料明细发生变化 材料费随之变化
192
- sumchange(val){
193
- this.model.f_cost_material = val
155
+ // 拍照时的文件名
156
+ imgurl: 'http://192.168.2.77:8081',
157
+ fileName: '',
158
+ materialsumshow: { // 控制明细组件和费用层的 显示 fasle 明细组建显示
159
+ type: Boolean,
160
+ default: true
194
161
  },
195
- // 返回 总材料费 关闭材料费详情界面
196
- showchenge(val){
197
- this.materialsumshow = true
198
- if(!isNaN(val)) {
199
- this.model.f_cost_material = val
200
- }
162
+ imgtpe: false,
163
+ isxiangce: this.$appdata.getSingleValue('维修-开启相册') ? this.$appdata.getSingleValue('维修-开启相册') : '否',
164
+ image_length: this.$appdata.getSingleValue('维修图片最大数量') ? this.$appdata.getSingleValue('维修图片最大数量') : '99',
165
+ imgstype: []
166
+ }
167
+ },
168
+ methods: {
169
+ check (index) {
170
+ // 先取消所有选中项
171
+ for (let item of this.radios) {
172
+ item.isChecked = false
201
173
  }
174
+ //再设置当前点击项选中
175
+ this.model.f_client_evaluation = this.radios[index].label
176
+ // 设置值,以供传递
177
+ this.radios[index].isChecked = true
202
178
  },
203
- ready(){
204
- if(Vue.config.telephone.Outlay.data != undefined){
205
- //tag
206
- //tag)
207
- if(this.service.f_user_type == '民用'){
208
- this.imgstype = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.Outlay.data[this.service.f_workorder_type].civil)))
209
- }else{
210
- this.imgstype = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.Outlay.data[this.service.f_workorder_type].nocivil)))
211
- }
212
- if(this.imgstype.length>0){
213
- this.imgtpe = true
214
- }
179
+ amrCallBack (fileName) {
180
+ HostApp.__this__.$set('model.f_recording_path', fileName)
181
+ HostApp.__callback__ = null
182
+ HostApp.__this__ = null
183
+ },
184
+ record () {
185
+ HostApp.__callback__ = this.amrCallBack
186
+ HostApp.__this__ = this
187
+ let fileName
188
+ if (!this.model.f_recording_path) {
189
+ fileName = Util.guid() + '.amr'
190
+ } else {
191
+ fileName = Util.getFileName(this.model.f_recording_path)
192
+ }
193
+ HostApp._open_a_page({
194
+ type: 'boomerang',
195
+ page: 'com.aofeng.hybrid.android.peripheral.AudioClipActivity',
196
+ param: {file: fileName, requestCode: 111, callback: 'javascript:HostApp.__callback__("%s");'}
197
+ })
198
+ },
199
+ getSignValue (fileName) {
200
+ //tag
201
+ //tag
202
+ this.model.f_signname = fileName
203
+ this.model.f_sign_path = this.$androidUtil.getFullFileName(fileName)
204
+ },
205
+ getsutitle (val) {
206
+ return val
207
+ },
208
+ mute () {
209
+ HostApp.mute()
210
+ },
211
+ // 签名回调
212
+ signCallback (prop, fileName) {
213
+ // HostApp.alert('绑定属性:' + prop + ' 文件全路径如file:///storage/sdcard0/safecheck/abc.jpg:' + fullFileName)
214
+ HostApp.__this__.$set('model.f_signname', fileName)
215
+ HostApp.__callback__ = null
216
+ HostApp.__this__ = null
217
+ },
218
+ // 用户签名
219
+ sign () {
220
+ this.delAudioFile('f_signname', this.model.f_signname)
221
+ let prop = 'f_signname'
222
+ let idx = 'aofeng'
223
+ let fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
224
+ HostApp.__callback__ = this.signCallback
225
+ HostApp.__this__ = this
226
+ HostApp.getSignature({
227
+ file: fileName,
228
+ requestCode: 111,
229
+ callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");'
230
+ })
231
+ },
232
+ delAudioFile (prop, fileName) {
233
+ if (!fileName) {
234
+ return
235
+ } else {
236
+ HostApp.delfile(fileName)
237
+ this.model[prop] = null
238
+ }
239
+ },
240
+ // 从图片中删除
241
+ remove (row) {
242
+ this.$androidUtil.delfile(row.android_file)
243
+ let pos = this.model.imgs.findIndex((value) => {
244
+ return value === row
245
+ })
246
+ this.model.imgs.splice(pos, 1)
247
+ },
248
+ // fileName: 回传文件名,传入的带安卓路径url
249
+ // prop: 传入的字段名,没做改动
250
+ cameraCallBack (prop, fileName) {
251
+ // 当前this只能通过HostApp.__tis__获取
252
+ let self = this.$androidUtil.getCallBack(this)
253
+ // 添加新图片
254
+ self.model.imgs.push({
255
+ android_file: self.fileName,
256
+ path: fileName
257
+ })
258
+ },
259
+ takePic () {
260
+ let prop = 'repair'
261
+ let idx = 'aofeng'
262
+ this.fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
263
+ this.$androidUtil.takePic(this, this.cameraCallBack, this.fileName)
264
+ },
265
+ // 明细组件显示
266
+ sumshow () {
267
+ this.materialsumshow = false
268
+ },
269
+ // 当材料明细发生变化 材料费随之变化
270
+ sumchange (val) {
271
+ this.model.f_cost_material = val
272
+ },
273
+ // 返回 总材料费 关闭材料费详情界面
274
+ showchenge (val) {
275
+ this.materialsumshow = true
276
+ if (!isNaN(val)) {
277
+ this.model.f_cost_material = val
215
278
  }
216
- if(navigator.userAgent.match('iPad') || navigator.userAgent.match('iPhone')){
217
- this.signType = false
279
+ }
280
+ },
281
+ ready () {
282
+ if (Vue.config.telephone.Outlay.data != undefined) {
283
+ //tag
284
+ //tag)
285
+ if (this.service.f_user_type == '民用') {
286
+ this.imgstype = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.Outlay.data[this.service.f_workorder_type].civil)))
287
+ } else {
288
+ this.imgstype = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.Outlay.data[this.service.f_workorder_type].nocivil)))
218
289
  }
219
- if(this.model && this.model.f_single_man){
220
- this.model.f_single_man = this.f_single_man
290
+ if (this.imgstype.length > 0) {
291
+ this.imgtpe = true
221
292
  }
222
- if(!this.show&&this.model){
223
- if(Vue.user == undefined)
224
- return
225
- this.model.f_order_man = Vue.user.name
226
- this.model.f_order_man_id = Vue.user.id
293
+ }
294
+ if (navigator.userAgent.match('iPad') || navigator.userAgent.match('iPhone')) {
295
+ this.signType = false
296
+ }
297
+ if (this.model && this.model.f_single_man) {
298
+ this.model.f_single_man = this.f_single_man
299
+ }
300
+ if (!this.show && this.model) {
301
+ if (Vue.user == undefined) {
302
+ return
227
303
  }
228
- // if (this.service.f_workorder_type == '置换通气单'){
229
- // new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/sql/tel_singleTable_OrderBy`, {
230
- // data: {
231
- // items: "*",
232
- // tablename: "t_userinfo",
233
- // condition: ` f_userinfo_id = '${this.model.baseuserinfo.f_userinfo_id}' and f_is_signature is null`,
234
- // orderitem: "id"
235
- // }
236
- // }, {resolveMsg: null, rejectMsg: null}).then((res) => {
237
- // if (res.data.length>0){
238
- // new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/wx/af-telephone/rs/logic/wordToosRept`, {
239
- // data: {
240
- // f_userinfo_id: this.model.baseuserinfo.f_userinfo_id,
241
- // }
242
- // }, {resolveMsg: null, rejectMsg: null}).then((res2) => {
243
- // this.pdfurl = res2.data[0].f_visit_url
244
- // })
245
- // }
246
- // })
247
- // }
304
+ this.model.f_order_man = Vue.user.name
305
+ this.model.f_order_man_id = Vue.user.id
306
+ }
307
+ // if (this.service.f_workorder_type == '置换通气单'){
308
+ // new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/sql/tel_singleTable_OrderBy`, {
309
+ // data: {
310
+ // items: "*",
311
+ // tablename: "t_userinfo",
312
+ // condition: ` f_userinfo_id = '${this.model.baseuserinfo.f_userinfo_id}' and f_is_signature is null`,
313
+ // orderitem: "id"
314
+ // }
315
+ // }, {resolveMsg: null, rejectMsg: null}).then((res) => {
316
+ // if (res.data.length>0){
317
+ // new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/wx/af-telephone/rs/logic/wordToosRept`, {
318
+ // data: {
319
+ // f_userinfo_id: this.model.baseuserinfo.f_userinfo_id,
320
+ // }
321
+ // }, {resolveMsg: null, rejectMsg: null}).then((res2) => {
322
+ // this.pdfurl = res2.data[0].f_visit_url
323
+ // })
324
+ // }
325
+ // })
326
+ // }
248
327
  // base64_str = base64.encodeFile(sign_path[0].f_realpath),
249
328
  // pdf2_data={
250
329
  // f_contract_signature_id:pdf[0].f_contract_signature_id,
@@ -256,27 +335,27 @@
256
335
  // log.debug($合同结果=========>{pdf2}$)
257
336
  // ),null,
258
337
 
259
- //tag
260
- //tag
261
- //tag
262
- },
263
- watch: {
264
- 'model.imgs' (val){
265
- if (this.model.imgs.length > this.image_length){
266
- this.$showMessage('最大可上传3张照片')
267
- this.model.imgs.splice(0, 1)
268
- }
338
+ //tag
339
+ //tag
340
+ //tag
341
+ },
342
+ watch: {
343
+ 'model.imgs' (val) {
344
+ if (this.model.imgs.length > this.image_length) {
345
+ this.$showMessage('最大可上传3张照片')
346
+ this.model.imgs.splice(0, 1)
269
347
  }
270
- },
271
- computed:{
272
- Detail(){
273
- if (this.model.imgs && this.model.servicerepair.length > 0) {
274
- let result = this.model.servicerepair.find((row) => {
275
- return row.f_type === this.repairitem.header
276
- })
277
- return result
278
- }
348
+ }
349
+ },
350
+ computed: {
351
+ Detail () {
352
+ if (this.model.imgs && this.model.servicerepair.length > 0) {
353
+ let result = this.model.servicerepair.find((row) => {
354
+ return row.f_type === this.repairitem.header
355
+ })
356
+ return result
279
357
  }
280
358
  }
281
359
  }
360
+ }
282
361
  </script>