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 +1 -1
- package/src/components/android/ImgArea.vue +104 -80
- package/src/components/workorder/Outlay.vue +237 -236
package/package.json
CHANGED
|
@@ -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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
</
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
//
|
|
51
|
-
self.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
<!--<!–<button type="button" name="button" class="btn btn-primary" @click="sumshow">明细</button>–>-->
|
|
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
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
//tag
|
|
117
|
-
|
|
118
|
-
this.model.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
HostApp.
|
|
130
|
-
HostApp.
|
|
131
|
-
HostApp.
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
let
|
|
138
|
-
let
|
|
139
|
-
|
|
140
|
-
HostApp.
|
|
141
|
-
HostApp.
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
//
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
let
|
|
177
|
-
|
|
178
|
-
this
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
//tag
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
this.model.
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
//tag
|
|
223
|
-
//tag
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
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
|
+
<!--<!–<button type="button" name="button" class="btn btn-primary" @click="sumshow">明细</button>–>-->
|
|
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>
|