|
|
|
@ -1,84 +1,28 @@
|
|
|
|
|
<template> |
|
|
|
|
<div class="app-container"> |
|
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
|
|
|
|
<el-form-item label="活动ID" prop="macketingActivitiesId"> |
|
|
|
|
<el-form-item label="活动名称" prop="macketingActivitiesId"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="queryParams.macketingActivitiesId" |
|
|
|
|
placeholder="请输入活动ID" |
|
|
|
|
placeholder="请输入活动名称" |
|
|
|
|
clearable |
|
|
|
|
size="small" |
|
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="参加作品ID" prop="collectionId"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="queryParams.collectionId" |
|
|
|
|
placeholder="请输入参加作品ID" |
|
|
|
|
clearable |
|
|
|
|
size="small" |
|
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="参加作品数量" prop="collectionNumber"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="queryParams.collectionNumber" |
|
|
|
|
placeholder="请输入参加作品数量" |
|
|
|
|
clearable |
|
|
|
|
size="small" |
|
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="状态" prop="state"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="queryParams.state" |
|
|
|
|
placeholder="请输入状态" |
|
|
|
|
clearable |
|
|
|
|
size="small" |
|
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="删除时间" prop="deletedTime"> |
|
|
|
|
<el-date-picker clearable size="small" |
|
|
|
|
v-model="queryParams.deletedTime" |
|
|
|
|
type="date" |
|
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
|
placeholder="选择删除时间"> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="创建人" prop="createdBy"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="queryParams.createdBy" |
|
|
|
|
placeholder="请输入创建人" |
|
|
|
|
clearable |
|
|
|
|
size="small" |
|
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="创建时间" prop="createdTime"> |
|
|
|
|
<el-date-picker clearable size="small" |
|
|
|
|
v-model="queryParams.createdTime" |
|
|
|
|
type="date" |
|
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
|
placeholder="选择创建时间"> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="更新人" prop="updatedBy"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="queryParams.updatedBy" |
|
|
|
|
placeholder="请输入更新人" |
|
|
|
|
clearable |
|
|
|
|
size="small" |
|
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="更新时间" prop="updatedTime"> |
|
|
|
|
<el-date-picker clearable size="small" |
|
|
|
|
v-model="queryParams.updatedTime" |
|
|
|
|
type="date" |
|
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
|
placeholder="选择更新时间"> |
|
|
|
|
</el-date-picker> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="活动状态" prop="state"> |
|
|
|
|
<el-select v-model="queryParams.state" clearable placeholder="请选择活动状态" |
|
|
|
|
size="small" |
|
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
|
> |
|
|
|
|
<el-option label="待开始" value="1"></el-option> |
|
|
|
|
<el-option label="进行中" value="2"></el-option> |
|
|
|
|
<el-option label="已结束" value="3"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
|
|
|
@ -118,45 +62,46 @@
|
|
|
|
|
v-hasPermi="['wjnft:macketingapplication:remove']" |
|
|
|
|
>删除</el-button> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="1.5"> |
|
|
|
|
<el-button |
|
|
|
|
type="warning" |
|
|
|
|
plain |
|
|
|
|
icon="el-icon-download" |
|
|
|
|
size="mini" |
|
|
|
|
@click="handleExport" |
|
|
|
|
v-hasPermi="['wjnft:macketingapplication:export']" |
|
|
|
|
>导出</el-button> |
|
|
|
|
</el-col> |
|
|
|
|
<!-- <el-col :span="1.5">--> |
|
|
|
|
<!-- <el-button--> |
|
|
|
|
<!-- type="warning"--> |
|
|
|
|
<!-- plain--> |
|
|
|
|
<!-- icon="el-icon-download"--> |
|
|
|
|
<!-- size="mini"--> |
|
|
|
|
<!-- @click="handleExport"--> |
|
|
|
|
<!-- v-hasPermi="['wjnft:macketingapplication:export']"--> |
|
|
|
|
<!-- >导出</el-button>--> |
|
|
|
|
<!-- </el-col>--> |
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="macketingapplicationList" @selection-change="handleSelectionChange"> |
|
|
|
|
<el-table-column type="selection" width="55" align="center" /> |
|
|
|
|
<el-table-column label="id" align="center" prop="id" /> |
|
|
|
|
<el-table-column label="活动ID" align="center" prop="macketingActivitiesId" /> |
|
|
|
|
<el-table-column label="参加作品ID" align="center" prop="collectionId" /> |
|
|
|
|
<el-table-column label="参加作品数量" align="center" prop="collectionNumber" /> |
|
|
|
|
<el-table-column label="状态" align="center" prop="state" /> |
|
|
|
|
<el-table-column label="删除时间" align="center" prop="deletedTime" width="180"> |
|
|
|
|
<el-table-column label="序号" align="center" type="index" /> |
|
|
|
|
<el-table-column label="活动名称" align="center" prop="title" /> |
|
|
|
|
<el-table-column label="作品名称" align="center" prop="collectionName" /> |
|
|
|
|
<el-table-column label="作品数量" align="center" prop="collectionNumber" /> |
|
|
|
|
<el-table-column label="活动状态" align="center" prop="state" > |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ parseTime(scope.row.deletedTime, '{y}-{m}-{d}') }}</span> |
|
|
|
|
<span v-if="scope.row.state === 1"> 待开始 </span> |
|
|
|
|
<span v-if="scope.row.state === 2"> 进行中 </span> |
|
|
|
|
<span v-if="scope.row.state === 3"> 已结束 </span> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="创建人" align="center" prop="createdBy" /> |
|
|
|
|
<el-table-column label="创建时间" align="center" prop="createdTime" width="180"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ parseTime(scope.row.createdTime, '{y}-{m}-{d}') }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="更新人" align="center" prop="updatedBy" /> |
|
|
|
|
<el-table-column label="更新时间" align="center" prop="updatedTime" width="180"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d}') }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<template slot-scope="scope" v-if="scope.row.state === 1"> |
|
|
|
|
<el-button |
|
|
|
|
size="mini" |
|
|
|
|
type="text" |
|
|
|
@ -185,49 +130,30 @@
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改活动申请 对话框 --> |
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|
|
|
|
<el-form-item label="活动ID" prop="macketingActivitiesId"> |
|
|
|
|
<el-input v-model="form.macketingActivitiesId" placeholder="请输入活动ID" /> |
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> |
|
|
|
|
<el-form-item label="活动名称" prop="macketingActivitiesId"> |
|
|
|
|
<!-- <el-input v-model="form.macketingActivitiesId" placeholder="请选择活动名称" />--> |
|
|
|
|
<el-select v-model="form.macketingActivitiesId" clearable placeholder="请选择活动名称" > |
|
|
|
|
<el-option v-for="item in activity " |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.title" |
|
|
|
|
:value="item.id"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="参加作品ID" prop="collectionId"> |
|
|
|
|
<el-input v-model="form.collectionId" placeholder="请输入参加作品ID" /> |
|
|
|
|
<el-form-item label="参加作品" prop="collectionId"> |
|
|
|
|
<!-- <el-input v-model="form.collectionId" placeholder="请输入参加作品名称" />--> |
|
|
|
|
<el-select v-model="form.collectionId" clearable placeholder="请输入参加作品名称" > |
|
|
|
|
<el-option v-for="item in worksCollection" |
|
|
|
|
:value="item.id" |
|
|
|
|
:label="item.collectionName" |
|
|
|
|
:key="item.id" ></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="参加作品数量" prop="collectionNumber"> |
|
|
|
|
<el-input v-model="form.collectionNumber" placeholder="请输入参加作品数量" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="状态" prop="state"> |
|
|
|
|
<el-input v-model="form.state" placeholder="请输入状态" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="删除时间" prop="deletedTime"> |
|
|
|
|
<el-date-picker clearable size="small" |
|
|
|
|
v-model="form.deletedTime" |
|
|
|
|
type="date" |
|
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
|
placeholder="选择删除时间"> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="创建人" prop="createdBy"> |
|
|
|
|
<el-input v-model="form.createdBy" placeholder="请输入创建人" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="创建时间" prop="createdTime"> |
|
|
|
|
<el-date-picker clearable size="small" |
|
|
|
|
v-model="form.createdTime" |
|
|
|
|
type="date" |
|
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
|
placeholder="选择创建时间"> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="更新人" prop="updatedBy"> |
|
|
|
|
<el-input v-model="form.updatedBy" placeholder="请输入更新人" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="更新时间" prop="updatedTime"> |
|
|
|
|
<el-date-picker clearable size="small" |
|
|
|
|
v-model="form.updatedTime" |
|
|
|
|
type="date" |
|
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
|
placeholder="选择更新时间"> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
|
|
|
@ -238,12 +164,18 @@
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { listMacketingapplication, getMacketingapplication, delMacketingapplication, addMacketingapplication, updateMacketingapplication } from "@/api/wjnft/macketingapplication"; |
|
|
|
|
import { listMacketingapplication, getMacketingapplication, delMacketingapplication, addMacketingapplication, updateMacketingapplication ,getQueryActivity , |
|
|
|
|
getProduction } from "@/api/wjnft/macketingapplication"; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
name: "Macketingapplication", |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
//作品名称集合 |
|
|
|
|
worksCollection:[], |
|
|
|
|
//活动名称集合 |
|
|
|
|
activity:[], |
|
|
|
|
|
|
|
|
|
// 遮罩层 |
|
|
|
|
loading: true, |
|
|
|
|
// 选中数组 |
|
|
|
@ -285,8 +217,47 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
this.getList(); |
|
|
|
|
this.queryActivity(); |
|
|
|
|
this.production(); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
|
|
|
|
|
/*** 查询藏品*/ |
|
|
|
|
production(){ |
|
|
|
|
getProduction().then(rest =>{ |
|
|
|
|
// console.log(rest.data); |
|
|
|
|
let est = rest.data; |
|
|
|
|
est.forEach( re =>{ |
|
|
|
|
let nub = { |
|
|
|
|
id:re.id, |
|
|
|
|
collectionName: re.collectionName +"——剩余 "+re.quantityIssued+"个" |
|
|
|
|
} |
|
|
|
|
this.worksCollection.push(nub); |
|
|
|
|
} ) |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 查询活动名称 |
|
|
|
|
*/ |
|
|
|
|
queryActivity(){ |
|
|
|
|
getQueryActivity().then(rest =>{ |
|
|
|
|
//console.log(rest.data); |
|
|
|
|
let sets = rest.data; |
|
|
|
|
sets.forEach( res => { |
|
|
|
|
let s ={ |
|
|
|
|
id:res.id, |
|
|
|
|
title: res.title |
|
|
|
|
} |
|
|
|
|
this.activity.push(s); |
|
|
|
|
} ) |
|
|
|
|
// console.log(this.activity); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
/** 查询活动申请 列表 */ |
|
|
|
|
getList() { |
|
|
|
|
this.loading = true; |
|
|
|
@ -337,7 +308,7 @@ export default {
|
|
|
|
|
handleAdd() { |
|
|
|
|
this.reset(); |
|
|
|
|
this.open = true; |
|
|
|
|
this.title = "添加活动申请 "; |
|
|
|
|
this.title = "添加活动作品 "; |
|
|
|
|
}, |
|
|
|
|
/** 修改按钮操作 */ |
|
|
|
|
handleUpdate(row) { |
|
|
|
@ -346,7 +317,7 @@ export default {
|
|
|
|
|
getMacketingapplication(id).then(response => { |
|
|
|
|
this.form = response.data; |
|
|
|
|
this.open = true; |
|
|
|
|
this.title = "修改活动申请 "; |
|
|
|
|
this.title = "修改活动作品 "; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
/** 提交按钮 */ |
|
|
|
@ -360,6 +331,7 @@ export default {
|
|
|
|
|
this.getList(); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
console.log(this.form); |
|
|
|
|
addMacketingapplication(this.form).then(response => { |
|
|
|
|
this.$modal.msgSuccess("新增成功"); |
|
|
|
|
this.open = false; |
|
|
|
@ -371,8 +343,9 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
/** 删除按钮操作 */ |
|
|
|
|
handleDelete(row) { |
|
|
|
|
console.log(row); |
|
|
|
|
const ids = row.id || this.ids; |
|
|
|
|
this.$modal.confirm('是否确认删除活动申请 编号为"' + ids + '"的数据项?').then(function() { |
|
|
|
|
this.$modal.confirm('是否确认删除活动作品名称为"' + row.collectionName + '"的数据项?').then(function() { |
|
|
|
|
return delMacketingapplication(ids); |
|
|
|
|
}).then(() => { |
|
|
|
|
this.getList(); |
|
|
|
|