|
@@ -1,15 +1,15 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
|
|
- <el-row :gutter="10" justify="space-between">
|
|
|
- <el-col :span="5">
|
|
|
+ <el-row :gutter="1" justify="space-between">
|
|
|
+ <el-col :span="4">
|
|
|
<el-form-item label="所属客户" prop="customerName">
|
|
|
<el-popover-select-v2 v-model="queryParams.customerName" title="客户" valueKey="name"
|
|
|
referName="CUSTOMER_PARAM_ZT" :dataMapping="{ customer: 'id', customerName: 'name'}"
|
|
|
:source.sync="queryParams" placeholder="请输入所属客户" @keyup.enter.native="handleQuery" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="5">
|
|
|
+ <el-col :span="4">
|
|
|
<el-form-item label="产线" prop="productionLineName">
|
|
|
<el-popover-tree-select v-model="queryParams.productionLineName" valueKey='name' title="产线"
|
|
|
referName="PRODUCTLINE" :dataMapping="{ customCode: 'id', custom: 'name'}" :source.sync="queryParams"
|
|
@@ -23,14 +23,19 @@
|
|
|
@keyup.enter.native="handleQuery" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-row :gutter="10" class="mb8" style="float: right">
|
|
|
- <el-col :span="1.5">
|
|
|
- <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>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="创建日期范围" prop="dateRange" label-width="120px">
|
|
|
+ <el-date-picker v-model="queryParams.dateRange" type="daterange" range-separator="至"
|
|
|
+ start-placeholder="开始日期" end-placeholder="结束日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3">
|
|
|
+ <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>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
|
|
@@ -66,7 +71,7 @@
|
|
|
<el-table-column label="产线" align="center" prop="productionLineName" width="150" />
|
|
|
<el-table-column label="供应商" align="center" prop="rivalName" width="220" />
|
|
|
<el-table-column label="供应商体量(万)" align="center" prop="rivalBulk" width="130" />
|
|
|
- <el-table-column label="品牌" align="center" prop="brand" width="100" />
|
|
|
+ <el-table-column label="品牌" align="center" prop="brand" width="220" />
|
|
|
<el-table-column label="品牌份额(万)" align="center" prop="brandPortion" width="120" />
|
|
|
<el-table-column label="合作期限(起)" align="center" prop="cooperationStart" width="180">
|
|
|
<template slot-scope="scope">
|
|
@@ -87,6 +92,10 @@
|
|
|
<el-table-column label="开发思路(营销策略)" align="center" prop="idea" min-width="220" show-overflow-tooltip />
|
|
|
<el-table-column label="机会点/困难点所需资源" align="center" prop="chance" min-width="220" show-overflow-tooltip />
|
|
|
<el-table-column label="备注" align="center" prop="remark" min-width="220" show-overflow-tooltip />
|
|
|
+ <el-table-column label="创建人" align="center" prop="createByName" width="180" />
|
|
|
+ <el-table-column label="创建时间" align="center" prop="createTime" width="180" />
|
|
|
+ <el-table-column label="最后修改人" align="center" prop="updateByName" width="180" />
|
|
|
+ <el-table-column label="最后修改时间" align="center" prop="updateTime" width="180" />
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180px" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button size="mini" type="text" icon="el-icon-search" @click="handleSee(scope.row)">查看</el-button>
|
|
@@ -131,7 +140,8 @@
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="品牌" prop="brand">
|
|
|
- <el-input v-model="form.brand" placeholder="请输入品牌" />
|
|
|
+ <el-popover-select-v2 v-model="form.brand" title="品牌" valueKey="name" referName="SUPPLIER_PARAM"
|
|
|
+ :dataMapping="{ brandId: 'id', brand: 'name'}" :source.sync="form" placeholder="请输入品牌" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
@@ -270,6 +280,8 @@
|
|
|
chance: null,
|
|
|
tenantId: null,
|
|
|
revision: null,
|
|
|
+ dateRange: null,
|
|
|
+ staff: null,
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
@@ -333,12 +345,22 @@
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
+ if (this.queryParams.dateRange != undefined && this.queryParams.dateRange != null) {
|
|
|
+ let date = this.queryParams.dateRange[1];
|
|
|
+ if (String(date).indexOf("00:00:00") >= 0) {
|
|
|
+ this.queryParams.dateRange[0] = this.dateToStr(this.queryParams.dateRange[0]);
|
|
|
+ this.queryParams.dateRange[1] = this.dateToStrEnd(this.queryParams.dateRange[1]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.getStaff();
|
|
|
this.queryParams.pageNum = 1;
|
|
|
this.getList();
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
this.resetForm("queryForm");
|
|
|
+ this.queryParams.dateRange = null;
|
|
|
+ this.queryParams.staff = null;
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
// 多选框选中数据
|
|
@@ -368,12 +390,12 @@
|
|
|
if (res.code == '200') {
|
|
|
this.resetQuery();
|
|
|
if (res.msg.indexOf('导入失败') >= 0) {
|
|
|
- this.$message({
|
|
|
- duration: 5000,
|
|
|
- message: res.msg
|
|
|
- });
|
|
|
+ this.$message({
|
|
|
+ duration: 5000,
|
|
|
+ message: res.msg
|
|
|
+ });
|
|
|
} else {
|
|
|
- this.$message.success(res.msg);
|
|
|
+ this.$message.success(res.msg);
|
|
|
}
|
|
|
} else {
|
|
|
this.$message.error(res.msg);
|
|
@@ -447,6 +469,32 @@
|
|
|
...this.queryParams
|
|
|
}, `gather_${new Date().getTime()}.xlsx`)
|
|
|
},
|
|
|
+ // 日期转字符串格式
|
|
|
+ dateToStr(date) {
|
|
|
+ var year = date.getFullYear(); // 年
|
|
|
+ var month = date.getMonth(); // 月
|
|
|
+ var day = date.getDate(); // 日
|
|
|
+ var hours = date.getHours(); // 时
|
|
|
+ var min = date.getMinutes(); // 分
|
|
|
+ var second = date.getSeconds(); // 秒
|
|
|
+ return year + "-" +
|
|
|
+ ((month + 1) > 9 ? (month + 1) : "0" + (month + 1)) + "-" +
|
|
|
+ (day > 9 ? day : ("0" + day)) + " " +
|
|
|
+ (hours > 9 ? hours : ("0" + hours)) + ":" +
|
|
|
+ (min > 9 ? min : ("0" + min)) + ":" +
|
|
|
+ (second > 9 ? second : ("0" + second));
|
|
|
+ },
|
|
|
+ dateToStrEnd(date) {
|
|
|
+ var year = date.getFullYear(); // 年
|
|
|
+ var month = date.getMonth(); // 月
|
|
|
+ var day = date.getDate(); // 日
|
|
|
+ return year + "-" +
|
|
|
+ ((month + 1) > 9 ? (month + 1) : "0" + (month + 1)) + "-" +
|
|
|
+ (day > 9 ? day : ("0" + day)) + " " + "23:59:59"
|
|
|
+ },
|
|
|
+ getStaff() {
|
|
|
+ this.queryParams.staff = this.$store.state.user.id;
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
|