|
|
@@ -24,8 +24,16 @@
|
|
24
|
24
|
</view>
|
|
25
|
25
|
</view>
|
|
26
|
26
|
<!-- 基础表单校验 -->
|
|
27
|
|
- <uni-forms ref="valiForm" :rules="rules" >
|
|
28
|
|
- <uni-forms-item label="附件" name="attitude" v-if="FileUrl && FileUrl.length > 0">
|
|
|
27
|
+ <uni-forms ref="valiForm" :rules="rules">
|
|
|
28
|
+ <uni-forms-item label="附件" name="attitude"
|
|
|
29
|
+ v-if="FileUrl && FileUrl.length > 0 && !(PictureUrl && PictureUrl.length > 0)">
|
|
|
30
|
+ <view class="example-body ">
|
|
|
31
|
+ <uni-file-picker readonly :value="FileUrl" :imageStyles="imageStyles" file-mediatype="image">
|
|
|
32
|
+ </uni-file-picker>
|
|
|
33
|
+ </view>
|
|
|
34
|
+ </uni-forms-item>
|
|
|
35
|
+ <uni-forms-item label="维修前附件" name="attitude"
|
|
|
36
|
+ v-if="FileUrl && FileUrl.length > 0 && (PictureUrl && PictureUrl.length > 0)">
|
|
29
|
37
|
<view class="example-body ">
|
|
30
|
38
|
<uni-file-picker readonly :value="FileUrl" :imageStyles="imageStyles" file-mediatype="image">
|
|
31
|
39
|
</uni-file-picker>
|
|
|
@@ -37,17 +45,17 @@
|
|
37
|
45
|
</uni-file-picker>
|
|
38
|
46
|
</view>
|
|
39
|
47
|
</uni-forms-item>
|
|
40
|
|
- <uni-forms-item label="结果" name="days" required>
|
|
|
48
|
+ <uni-forms-item label="结果" name="days" required>
|
|
41
|
49
|
<uni-data-checkbox v-model="result" :localdata="resultList" />
|
|
42
|
50
|
</uni-forms-item>
|
|
43
|
|
- <uni-forms-item label="原因" name="content" >
|
|
|
51
|
+ <uni-forms-item label="原因" name="content">
|
|
44
|
52
|
<uni-easyinput type="textarea" v-model="content" placeholder="请输入原因" />
|
|
45
|
53
|
</uni-forms-item>
|
|
46
|
54
|
</uni-forms>
|
|
47
|
55
|
<view class="btnClass">
|
|
48
|
56
|
<button type="primary" :disabled="disabledButton" @click="submit('valiForm')">提交</button>
|
|
49
|
57
|
</view>
|
|
50
|
|
-
|
|
|
58
|
+
|
|
51
|
59
|
</view>
|
|
52
|
60
|
</view>
|
|
53
|
61
|
</template>
|
|
|
@@ -59,27 +67,27 @@
|
|
59
|
67
|
return {
|
|
60
|
68
|
FileUrl: [],
|
|
61
|
69
|
PictureUrl: [],
|
|
62
|
|
- getFontSizeValue:'1rem',
|
|
|
70
|
+ getFontSizeValue: '1rem',
|
|
63
|
71
|
equipmentCon: [],
|
|
64
|
|
- disabledButton:false,
|
|
|
72
|
+ disabledButton: false,
|
|
65
|
73
|
result: 1,
|
|
66
|
74
|
content: '',
|
|
67
|
75
|
workorderid: '',
|
|
68
|
76
|
resultList: [{
|
|
69
|
77
|
value: 1,
|
|
70
|
|
- text: '无误'
|
|
71
|
|
- },{
|
|
|
78
|
+ text: '无误'
|
|
|
79
|
+ }, {
|
|
72
|
80
|
value: 0,
|
|
73
|
|
- text: '有误'
|
|
|
81
|
+ text: '有误'
|
|
74
|
82
|
}],
|
|
75
|
83
|
// 校验规则
|
|
76
|
84
|
rules: {
|
|
77
|
|
-
|
|
|
85
|
+
|
|
78
|
86
|
},
|
|
79
|
87
|
}
|
|
80
|
88
|
},
|
|
81
|
89
|
onLoad(option) {
|
|
82
|
|
- this.getFontSizeValue = uni.getStorageSync('fontSizeValue')+'rem'
|
|
|
90
|
+ this.getFontSizeValue = uni.getStorageSync('fontSizeValue') + 'rem'
|
|
83
|
91
|
this.workorderid = option.wid
|
|
84
|
92
|
this.getDetail()
|
|
85
|
93
|
this.getDetailfiles()
|
|
|
@@ -89,16 +97,17 @@
|
|
89
|
97
|
console.log(e)
|
|
90
|
98
|
this.days = e
|
|
91
|
99
|
},
|
|
92
|
|
- submit(ref,state) {
|
|
|
100
|
+ submit(ref, state) {
|
|
93
|
101
|
this.disabledButton = true
|
|
94
|
102
|
this.$refs[ref].validate().then(res => {
|
|
95
|
103
|
const params = {
|
|
96
|
|
- workordercode: this.workorderid,
|
|
97
|
|
- confirmtype: this.result,
|
|
98
|
|
- reason: this.content,
|
|
|
104
|
+ workordercode: this.workorderid,
|
|
|
105
|
+ confirmtype: this.result,
|
|
|
106
|
+ reason: this.content,
|
|
99
|
107
|
}
|
|
100
|
|
- this.$mHelper.httpPost("FaultRepair/ConfirmEquips",params,2,res=>this.disabledButton=res)
|
|
101
|
|
-
|
|
|
108
|
+ this.$mHelper.httpPost("FaultRepair/ConfirmEquips", params, 2, res => this.disabledButton =
|
|
|
109
|
+ res)
|
|
|
110
|
+
|
|
102
|
111
|
}).catch(err => {
|
|
103
|
112
|
this.disabledButton = false
|
|
104
|
113
|
console.log('err', err);
|
|
|
@@ -116,12 +125,32 @@
|
|
116
|
125
|
url: o.F_FileUrl,
|
|
117
|
126
|
};
|
|
118
|
127
|
})
|
|
|
128
|
+ // this.PictureUrl = response.data[0].PictureUrl && response.data[0].PictureUrl.map((o) => {
|
|
|
129
|
+ // return {
|
|
|
130
|
+ // url: o.F_FileUrl,
|
|
|
131
|
+ // };
|
|
|
132
|
+ // })
|
|
|
133
|
+
|
|
|
134
|
+ }
|
|
|
135
|
+ }).catch((e) => {
|
|
|
136
|
+ console.log(e);
|
|
|
137
|
+ })
|
|
|
138
|
+ this.$http.get("FaultRepair/GetWorkOrder", {
|
|
|
139
|
+ WorkOrderCode: this.workorderid,
|
|
|
140
|
+ type: 0
|
|
|
141
|
+ }).then((response) => {
|
|
|
142
|
+ if (response.state.toLowerCase() === "success") {
|
|
|
143
|
+ // this.FileUrl = response.data[0].FileUrl && response.data[0].FileUrl.map((o) => {
|
|
|
144
|
+ // return {
|
|
|
145
|
+ // url: o.F_FileUrl,
|
|
|
146
|
+ // };
|
|
|
147
|
+ // })
|
|
119
|
148
|
this.PictureUrl = response.data[0].PictureUrl && response.data[0].PictureUrl.map((o) => {
|
|
120
|
149
|
return {
|
|
121
|
150
|
url: o.F_FileUrl,
|
|
122
|
151
|
};
|
|
123
|
152
|
})
|
|
124
|
|
-
|
|
|
153
|
+
|
|
125
|
154
|
}
|
|
126
|
155
|
}).catch((e) => {
|
|
127
|
156
|
console.log(e);
|
|
|
@@ -134,7 +163,7 @@
|
|
134
|
163
|
}
|
|
135
|
164
|
this.$http.get("FaultRepair/GetWorkOrder", params).then((response) => {
|
|
136
|
165
|
if (response.state.toLowerCase() === "success") {
|
|
137
|
|
- if(response.data.length> 0 && response.data[0].Equips) {
|
|
|
166
|
+ if (response.data.length > 0 && response.data[0].Equips) {
|
|
138
|
167
|
this.equipmentCon = response.data[0].Equips
|
|
139
|
168
|
}
|
|
140
|
169
|
}
|
|
|
@@ -148,59 +177,64 @@
|
|
148
|
177
|
|
|
149
|
178
|
<style lang="scss">
|
|
150
|
179
|
@import '@/common/addFormDeep.scss';
|
|
151
|
|
- /deep/ .uni-data-checklist[data-v-84d5d996]{
|
|
|
180
|
+
|
|
|
181
|
+ /deep/ .uni-data-checklist[data-v-84d5d996] {
|
|
152
|
182
|
margin-top: 7px !important;
|
|
153
|
183
|
}
|
|
154
|
|
-.wrapper {
|
|
155
|
|
- padding: 10px 15px;
|
|
156
|
|
- background-color: #fff;
|
|
157
|
|
- .form {
|
|
158
|
|
- .uni-stat__select{
|
|
159
|
|
- display: block;
|
|
160
|
|
- align-items: center;
|
|
161
|
|
- padding: 0px;
|
|
162
|
|
- cursor: pointer;
|
|
163
|
|
- width: 80%;
|
|
164
|
|
- }
|
|
165
|
|
- .operationButton {
|
|
166
|
|
- // margin: 5px 0;
|
|
167
|
|
- // padding: 17px;
|
|
168
|
|
- background-color: #fff;
|
|
169
|
|
-
|
|
170
|
|
- .operationButtonTitle {
|
|
171
|
|
- font-weight: 700;
|
|
|
184
|
+
|
|
|
185
|
+ .wrapper {
|
|
|
186
|
+ padding: 10px 15px;
|
|
|
187
|
+ background-color: #fff;
|
|
|
188
|
+
|
|
|
189
|
+ .form {
|
|
|
190
|
+ .uni-stat__select {
|
|
|
191
|
+ display: block;
|
|
|
192
|
+ align-items: center;
|
|
|
193
|
+ padding: 0px;
|
|
|
194
|
+ cursor: pointer;
|
|
|
195
|
+ width: 80%;
|
|
172
|
196
|
}
|
|
173
|
|
-
|
|
174
|
|
- .buttons {
|
|
175
|
|
- margin: 15px 0 0 0;
|
|
176
|
|
-
|
|
|
197
|
+
|
|
|
198
|
+ .operationButton {
|
|
|
199
|
+ // margin: 5px 0;
|
|
|
200
|
+ // padding: 17px;
|
|
|
201
|
+ background-color: #fff;
|
|
|
202
|
+
|
|
|
203
|
+ .operationButtonTitle {
|
|
|
204
|
+ font-weight: 700;
|
|
|
205
|
+ }
|
|
|
206
|
+
|
|
|
207
|
+ .buttons {
|
|
|
208
|
+ margin: 15px 0 0 0;
|
|
|
209
|
+
|
|
|
210
|
+ }
|
|
177
|
211
|
}
|
|
178
|
|
- }
|
|
179
|
|
- .equipmentInfo{
|
|
180
|
|
- width: 100%;
|
|
181
|
|
- margin-top: 15px;
|
|
182
|
|
- border: 1px solid rgb(229, 229, 229);
|
|
183
|
|
- box-shadow: 0px 4px 16px 0px rgba(69, 91, 99, 0.05);
|
|
184
|
|
- margin-bottom: 20px;
|
|
185
|
|
- border-radius: 5px;
|
|
186
|
|
-
|
|
187
|
|
- .trCon {
|
|
|
212
|
+
|
|
|
213
|
+ .equipmentInfo {
|
|
188
|
214
|
width: 100%;
|
|
189
|
|
- font-size: 1rem;
|
|
190
|
|
-
|
|
191
|
|
- .tdCon {
|
|
192
|
|
- display: inline-block;
|
|
193
|
|
- padding: 10px 0px;
|
|
194
|
|
- color: rgb(102, 102, 102);
|
|
195
|
|
- width: 31%;
|
|
196
|
|
- padding-right: 5px;
|
|
197
|
|
- text-align: center;
|
|
|
215
|
+ margin-top: 15px;
|
|
|
216
|
+ border: 1px solid rgb(229, 229, 229);
|
|
|
217
|
+ box-shadow: 0px 4px 16px 0px rgba(69, 91, 99, 0.05);
|
|
|
218
|
+ margin-bottom: 20px;
|
|
|
219
|
+ border-radius: 5px;
|
|
|
220
|
+
|
|
|
221
|
+ .trCon {
|
|
|
222
|
+ width: 100%;
|
|
|
223
|
+ font-size: 1rem;
|
|
|
224
|
+
|
|
|
225
|
+ .tdCon {
|
|
|
226
|
+ display: inline-block;
|
|
|
227
|
+ padding: 10px 0px;
|
|
|
228
|
+ color: rgb(102, 102, 102);
|
|
|
229
|
+ width: 31%;
|
|
|
230
|
+ padding-right: 5px;
|
|
|
231
|
+ text-align: center;
|
|
|
232
|
+ }
|
|
198
|
233
|
}
|
|
|
234
|
+
|
|
199
|
235
|
}
|
|
200
|
|
-
|
|
|
236
|
+
|
|
201
|
237
|
}
|
|
202
|
|
-
|
|
203
|
|
- }
|
|
204
|
238
|
|
|
205
|
|
-}
|
|
|
239
|
+ }
|
|
206
|
240
|
</style>
|