telephone-clients 4.0.0-1-3 → 4.0.0-1-5

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