telephone-clients 3.0.105-21 → 3.0.105-22

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": "telephone-clients",
3
- "version": "3.0.105-21",
3
+ "version": "3.0.105-22",
4
4
  "description": "呼叫模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -1,80 +1,104 @@
1
- <template>
2
- <div>
3
- <div class="row">
4
- <button type="button" name="button" class="btn btn-primary" @click="takePic()">拍照</button>
5
- </div>
6
- <div class="row">
7
- <div class="col-xs-4 col-sm-3 col-md-2" v-for="img in model" v-if="img.imgpath == sutitle ">
8
- <img-self :src="getimgstr(img)" alt="维修照片" :width="150" :height="200"></img-self>
9
- <button type="button" name="button" class="btn btn-default" @click="remove(img)">-</button>
10
- </div>
11
- </div>
12
- </div>
13
- </template>
14
-
15
- <script>
16
- import Vue from 'vue'
17
- import * as Util from '../../components/Util'
18
-
19
- export default {
20
- props: {
21
- // 存放照片的数组
22
- model: {
23
- type: Array
24
- },
25
- sutitle:'维修照片'
26
- },
27
- data () {
28
- return {
29
- // 拍照时的文件名
30
- fileName: '',
31
- is_has_jingweidu: this.$appdata.getSingleValue('照片水印加经纬度') || 'false',
32
-
33
- }
34
- },
35
- methods: {
36
- // 从图片中删除
37
- remove (row) {
38
- this.$androidUtil.delfile(row.android_file)
39
- let pos = this.model.findIndex((value) => {
40
- return value === row
41
- });
42
- this.model.splice(pos, 1)
43
- },
44
- // fileName: 回传文件名,传入的带安卓路径url
45
- // prop: 传入的字段名,没做改动
46
- cameraCallBack(prop, fileName) {
47
- alert("callback!!!!!!!!!!!!!!!!!!--start")
48
- // 当前this只能通过HostApp.__tis__获取
49
- let self = this.$androidUtil.getCallBack(this)
50
- // 添加新图片
51
- self.model.push({
52
- android_file: self.fileName,
53
- path: fileName,
54
- imgpath: this.sutitle
55
- })
56
- alert("callback!!!!!!!!!!!!!!!!!!--end")
57
- },
58
- takePic() {
59
- const obj = HostApp.getGpsDetailAddress()
60
- let jingweidu = ''
61
- if (this.is_has_jingweidu == 'true'){
62
- jingweidu = '\t经度:' + obj.longitude+ '\t纬度:' + obj.latitude
63
- }
64
- let prop = 'repair'
65
- let idx = 'aofeng'
66
- this.fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
67
- this.$androidUtil.takePic(this, this.cameraCallBack, this.fileName,this.sutitle+jingweidu)
68
- },
69
- getimgstr(val){
70
- if(!val){
71
- return ''
72
- }
73
- if(Vue.android){
74
- return val.path + '?' + Math.random()
75
- }
76
- return 'rs/file/getfile/' + val.imgid
77
- }
78
- },
79
- }
80
- </script>
1
+ <template>
2
+ <div>
3
+ <div class="row">
4
+ <button type="button" name="button" class="btn btn-primary" @click="takePic()">拍照</button>
5
+ <button v-if="isxiangce == '是'" type="button" name="button" class="btn btn-primary" @click="takePic1()">相册</button>
6
+ </div>
7
+ <div class="row">
8
+ <div class="col-xs-4 col-sm-3 col-md-2" v-for="img in model" v-if="img.imgpath == sutitle ">
9
+ <img-self :src="getimgstr(img)" alt="维修照片" :width="150" :height="200"></img-self>
10
+ <button type="button" name="button" class="btn btn-default" @click="remove(img)">-</button>
11
+ </div>
12
+ </div>
13
+ </div>
14
+ </template>
15
+
16
+ <script>
17
+ import Vue from 'vue'
18
+ import * as Util from '../../components/Util'
19
+
20
+ export default {
21
+ props: {
22
+ // 存放照片的数组
23
+ model: {
24
+ type: Array
25
+ },
26
+ sutitle:'维修照片',
27
+ isxiangce:'否'
28
+ },
29
+ data () {
30
+ return {
31
+ // 拍照时的文件名
32
+ fileName: '',
33
+ is_has_jingweidu: this.$appdata.getSingleValue('照片水印加经纬度') || 'false',
34
+
35
+ }
36
+ },
37
+ methods: {
38
+ // 从图片中删除
39
+ remove (row) {
40
+ this.$androidUtil.delfile(row.android_file)
41
+ let pos = this.model.findIndex((value) => {
42
+ return value === row
43
+ });
44
+ this.model.splice(pos, 1)
45
+ },
46
+ // fileName: 回传文件名,传入的带安卓路径url
47
+ // prop: 传入的字段名,没做改动
48
+ cameraCallBack(prop, fileName) {
49
+ alert("callback!!!!!!!!!!!!!!!!!!--start")
50
+ // 当前this只能通过HostApp.__tis__获取
51
+ let self = this.$androidUtil.getCallBack(this)
52
+ // 添加新图片
53
+ self.model.push({
54
+ android_file: self.fileName,
55
+ path: fileName,
56
+ imgpath: this.sutitle
57
+ })
58
+ alert("callback!!!!!!!!!!!!!!!!!!--end")
59
+ },
60
+ takePic() {
61
+ const obj = HostApp.getGpsDetailAddress()
62
+ let jingweidu = ''
63
+ if (this.is_has_jingweidu == 'true'){
64
+ jingweidu = '\t经度:' + obj.longitude+ '\t纬度:' + obj.latitude
65
+ }
66
+ let prop = 'repair'
67
+ let idx = 'aofeng'
68
+ this.fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
69
+ this.$androidUtil.takePic(this, this.cameraCallBack, this.fileName,this.sutitle+jingweidu)
70
+ },
71
+ takePic1() {
72
+ const obj = HostApp.getGpsDetailAddress()
73
+ let jingweidu = ''
74
+ if (this.is_has_jingweidu == 'true') {
75
+ jingweidu = '\t经度:' + obj.longitude + '\t纬度:' + obj.latitude
76
+ }
77
+ HostApp.__callback__ = this.cameraCallBack
78
+ HostApp.__this__ = this
79
+ let prop = 'repair'
80
+ let idx = 'aofeng'
81
+ this.fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
82
+ HostApp._open_a_page({
83
+ type: 'boomerang',
84
+ page: 'com.aofeng.hybrid.android.peripheral.ActionPickActivity',
85
+ param: {
86
+ file: this.fileName,
87
+ requestCode: 111,
88
+ callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
89
+ watermark: this.sutitle+jingweidu + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name
90
+ }
91
+ })
92
+ },
93
+ getimgstr(val){
94
+ if(!val){
95
+ return ''
96
+ }
97
+ if(Vue.android){
98
+ return val.path + '?' + Math.random()
99
+ }
100
+ return 'rs/file/getfile/' + val.imgid
101
+ }
102
+ },
103
+ }
104
+ </script>
@@ -1,236 +1,237 @@
1
- <template>
2
- <div class="select-overspread repair-bg auto" style="padding-bottom:5px;">
3
- <validator name="v">
4
- <!-- 费用 -->
5
-
6
- <div class="bq-parent" v-if="shutype == 'heng'">
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>
9
- </blockquote>
10
- </div>
11
- <div class="auto repair-info-content compatible" v-if="materialsumshow">
12
- <div class="row auto">
13
- <!--<div class="col-xs-12 col-sm-6 col-md-6 form-input-group mg8" :class="$v.f_cost_person.pattern ? 'has-error' : ''">-->
14
- <!--<label class="text-justify lb-left" for="f_cost_person">人工费:</label>-->
15
- <!--<span v-if="show">{{model.f_cost_person}}元</span>-->
16
- <!--<template v-if="!show">-->
17
- <!--<input type="text" class="form-control" id="f_cost_person" v-model="model.f_cost_person" v-validate:f_cost_person="{pattern:'/^[+]{0,1}(\\d+)$|^[+]{0,1}(\\d+\\.\\d+)$/'}">-->
18
- <!--</template>-->
19
- <!--</div>-->
20
- <!--<div class="col-xs-12 col-sm-6 col-md-6 form-input-group">-->
21
- <!--<label class="text-justify lb-left" for="costmatter">材料费:</label>-->
22
- <!--<span v-if="show">{{model.f_cost_material}}元</span>-->
23
- <!--<input type="text" class="form-control" id="costmatter" v-model="model.f_cost_material" v-if="!show">-->
24
- <!--&lt;!&ndash;<button type="button" name="button" class="btn btn-primary" @click="sumshow">明细</button>&ndash;&gt;-->
25
- <!--</div>-->
26
- <!--<div class="col-xs-12 col-sm-6 col-md-6 form-input-group">-->
27
- <!--<label class="text-justify lb-left">操作员:</label>-->
28
- <!--<span v-if="show" style="font-weight:bold">{{model.f_order_man}}</span>-->
29
- <!--<input type="text" class="form-control" v-model="model.f_order_man" v-if="!show" :disabled="issee">-->
30
- <!--</div>-->
31
- <!--<div class="col-xs-12 col-sm-6 col-md-6 form-input-group">-->
32
- <!--<label class="text-justify lb-left">派单员:</label>-->
33
- <!--<span v-if="show" style="font-weight:bold">{{f_single_man}}</span>-->
34
- <!--<input type="text" class="form-control" v-model="f_single_man" v-if="!show" readonly >-->
35
- <!--</div>-->
36
- <!--<div class="col-xs-12 col-sm-12 col-md-12 form-input-group">-->
37
- <!--<label class="text-justify lb-left">反馈建议:</label>-->
38
- <!--<span v-if="show" style="font-weight:bold">{{model.f_service_idea}}</span>-->
39
- <!--<textarea class="form-control" cols="30" rows="4" style="resize: vertical;" v-model="model.f_service_idea" v-if="!show" :disabled="issee"></textarea>-->
40
- <!--</div>-->
41
- <div class="col-xs-12 col-sm-12 col-md-12 form-input-group">
42
- <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
- </div>
46
- </div>
47
- <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)"></img-area>
51
- </div>
52
- </div>
53
- <img-area :model="model.imgs" :sutitle="'总体照片'" v-if="!imgtpe" ></img-area>
54
- <p style="font-size: 15px;font-weight: bold" v-if="model.f_sign_imgid">客户签名:</p>
55
- <div v-if="!show && signType">
56
- <Sign :signname="model.f_signname" @input="getSignValue"></Sign>
57
- </div>
58
- <div v-if="!show && !signType">
59
- <new-sign :value="model.f_signname" @input="getSignValue"></new-sign>
60
- </div>
61
- <div v-if="show && model.f_sign_imgid">
62
- <img :src="'rs/file/getfile/' + model.f_sign_imgid" :width="150" :height="200" >
63
- </div>
64
- </div>
65
- <material-sum v-if="!materialsumshow" v-on:sumchange="sumchange"
66
- v-on:back="showchenge" :material="model.material" :f_cost_material="model.f_cost_material" :show="show">
67
- </material-sum>
68
- </validator>
69
- </div>
70
- </template>
71
-
72
- <script>
73
- import Vue from 'vue'
74
- import * as Util from '../Util'
75
- export default {
76
- title: '费用',
77
- props: {
78
- // 本次维修, 包含照片数组 材料数组
79
- model: {
80
- type: Object
81
- },
82
- service: {
83
- type: Object
84
- },
85
- show: {
86
- type: Boolean,
87
- default: false
88
- },
89
- f_single_man: {
90
- type: Object
91
- },
92
- system: '',
93
- shutype: 'heng',
94
- issee:''
95
- },
96
- data () {
97
- return {
98
- signType:{
99
- type: Boolean,
100
- default: true
101
- },
102
- // 拍照时的文件名
103
- imgurl: 'http://192.168.2.77:8081',
104
- fileName: '',
105
- materialsumshow: { // 控制明细组件和费用层的 显示 fasle 明细组建显示
106
- type: Boolean,
107
- default: true
108
- },
109
- imgtpe:false,
110
- imgstype:[]
111
- }
112
- },
113
- methods: {
114
- getSignValue(fileName){
115
- //tag
116
- //tag
117
- this.model.f_signname = fileName
118
- this.model.f_sign_path = this.$androidUtil.getFullFileName(fileName)
119
- },
120
- getsutitle(val){
121
- return val
122
- },
123
- mute () {
124
- HostApp.mute()
125
- },
126
- // 签名回调
127
- signCallback(prop, fileName) {
128
- // HostApp.alert('绑定属性:' + prop + ' 文件全路径如file:///storage/sdcard0/safecheck/abc.jpg:' + fullFileName)
129
- HostApp.__this__.$set('model.f_signname', fileName)
130
- HostApp.__callback__ = null
131
- HostApp.__this__ = null
132
- },
133
- // 用户签名
134
- sign() {
135
- this.delAudioFile('f_signname', this.model.f_signname)
136
- let prop = 'f_signname'
137
- let idx = 'aofeng'
138
- let fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
139
- HostApp.__callback__ = this.signCallback
140
- HostApp.__this__ = this
141
- HostApp.getSignature({
142
- file: fileName,
143
- requestCode: 111,
144
- callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");'
145
- })
146
- },
147
- delAudioFile(prop, fileName) {
148
- if (!fileName)
149
- return
150
- else {
151
- HostApp.delfile(fileName)
152
- this.model[prop] = null
153
- }
154
- },
155
- // 从图片中删除
156
- remove (row) {
157
- this.$androidUtil.delfile(row.android_file)
158
- let pos = this.model.imgs.findIndex((value) => {
159
- return value === row
160
- })
161
- this.model.imgs.splice(pos, 1)
162
- },
163
- // fileName: 回传文件名,传入的带安卓路径url
164
- // prop: 传入的字段名,没做改动
165
- cameraCallBack(prop, fileName) {
166
- // 当前this只能通过HostApp.__tis__获取
167
- let self = this.$androidUtil.getCallBack(this)
168
- // 添加新图片
169
- self.model.imgs.push({
170
- android_file: self.fileName,
171
- path: fileName
172
- })
173
- },
174
- takePic() {
175
- let prop = 'repair'
176
- let idx = 'aofeng'
177
- this.fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
178
- this.$androidUtil.takePic(this, this.cameraCallBack, this.fileName)
179
- },
180
- // 明细组件显示
181
- sumshow(){
182
- this.materialsumshow = false
183
- },
184
- // 当材料明细发生变化 材料费随之变化
185
- sumchange(val){
186
- this.model.f_cost_material = val
187
- },
188
- // 返回 总材料费 关闭材料费详情界面
189
- showchenge(val){
190
- this.materialsumshow = true
191
- if(!isNaN(val)) {
192
- this.model.f_cost_material = val
193
- }
194
- }
195
- },
196
- ready(){
197
- if(Vue.config.telephone.Outlay.data != undefined){
198
- //tag
199
- //tag)
200
- if(this.service.f_user_type == '民用'){
201
- this.imgstype = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.Outlay.data[this.service.f_workorder_type].civil)))
202
- }else{
203
- this.imgstype = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.Outlay.data[this.service.f_workorder_type].nocivil)))
204
- }
205
- if(this.imgstype.length>0){
206
- this.imgtpe = true
207
- }
208
- }
209
- if(navigator.userAgent.match('iPad') || navigator.userAgent.match('iPhone')){
210
- this.signType = false
211
- }
212
- if(this.model && this.model.f_single_man){
213
- this.model.f_single_man = this.f_single_man
214
- }
215
- if(!this.show&&this.model){
216
- if(Vue.user == undefined)
217
- return
218
- this.model.f_order_man = Vue.user.name
219
- this.model.f_order_man_id = Vue.user.id
220
- }
221
- //tag
222
- //tag
223
- //tag
224
- },
225
- computed:{
226
- Detail(){
227
- if (this.model.imgs && this.model.servicerepair.length > 0) {
228
- let result = this.model.servicerepair.find((row) => {
229
- return row.f_type === this.repairitem.header
230
- })
231
- return result
232
- }
233
- }
234
- }
235
- }
236
- </script>
1
+ <template>
2
+ <div class="select-overspread repair-bg auto" style="padding-bottom:5px;">
3
+ <validator name="v">
4
+ <!-- 费用 -->
5
+
6
+ <div class="bq-parent" v-if="shutype == 'heng'">
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>
9
+ </blockquote>
10
+ </div>
11
+ <div class="auto repair-info-content compatible" v-if="materialsumshow">
12
+ <div class="row auto">
13
+ <!--<div class="col-xs-12 col-sm-6 col-md-6 form-input-group mg8" :class="$v.f_cost_person.pattern ? 'has-error' : ''">-->
14
+ <!--<label class="text-justify lb-left" for="f_cost_person">人工费:</label>-->
15
+ <!--<span v-if="show">{{model.f_cost_person}}元</span>-->
16
+ <!--<template v-if="!show">-->
17
+ <!--<input type="text" class="form-control" id="f_cost_person" v-model="model.f_cost_person" v-validate:f_cost_person="{pattern:'/^[+]{0,1}(\\d+)$|^[+]{0,1}(\\d+\\.\\d+)$/'}">-->
18
+ <!--</template>-->
19
+ <!--</div>-->
20
+ <!--<div class="col-xs-12 col-sm-6 col-md-6 form-input-group">-->
21
+ <!--<label class="text-justify lb-left" for="costmatter">材料费:</label>-->
22
+ <!--<span v-if="show">{{model.f_cost_material}}元</span>-->
23
+ <!--<input type="text" class="form-control" id="costmatter" v-model="model.f_cost_material" v-if="!show">-->
24
+ <!--&lt;!&ndash;<button type="button" name="button" class="btn btn-primary" @click="sumshow">明细</button>&ndash;&gt;-->
25
+ <!--</div>-->
26
+ <!--<div class="col-xs-12 col-sm-6 col-md-6 form-input-group">-->
27
+ <!--<label class="text-justify lb-left">操作员:</label>-->
28
+ <!--<span v-if="show" style="font-weight:bold">{{model.f_order_man}}</span>-->
29
+ <!--<input type="text" class="form-control" v-model="model.f_order_man" v-if="!show" :disabled="issee">-->
30
+ <!--</div>-->
31
+ <!--<div class="col-xs-12 col-sm-6 col-md-6 form-input-group">-->
32
+ <!--<label class="text-justify lb-left">派单员:</label>-->
33
+ <!--<span v-if="show" style="font-weight:bold">{{f_single_man}}</span>-->
34
+ <!--<input type="text" class="form-control" v-model="f_single_man" v-if="!show" readonly >-->
35
+ <!--</div>-->
36
+ <!--<div class="col-xs-12 col-sm-12 col-md-12 form-input-group">-->
37
+ <!--<label class="text-justify lb-left">反馈建议:</label>-->
38
+ <!--<span v-if="show" style="font-weight:bold">{{model.f_service_idea}}</span>-->
39
+ <!--<textarea class="form-control" cols="30" rows="4" style="resize: vertical;" v-model="model.f_service_idea" v-if="!show" :disabled="issee"></textarea>-->
40
+ <!--</div>-->
41
+ <div class="col-xs-12 col-sm-12 col-md-12 form-input-group">
42
+ <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
+ </div>
46
+ </div>
47
+ <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>
52
+ </div>
53
+ <img-area :model="model.imgs" :sutitle="'总体照片'" v-if="!imgtpe" :isxiangce="isxiangce"></img-area>
54
+ <p style="font-size: 15px;font-weight: bold" v-if="model.f_sign_imgid">客户签名:</p>
55
+ <div v-if="!show && signType">
56
+ <Sign :signname="model.f_signname" @input="getSignValue"></Sign>
57
+ </div>
58
+ <div v-if="!show && !signType">
59
+ <new-sign :value="model.f_signname" @input="getSignValue"></new-sign>
60
+ </div>
61
+ <div v-if="show && model.f_sign_imgid">
62
+ <img :src="'rs/file/getfile/' + model.f_sign_imgid" :width="150" :height="200" >
63
+ </div>
64
+ </div>
65
+ <material-sum v-if="!materialsumshow" v-on:sumchange="sumchange"
66
+ v-on:back="showchenge" :material="model.material" :f_cost_material="model.f_cost_material" :show="show">
67
+ </material-sum>
68
+ </validator>
69
+ </div>
70
+ </template>
71
+
72
+ <script>
73
+ import Vue from 'vue'
74
+ import * as Util from '../Util'
75
+ export default {
76
+ title: '费用',
77
+ props: {
78
+ // 本次维修, 包含照片数组 材料数组
79
+ model: {
80
+ type: Object
81
+ },
82
+ service: {
83
+ type: Object
84
+ },
85
+ show: {
86
+ type: Boolean,
87
+ default: false
88
+ },
89
+ f_single_man: {
90
+ type: Object
91
+ },
92
+ system: '',
93
+ shutype: 'heng',
94
+ issee:''
95
+ },
96
+ data () {
97
+ return {
98
+ signType:{
99
+ type: Boolean,
100
+ default: true
101
+ },
102
+ // 拍照时的文件名
103
+ imgurl: 'http://192.168.2.77:8081',
104
+ fileName: '',
105
+ materialsumshow: { // 控制明细组件和费用层的 显示 fasle 明细组建显示
106
+ type: Boolean,
107
+ default: true
108
+ },
109
+ imgtpe:false,
110
+ isxiangce:this.$appdata.getSingleValue('维修-开启相册')?this.$appdata.getSingleValue('维修-开启相册'):'否',
111
+ imgstype:[]
112
+ }
113
+ },
114
+ methods: {
115
+ getSignValue(fileName){
116
+ //tag
117
+ //tag
118
+ this.model.f_signname = fileName
119
+ this.model.f_sign_path = this.$androidUtil.getFullFileName(fileName)
120
+ },
121
+ getsutitle(val){
122
+ return val
123
+ },
124
+ mute () {
125
+ HostApp.mute()
126
+ },
127
+ // 签名回调
128
+ signCallback(prop, fileName) {
129
+ // HostApp.alert('绑定属性:' + prop + ' 文件全路径如file:///storage/sdcard0/safecheck/abc.jpg:' + fullFileName)
130
+ HostApp.__this__.$set('model.f_signname', fileName)
131
+ HostApp.__callback__ = null
132
+ HostApp.__this__ = null
133
+ },
134
+ // 用户签名
135
+ sign() {
136
+ this.delAudioFile('f_signname', this.model.f_signname)
137
+ let prop = 'f_signname'
138
+ let idx = 'aofeng'
139
+ let fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
140
+ HostApp.__callback__ = this.signCallback
141
+ HostApp.__this__ = this
142
+ HostApp.getSignature({
143
+ file: fileName,
144
+ requestCode: 111,
145
+ callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");'
146
+ })
147
+ },
148
+ delAudioFile(prop, fileName) {
149
+ if (!fileName)
150
+ return
151
+ else {
152
+ HostApp.delfile(fileName)
153
+ this.model[prop] = null
154
+ }
155
+ },
156
+ // 从图片中删除
157
+ remove (row) {
158
+ this.$androidUtil.delfile(row.android_file)
159
+ let pos = this.model.imgs.findIndex((value) => {
160
+ return value === row
161
+ })
162
+ this.model.imgs.splice(pos, 1)
163
+ },
164
+ // fileName: 回传文件名,传入的带安卓路径url
165
+ // prop: 传入的字段名,没做改动
166
+ cameraCallBack(prop, fileName) {
167
+ // 当前this只能通过HostApp.__tis__获取
168
+ let self = this.$androidUtil.getCallBack(this)
169
+ // 添加新图片
170
+ self.model.imgs.push({
171
+ android_file: self.fileName,
172
+ path: fileName
173
+ })
174
+ },
175
+ takePic() {
176
+ let prop = 'repair'
177
+ let idx = 'aofeng'
178
+ this.fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
179
+ this.$androidUtil.takePic(this, this.cameraCallBack, this.fileName)
180
+ },
181
+ // 明细组件显示
182
+ sumshow(){
183
+ this.materialsumshow = false
184
+ },
185
+ // 当材料明细发生变化 材料费随之变化
186
+ sumchange(val){
187
+ this.model.f_cost_material = val
188
+ },
189
+ // 返回 总材料费 关闭材料费详情界面
190
+ showchenge(val){
191
+ this.materialsumshow = true
192
+ if(!isNaN(val)) {
193
+ this.model.f_cost_material = val
194
+ }
195
+ }
196
+ },
197
+ ready(){
198
+ if(Vue.config.telephone.Outlay.data != undefined){
199
+ //tag
200
+ //tag)
201
+ if(this.service.f_user_type == '民用'){
202
+ this.imgstype = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.Outlay.data[this.service.f_workorder_type].civil)))
203
+ }else{
204
+ this.imgstype = Object.assign([], JSON.parse(JSON.stringify(Vue.config.telephone.Outlay.data[this.service.f_workorder_type].nocivil)))
205
+ }
206
+ if(this.imgstype.length>0){
207
+ this.imgtpe = true
208
+ }
209
+ }
210
+ if(navigator.userAgent.match('iPad') || navigator.userAgent.match('iPhone')){
211
+ this.signType = false
212
+ }
213
+ if(this.model && this.model.f_single_man){
214
+ this.model.f_single_man = this.f_single_man
215
+ }
216
+ if(!this.show&&this.model){
217
+ if(Vue.user == undefined)
218
+ return
219
+ this.model.f_order_man = Vue.user.name
220
+ this.model.f_order_man_id = Vue.user.id
221
+ }
222
+ //tag
223
+ //tag
224
+ //tag
225
+ },
226
+ computed:{
227
+ Detail(){
228
+ if (this.model.imgs && this.model.servicerepair.length > 0) {
229
+ let result = this.model.servicerepair.find((row) => {
230
+ return row.f_type === this.repairitem.header
231
+ })
232
+ return result
233
+ }
234
+ }
235
+ }
236
+ }
237
+ </script>