diff --git a/src/common/lang/workCenter/zh.js b/src/common/lang/workCenter/zh.js
index afa66cfa..0b1d3ee0 100644
--- a/src/common/lang/workCenter/zh.js
+++ b/src/common/lang/workCenter/zh.js
@@ -167,7 +167,8 @@ module.exports = {
confirmIsInsertSignatureCancelText: '确认签章页无误并提交',
haveNoOpinion: '有无意见',
have: '有',
- noHave: '无'
+ noHave: '无',
+ batchSetHandleAdvice: '批量设置处理意见'
},
// 企标更改流程
enStandardChange: {
diff --git a/src/enums/commonEnums.js b/src/enums/commonEnums.js
index eeaa2daf..170fb4ef 100644
--- a/src/enums/commonEnums.js
+++ b/src/enums/commonEnums.js
@@ -612,3 +612,9 @@ export const EnterpriseNameCode = {
JC: { text: 'JC', value: 'JC' },
JHK: { text: 'JHK', value: 'JHK' }
}
+
+// 企标制修订-有无意见
+export const HaveNoOpinion = {
+ HAVE: { text: '有', value: '1' },
+ NO: { text: '无', value: '0' }
+}
diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/BatchSetHandleAdviceModal.vue b/src/views/workCenter/enterpriseStandardRevision/modules/BatchSetHandleAdviceModal.vue
new file mode 100644
index 00000000..728f515d
--- /dev/null
+++ b/src/views/workCenter/enterpriseStandardRevision/modules/BatchSetHandleAdviceModal.vue
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue
index 94e2ee73..250cb112 100644
--- a/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue
+++ b/src/views/workCenter/enterpriseStandardRevision/modules/CommentObjectEnterBaseInfo.vue
@@ -27,10 +27,10 @@
-
+
{{ $t('workCenter.enStandardRevision.have') }}
-
+
{{ $t('workCenter.enStandardRevision.noHave') }}
@@ -77,6 +77,7 @@
import BaseInfoForm from './BaseInfoForm'
import JTable from '@/components/jero/JTable'
import CommentModal from './CommentModal'
+import { HaveNoOpinion } from '../../../../enums/commonEnums'
import Vue from 'vue'
import { kkFilePreview } from '@/utils/kkFilePreview'
import { ACCESS_TOKEN } from '@/store/mutation-types'
@@ -95,6 +96,7 @@ export default {
},
data () {
return {
+ HaveNoOpinion,
loading: false,
formInline: {},
rules: {
diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonCollectBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonCollectBaseInfo.vue
index beb68d65..b82362e8 100644
--- a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonCollectBaseInfo.vue
+++ b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonCollectBaseInfo.vue
@@ -16,6 +16,32 @@
+
+
+
+
+
+
+
+
+ {{ $t('pleaseSelect') }}
+ {{ $t('workCenter.enStandardRevision.have') }}
+ {{ $t('workCenter.enStandardRevision.noHave') }}
+
+
+
+
+
+
{{ $t('query') }}
+
{{ $t('reset') }}
+
+
+
+
+
+
@@ -77,11 +103,7 @@ import BaseInfoForm from './BaseInfoForm'
import JTable from '@/components/jero/JTable'
import CommentModal from './CommentModal'
import UserSelection from '@/components/selection/UserSelection'
-import Vue from 'vue'
-import { kkFilePreview } from '@/utils/kkFilePreview'
-import { ACCESS_TOKEN } from '@/store/mutation-types'
-import { queryFileInfoByEditId } from '../../../../api/workCenter'
-import { Base64 } from 'js-base64'
+import { HaveNoOpinion } from '../../../../enums/commonEnums'
export default {
name: 'DepartLiaisonCollectBaseInfo',
@@ -95,7 +117,15 @@ export default {
},
data () {
return {
+ HaveNoOpinion,
loading: false,
+ labelCol: {
+ span: 12
+ },
+ wrapperCol: {
+ span: 12
+ },
+ queryParam: {},
/* 分页参数 */
ipagination: {
current: 1,
@@ -155,6 +185,7 @@ export default {
}
],
dataSource: [],
+ dataList: [], // 全部数据,防止查询后数据丢失
formInline: {},
rules: {
// 部门联络人主管级领导
@@ -182,6 +213,7 @@ export default {
...item
}
})
+ this.dataList = JSON.parse(JSON.stringify(this.dataSource))
this.formInline = Object.assign({}, data)
this.onEditFile = data.onEditFile
// 给表单赋值
@@ -193,7 +225,7 @@ export default {
getData () {
// 把数据抛出,在线编辑不知道要不要抛
const data = Object.assign({}, this.formInline)
- data.advices = this.dataSource
+ data.advices = this.dataList
// 在线编辑文件id
data.onEditFile = this.onEditFile
return data
@@ -203,9 +235,9 @@ export default {
let data = {} // 需要返回的数据
await this.$refs.ruleForm.validate(valid => {
if (valid) {
- if (this.dataSource && this.dataSource.length > 0) {
+ if (this.dataList && this.dataList.length > 0) {
data = Object.assign({}, this.formInline)
- data.advices = this.dataSource
+ data.advices = this.dataList
} else {
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
data = false
@@ -216,6 +248,23 @@ export default {
})
return data
},
+ searchQuery () {
+ if (this.queryParam.haveNoOpinion === HaveNoOpinion.HAVE.value) {
+ this.dataSource = this.dataList.filter(item => {
+ return item.haveNoOpinion === HaveNoOpinion.HAVE.value
+ })
+ } else if (this.queryParam.haveNoOpinion === HaveNoOpinion.NO.value) {
+ this.dataSource = this.dataList.filter(item => {
+ return item.haveNoOpinion === HaveNoOpinion.NO.value
+ })
+ } else {
+ this.dataSource = JSON.parse(JSON.stringify(this.dataList))
+ }
+ },
+ searchReset () {
+ this.dataSource = JSON.parse(JSON.stringify(this.dataList))
+ this.queryParam = {}
+ },
handleTableChange (pagination) {
this.ipagination = pagination
},
@@ -241,6 +290,8 @@ export default {
onOk: () => {
const dataIndex = this.dataSource.findIndex(item => item.uid === uid)
this.dataSource.splice(dataIndex, 1)
+ const dataIndexTwo = this.dataList.findIndex(item => item.uid === uid)
+ this.dataList.splice(dataIndexTwo, 1)
}
})
},
@@ -253,13 +304,21 @@ export default {
this.$set(this.dataSource[dataIndex], 'clauseNum', value.clauseNum)
this.$set(this.dataSource[dataIndex], 'clauseName', value.clauseName)
this.$set(this.dataSource[dataIndex], 'editAdvice', value.editAdvice)
+ const dataIndexTwo = this.dataList.findIndex(item => item.uid === uid)
+ this.$set(this.dataList[dataIndexTwo], 'clauseNum', value.clauseNum)
+ this.$set(this.dataList[dataIndexTwo], 'clauseName', value.clauseName)
+ this.$set(this.dataList[dataIndexTwo], 'editAdvice', value.editAdvice)
// this.dataSource.splice(index, 1, value)
} else {
// 没有下标, 是新增
const uidGenerator = () => {
return '-' + parseInt(Math.random() * 10000 + 1, 10)
}
- this.dataSource.push({ uid: uidGenerator(), ...value })
+ if (!this.queryParam.haveNoOpinion || this.queryParam.haveNoOpinion === HaveNoOpinion.HAVE.value) {
+ // 有意见或者没有筛选项的时候dataSource才增加
+ this.dataSource.push({ uid: uidGenerator(), ...value, haveNoOpinion: HaveNoOpinion.HAVE.value })
+ }
+ this.dataList.push({ uid: uidGenerator(), ...value, haveNoOpinion: HaveNoOpinion.HAVE.value })
}
},
// 选择用户得到用户名
@@ -296,4 +355,18 @@ export default {
.title-text-long {
width: 180px !important;
}
+
+.table-page-search-wrapper {
+ padding: 0 20px;
+}
+.search-col {
+ /deep/ .ant-form-item-label {
+ width: 128px !important;
+ text-align: right !important;
+ padding-right: 16px !important;
+ }
+ /deep/ .ant-form-item-control-wrapper {
+ padding-right: 12px !important;
+ }
+}
diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonLeaderApproveBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonLeaderApproveBaseInfo.vue
index 93ee607d..bd4daf1e 100644
--- a/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonLeaderApproveBaseInfo.vue
+++ b/src/views/workCenter/enterpriseStandardRevision/modules/DepartLiaisonLeaderApproveBaseInfo.vue
@@ -15,6 +15,32 @@
+
+
+
+
+
+
+
+
+
+ {{ $t('pleaseSelect') }}
+ {{ $t('workCenter.enStandardRevision.have') }}
+ {{ $t('workCenter.enStandardRevision.noHave') }}
+
+
+
+
+
+
{{ $t('query') }}
+
{{ $t('reset') }}
+
+
+
+
+
@@ -52,11 +78,7 @@
import BaseInfoForm from './BaseInfoForm'
import JTable from '@/components/jero/JTable'
import CommentModal from './CommentModal'
-import Vue from 'vue'
-import { kkFilePreview } from '@/utils/kkFilePreview'
-import { ACCESS_TOKEN } from '@/store/mutation-types'
-import { queryFileInfoByEditId } from '../../../../api/workCenter'
-import { Base64 } from 'js-base64'
+import { HaveNoOpinion } from '../../../../enums/commonEnums'
export default {
name: 'DepartLiaisonLeaderApproveBaseInfo',
@@ -70,7 +92,15 @@ export default {
},
data () {
return {
+ HaveNoOpinion,
loading: false,
+ labelCol: {
+ span: 12
+ },
+ wrapperCol: {
+ span: 12
+ },
+ queryParam: {},
/* 分页参数 */
ipagination: {
current: 1,
@@ -130,6 +160,7 @@ export default {
}
],
dataSource: [],
+ dataList: [], // 全部数据,防止查询后数据丢失
onEditFile: '' // 在线编辑的文件id
}
},
@@ -146,6 +177,7 @@ export default {
...item
}
})
+ this.dataList = JSON.parse(JSON.stringify(this.dataSource))
this.onEditFile = data.onEditFile
// 给表单赋值
this.$nextTick(() => {
@@ -156,7 +188,7 @@ export default {
getData () {
// 把数据抛出,在线编辑不知道要不要抛
const data = {}
- data.advices = this.dataSource
+ data.advices = this.dataList
data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData())
// 在线编辑文件id
data.onEditFile = this.onEditFile
@@ -164,15 +196,32 @@ export default {
},
// 外层获取数据要过校验,返回false表示没有通过校验
getDataValidate () {
- if (this.dataSource && this.dataSource.length > 0) {
+ if (this.dataList && this.dataList.length > 0) {
const data = {}
- data.advices = this.dataSource
+ data.advices = this.dataList
return data
} else {
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
return false
}
},
+ searchQuery () {
+ if (this.queryParam.haveNoOpinion === HaveNoOpinion.HAVE.value) {
+ this.dataSource = this.dataList.filter(item => {
+ return item.haveNoOpinion === HaveNoOpinion.HAVE.value
+ })
+ } else if (this.queryParam.haveNoOpinion === HaveNoOpinion.NO.value) {
+ this.dataSource = this.dataList.filter(item => {
+ return item.haveNoOpinion === HaveNoOpinion.NO.value
+ })
+ } else {
+ this.dataSource = JSON.parse(JSON.stringify(this.dataList))
+ }
+ },
+ searchReset () {
+ this.dataSource = JSON.parse(JSON.stringify(this.dataList))
+ this.queryParam = {}
+ },
handleTableChange (pagination) {
this.ipagination = pagination
},
@@ -198,6 +247,8 @@ export default {
onOk: () => {
const dataIndex = this.dataSource.findIndex(item => item.uid === uid)
this.dataSource.splice(dataIndex, 1)
+ const dataIndexTwo = this.dataList.findIndex(item => item.uid === uid)
+ this.dataList.splice(dataIndexTwo, 1)
}
})
},
@@ -210,13 +261,21 @@ export default {
this.$set(this.dataSource[dataIndex], 'clauseNum', value.clauseNum)
this.$set(this.dataSource[dataIndex], 'clauseName', value.clauseName)
this.$set(this.dataSource[dataIndex], 'editAdvice', value.editAdvice)
+ const dataIndexTwo = this.dataList.findIndex(item => item.uid === uid)
+ this.$set(this.dataList[dataIndexTwo], 'clauseNum', value.clauseNum)
+ this.$set(this.dataList[dataIndexTwo], 'clauseName', value.clauseName)
+ this.$set(this.dataList[dataIndexTwo], 'editAdvice', value.editAdvice)
// this.dataSource.splice(index, 1, value)
} else {
// 没有下标, 是新增
const uidGenerator = () => {
return '-' + parseInt(Math.random() * 10000 + 1, 10)
}
- this.dataSource.push({ uid: uidGenerator(), ...value })
+ if (!this.queryParam.haveNoOpinion || this.queryParam.haveNoOpinion === HaveNoOpinion.HAVE.value) {
+ // 有意见或者没有筛选项的时候dataSource才增加
+ this.dataSource.push({ uid: uidGenerator(), ...value, haveNoOpinion: HaveNoOpinion.HAVE.value })
+ }
+ this.dataList.push({ uid: uidGenerator(), ...value, haveNoOpinion: HaveNoOpinion.HAVE.value })
}
},
// 在线编辑的查看
@@ -243,4 +302,18 @@ export default {
margin-right: 20px;
}
}
+
+.table-page-search-wrapper {
+ padding: 0 20px;
+}
+.search-col {
+ /deep/ .ant-form-item-label {
+ width: 128px !important;
+ text-align: right !important;
+ padding-right: 16px !important;
+ }
+ /deep/ .ant-form-item-control-wrapper {
+ padding-right: 12px !important;
+ }
+}
diff --git a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectBaseInfo.vue b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectBaseInfo.vue
index 53d5d47b..a60c1746 100644
--- a/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectBaseInfo.vue
+++ b/src/views/workCenter/enterpriseStandardRevision/modules/MainDrafterCollectBaseInfo.vue
@@ -16,12 +16,42 @@
+
+
+
+
+
+
+
+
+
+ {{ $t('pleaseSelect') }}
+ {{ $t('workCenter.enStandardRevision.have') }}
+ {{ $t('workCenter.enStandardRevision.noHave') }}
+
+
+
+
+
+
{{ $t('query') }}
+
{{ $t('reset') }}
+
+
+
+
+
{{ $t('newlyAdded') }}
+
+
+ {{ $t('workCenter.enStandardRevision.batchSetHandleAdvice') }}
+
@@ -34,6 +64,7 @@
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
+ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
@@ -44,6 +75,8 @@
+
+
@@ -55,11 +88,12 @@ import { USER_INFO } from '@/store/mutation-types'
import Vue from 'vue'
import { onlineEditor } from '../../../../utils/onlyOfficeUtils'
import { getStandardEditFileByNo } from '../../../../api/workCenter'
-import { ProjectType } from '../../../../enums/commonEnums'
+import { ProjectType, HaveNoOpinion } from '../../../../enums/commonEnums'
+import BatchSetHandleAdviceModal from './BatchSetHandleAdviceModal'
export default {
name: 'MainDrafterCollectBaseInfo',
- components: { CommentModal, BaseInfoForm, JTable },
+ components: { CommentModal, BaseInfoForm, JTable, BatchSetHandleAdviceModal },
props: {
disabled: {
type: Boolean,
@@ -69,7 +103,17 @@ export default {
},
data () {
return {
+ HaveNoOpinion,
loading: false,
+ labelCol: {
+ span: 12
+ },
+ wrapperCol: {
+ span: 12
+ },
+ queryParam: {},
+ selectedRowKeys: [],
+ selectionRows: [],
/* 分页参数 */
ipagination: {
current: 1,
@@ -132,6 +176,10 @@ export default {
children: {
+ const listIndex = this.dataList.findIndex(item => item.uid === row.uid)
+ this.dataList[listIndex].handleAdvice = value
+ } }
/>,
attrs: {}
}
@@ -150,6 +198,8 @@ export default {
onChange={ e => {
e.target.value = e.target.value.trim()
row.reason = e.target.value.trim()
+ const listIndex = this.dataList.findIndex(item => item.uid === row.uid)
+ this.dataList[listIndex].reason = e.target.value.trim()
} }
/>,
attrs: {}
@@ -159,6 +209,7 @@ export default {
}
],
dataSource: [],
+ dataList: [], // 全部数据,防止查询后数据丢失
handlingSuggestionOption: [
{ value: '1', label: '采纳' },
{ value: '2', label: '部分采纳' },
@@ -182,6 +233,7 @@ export default {
handleAdvice: item.handleAdvice ? item.handleAdvice : undefined
}
})
+ this.dataList = JSON.parse(JSON.stringify(this.dataSource))
this.onEditFile = data.onEditFile
// 给表单赋值
this.$nextTick(() => {
@@ -192,7 +244,7 @@ export default {
getData () {
// 把数据抛出,在线编辑不知道要不要抛
const data = {}
- data.advices = this.dataSource
+ data.advices = this.dataList
data.businessJson = JSON.stringify(this.$refs.baseInfoForm.getData())
data.onEditFile = this.onEditFile
return data
@@ -200,7 +252,7 @@ export default {
// 外层获取数据要过校验,返回false表示没有通过校验
getDataValidate () {
let hasErr = false
- for (const item of this.dataSource) {
+ for (const item of this.dataList) {
// 处理意见必填,不采纳,部分采纳必填理由
if (!item.handleAdvice || ((item.handleAdvice === '2' || item.handleAdvice === '3') && !item.reason)) {
console.log(item.handleAdvice)
@@ -213,7 +265,7 @@ export default {
this.$message.warning(this.$t('pleaseCompleteTableInfo'))
data = false
} else {
- data.advices = this.dataSource
+ data.advices = this.dataList
data.onEditFile = this.onEditFile
}
return data
@@ -227,6 +279,44 @@ export default {
}
})
},
+ searchQuery () {
+ if (this.queryParam.haveNoOpinion === HaveNoOpinion.HAVE.value) {
+ this.dataSource = this.dataList.filter(item => {
+ return item.haveNoOpinion === HaveNoOpinion.HAVE.value
+ })
+ } else if (this.queryParam.haveNoOpinion === HaveNoOpinion.NO.value) {
+ this.dataSource = this.dataList.filter(item => {
+ return item.haveNoOpinion === HaveNoOpinion.NO.value
+ })
+ } else {
+ this.dataSource = JSON.parse(JSON.stringify(this.dataList))
+ }
+ },
+ searchReset () {
+ this.dataSource = JSON.parse(JSON.stringify(this.dataList))
+ this.queryParam = {}
+ },
+ // 点击批量设置处理意见
+ batchSetHandleAdvice () {
+ if (this.selectedRowKeys.length <= 0) {
+ // 请选择要分发的数据
+ this.$message.warning(this.$t('selectAtLeastOne'))
+ return
+ }
+ this.$refs.batchSetHandleAdviceModal.show()
+ },
+ // 批量设置处理意见确认回调
+ batchSetHandleAdviceOk (value) {
+ for (const i of this.selectedRowKeys) {
+ const dataIndex = this.dataSource.findIndex(item => item.uid === i)
+ this.dataSource[dataIndex].handleAdvice = value
+ const dataIndexTwo = this.dataList.findIndex(item => item.uid === i)
+ this.dataList[dataIndexTwo].handleAdvice = value
+ }
+ this.dataSource = JSON.parse(JSON.stringify(this.dataSource))
+ this.dataList = JSON.parse(JSON.stringify(this.dataList))
+ this.selectedRowKeys = []
+ },
// 制修订类型改变
typeOfRevisionChange (val, originStandardNum) {
if (val === ProjectType.ENACT.value) {
@@ -238,6 +328,11 @@ export default {
handleTableChange (pagination) {
this.ipagination = pagination
},
+ // 表格选中
+ onSelectChange (selectedRowKeys, selectionRows) {
+ this.selectedRowKeys = selectedRowKeys
+ this.selectionRows = selectionRows
+ },
// 新增征求意见
handleAdd () {
// 不知道左侧要预览哪个文件
@@ -269,7 +364,14 @@ export default {
if (uid || uid === 0) {
// 有下标,说明是编辑
const dataIndex = this.dataSource.findIndex(item => item.uid === uid)
- this.dataSource.splice(dataIndex, 1, value)
+ // 有下标,说明是编辑
+ this.$set(this.dataSource[dataIndex], 'clauseNum', value.clauseNum)
+ this.$set(this.dataSource[dataIndex], 'clauseName', value.clauseName)
+ this.$set(this.dataSource[dataIndex], 'editAdvice', value.editAdvice)
+ const dataIndexTwo = this.dataList.findIndex(item => item.uid === uid)
+ this.$set(this.dataList[dataIndexTwo], 'clauseNum', value.clauseNum)
+ this.$set(this.dataList[dataIndexTwo], 'clauseName', value.clauseName)
+ this.$set(this.dataList[dataIndexTwo], 'editAdvice', value.editAdvice)
} else {
// 没有下标, 是新增
const currentUser = Vue.ls.get(USER_INFO)
@@ -277,7 +379,11 @@ export default {
const uidGenerator = () => {
return '-' + parseInt(Math.random() * 10000 + 1, 10)
}
- this.dataSource.push({ ...value, createUserId_dictText: currentUserId, uid: uidGenerator() })
+ if (!this.queryParam.haveNoOpinion || this.queryParam.haveNoOpinion === HaveNoOpinion.HAVE.value) {
+ // 有意见或者没有筛选项的时候dataSource才增加
+ this.dataSource.push({ ...value, createUserId_dictText: currentUserId, uid: uidGenerator(), haveNoOpinion: HaveNoOpinion.HAVE.value })
+ }
+ this.dataList.push({ ...value, createUserId_dictText: currentUserId, uid: uidGenerator(), haveNoOpinion: HaveNoOpinion.HAVE.value })
}
},
/**
@@ -322,4 +428,18 @@ export default {
.handle-suggest-select {
width: 100%;
}
+
+.table-page-search-wrapper {
+ padding: 0 20px;
+}
+.search-col {
+ /deep/ .ant-form-item-label {
+ width: 128px !important;
+ text-align: right !important;
+ padding-right: 16px !important;
+ }
+ /deep/ .ant-form-item-control-wrapper {
+ padding-right: 12px !important;
+ }
+}