From 1a0839267ac1b05f462e2716149a107504cdb0d8 Mon Sep 17 00:00:00 2001 From: zichen1019 <1510748736@qq.com> Date: Tue, 24 Aug 2021 23:37:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=BD=AC=E4=BA=A4=E5=8D=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/zjd/zjbg_list.vue | 111 +++++++++++++++++------------------- src/views/zjd/zjd_list.vue | 26 +++++---- 2 files changed, 69 insertions(+), 68 deletions(-) diff --git a/src/views/zjd/zjbg_list.vue b/src/views/zjd/zjbg_list.vue index 6468fbd..a3edb62 100644 --- a/src/views/zjd/zjbg_list.vue +++ b/src/views/zjd/zjbg_list.vue @@ -6,7 +6,7 @@ 生成转交单 -
+
- - - + + + 查询 @@ -49,13 +49,13 @@ 清空
- - - - - + + + + + - + - + @@ -100,28 +100,28 @@ - + - - + + - - + + @@ -135,19 +135,19 @@ - + @@ -179,11 +179,7 @@ export default { listQuery: { pageNum: 1, // 页码 pageRow: 20, // 每页条数 - order: 'id', // 排序字段 - sort: 'desc', - searchYsjl: { - departmentId: this.$store.getters.departmentId - } + orderBy: 'id desc' // 排序字段 }, flowUserList: [], dialogFormVisible: false, @@ -192,33 +188,24 @@ export default { multipleSelection: [], multipleCartSelection: [], jianyanriqi: '', - jylbList: [{ - code: '定期检验', - name: '定期检验' - }, { - code: '监督检验', - name: '监督检验' - }, { - code: '首次检验', - name: '首次检验' - }], + jylbList: [], userList: [], zhuanjiaoVisible: false, zhuanjiaoCartVisible: false, zhuanjiao: { - zhuanjiaoren: '', - zhuanjiaoriqi: '', + createBy: '', + createTime: '', ysjlId: '' }, rules: { - zhuanjiaoren: [{ required: true, message: '转交人不能为空', trigger: 'blur', validator: this.validator }], - zhuanjiaoriqi: [{ required: true, message: '转交日期不能为空', trigger: 'blur', validator: this.validator }] + createBy: [{ required: true, message: '转交人不能为空', trigger: 'blur', validator: this.validator }], + createTime: [{ required: true, message: '转交日期不能为空', trigger: 'blur', validator: this.validator }] } } }, created() { this.getList() - // this.jylbList = this.$store.getters.allCategory + this.jylbList = this.$store.getters.allCategory.filter(row => row.parentId) this.userList = this.$store.getters.allUser }, mounted() { @@ -238,14 +225,14 @@ export default { getList() { if (this.jianyanriqi) { // 解析 - this.listQuery.searchYsjl.jianyankaishiriqi = this.jianyanriqi[0] - this.listQuery.searchYsjl.jianyanjieshuriqi = this.jianyanriqi[1] + this.listQuery.jianyankaishiriqi = this.jianyanriqi[0] + this.listQuery.jianyanjieshuriqi = this.jianyanriqi[1] } else { - this.listQuery.searchYsjl.jianyankaishiriqi = '' - this.listQuery.searchYsjl.jianyanjieshuriqi = '' + this.listQuery.jianyankaishiriqi = '' + this.listQuery.jianyanjieshuriqi = '' } this.api({ - url: '/report/getList', + url: '/ysjl/getListCanZj', method: 'get', params: this.listQuery }).then(data => { @@ -254,8 +241,7 @@ export default { }) }, sortChange(column) { - this.listQuery.order = column.prop - this.listQuery.sort = column.order.replace('ending', '') + this.listQuery.orderBy = column.prop + ' ' + column.order.replace('ending', '') this.getList() }, getIndex($index) { @@ -277,10 +263,10 @@ export default { this.selection = val }, clearQuery() { - this.$set(this.listQuery, 'searchYsjl', { - departmentId: this.$store.getters.departmentId, - createBy: this.$store.getters.userId, - printState: 0 + this.$set(this, 'listQuery', { + pageNum: 1, + pageRow: 20, + orderBy: 'id desc' }) this.jianyanriqi = '' this.getList() @@ -297,9 +283,18 @@ export default { return false } } - this.zhuanjiao.zhuanjiaoriqi = new Date() - this.zhuanjiao.zhuanjiaoren = this.$store.getters.nickname - this.zhuanjiaoVisible = true + this.api({ + url: '/zjd', + method: 'post', + data: { + ysjlIds: this.$refs.list.selection.map(row => row.id), + sbzldm: this.$refs.list.selection[0].shebeizhongleidaima, + neibuleibie: this.$refs.list.selection[0].neibuleibie + } + }).then(data => { + this.getList() + Utils.$emit('zjd-list') + }) }, commitZjd() { if (this.multipleSelection.length === 0) { diff --git a/src/views/zjd/zjd_list.vue b/src/views/zjd/zjd_list.vue index f30897c..f95964e 100644 --- a/src/views/zjd/zjd_list.vue +++ b/src/views/zjd/zjd_list.vue @@ -52,10 +52,10 @@ - - - - + + + +