|
|
@@ -156,13 +156,17 @@ export default {
|
|
|
}
|
|
|
let kindName = this.option.kindName ? this.option.kindName : ''
|
|
|
let form = JSON.parse(JSON.stringify(this.form))
|
|
|
- uni.showLoading({mask:true})
|
|
|
- cgPlant({...form,kindId:kindId,name:kindName,kindName:kindName}).then(res => {
|
|
|
- uni.hideLoading()
|
|
|
- if(res.code == 1){
|
|
|
- this.pageTo({url: '/admin/goods/cgNewPlantResult',type:2,query:{id:res.data.id}})
|
|
|
- }
|
|
|
- })
|
|
|
+
|
|
|
+ let that = this
|
|
|
+ this.$util.confirmModal({content:'确认提交'},() => {
|
|
|
+ uni.showLoading({mask:true})
|
|
|
+ cgPlant({...form,kindId:kindId,name:kindName,kindName:kindName}).then(res => {
|
|
|
+ uni.hideLoading()
|
|
|
+ if(res.code == 1){
|
|
|
+ that.pageTo({url: '/admin/goods/cgNewPlantResult',type:2,query:{id:res.data.id}})
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
formSubmit(e) {
|
|
|
let rules = [
|
|
|
@@ -184,11 +188,11 @@ export default {
|
|
|
];
|
|
|
let formData = e.detail.value;
|
|
|
let checkRes = form.validation(formData, rules);
|
|
|
- if (!checkRes) {
|
|
|
- this.confirmFn()
|
|
|
- } else {
|
|
|
- this.$msg(checkRes);
|
|
|
+ if (checkRes) {
|
|
|
+ this.$msg(checkRes)
|
|
|
+ return false
|
|
|
}
|
|
|
+ this.confirmFn()
|
|
|
}
|
|
|
}
|
|
|
};
|