|
|
@@ -39,18 +39,21 @@
|
|
|
},
|
|
|
methods:{
|
|
|
destroy(id,index){
|
|
|
- axios.delete('{{url("apiLocal/material/destroy")}}/'+id).then(res=>{
|
|
|
- if(res.data.success){
|
|
|
+ window.tempTip.setIndex(1099);
|
|
|
+ window.tempTip.confirm("是否删除当前耗材?",()=>{
|
|
|
+ window.axios.delete('{{url("apiLocal/material/destroy")}}/'+id).then(res=>{
|
|
|
+ if(res.data.success){
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.showSuccess('删除成功');
|
|
|
+ this.$delete(this.materials,index);
|
|
|
+ return;
|
|
|
+ }
|
|
|
tempTip.setDuration(3000);
|
|
|
- tempTip.showSuccess('删除成功');
|
|
|
- this.$delete(this.materials,index);
|
|
|
- return;
|
|
|
- }
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show(res.data.message);
|
|
|
- }).catch(err=>{
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show(err);
|
|
|
+ tempTip.show(res.data.message);
|
|
|
+ }).catch(err=>{
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show(err);
|
|
|
+ });
|
|
|
});
|
|
|
},
|
|
|
edit(material,i){
|