diff --git a/src/apps/AppWalkask/add.vue b/src/apps/AppWalkask/add.vue index b8d6c1b0..3a48b124 100644 --- a/src/apps/AppWalkask/add.vue +++ b/src/apps/AppWalkask/add.vue @@ -10,8 +10,8 @@
- - + +
@@ -68,8 +68,10 @@ export default { forms: { areaId: '', areaName: '', + optionId: '', - create_user_name: '', + name: '', + reality: '', realityValue: '', menuLevel3Name: '', @@ -84,11 +86,14 @@ export default { areaIdProps: '', clickedUserSelect: false, id: '', + + name: '', + optionId: '', } }, computed: { ...mapState(['user']) }, onLoad(o) { - this.id = o.id + this.id = o.id ? o.id : '' this.areaIdProps = this.user.areaId if (!this.id) { this.forms.areaId = this.user.areaId @@ -97,6 +102,13 @@ export default { this.$dict.load('realityStatus').then(() => { this.getDetail() }) + + uni.$on('goBack', (data) => { + console.log(data) + this.forms.menuLevel3Name = data.applicationName + this.forms.name = data.selectUser.name + this.forms.optionId = data.selectUser.id + }) }, onShow() { document.title = '新建走访' @@ -105,11 +117,12 @@ export default { methods: { realityClick() { if (this.id) return - if (!this.forms.create_user_name) { + if (!this.forms.name) { return this.$u.toast('请选择走访对象') } this.showStstus = true }, + getDetail() { if (this.id) { this.$http.post(`/app/appvisitvondolence/queryDetailById?id=${this.id}`).then((res) => { @@ -131,7 +144,7 @@ export default { this.$refs.uForm.validate((valid) => { if (valid) { - if (!this.forms.create_user_name) { + if (!this.forms.name) { return this.$u.toast('请选择走访对象') } if (!this.forms.title) { @@ -150,9 +163,10 @@ export default { .post(`/app/appvisitvondolence/addOrUpdate`, { areaId: this.forms.areaId, applicationId: this.forms.applicationId, - name: this.forms.create_user_name, + name: this.forms.name, + optionId: this.forms.optionId, menuLevel3Name: this.forms.menuLevel3Name, - optionId: this.forms.applicationId, + reality: this.forms.realityValue ? this.forms.realityValue : this.forms.reality, title: this.forms.title, description: this.forms.description, @@ -182,13 +196,13 @@ export default { this.forms.areaId = e }, - backlist(e) { - this.forms.create_user_name = e.item.create_user_name - this.forms.menuLevel3Name = e.menuLevel3Name - this.forms.applicationId = e.appId - this.forms.optionId = e.item.id - this.addList = true - }, + // backlist(e) { + // this.forms.create_user_name = e.item.create_user_name + // this.forms.menuLevel3Name = e.menuLevel3Name + // this.forms.applicationId = e.appId + // this.forms.optionId = e.item.id + // this.addList = true + // }, realityStstus(e) { this.forms.reality = e[0].label diff --git a/src/apps/AppWalkask/img/tx@2x.png b/src/apps/AppWalkask/img/tx@2x.png new file mode 100644 index 00000000..d9620e08 Binary files /dev/null and b/src/apps/AppWalkask/img/tx@2x.png differ diff --git a/src/apps/AppWalkask/img/xz.png b/src/apps/AppWalkask/img/xz.png new file mode 100644 index 00000000..98f78cda Binary files /dev/null and b/src/apps/AppWalkask/img/xz.png differ diff --git a/src/apps/AppWalkask/img/xzh.png b/src/apps/AppWalkask/img/xzh.png new file mode 100644 index 00000000..967fa399 Binary files /dev/null and b/src/apps/AppWalkask/img/xzh.png differ diff --git a/src/apps/AppWalkask/selectType.vue b/src/apps/AppWalkask/selectType.vue index 97d69485..0539617b 100644 --- a/src/apps/AppWalkask/selectType.vue +++ b/src/apps/AppWalkask/selectType.vue @@ -15,7 +15,7 @@
- +
{{ item.applicationName }}
@@ -31,10 +31,15 @@
- +
+ + + + +
-
{{ e.create_user_name }}
+
{{ e.name }}
@@ -45,6 +50,10 @@
+
+
确定选择
+
+
@@ -62,6 +71,7 @@ export default { current: 1, showType: true, applicationName: '', + selectUser: {}, } }, computed: {}, @@ -71,6 +81,20 @@ export default { }, onShow() {}, methods: { + userClick(row, index) { + if (this.userList[index].isChecked) { + //取消 + this.userList[index].isChecked = false + this.selectUser = {} + } else { + this.userList.map((item) => { + item.isChecked = false + }) + this.userList[index].isChecked = true + this.selectUser = row + } + }, + getTypeList() { this.userList = [] this.$http.post(`/app/appapplicationinfo/queryApplicationListByType?type=0&status=1`).then((res) => { @@ -83,13 +107,21 @@ export default { getUser(data) { this.$http.post(`/app/appapplicationinfo/list?appId=${data.id}¤t=${this.current}&size=${999}`, { searchParam: this.keyword }).then((res) => { if (res.code == 0) { + res.data.records.map((item) => { + item.isChecked = false + }) this.userList = res.data.records } }) }, + submit() { + uni.$emit('goBack', { selectUser: this.selectUser, applicationName: this.applicationName }) + uni.navigateBack() + // uni.navigateTo({ url: `./add` }) + }, + toUserSelect(item) { - console.log(item) this.applicationName = item.applicationName this.showType = false this.getUser(item) @@ -152,7 +184,7 @@ export default { height: 120px; line-height: 120px; // background: pink; - padding: 0 20px 0 32px; + padding: 0 0 0 32px; img { width: 74px; @@ -174,6 +206,7 @@ export default { .imgs { width: 40px; height: 40px; + margin-right: 20px; } } } @@ -186,13 +219,25 @@ export default { height: 120px; line-height: 120px; // background: pink; - padding: 0 20px 0 32px; + padding: 0 0 0 32px; - img { - width: 74px; - height: 74px; - border-radius: 8px; + .imges { + display: flex; + align-items: center; + width: 200px; + .imgselect { + width: 48px; + height: 48px; + } + + .avatras { + width: 74px; + height: 74px; + border-radius: 8px; + margin-left: 36px; + } } + .right { width: 100%; display: flex; @@ -213,5 +258,26 @@ export default { } } } + + .subBtn { + position: fixed; + bottom: 0; + left: 0; + width: 100%; + height: 118px; + background: #f4f8fb; + div { + width: 192px; + height: 80px; + line-height: 80px; + text-align: center; + background: #1365dd; + border-radius: 4px; + font-size: 32px; + color: #fff; + margin: 20px 34px 0 0; + float: right; + } + } }