|
|
@@ -83,14 +83,20 @@
|
|
|
window.axios.post("{{url('maintenance/priceModel/express/getDetail')}}", {id:model.id})
|
|
|
.then(res=>{
|
|
|
if (res.data.success){
|
|
|
- this.details[model.id] = res.data.data;
|
|
|
- this.$forceUpdate();
|
|
|
+ if (res.data.data.length>0){
|
|
|
+ this.details[model.id] = res.data.data;
|
|
|
+ this.$forceUpdate();
|
|
|
+ }else {
|
|
|
+ this.details[model.id] = [];
|
|
|
+ this.addDetail();
|
|
|
+ }
|
|
|
$("#detailModal").modal("show");
|
|
|
return;
|
|
|
}
|
|
|
window.tempTip.setDuration(3000);
|
|
|
window.tempTip.show(res.data.data);
|
|
|
}).catch(err=>{
|
|
|
+ console.log(err);
|
|
|
window.tempTip.setDuration(3000);
|
|
|
window.tempTip.show("网络错误:"+err);
|
|
|
});
|
|
|
@@ -132,9 +138,8 @@
|
|
|
},
|
|
|
addDetail(){
|
|
|
if (this.provinces === null){
|
|
|
- window.axios.post('{{url('maintenance/province/get')}}')
|
|
|
- .then(res=>{
|
|
|
- this.provinces = res.data;
|
|
|
+ window.tempTip.postBasicRequest('{{url('maintenance/province/get')}}',{},undefined,data=>{
|
|
|
+ this.provinces = data;
|
|
|
});
|
|
|
}
|
|
|
this.details[this.id].unshift({
|