[update] 修改bug80276,改了年度制修订的两个流程

This commit is contained in:
lideqin
2024-01-11 19:07:04 +08:00
parent 4ff9ba5ead
commit 367115bf75
8 changed files with 147 additions and 39 deletions
@@ -52,7 +52,7 @@ export default {
},
// 修改的字段名
filedName: {
type: String,
type: [String, Number],
default: ''
},
// 回显输入框的类型,默认是input
@@ -52,7 +52,7 @@ export default {
},
// 修改的字段名
filedName: {
type: String,
type: [String, Number],
default: ''
},
// 回显输入框的类型,默认是input
+1 -1
View File
@@ -57,7 +57,7 @@ export default {
},
// 修改的字段名
filedName: {
type: String,
type: [String, Number],
default: ''
},
// 回显输入框的类型,默认是input
@@ -25,12 +25,13 @@
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
:rowKey="(record, index) => { return index }"
:rowKey="(record, index) => { return (Number(this.ipagination.current) - 1) * Number(this.ipagination.pageSize) + index }"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<!-- 原企标编号/企标名称 -->
<template v-slot:toDetailOld="{text, record}">
@@ -142,6 +143,18 @@ export default {
data () {
return {
loading: false,
/* 分页参数 */
ipagination: {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '30', '50', '100', '150', '200'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip')
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
columns: [
{
title: this.$t('serialNumber'),
@@ -322,6 +335,9 @@ export default {
}
})
},
handleTableChange (pagination) {
this.ipagination = pagination
},
// 表格选中
onSelectChange (selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys
@@ -429,7 +445,8 @@ export default {
},
// 编辑
handleEdit (record, index) {
this.modalType = 'edit' + ',' + index
const dataIndex = (Number(this.ipagination.current) - 1) * Number(this.ipagination.pageSize) + index
this.modalType = 'edit' + ',' + dataIndex
this.$refs.contactEnterSendTaskModal.edit(record)
},
// 查看
@@ -438,7 +455,14 @@ export default {
},
// 删除
handleDelete (id, index) {
this.dataSource.splice(index, 1)
this.$confirm({
title: this.$t('confirmDeletion'),
content: this.$t('areYouSure'),
onOk: () => {
const dataIndex = (Number(this.ipagination.current) - 1) * Number(this.ipagination.pageSize) + index
this.dataSource.splice(dataIndex, 1)
}
})
},
// 批量删除
batchDel () {
@@ -20,9 +20,10 @@
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<!-- 原企标编号/企标名称 -->
<template v-slot:toDetailOld="{text, record}">
@@ -65,6 +66,18 @@ export default {
data () {
return {
loading: false,
/* 分页参数 */
ipagination: {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '30', '50', '100', '150', '200'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip')
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
columns: [
{
title: this.$t('serialNumber'),
@@ -194,9 +207,9 @@ export default {
width: 300,
dataIndex: 'approvalUser',
customRender: (value, row, index) => {
return <user-selection v-model={this.dataSource[index].approvalUser}
filedName={index + ''} onNameChange={this.userNameChange}
nameStr={this.dataSource[index].approvalUser_dictText} showBtn={false}
return <user-selection v-model={row.approvalUser}
filedName={row.id} onNameChange={this.userNameChange}
nameStr={row.approvalUser_dictText} showBtn={false}
disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} />
}
}
@@ -265,6 +278,9 @@ export default {
}
})
},
handleTableChange (pagination) {
this.ipagination = pagination
},
// 表格选中
onSelectChange (selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys
@@ -297,13 +313,15 @@ export default {
curr.approvalUser_dictText = this.selectNames
}
this.dataSource = JSON.parse(JSON.stringify(this.dataSource))
this.selectedRowKeys = []
},
// 选人的名字获取
userSelectNameChange (value) {
this.selectNames = value
},
userNameChange (value, fieldName) {
this.dataSource[Number(fieldName)].approvalUser_dictText = value
const dataIndex = this.dataSource.findIndex(item => item.id === fieldName)
this.dataSource[dataIndex].approvalUser_dictText = value
}
}
}
@@ -29,14 +29,13 @@
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
:rowKey="(record, index) => {
return index
}"
:rowKey="(record, index) => { return (Number(this.ipagination.current) - 1) * Number(this.ipagination.pageSize) + index }"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<!-- 原企标编号/企标名称 -->
<template v-slot:toDetailOld="{text, record}">
@@ -109,6 +108,18 @@ export default {
data () {
return {
loading: false,
/* 分页参数 */
ipagination: {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '30', '50', '100', '150', '200'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip')
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
columns: [
{
title: this.$t('serialNumber'),
@@ -243,8 +254,10 @@ export default {
return this.dataSource[index].contactUser_dictText
} else {
// 不是被驳回的待办,可以设置联络人
return <user-select-by-contact v-model={this.dataSource[index].contactUser}
nameStr={this.dataSource[index].contactUser_dictText} showBtn={false}
return <user-select-by-contact v-model={row.contactUser}
nameStr={row.contactUser_dictText} showBtn={false}
filedName={(Number(this.ipagination.current) - 1) * Number(this.ipagination.pageSize) + index}
onNameChange={this.lineNameChange}
disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} />
}
}
@@ -332,6 +345,13 @@ export default {
}
})
},
// 行内联络人变化的回调
lineNameChange (value, fieldName) {
this.dataSource[fieldName].contactUser_dictText = value
},
handleTableChange (pagination) {
this.ipagination = pagination
},
// 表格选中
onSelectChange (selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys
@@ -439,7 +459,8 @@ export default {
},
// 编辑
handleEdit (record, index) {
this.modalType = 'edit' + ',' + index
const dataIndex = (Number(this.ipagination.current) - 1) * Number(this.ipagination.pageSize) + index
this.modalType = 'edit' + ',' + dataIndex
this.$refs.baseInfoTableModal.edit(record)
},
// 查看
@@ -448,7 +469,14 @@ export default {
},
// 删除
handleDelete (id, index) {
this.dataSource.splice(index, 1)
this.$confirm({
title: this.$t('confirmDeletion'),
content: this.$t('areYouSure'),
onOk: () => {
const dataIndex = (Number(this.ipagination.current) - 1) * Number(this.ipagination.pageSize) + index
this.dataSource.splice(dataIndex, 1)
}
})
},
// 批量删除
batchDel () {
@@ -484,6 +512,7 @@ export default {
this.dataSource[item].contactUser_dictText = this.selectNames
}
this.dataSource = JSON.parse(JSON.stringify(this.dataSource))
this.selectedRowKeys = []
},
// 选人的名字获取
userSelectNameChange (value) {
@@ -13,12 +13,13 @@
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
:rowKey="(record, index) => {return index}"
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<!-- 原企标编号/企标名称 -->
<template v-slot:toDetailOld="{text, record}">
@@ -56,6 +57,18 @@ export default {
data () {
return {
loading: false,
/* 分页参数 */
ipagination: {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '30', '50', '100', '150', '200'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip')
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
columns: [
{
title: this.$t('serialNumber'),
@@ -185,9 +198,9 @@ export default {
width: 300,
dataIndex: 'drafter',
customRender: (value, row, index) => {
return <user-selection v-model={this.dataSource[index].prcMainDraftUser}
filedName={index + ''} onNameChange={this.userNameChange}
nameStr={this.dataSource[index].prcMainDraftUser_dictText} showBtn={false}
return <user-selection v-model={row.prcMainDraftUser}
filedName={row.id} onNameChange={this.userNameChange}
nameStr={row.prcMainDraftUser_dictText} showBtn={false}
disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} />
}
}
@@ -243,6 +256,9 @@ export default {
}
})
},
handleTableChange (pagination) {
this.ipagination = pagination
},
// 表格选中
onSelectChange (selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys
@@ -260,17 +276,20 @@ export default {
// 批量设置主起草人选择人后的回调
userSelectModalChange (value) {
for (const item of this.selectedRowKeys) {
this.dataSource[item].prcMainDraftUser = value
this.dataSource[item].prcMainDraftUser_dictText = this.selectNames
const curr = this.dataSource.find(i => i.id === item)
curr.prcMainDraftUser = value
curr.prcMainDraftUser_dictText = this.selectNames
}
this.dataSource = JSON.parse(JSON.stringify(this.dataSource))
this.selectedRowKeys = []
},
// 选人的名字获取
userSelectNameChange (value) {
this.selectNames = value
},
userNameChange (value, fieldName) {
this.dataSource[Number(fieldName)].prcMainDraftUser_dictText = value
const dataIndex = this.dataSource.findIndex(item => item.id === fieldName)
this.dataSource[dataIndex].prcMainDraftUser_dictText = value
}
}
}
@@ -5,11 +5,12 @@
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
rowKey="enterpriseStandardPlanId"
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:loading="loading">
:pagination="ipagination"
:loading="loading"
@change="handleTableChange">
<!-- 原企标编号/企标名称 -->
<template v-slot:toDetailOld="{text, record}">
@@ -59,6 +60,18 @@ export default {
data () {
return {
loading: false,
/* 分页参数 */
ipagination: {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '30', '50', '100', '150', '200'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip')
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
columns: [
{
title: this.$t('serialNumber'),
@@ -192,7 +205,7 @@ export default {
],
dataSource: [],
initDataSource: [], // 最初的数据,用于在主起草人填写信息节点提交时,判断没有改过标准化填的内容
editIndex: undefined // 编辑的下标
editId: undefined // 正在编辑的数据的id
}
},
mounted () {
@@ -272,18 +285,23 @@ export default {
}
})
},
handleTableChange (pagination) {
this.ipagination = pagination
},
// 新增或编辑完成
modelFormOk (value) {
this.dataSource.splice(this.editIndex, 1, value)
const dataIndex = this.dataSource.findIndex(item => item.id === this.editId)
this.dataSource.splice(dataIndex, 1, value)
},
// 编辑
handleEdit (record, index) {
this.editIndex = index
this.editId = record.id
this.$refs.baseInfoTableModal.edit(record)
},
// 删除
handleDelete (id, index) {
this.dataSource.splice(index, 1)
const dataIndex = this.dataSource.findIndex(item => item.id === id)
this.dataSource.splice(dataIndex, 1)
}
}
}