|
|
@ -12,11 +12,11 @@ |
|
|
|
<el-date-picker |
|
|
|
v-model="form.giveStartTime" |
|
|
|
:picker-options="pickerStartTime" |
|
|
|
type="date" |
|
|
|
type="datetime" |
|
|
|
align="right" |
|
|
|
format="yyyy-MM-dd" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
placeholder="选择日期" |
|
|
|
format="yyyy-MM-dd HH:mm:ss" |
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
placeholder="选择日期时间" |
|
|
|
style="width: 280px;" |
|
|
|
disabled |
|
|
|
/> |
|
|
@ -25,17 +25,17 @@ |
|
|
|
<el-date-picker |
|
|
|
v-model="form.giveEndTime" |
|
|
|
:picker-options="pickerEndTime" |
|
|
|
type="date" |
|
|
|
type="datetime" |
|
|
|
align="right" |
|
|
|
format="yyyy-MM-dd" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
placeholder="选择日期" |
|
|
|
format="yyyy-MM-dd HH:mm:ss" |
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
placeholder="选择日期时间" |
|
|
|
style="width: 280px;" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-row> |
|
|
|
<el-form-item label="利用事由" prop="reason"> |
|
|
|
<el-input v-model="form.reason" type="textarea" :rows="4" style="width: 703px;" /> |
|
|
|
<el-form-item label="利用事由" prop="borrowReason"> |
|
|
|
<el-input v-model="form.borrowReason" type="textarea" :rows="3" style="width: 703px;" /> |
|
|
|
</el-form-item> |
|
|
|
</el-row> |
|
|
|
<!-- <el-row> |
|
|
@ -60,8 +60,9 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="checkedId" label="利用方式" width="340"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-checkbox-group v-model="scope.row.checkedId" class="checkbox-style" @change="handleChecked"> |
|
|
|
<el-checkbox v-for="item in List" :key="item.value" :label="item.value">{{ item.label }}</el-checkbox> |
|
|
|
<!-- <el-checkbox v-for="item in scope.row.childMenu" :key="item.value" v-model="item.checked" :label="item.value" :data-a="responsive" @change="changeChecked(item)">{{ item.label }}</el-checkbox> --> |
|
|
|
<el-checkbox-group v-model="scope.row.checkedId" :min="1" class="checkbox-style" @change="changeChecked"> |
|
|
|
<el-checkbox v-for="item in scope.row.childMenu" :key="item.value" :label="item.value" :data-a="responsive">{{ item.label }}</el-checkbox> |
|
|
|
</el-checkbox-group> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
@ -101,11 +102,13 @@ export default { |
|
|
|
title: null, |
|
|
|
giveStartTime: null, |
|
|
|
giveEndTime: null, |
|
|
|
reason: null, |
|
|
|
borrowReason: null, |
|
|
|
fondsNo: null |
|
|
|
}, |
|
|
|
checkedEquipments: [], |
|
|
|
detailArcData: [], |
|
|
|
List: [ |
|
|
|
responsive: true, |
|
|
|
uselist: [ |
|
|
|
{ |
|
|
|
value: 1, |
|
|
|
label: '电子查看' |
|
|
@ -133,10 +136,11 @@ export default { |
|
|
|
giveEndTime: [ |
|
|
|
{ required: true, message: '结束时间不可为空', trigger: 'blur' } |
|
|
|
], |
|
|
|
reason: [ |
|
|
|
borrowReason: [ |
|
|
|
{ required: true, message: '利用事由不可为空', trigger: 'blur' } |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
checkedArr: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
@ -175,9 +179,25 @@ export default { |
|
|
|
this.form.giveStartTime = getCurrentTime() |
|
|
|
this.getFondsDetail() |
|
|
|
// this.$refs.archivesListModule.getViewTable() |
|
|
|
console.log(this.detailArcData) |
|
|
|
}, |
|
|
|
handleChecked(item) { |
|
|
|
console.log('item', item) |
|
|
|
// changeChecked(item) { |
|
|
|
// console.log('item', item) |
|
|
|
// this.responsive = !this.responsive |
|
|
|
// }, |
|
|
|
changeChecked() { |
|
|
|
this.responsive = !this.responsive |
|
|
|
this.checkedArr = [] |
|
|
|
this.detailArcData.forEach((item) => { |
|
|
|
for (let i = 0; i < item.checkedId.length; i++) { |
|
|
|
for (let j = 0; j < item.childMenu.length; j++) { |
|
|
|
if (item.checkedId[i] === item.childMenu[j].value) { |
|
|
|
this.checkedArr.push(item.childMenu[j].value) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
console.log(this.checkedArr) // 输出当前选中的所有checkbox的value值 |
|
|
|
}) |
|
|
|
}, |
|
|
|
getFondsDetail() { |
|
|
|
FetchFondsDetail({ id: this.user.fonds.id }).then((res) => { |
|
|
@ -207,30 +227,32 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
submitForm() { |
|
|
|
console.log(this.form.checkedId) |
|
|
|
this.$refs['form'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
const archivesIds = [] |
|
|
|
this.selections.forEach(val => { |
|
|
|
archivesIds.push(val.id) |
|
|
|
const archivesIds = this.detailArcData.map(val => val.archivesId) |
|
|
|
const utilizeDTO = this.detailArcData.map(item => { |
|
|
|
const json = { |
|
|
|
'archivesId': item.archivesId, |
|
|
|
'categoryId': item.categoryPid, |
|
|
|
'categoryLevel': item.categoryLevel, |
|
|
|
'utilizeType': item.checkedId.join(',') |
|
|
|
} |
|
|
|
return json |
|
|
|
}) |
|
|
|
const params = { |
|
|
|
'title': this.form.title, // 流程名称 |
|
|
|
'applicant': this.user.username, // 申请人 |
|
|
|
'archivesIds': archivesIds, |
|
|
|
'businessType': 5, |
|
|
|
'categoryId': this.selectedCategory.id, |
|
|
|
'categoryLevel': this.collectLevel, |
|
|
|
'reason': this.form.reason, |
|
|
|
'borrowReason': this.form.borrowReason, |
|
|
|
'giveStartTime': this.form.giveStartTime, // 赋权开始时间 |
|
|
|
'giveEndTime': this.form.giveEndTime, // 赋权结束时间 |
|
|
|
'fondsNo': this.form.fondsNo, // 原始全宗 |
|
|
|
'targetFondsNo': this.targetFondsNo ? this.targetFondsNo.fondsId : null// 目标全宗号 |
|
|
|
// 'targetPosition': 'string', // 目的位置 |
|
|
|
// 'startPosition': 'string', // 开始位置 |
|
|
|
// 'givegiveStartTime': null, // 赋权开始时间 |
|
|
|
// 'giveEndTime': null // 赋权结束时间 |
|
|
|
'archivesIds': archivesIds, |
|
|
|
'utilizeDTO': utilizeDTO |
|
|
|
} |
|
|
|
console.log(params) |
|
|
|
FetchIntoFlowBusiness(params).then((res) => { |
|
|
|
if (res.code !== 5001) { |
|
|
|
if (res.code !== 5001 && res.code !== 500) { |
|
|
|
this.$message({ message: '操作提交成功', type: 'success', offset: 8 }) |
|
|
|
this.$emit('close-dialog') |
|
|
|
} else { |
|
|
@ -238,7 +260,7 @@ export default { |
|
|
|
// this.$message.error(message.fail.join(',') + '操作提交失败') |
|
|
|
this.$message({ message: res.message, type: 'error', offset: 8 }) |
|
|
|
} |
|
|
|
this.handleClose() |
|
|
|
this.handleCloseDialog() |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
@ -252,6 +274,11 @@ export default { |
|
|
|
this.lendDetail = true |
|
|
|
}, |
|
|
|
handleCloseDialog(done) { |
|
|
|
this.form.title = '' |
|
|
|
this.form.reason = '' |
|
|
|
this.form.giveStartTime = null |
|
|
|
this.form.giveEndTime = null |
|
|
|
this.$refs['form'].resetFields() |
|
|
|
this.lendFormVisible = false |
|
|
|
// 关闭弹框 |
|
|
|
// done() |
|
|
|