diff --git a/src/apps/AppAiInput/AppAiInput.vue b/src/apps/AppAiInput/AppAiInput.vue index c828196a..eea6a080 100644 --- a/src/apps/AppAiInput/AppAiInput.vue +++ b/src/apps/AppAiInput/AppAiInput.vue @@ -1,6 +1,6 @@ @@ -129,11 +157,22 @@ uni-page-body { color: #222; margin-bottom: 64px; } - .cancel { + .btn { + text-align: center; font-family: PingFangSC-Regular; font-size: 36px; - color: #999; + p { + display: inline-block; + } + .cancel { + color: #999; + } + .confirm { + color: #0262F2; + margin-left: 120px; + } } + } } diff --git a/src/apps/AppAiInput/formConfirm.vue b/src/apps/AppAiInput/formConfirm.vue index fa5f7e00..1c1022c0 100644 --- a/src/apps/AppAiInput/formConfirm.vue +++ b/src/apps/AppAiInput/formConfirm.vue @@ -6,7 +6,7 @@
户主姓名
- +
@@ -14,18 +14,59 @@ *
性别
-
- +
+ {{ $dict.getLabel('sex', info.sex) || '请选择'}}
+
+ * +
+
联系电话
+
+ +
+
+
+
+ * +
+
出生日期
+
+ {{ info.birthday || '请选择'}} + +
+
+
+
+ * +
+
民族
+
+ {{ $dict.getLabel('nation', info.nation) || '请选择'}} + +
+
+
+
+ * +
+
家庭人口数
+
+ +
+
+
-
保存内容
-
提交
+
保存内容
+
提交
取消
+ 请选择 + + @@ -36,20 +77,69 @@ export default { name: 'formConfirm', data() { return { - + word: '', + info: {}, + showSex: false, + showNation: false, + showDate: false, + deteParams: {year: true, month: true, day: true, hour: false, minute: false, second: false}, } }, computed: { ...mapState(['user']), }, - created() { - + onLoad(option) { + uni.showLoading({title: '加载中'}) + this.word = option.word + this.$dict.load('sex', 'nation').then(() => { + this.getInfo() + }) }, onShow() { document.title = '婚姻家庭纠纷入户登记表' }, methods: { - + getInfo() { + this.$http.post(`/app/appbaiduai/queryByInfo?word=${this.word}`).then((res) => { + if (res.code === 0) { + this.info = {...res.data} + uni.hideLoading() + } + }).catch(res => { + this.$u.toast(res) + uni.hideLoading() + }) + }, + confirmSex(e) { + this.info.sex = e[0].value + }, + confirmNation(e) { + this.info.nation = e[0].value + }, + dateConfirm(e) { + this.info.birthday = `${e.year}-${e.month}-${e.day}` + }, + confirm(successText) { + if(this.info.name == null || !this.info.name) { + return this.$u.toast('请输入户主姓名') + } + if(this.info.sex == null) { + return this.$u.toast('请选择性别') + } + if(this.info.phone == null || !this.info.phone) { + return this.$u.toast('请输入联系电话') + } + if(this.info.birthday == null) { + return this.$u.toast('请选择出生日期') + } + if(this.info.nation == null) { + return this.$u.toast('请选择民族') + } + if(this.info.householdNumber == null || !this.info.householdNumber) { + return this.$u.toast('请输入家庭人口数') + } + this.$u.toast(successText) + } }, } @@ -102,6 +192,10 @@ uni-page-body { width: 32px; height: 32px; margin-left: 8px; + vertical-align: middle; + } + .color-999 { + color: rgb(192, 196, 204); } } } diff --git a/src/apps/AppAiInput/formEdit.vue b/src/apps/AppAiInput/formEdit.vue index 7756b546..c1147edd 100644 --- a/src/apps/AppAiInput/formEdit.vue +++ b/src/apps/AppAiInput/formEdit.vue @@ -6,26 +6,77 @@
- 户主姓名 -
+ 户主姓名 +
修改
-
沈浩
+
+ + {{info.name || '请输入'}} +
- 性别 -
+ 性别 +
修改
-
+
+ {{ $dict.getLabel('sex', info.sex) || '请选择'}} +
+
+
+
+ 联系电话 +
+ 修改 +
+
+
+ + {{info.phone || '请输入'}} +
+
+
+
+ 出生日期 +
+ 修改 +
+
+
+ {{info.birthday || '请选择'}} +
+
+
+
+ 民族 +
+ 修改 +
+
+
+ {{ $dict.getLabel('nation', info.nation) || '请选择'}} +
+
+
+
+ 家庭人口数 +
+ 修改 +
+
+
+ + {{info.householdNumber || '请输入'}} +
-
确认使用
-
取消输入
+
确认使用
+
取消输入
@@ -37,20 +88,75 @@ export default { name: 'formEdit', data() { return { - + word: '', + info: {}, + showSex: false, + showNation: false, + showDate: false, + deteParams: {year: true, month: true, day: true, hour: false, minute: false, second: false}, + editName: false, + editPhone: false, + editHouseholdNumber: false } }, computed: { ...mapState(['user']), }, - created() { - + onLoad(option) { + uni.showLoading({title: '加载中'}) + this.word = option.word + this.$dict.load('sex', 'nation').then(() => { + this.getInfo() + }) }, onShow() { document.title = '婚姻家庭纠纷入户登记表' }, methods: { - + getInfo() { + this.$http.post(`/app/appbaiduai/queryByInfo?word=${this.word}`).then((res) => { + if (res.code === 0) { + this.info = {...res.data} + uni.hideLoading() + } + }).catch(res => { + this.$u.toast(res) + uni.hideLoading() + }) + }, + confirmSex(e) { + this.info.sex = e[0].value + }, + confirmNation(e) { + this.info.nation = e[0].value + }, + dateConfirm(e) { + this.info.birthday = `${e.year}-${e.month}-${e.day}` + }, + toConfirm() { + if(this.info.name == null || !this.info.name) { + return this.$u.toast('请输入户主姓名') + } + if(this.info.sex == null) { + return this.$u.toast('请选择性别') + } + if(this.info.phone == null || !this.info.phone) { + return this.$u.toast('请输入联系电话') + } + if(this.info.birthday == null) { + return this.$u.toast('请选择出生日期') + } + if(this.info.nation == null) { + return this.$u.toast('请选择民族') + } + if(this.info.householdNumber == null || !this.info.householdNumber) { + return this.$u.toast('请输入家庭人口数') + } + uni.navigateTo({url: `./formConfirm?word=${this.word}`}) + }, + back() { + uni.navigateBack() + } }, } @@ -84,19 +190,25 @@ uni-page-body { padding-bottom: 272px; .item { text-align: center; - margin-bottom: 32px; + margin-bottom: 64px; .label { - color: #999; - font-size: 40px; - font-family: PingFangSC; - font-weight: 500; - line-height: 60px; - text-align: center; + margin-bottom: 18px; + span { + color: #999; + font-size: 40px; + font-family: PingFangSC; + font-weight: 500; + line-height: 60px; + text-align: center; + } .edit { display: inline-block; + width: 150px; + text-align: right; font-family: PingFangSC-Regular; font-size: 28px; color: #3072F5; + vertical-align: text-bottom; img { width: 28px; height: 28px; @@ -106,11 +218,24 @@ uni-page-body { } } .value { - color: #3975c6; - font-size: 40px; - font-family: PingFangSC; - font-weight: 500; - line-height: 60px; + width: calc(100% - 150px); + .u-input, span{ + display: inline-block; + width: 100%; + text-align: center; + color: #3975c6; + font-size: 40px; + font-family: PingFangSC; + font-weight: 500; + line-height: 60px; + } + ::v-deep .uni-input-input { + color: #3975c6; + font-size: 40px; + font-family: PingFangSC; + font-weight: 500; + line-height: 60px; + } } } }