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 @@
-
-
-
-
+
+
+
+
@@ -103,7 +103,7 @@
-
+
@@ -170,7 +170,7 @@ export default {
},
getList() {
this.api({
- url: '/zjd',
+ url: '/zjd/list',
method: 'get',
params: this.listQuery
}).then(data => {
@@ -220,9 +220,15 @@ export default {
return false
}
}
- this.zhuanjiao.querenriqi = new Date()
- this.zhuanjiao.querenren = this.$store.getters.nickname
- this.zhuanjiaoVisible = true
+ this.api({
+ url: '/zjd/complete',
+ method: 'post',
+ data: {
+ zjdIds: this.$refs.list.selection.map(row => row.id)
+ }
+ }).then(data => {
+ this.getList()
+ })
},
commitZjd() {
if (this.multipleSelection.length === 0) {
@@ -260,7 +266,7 @@ export default {
zjdId: this.list[$index].id
}
}).then(data => {
- this.zjdList = data.list
+ this.zjdList = data
this.zjdInfoVisible = true
})
},