修复首页添加大棚
parent
0847b9490e
commit
b532cc9a93
|
|
@ -83,11 +83,11 @@ export default {
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
close() {
|
close() {
|
||||||
|
this.$emit("reload")
|
||||||
this.$refs.addForm.close();
|
this.$refs.addForm.close();
|
||||||
},
|
},
|
||||||
confirm() {
|
confirm() {
|
||||||
this.$refs.form.validate().then(res => {
|
this.$refs.form.validate().then(res => {
|
||||||
if (!res) {
|
|
||||||
addAgriMobile(this.formData).then((response) => {
|
addAgriMobile(this.formData).then((response) => {
|
||||||
if (response.code===200) {
|
if (response.code===200) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
|
|
@ -98,13 +98,22 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
this.close();
|
this.close();
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log('表单错误信息:', err);
|
uni.showModal({
|
||||||
|
title: `❌操作提示`,
|
||||||
|
content: `${err.errorMessage}`,
|
||||||
|
showCancal: false,
|
||||||
|
confirmText: '确定',
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
open() {
|
open() {
|
||||||
|
this.formData = {
|
||||||
|
agriName: null,
|
||||||
|
imei: null,
|
||||||
|
sourceCode:0
|
||||||
|
};
|
||||||
this.$refs.addForm.open();
|
this.$refs.addForm.open();
|
||||||
},
|
},
|
||||||
getScanCode(res){
|
getScanCode(res){
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@
|
||||||
<!-- :direction="direction" @trigger="trigger" @fabClick="fabClick" />-->
|
<!-- :direction="direction" @trigger="trigger" @fabClick="fabClick" />-->
|
||||||
|
|
||||||
</z-paging>
|
</z-paging>
|
||||||
<add-agri ref="addAgri"/>
|
<add-agri ref="addAgri" @reload="getListData"/>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ class TimeUtil {
|
||||||
|
|
||||||
// 情况4:不支持的类型
|
// 情况4:不支持的类型
|
||||||
else {
|
else {
|
||||||
console.error(`不支持的时间类型:${typeof time},仅支持数字、Date对象、字符串`);
|
console.warn(`不支持的时间类型:${typeof time},仅支持数字、Date对象、字符串`);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue