修复首页添加大棚

feasure
lld 2026-02-20 14:51:28 +08:00
parent 0847b9490e
commit b532cc9a93
3 changed files with 24 additions and 15 deletions

View File

@ -83,28 +83,37 @@ export default {
},
methods:{
close() {
this.$emit("reload")
this.$refs.addForm.close();
},
confirm() {
this.$refs.form.validate().then(res => {
if (!res) {
addAgriMobile(this.formData).then((response) => {
if (response.code===200) {
uni.showModal({
title: `${response.data.code===1?"✅":"⚠️"}操作提示`,
content: `${response.data.msg}`,
showCancal: false,
confirmText: '确定',
})
}
})
}
addAgriMobile(this.formData).then((response) => {
if (response.code===200) {
uni.showModal({
title: `${response.data.code===1?"✅":"⚠️"}操作提示`,
content: `${response.data.msg}`,
showCancal: false,
confirmText: '确定',
})
}
})
this.close();
}).catch(err => {
console.log('表单错误信息:', err);
uni.showModal({
title: `❌操作提示`,
content: `${err.errorMessage}`,
showCancal: false,
confirmText: '确定',
})
})
},
open() {
this.formData = {
agriName: null,
imei: null,
sourceCode:0
};
this.$refs.addForm.open();
},
getScanCode(res){

View File

@ -78,7 +78,7 @@
<!-- :direction="direction" @trigger="trigger" @fabClick="fabClick" />-->
</z-paging>
<add-agri ref="addAgri"/>
<add-agri ref="addAgri" @reload="getListData"/>
</view>
</template>

View File

@ -70,7 +70,7 @@ class TimeUtil {
// 情况4不支持的类型
else {
console.error(`不支持的时间类型:${typeof time}仅支持数字、Date对象、字符串`);
console.warn(`不支持的时间类型:${typeof time}仅支持数字、Date对象、字符串`);
return null;
}