commit
This commit is contained in:
+3
-3
@@ -93,7 +93,7 @@ layout("/layouts/platform.html"){
|
||||
</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
|
||||
<el-button v-if="row.instanceState === 20" @click="doExport(row)" size="mini" type="primary">导出</el-button>
|
||||
<el-button v-if="row.instanceState === 20" @click="doExportDeclare(row)" size="mini" type="primary">申请表导出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -143,8 +143,8 @@ layout("/layouts/platform.html"){
|
||||
'info': INFO
|
||||
},
|
||||
methods: {
|
||||
doExport(row){
|
||||
this.$downLoad('/platform/activityDeclare/mine/doExport?id=' + row.id)
|
||||
doExportDeclare(row){
|
||||
this.$downLoad('/platform/activityDeclare/mine/doExportDeclare?id=' + row.id)
|
||||
},
|
||||
onApply() {
|
||||
window.location.href = '/platform/activityDeclare/apply'
|
||||
|
||||
+50
-15
@@ -13,8 +13,8 @@ layout("/layouts/platform.html"){
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":" class="flow-task-form">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="活动名称">
|
||||
<el-form-item prop="id">
|
||||
<el-select v-model="formData.id"
|
||||
<el-form-item prop="declareId">
|
||||
<el-select v-model="formData.declareId"
|
||||
style="width: 100%;"
|
||||
@change="activityChange"
|
||||
filterable placeholder="请选择活动">
|
||||
@@ -28,7 +28,7 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<template v-if="formData.id">
|
||||
<template v-if="formData.declareId">
|
||||
<el-descriptions-item label="相关数据">
|
||||
<el-button size="small" type="primary" @click="viewDeclare">查看申报信息</el-button>
|
||||
</el-descriptions-item>
|
||||
@@ -37,7 +37,7 @@ layout("/layouts/platform.html"){
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
</template>
|
||||
|
||||
<el-descriptions-item label="实际活动时间" :span="2">
|
||||
<el-descriptions-item label="实际活动时间">
|
||||
<el-form-item prop="activityTime">
|
||||
<el-date-picker
|
||||
start-placeholder="开始日期"
|
||||
@@ -51,6 +51,23 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="活动计划时间">
|
||||
<el-form-item prop="planDate">
|
||||
<el-date-picker
|
||||
readonly
|
||||
start-placeholder="开始日期"
|
||||
range-separator="-"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 100%"
|
||||
type="daterange"
|
||||
v-model="formData.planDate"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="活动预算费用" :span="2">
|
||||
<el-form-item prop="budgets">
|
||||
<el-table :data="formData.budgets" border max-height="500" size="mini" style="width: 100%">
|
||||
@@ -211,7 +228,9 @@ layout("/layouts/platform.html"){
|
||||
|
||||
formData: {
|
||||
id: GetQueryString("businessId"),
|
||||
activityTime: []
|
||||
activityTime: [],
|
||||
budgets: [],
|
||||
planDate: [],
|
||||
},
|
||||
formRules: {
|
||||
id: [{required: true, message: "必填", trigger: ['change', 'blur']}]
|
||||
@@ -294,7 +313,7 @@ layout("/layouts/platform.html"){
|
||||
viewDeclare() {
|
||||
this.declareDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen({id: this.formData.id})
|
||||
this.$refs.infoRef.onOpen({id: this.formData.declareId})
|
||||
})
|
||||
},
|
||||
|
||||
@@ -315,24 +334,40 @@ layout("/layouts/platform.html"){
|
||||
...data
|
||||
}
|
||||
|
||||
if (data.planStartTime && data.planEndTime) {
|
||||
this.formData.activityTime = [
|
||||
new Date(data.planStartTime),
|
||||
new Date(data.planEndTime)
|
||||
]
|
||||
}
|
||||
this.formData.id = this.bizId ? this.bizId : null
|
||||
|
||||
if (data.planStartTime && data.planEndTime) {
|
||||
this.formData.planDate = [data.planStartTime, data.planEndTime]
|
||||
}
|
||||
}
|
||||
},
|
||||
async getActivityReimbursementByUser() {
|
||||
const {code, data} = await this.$axios.post('/platform/activityReimbursement/apply/getActivityReimbursementByUser');
|
||||
async getActivityReimbursementByUser(id) {
|
||||
const {code, data} = await this.$axios.post('/platform/activityReimbursement/apply/getActivityReimbursementByUser',{id});
|
||||
if (code === 0) {
|
||||
this.activityOptions = data
|
||||
}
|
||||
},
|
||||
findOne(){
|
||||
this.$axios.post('/platform/activityReimbursement/mine/findOne', {id: this.bizId})
|
||||
.then(res => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
if (res.data.planStartTime && res.data.planEndTime) {
|
||||
this.formData.planDate = [res.data.planStartTime, res.data.planEndTime]
|
||||
}
|
||||
if (res.data.startTime && res.data.endTime) {
|
||||
this.formData.activityTime = [res.data.startTime, res.data.endTime]
|
||||
}
|
||||
// this.activityChange(res.data.activityId)
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getActivityReimbursementByUser()
|
||||
await this.getActivityReimbursementByUser(this.bizId)
|
||||
if (this.bizId) {
|
||||
this.findOne()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+5
-5
@@ -83,7 +83,7 @@ layout("/layouts/platform.html"){
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<el-table-column label="操作" fixed="right" width="350px" fixed="right">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">
|
||||
@@ -93,8 +93,8 @@ layout("/layouts/platform.html"){
|
||||
</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
|
||||
<el-button @click="doExport(row)" size="mini">申请</el-button>
|
||||
<el-button @click="doExportReimbursement(row)" size="mini">报销</el-button>
|
||||
<el-button @click="doExportDeclare(row)" size="mini" type="primary">申请表导出</el-button>
|
||||
<el-button v-if="row.instanceState === 20" @click="doExportReimbursement(row)" size="mini" type="primary">报销凭证导出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -144,8 +144,8 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
methods: {
|
||||
// 导出示例
|
||||
doExport(row){
|
||||
this.$downLoad('/platform/activityDeclare/mine/doExport?id=' + row.declareId)
|
||||
doExportDeclare(row){
|
||||
this.$downLoad('/platform/activityDeclare/mine/doExportDeclare?id=' + row.declareId)
|
||||
},
|
||||
// 导出报销凭证
|
||||
doExportReimbursement(row){
|
||||
|
||||
Reference in New Issue
Block a user