[update] 调年度制修订计划两个流程
This commit is contained in:
+49
-15
@@ -13,7 +13,7 @@
|
||||
:can-drag="true"
|
||||
:scroll="{x: '100%'}"
|
||||
ref="table"
|
||||
rowKey="enterpriseStandardPlanId"
|
||||
:rowKey="(record, index) => {return index}"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="false"
|
||||
@@ -42,7 +42,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 选人弹框 -->
|
||||
<user-select-modal ref="userSelectModal" type="radio" @change="userSelectModalChange"></user-select-modal>
|
||||
<user-select-modal ref="userSelectModal" type="radio" @change="userSelectModalChange" @nameChange="userSelectNameChange"></user-select-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
import JTable from '@/components/jero/JTable'
|
||||
// 选人弹框
|
||||
import UserSelectModal from '@/components/selection/UserSelectModal'
|
||||
import { standardizationInitBatchSetDrafter } from '@/api/workCenter'
|
||||
|
||||
export default {
|
||||
name: 'LeaderApproveSentBaseInfo',
|
||||
@@ -195,6 +194,7 @@ export default {
|
||||
dataIndex: 'drafter',
|
||||
customRender: (value, row, index) => {
|
||||
return <user-select-by-contact v-model={this.dataSource[index].drafter}
|
||||
nameStr={this.dataSource[index].drafter_dictText}
|
||||
disabled={this.disabled} type={'radio'} placeholder={this.$t('pleaseSelect')} />
|
||||
}
|
||||
}
|
||||
@@ -204,10 +204,45 @@ export default {
|
||||
selectionRows: [],
|
||||
url: {
|
||||
list: ''
|
||||
}
|
||||
},
|
||||
selectNames: '' // 选完人的名字,批量设置人需要用
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表格赋值
|
||||
// this.dataSource =
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
// 把数据抛出
|
||||
const data = {}
|
||||
data.dataSource = this.dataSource
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate (callback) {
|
||||
// 每行的主起草人是否都有
|
||||
let hasErr = false
|
||||
for (const item of this.dataSource) {
|
||||
if (!item.drafter) {
|
||||
// 需要选主起草人,但是没有选择
|
||||
hasErr = true
|
||||
break
|
||||
}
|
||||
}
|
||||
let data
|
||||
if (hasErr) {
|
||||
this.$message.warning(this.$t('workCenter.revisionPlanActivelyReport.pleaseSelectDrafter'))
|
||||
data = false
|
||||
callback(data)
|
||||
} else {
|
||||
data = { dataSource: this.dataSource }
|
||||
callback(data)
|
||||
}
|
||||
},
|
||||
// 企标编号,企标名称跳转详情,原企标
|
||||
handleGoDetailOld (record) {
|
||||
this.$openPageNewSheet({
|
||||
@@ -240,18 +275,17 @@ export default {
|
||||
}
|
||||
this.$refs.userSelectModal.open()
|
||||
},
|
||||
// 批量设置联络人选择人后的回调
|
||||
// 批量设置主起草人选择人后的回调
|
||||
userSelectModalChange (value) {
|
||||
const param = {}
|
||||
param.contact = value
|
||||
param.ids = this.selectedRowKeys.join(',')
|
||||
standardizationInitBatchSetDrafter(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
for (const item of this.selectedRowKeys) {
|
||||
this.dataSource[item].draft = value
|
||||
this.dataSource[item].draft_dictText = this.selectNames
|
||||
}
|
||||
this.dataSource = JSON.parse(JSON.stringify(this.dataSource))
|
||||
},
|
||||
// 选人的名字获取
|
||||
userSelectNameChange (value) {
|
||||
this.selectNames = value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user