Commit a57d6ed4 authored by 我在何方's avatar 我在何方
parents 6fcd33d4 d10f6c43
......@@ -9,7 +9,7 @@ export function createDeptTarget(data) {
})
}
// 我的业绩
// 我的部门业绩
export function myDeptAchievementByPage(data) {
return request({
url: '/sale/dept-target/myDeptAchievementByPage',
......@@ -17,7 +17,7 @@ export function myDeptAchievementByPage(data) {
data: data
})
}
// 我的部门业绩
// 我的业绩
export function myAchievementByPage(data) {
return request({
url: '/sale/dept-target/myAchievementByPage',
......@@ -26,6 +26,15 @@ export function myAchievementByPage(data) {
})
}
// 全部业绩
export function allAchievementByPage(data) {
return request({
url: '/sale/dept-target/allAchievementByPage',
method: 'post',
data: data
})
}
// 更新部门业绩目标设置
export function updateDeptTarget(data) {
return request({
......@@ -85,3 +94,23 @@ export function exportDeptTargetExcel(query) {
responseType: 'blob'
})
}
// 导出部门业绩目标设置 Excel
export function exportDetailExcel(query) {
return request({
url: '/sale/dept-target/exportDetailExcel',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 导出部门业绩目标设置 Excel
export function exportStatisticsExcel(query) {
return request({
url: '/sale/dept-target/exportStatisticsExcel',
method: 'get',
params: query,
responseType: 'blob'
})
}
......@@ -79,3 +79,10 @@ export function calculationPrice(data){
data: data
})
}
//新增商品可用优惠信息列表
export function product_coupon_newProd(){
return request({
url:'/product/coupon/newProd/list',
method:'get',
})
}
......@@ -65,11 +65,11 @@
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['shipment:box:action:create']">{{$t('出货安排')}}
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['shipment:box:create']">{{$t('出货安排')}}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" v-hasPermi="['shipment:box:action:export']">{{$t('导出')}}
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" v-hasPermi="['shipment:box:export']">{{$t('导出')}}
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
......
......@@ -51,11 +51,11 @@
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['shipment:seaAir:action:create']">{{$t('出货安排')}}
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['shipment:seaAir:create:seaAir']">{{$t('出货安排')}}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" v-hasPermi="['shipment:seaAir:action:export']">{{$t('导出')}}
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" v-hasPermi="['shipment:box:export:seaAir']">{{$t('导出')}}
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
......
......@@ -171,7 +171,16 @@ export default {
});
});
});
this.tallyList = list;
let relist = []
list.forEach(l=>{
let index = relist.findIndex(i=>i.orderId == l.orderId && i.positionNo == l.positionNo)
if(index == -1){
relist.push(l)
}else{
relist[index].warehouseInInfo.cartonsNum = parseInt(relist[index].warehouseInInfo.cartonsNum)+parseInt(l.warehouseInInfo.cartonsNum)
}
})
this.tallyList = relist;
});
},
// 选中
......
......@@ -248,8 +248,8 @@
</el-form>
<div class="pl-100">
<template v-if="!readonly">
<el-button type="primary" @click="submitForm(0)">{{$t('保存')}}</el-button>
<el-button type="primary" @click="submitForm(1)">{{$t('发布')}}</el-button>
<el-button type="primary" @click="submitForm(0)" v-hasPermi="['ecw:coupon:draft']">{{$t('保存')}}</el-button>
<el-button type="primary" @click="submitForm(1)" v-hasPermi="['ecw:coupon:publish']">{{$t('发布')}}</el-button>
<el-button type="default" @click="reset">{{$t('重置')}}</el-button>
</template>
<el-button @click="$router.back()">{{$t('返回')}}</el-button>
......
......@@ -10,10 +10,6 @@
<el-input v-model="queryParams.titleEn" :placeholder="$t('请输入标题')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<el-form-item :label="$t('类型')" prop="type">
<!-- 1:优惠卷 2:金额-满减 3:方数-满减 4 折扣 5优惠 6 特价 7区间价-->
<!-- <el-select v-model="queryParams.type" placeholder="请选择类型 1:优惠卷 2:金额-满减 3:方数-满减 4 折扣 5优惠 6 特价 7区间价" clearable size="small">
<el-option :label="$t('请选择字典生成')" value="" />
</el-select> -->
<dict-selector :type='DICT_TYPE.ECW_COUPON_TYPE' v-model="queryParams.type" clearable />
</el-form-item>
<el-form-item :label="$t('状态')" prop="status" clearable>
......@@ -27,92 +23,6 @@
<el-form-item :label="$t('关键字')" prop="conditionCurrencyId">
<el-input v-model="queryParams.searchKey" :placeholder="$t('请输入关键字')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<!-- <el-form-item label="使用条件(优惠卷专用)" prop="cashCondition">
<el-input v-model="queryParams.cashCondition" placeholder="请输入使用条件(优惠卷专用)" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="减免金额(优惠卷专用)" prop="reduceAmount">
<el-input v-model="queryParams.reduceAmount" placeholder="请输入减免金额(优惠卷专用)" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="条件货币ID" prop="conditionCurrencyId">
<el-input v-model="queryParams.conditionCurrencyId" placeholder="请输入条件货币ID" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<!-- <el-form-item :label="$t('开始时间')">
<el-date-picker v-model="dateRangeStartTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
</el-form-item> -->
<!-- <el-form-item label="减免货币ID" prop="reduceCurrencyId">
<el-input v-model="queryParams.reduceCurrencyId" placeholder="请输入减免货币ID" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<!-- <el-form-item :label="$t('结束时间')">
<el-date-picker v-model="dateRangeEndTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
</el-form-item> -->
<!-- <el-form-item label="领券后X天起生效" prop="afterReceiveDays">
<el-input v-model="queryParams.afterReceiveDays" placeholder="请输入领券后X天起生效" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('有效天数')" prop="validDays">
<el-input v-model="queryParams.validDays" :placeholder="$t('请输入有效天数')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<!-- <el-form-item :label="$t('费用类型')" prop="costType">
<dict-selector :type="DICT_TYPE.ECW_COUPON_COST_TYPE" v-model="queryParams.costType"/>
</el-form-item> -->
<!-- <el-form-item :label="$t('优惠清单')" prop="discountDetailed">
<el-input v-model="queryParams.discountDetailed" :placeholder="$t('请输入优惠清单')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="同类优惠劵是否可以叠加 0否 1是" prop="isSimilarSuperposition">
<el-select v-model="queryParams.isSimilarSuperposition" placeholder="请选择同类优惠劵是否可以叠加 0否 1是" clearable size="small">
<el-option :label="$t('请选择字典生成')" value="" />
</el-select>
</el-form-item>
<el-form-item :label="$t('可叠加优惠劵列表')" prop="couponIds">
<el-input v-model="queryParams.couponIds" :placeholder="$t('请输入可叠加优惠劵列表')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="适用用户类型 0全部用户 1部分用户 2指定用户不参与" prop="suitableUserType">
<el-select v-model="queryParams.suitableUserType" placeholder="请选择适用用户类型 0全部用户 1部分用户 2指定用户不参与" clearable size="small">
<el-option :label="$t('请选择字典生成')" value="" />
</el-select>
</el-form-item>
<el-form-item label="适用线路类型 0全部线路参与 1指定线路参与 2指定线路不参与" prop="suitableLineType">
<el-select v-model="queryParams.suitableLineType" placeholder="请选择适用线路类型 0全部线路参与 1指定线路参与 2指定线路不参与" clearable size="small">
<el-option :label="$t('请选择字典生成')" value="" />
</el-select>
</el-form-item>
<el-form-item label="适用产品类型 0全部产品参与 1指定产品参与 2指定产品不参与" prop="suitableProdType">
<el-select v-model="queryParams.suitableProdType" placeholder="请选择适用产品类型 0全部产品参与 1指定产品参与 2指定产品不参与" clearable size="small">
<el-option :label="$t('请选择字典生成')" value="" />
</el-select>
</el-form-item>
<el-form-item label="每个用户领券上限,如不填则默认为1" prop="limitNum">
<el-input v-model="queryParams.limitNum" placeholder="请输入每个用户领券上限,如不填则默认为1" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<!-- <el-form-item :label="$t('过期状态')" prop="overdueStatus">
<dict-selector :type="DICT_TYPE.ECW_COUPON_OVERDUE_STATUS" v-model="queryParams.overdueStatus"/>
</el-form-item> -->
<!-- <el-form-item :label="$t('投放状态')" prop="putonStatus">
<dict-selector :type="DICT_TYPE.ECW_COUPON_PUTON_STATUS" v-model="queryParams.putonStatus"/>
</el-form-item> -->
<!-- <el-form-item label="获取方式 0=客户领取 1=平台发放" prop="getWay">
<el-input v-model="queryParams.getWay" placeholder="请输入获取方式 0=客户领取 1=平台发放" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="订单属性(可多选) 1 普货 2重货 3泡货" prop="orderAttr">
<el-input v-model="queryParams.orderAttr" placeholder="请输入订单属性(可多选) 1 普货 2重货 3泡货" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="是否发送站内信 0否 1是" prop="isSiteContent">
<el-select v-model="queryParams.isSiteContent" placeholder="请选择是否发送站内信 0否 1是" clearable size="small">
<el-option :label="$t('请选择字典生成')" value="" />
</el-select>
</el-form-item>
<el-form-item label="是否控货(可多选) 0否 1是" prop="isCargoControl">
<el-input v-model="queryParams.isCargoControl" placeholder="请输入是否控货(可多选) 0否 1是" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="单证报关(可多选) 1 我司全代 2自单代报 3混合报关" prop="documentDeclaration">
<el-input v-model="queryParams.documentDeclaration" placeholder="请输入单证报关(可多选) 1 我司全代 2自单代报 3混合报关" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<!-- <el-form-item :label="$t('创建时间')">
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
</el-form-item> -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('搜索') }}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t('重置') }}</el-button>
......@@ -183,13 +93,13 @@
<el-table-column :label="$t('操作')" align="center" fixed="right" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row, true)"
v-hasPermi="['ecw:coupon:update']">{{ $t('查看') }}</el-button>
v-hasPermi="['ecw:coupon:show']">{{ $t('查看') }}</el-button>
<el-button v-if="scope.row.status != 1" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:coupon:update']">{{ $t('编辑') }}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleCopy(scope.row)"
v-hasPermi="['ecw:coupon:create']">{{ $t('复制') }}</el-button>
v-hasPermi="['ecw:coupon:copy']">{{ $t('复制') }}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="updateEndtimeItem = scope.row" v-if="scope.row.endTime && scope.row.status"
v-hasPermi="['ecw:coupon:update']">{{ $t('延期') }}</el-button>
v-hasPermi="['ecw:coupon:delay']">{{ $t('延期') }}</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['ecw:coupon:delete']">{{ $t('删除') }}</el-button>
</template>
......
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('关键字')" prop="transportType">
<el-input v-model="queryParams.key" :placeholder="$t('请输入关键字查找')" clearable/>
</el-form-item>
<el-form-item :label="$t('运输方式')" prop="transportType">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportType" formatter="number" clearable/>
</el-form-item>
<el-form-item :label="$t('唛头')" prop="transportType">
<el-input v-model="queryParams.marks" :placeholder="$t('请输入关键字查找')" clearable />
</el-form-item>
<el-form-item :label="$t('资源类型')" prop="customerType">
<!-- <el-select clearable v-model="queryParams.customerType" :placeholder="$t('请选择资源类型')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_ESOURCE_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> -->
<dict-selector :type="DICT_TYPE.CUSTOMER_ESOURCE_TYPE" v-model="queryParams.customerType" :placeholder="$t('请选择资源类型')" clearable ></dict-selector>
</el-form-item>
<!-- <el-form-item :label="$t('客户经理')" prop="customerService">
<el-select clearable v-model="queryParams.customerService" :placeholder="$t('请选择客户经理')" clearable size="small">
<el-option v-for="dict in customerServiceList"
:key="dict.id" :label="dict.nickname" :value="dict.id"/>
</el-select>
</el-form-item> -->
<!-- <el-form-item prop="customerService">
<el-select clearable v-model="queryParams.customerService" clearable size="small">
<el-option :label="$t('下单时间')" value="createTime"/>
<el-option :label="$t('装柜时间')" value="ldBoxTime"/>
</el-select>
</el-form-item> -->
<el-form-item>
<el-date-picker v-model="dateFilter" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<!-- <el-date-picker v-model="queryParams.beginStartTime" :placeholder="$t('请选择开始时间')" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>-->
</el-form-item>
<!-- <el-form-item :label="$t('结束时间')" prop="endStartTime">-->
<!-- <el-date-picker v-model="queryParams.endStartTime" :placeholder="$t('请选择结束时间')" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button type="primary" icon="el-icon-search" @click="resetQuery">{{$t('重置')}}</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExportDetail" :loading="exportLoading">{{ $t('导出明细') }}</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExportStatistics" :loading="exportLoading">{{ $t('导出统计') }}</el-button>
<!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>{{$t('导出')}}</el-button> -->
</el-form-item>
</el-form>
<div class="total_num">
<span>{{ $t('开发客户:') }}</span>
<span>{{$t('总箱数')}} {{totalData.developNum}}{{$t('')}} </span>
<span>{{$t('总方数')}} {{totalData.developVolume}}</span>
<span>{{$t('总重量')}} {{totalData.developWeight}}KG </span>
<span>{{ $t('公司客户:') }}</span>
<span>{{$t('总箱数')}} {{totalData.companyNum}}{{$t('')}} </span>
<span>{{$t('总方数')}} {{totalData.companyVolume}}</span>
<span>{{$t('总重量')}} {{totalData.companyWeight}}KG </span>
<span>{{ $t('汇总:') }}</span>
<span>{{$t('总箱数')}} {{totalData.sumNum}}{{$t('')}} </span>
<span>{{$t('总方数')}} {{totalData.sumVolume}}</span>
<span>{{$t('总重量')}} {{totalData.sumWeight}}KG </span>
</div>
<!-- 列表 -->
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<!-- <el-table-column :label="$t('序号')" align="center" type="index"></el-table-column> -->
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column :label="$t('资源类型')" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_ESOURCE_TYPE" :value="scope.row.customerType"/>
</template>
</el-table-column>
<el-table-column :label="$t('报价单号')" align="center" width="180">
<template slot-scope="scope">
<span>{{scope.row.number}}</span>
</template>
</el-table-column>
<!-- <el-table-column :label="$t('报价结果')" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_OFFER_STATUS" :value="scope.row.offerStatus"/>
</template>
</el-table-column> -->
<el-table-column :label="$t('订单号')" align="center" prop="orderNo"/>
<el-table-column :label="$t('客户名称')" align="center" prop="name"/>
<el-table-column :label="$t('联系方式')" align="center" prop="phoneNew"/>
<el-table-column :label="$t('唛头')" align="center" prop="marks"/>
<el-table-column :label="$t('订单状态')" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column :label="$t('是否控货')" align="center" prop="isCargoControl">
<template slot-scope="scope">
{{scope.row.isCargoControl?$t(''):$t('')}}
</template>
</el-table-column>
<el-table-column :label="$t('重量')" align="center" prop="completeWeight"/>
<el-table-column :label="$t('方数')" align="center" prop="completeVolume"/>
<el-table-column :label="$t('下单时间')" align="center" prop="createTime"/>
<el-table-column :label="$t('装柜时间')" align="center" prop="ldBoxTime"/>
<el-table-column :label="$t('客户经理')" align="center" prop="userId" :formatter="customerServiceFn">
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
</div>
</template>
<script>
import {
createDeptTarget,
updateDeptTarget,
deleteDeptTarget,
getDeptTarget,
getDeptTargetPage,
exportDeptTargetExcel,
exportDetailExcel,
exportStatisticsExcel,
getCreateInitData,
getPersonTargetPage,
allAchievementByPage
} from "@/api/ecw/deptTarget";
import {listSimpleDepts} from "@/api/system/dept";
import {getChannelList} from '@/api/ecw/channel';
import dayjs from "dayjs";
import {listServiceUser} from "@/api/system/user";
export default {
name: "DeptTarget",
components: {},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
tableTotal: 0,
// 部门业绩目标设置列表
list: [],
tableList: [],
// 弹出层标题
title: "",
dateFilter:[],
detail: {
deptName: null,
targetType: null,
cubeNum: null,
shippingChannel: null,
transportType: null,
},
// 是否显示弹出层
open: false,
tableOpen: false,
dateRangeCreateTime: [],
dateRangeStartTime: [],
dateRangeEndTime: [],
deptData: [],
deptArr: [],
channelList: [],
monthList: [],
quarterList: [],
yearList: [],
targetPeriod: [],
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
beginStartTime:null,
transportType: null,
shippingChannel: null,
endStartTime: null,
},
tableQueryParams: {
pageNo: 1,
pageSize: 10,
id: null,
},
// 表单参数
form: {},
customerServiceList:[],
// 表单校验
rules: {
deptId: [{required: true, message: this.$t("部门ID不能为空"), trigger: "blur"}],
targetType: [{required: true, message: this.$t("目标类型不能为空"), trigger: "change"}],
cubeNum: [{required: true, message: this.$t("立方数不能为空"), trigger: "blur"}],
},
totalData:{
companyWeight:0,
companyVolume:0,
companyNum:0,
developWeight:0,
developVolume:0,
developNum:0,
sumWeight:0,
sumVolume:0,
sumNum:0,
},
myAchievementData:{}
};
},
computed: {
getShipChannelName() {
return shippingChannelId => {
for (let index in this.channelList) {
let channelItem = this.channelList[index];
if (channelItem.channelId == shippingChannelId) {
return this.$l(channelItem, 'name');
}
}
return '/'
}
}
},
created() {
this.getChannelList();
this.getList();
listServiceUser().then(r=>{
this.customerServiceList = r.data;
})
},
methods: {
getChannelList() {
getChannelList().then(res => this.channelList = res.data)
},
dateFormat(val) {
return dayjs(val).format("YYYY-MM-DD");
},
changeList(val) {
if (val === 1) {
this.form.targetPeriodName = undefined;
this.targetPeriod = this.monthList;
} else if (val === 2) {
this.form.targetPeriodName = undefined;
this.targetPeriod = this.quarterList;
} else {
this.form.targetPeriodName = undefined;
this.targetPeriod = this.yearList;
}
},
setTime(item) {
this.targetPeriod.forEach((i, index) => {
if (i.name === item) {
this.form.startTime = i.startDate;
this.form.endTime = i.endDate;
}
})
},
customerServiceFn(val){
if(this.customerServiceList.length > 0){
let index =this.customerServiceList.findIndex(item => item.id === val.userId);
return index !== -1 ? this.customerServiceList[index]?.nickname :''
}else {
return ''
}
},
/** 查询列表 */
getList() {
this.loading = true;
// 执行查询
allAchievementByPage(this.queryParams).then(response => {
this.list = response.data.myAchievementDtos.list;
this.total = response.data.myAchievementDtos.total;
this.myAchievementData = response.data
this.totalData.sumWeight =this.myAchievementData.totalWeight
this.totalData.sumVolume =this.myAchievementData.totalVolume
this.totalData.sumNum =this.myAchievementData.totalNum
this.totalData.companyWeight =this.myAchievementData.companyTotalWeight
this.totalData.companyVolume =this.myAchievementData.companyTotalVolume
this.totalData.companyNum =this.myAchievementData.companyTotalNum
this.totalData.developWeight =this.myAchievementData.devTotalWeight
this.totalData.developVolume =this.myAchievementData.devTotalVolume
this.totalData.developNum =this.myAchievementData.devTotalNum
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
deptId: undefined,
targetType: undefined,
targetPeriodName: undefined,
startTime: undefined,
endTime: undefined,
transportType: undefined,
shippingChannel: undefined,
cubeNum: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.queryParams.beginStartTime=this.dateFilter[0];
this.queryParams.endStartTime=this.dateFilter[1];
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateFilter = []
this.dateRangeCreateTime = [];
this.dateRangeStartTime = [];
this.dateRangeEndTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.targetPeriod = this.monthList;
this.reset();
this.open = true;
this.title = this.$t("添加部门业绩目标设置");
},
/** 查看人员目标情况 */
handleView(row) {
this.detail = row;
this.tableQueryParams.id = row.id;
this.getTableList();
this.tableOpen = true;
},
getTableList() {
getPersonTargetPage(this.tableQueryParams).then(res => {
this.tableList = res.data.list;
this.tableTotal = res.data.total;
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getDeptTarget(id).then(response => {
this.form = response.data;
if (response.data.targetType === 1) {
this.targetPeriod = this.monthList;
} else if (response.data.targetType === 2) {
this.targetPeriod = this.quarterList;
} else {
this.targetPeriod = this.yearList;
}
this.open = true;
this.title = this.$t("修改部门业绩目标设置");
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
// 修改的提交
if (this.form.id != null) {
updateDeptTarget(this.form).then(response => {
this.$modal.msgSuccess(this.$t("修改成功"));
this.open = false;
this.getList();
});
return;
}
// 添加的提交
createDeptTarget(this.form).then(response => {
this.$modal.msgSuccess(this.$t("新增成功"));
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm(this.$t('是否确认删除部门业绩目标设置编号为{id}的数据项?', {id})).then(function () {
return deleteDeptTarget(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess(this.$t("删除成功"));
}).catch(() => {
});
},
handleSelectionChange(val){
if(val&&val.length>0){
var data={
companyWeight:0,
companyVolume:0,
companyNum:0,
developWeight:0,
developVolume:0,
developNum:0,
sumWeight:0,
sumVolume:0,
sumNum:0,
}
val.forEach(item=>{
if(item.customerType==1){
data.developWeight += item.completeWeight
data.developVolume += item.completeVolume
data.developNum += item.sumNum
}else{
data.companyWeight += item.completeWeight
data.companyVolume += item.completeVolume
data.companyNum += item.sumNum
}
data.sumWeight += item.completeWeight
data.sumVolume += item.completeVolume
data.sumNum += item.sumNum
})
this.$set(this,'totalData',data)
}else{
this.totalData.sumWeight =this.myAchievementData.totalWeight
this.totalData.sumVolume =this.myAchievementData.totalVolume
this.totalData.sumNum =this.myAchievementData.totalNum
this.totalData.companyWeight =this.myAchievementData.companyTotalWeight
this.totalData.companyVolume =this.myAchievementData.companyTotalVolume
this.totalData.companyNum =this.myAchievementData.companyTotalNum
this.totalData.developWeight =this.myAchievementData.devTotalWeight
this.totalData.developVolume =this.myAchievementData.devTotalVolume
this.totalData.developNum =this.myAchievementData.devTotalNum
}
},
/** 导出按钮操作 */
handleExportDetail() {
// 处理查询参数
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
params.beginStartTime=this.dateFilter[0];
params.endStartTime=this.dateFilter[1];
// this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// this.addBeginAndEndTime(params, this.dateRangeStartTime, 'startTime');
// this.addBeginAndEndTime(params, this.dateRangeEndTime, 'endTime');
// 执行导出
this.$modal.confirm(this.$t('是否确认导出所有部门业绩数据项?')).then(() => {
this.exportLoading = true;
return exportDetailExcel(params);
}).then(response => {
this.$download.excel(response, `${this.$t('业绩明细')}.xls`);
this.exportLoading = false;
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExportStatistics() {
// 处理查询参数
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
params.beginStartTime=this.dateFilter[0];
params.endStartTime=this.dateFilter[1];
// this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// this.addBeginAndEndTime(params, this.dateRangeStartTime, 'startTime');
// this.addBeginAndEndTime(params, this.dateRangeEndTime, 'endTime');
// 执行导出
this.$modal.confirm(this.$t('是否确认导出所有部门业绩统计?')).then(() => {
this.exportLoading = true;
return exportStatisticsExcel(params);
}).then(response => {
this.$download.excel(response, `${this.$t('业绩统计')}.xls`);
this.exportLoading = false;
}).catch(() => {
});
}
}
};
</script>
<style scoped >
.total_num{
display:flex;
align-items: center;
justify-content: center;
margin:20px 0;
font-size:15px;
}
.total_num span{
margin: 0 8px;
}
</style>
......@@ -122,13 +122,13 @@
<el-dropdown>
<el-button icon="el-icon-plus" circle type="primary"></el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="$router.push('detail?offerId=' + scope.row.offerId)" >{{$t('详情')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('detail?offerId=' + scope.row.offerId)" v-hasPermi="['ecw:offer:show']">{{$t('详情')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('edit?id=' + scope.row.offerId)" v-if="[1,2,3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('编辑')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('logList?offerId=' + scope.row.offerId)" v-if="[1,3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('跟进')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`result?offerId=${scope.row.offerId}&number=${scope.row.number}`)" v-if="[3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('结果')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/special?offerId=' + scope.row.offerId)" v-if="[1,3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('特价')}}</el-dropdown-item>
<el-dropdown-item @click.native="cancel(scope.row.offerId)" v-if="[1,3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('取消')}}</el-dropdown-item>
<el-dropdown-item @click.native="recovery(scope.row.offerId)" v-if="[0].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('恢复')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('logList?offerId=' + scope.row.offerId)" v-if="[1,3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:loglist']">{{$t('跟进')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`result?offerId=${scope.row.offerId}&number=${scope.row.number}`)" v-if="[3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:result']">{{$t('结果')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/special?offerId=' + scope.row.offerId)" v-if="[1,3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:discount','ecw:offer:commission',]">{{$t('特价')}}</el-dropdown-item>
<el-dropdown-item @click.native="cancel(scope.row.offerId)" v-if="[1,3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:cancel']">{{$t('取消')}}</el-dropdown-item>
<el-dropdown-item @click.native="recovery(scope.row.offerId)" v-if="[0].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:recovery']">{{$t('恢复')}}</el-dropdown-item>
<el-dropdown-item @click.native="deleteOffer(scope.row.offerId)" v-if="[0,1,2,3,4,5,6,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:delete']">{{$t('删除')}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
......
......@@ -89,8 +89,8 @@
<el-table-column
:label="$t('操作')">
<template v-slot="{row}">
<el-button v-if="row.seaFreight > 0" size="mini" type="text" @click="showOfferProdId=row.offerProdId">{{$t('优惠申请')}}</el-button>
<el-button v-if="row.seaFreight > 0" size="mini" type="text" @click="showCommissionProd=row">{{$t('佣金规则')}}</el-button>
<el-button v-hasPermi="['ecw:offer:discount']" v-if="row.seaFreight > 0" size="mini" type="text" @click="showOfferProdId=row.offerProdId">{{$t('优惠申请')}}</el-button>
<el-button v-hasPermi="['ecw:offer:commission']" v-if="row.seaFreight > 0" size="mini" type="text" @click="showCommissionProd=row">{{$t('佣金规则')}}</el-button>
</template>
</el-table-column>
......
......@@ -233,12 +233,17 @@
'ecw:order:special',
'ecw:order:associate',
'ecw:order:mutex',
'ecw:order:special_price',
'ecw:order:release',
'ecw:order:merge',
'ecw:order:split',
'ecw:order:merge_log',
'ecw:order:split_log'
'ecw:order:split_log',
// 下面几个是特价里的
'ecw:order:discount',
'ecw:order:reduce',
'ecw:order:commission',
'ecw:order:heavy',
'ecw:order:bulky'
]" >
<el-button type="text">{{$t('操作')}}</el-button>
<el-dropdown-menu slot="dropdown">
......@@ -286,7 +291,14 @@
// exclude(scope.row.abnormalState, [1 ,99 ,2 ,3 ,4 ,9 ,10 ,11 ,12 ,14]) &&
exclude(scope.row.inWarehouseState, [204,205,206])
">
<el-dropdown-item @click.native="$router.push('/order/special/' + scope.row.orderId)" v-hasPermi="['ecw:order:special_price']" >{{$t('特价')}}</el-dropdown-item>
<!-- 特价里有多个操作,只要有其一权限就显示此菜单 -->
<el-dropdown-item @click.native="$router.push('/order/special/' + scope.row.orderId)" v-hasPermi="[
'ecw:order:discount',
'ecw:order:reduce',
'ecw:order:commission',
'ecw:order:heavy',
'ecw:order:bulky'
]" >{{$t('特价')}}</el-dropdown-item>
</template>
<!-- 确认提货 -->
......
......@@ -92,8 +92,8 @@
prop="address"
:label="$t('操作')">
<template v-slot="{row}">
<el-button v-if="row.originalSeaFreight" size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="showDiscountItem=row">{{$t('优惠申请')}}</el-button>
<el-button v-if="row.originalSeaFreight" size="mini" type="text" v-hasPermi="['ecw:order:update']" @click="showCommissionItem=row">{{$t('佣金规则')}}</el-button>
<el-button v-if="row.originalSeaFreight" size="mini" type="text" v-hasPermi="['ecw:order:reduce']" @click="showDiscountItem=row">{{$t('优惠申请')}}</el-button>
<el-button v-if="row.originalSeaFreight" size="mini" type="text" v-hasPermi="['ecw:order:commission']" @click="showCommissionItem=row">{{$t('佣金规则')}}</el-button>
<el-button v-if="row.originalSeaFreight" size="mini" type="text" v-hasPermi="['ecw:order:discount']" @click="showAllowanceItem=row">{{$t('管理折扣')}}</el-button>
</template>
</el-table-column>
......@@ -105,8 +105,8 @@
1.海运整柜、海运拼柜显示重货优惠 1,2
2.空运专线、海空联运显示泡货优惠 3,4
-->
<el-button type="primary" @click="showPreferentialType=4" v-if="order.transportId === 1 || order.transportId === 2">{{$t('申请重货优惠')}}</el-button>
<el-button type="primary" @click="showPreferentialType=5" v-else>{{$t('申请泡货优惠')}}</el-button>
<el-button v-hasPermi="['ecw:order:heavy']" type="primary" @click="showPreferentialType=4" v-if="order.transportId === 1 || order.transportId === 2">{{$t('申请重货优惠')}}</el-button>
<el-button v-hasPermi="['ecw:order:bulky']" type="primary" @click="showPreferentialType=5" v-else>{{$t('申请泡货优惠')}}</el-button>
<el-button type="primary" @click="$tab.closePage()">{{$t('关闭窗口')}}</el-button>
</div>
</el-card>
......
......@@ -206,7 +206,20 @@
<el-radio v-model.number="form.needBook" :label="1">{{$t('是')}}</el-radio>
<el-radio v-model.number="form.needBook" :label="0">{{$t('否')}}</el-radio>
</el-form-item>
<!-- <el-form-item :label="$t('可参与优惠活动')" prop="you">
<el-form-item v-if="this.form.id == null " :label="$t('可参与优惠')">
<!-- <el-select multiple v-model="form.couponlds" size="5" style="min-width: 300px; border:1px solid #DCDFE6; border-radius:4px">-->
<!-- <el-option v-for="item in preferentialList" :value="item.couponId" :label="item.titleZh" :key="item.couponId" :disabled="item.mandatory">{{item.titleZh}}</el-option>-->
<!-- </el-select>-->
<div style="width: 300px;height: 400px;border: 1px solid;overflow-y: auto">
<div @click="selectMoveAbout(item)" style="display: flex;justify-content: space-between; align-items: center;" :style="{'cursor':item.mandatory ? 'no-drop' : 'pointer' }" v-for="item in preferentialList">
<div>
{{$l(item, 'title')}}
</div>
<i v-if="form.couponIds.includes(item.couponId)" style="margin-right: 20px;" class="el-icon-check"></i>
</div>
</div>
</el-form-item>
<!-- <el-form-item :label="$t('可参与优惠活动')" prop="you">
<el-select v-model="form.you" :placeholder="$t('可参与优惠活动')" clearable>
<el-option v-for="packageItem in packagingList" :key="packageItem.value" :label="packageItem.label" :value="packageItem.value" />
</el-select>
......@@ -227,7 +240,15 @@
</template>
<script>
import { createProduct, updateProduct, deleteProduct, getProduct, getProductPage, exportProductExcel } from "@/api/ecw/product";
import {
createProduct,
updateProduct,
deleteProduct,
getProduct,
getProductPage,
exportProductExcel,
product_coupon_newProd
} from "@/api/ecw/product";
import { getProductAttrList } from "@/api/ecw/productAttr";
import { getProductTypeList } from "@/api/ecw/productType";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
......@@ -305,7 +326,8 @@ export default {
auditStatusDictDatas: getDictDatas(DICT_TYPE.AUDIT_STATUS),
materialList: getDictDatas(DICT_TYPE.ECW_PRODUCT_MATERIAL),
packagingList: getDictDatas(DICT_TYPE.ECW_PACKAGING_TYPE),
locationList: getDictDatas(DICT_TYPE.ECW_CONTAINER_LOCATION)
locationList: getDictDatas(DICT_TYPE.ECW_CONTAINER_LOCATION),
preferentialList:[],
};
},
......@@ -360,6 +382,10 @@ export default {
this.getAttrList();
this.getTypeList();
this.getList();
product_coupon_newProd().then(r => {
this.preferentialList = r.data
this.reset()
})
},
methods: {
/** 获取产品属性列表 */
......@@ -433,8 +459,11 @@ export default {
auditStatus: undefined,
status: undefined,
requirements: 0,
needBook: 0
needBook: 0,
couponIds:[],
};
let c = this.preferentialList.filter(i => i.isDefault).map(i => i.couponId)
this.form.couponIds = c
this.resetForm("form");
},
/** 搜索按钮操作 */
......@@ -485,7 +514,6 @@ export default {
}
//商品特性转字符串
this.form.attrId = this.form.attrArray.join(',');
// 修改的提交
if (this.form.id != null) {
updateProduct(this.form).then(response => {
......@@ -576,7 +604,21 @@ export default {
ids: this.ids
}
});
},
selectMoveAbout(val){
if(!val.mandatory){
let index = this.form.couponIds.findIndex(i => val.couponId == i)
if(index >= 0){
this.form.couponIds.splice(index,1)
}else {
this.form.couponIds.push(val.couponId)
}
}
}
}
};
</script>
<style lang="scss" scoped>
</style>
......@@ -163,9 +163,9 @@
v-hasPermi="['ecw:product-price:update']">{{$t('修改')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="updateStatus(scope.row, 'blacklist')"
v-hasPermi="['ecw:product-price:update']">{{ scope.row.blacklist == 0 ? $t('加入黑名单') : $t('移除黑名单') }}</el-button>
v-hasPermi="['ecw:product-price:black']">{{ scope.row.blacklist == 0 ? $t('加入黑名单') : $t('移除黑名单') }}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="updateStatus(scope.row, 'auditStatus')"
v-hasPermi="['ecw:product-price:update']">{{scope.row.auditStatus == AuditStatusEnum.PASS ? $t('下架') : $t('上架')}}</el-button>
v-hasPermi="['ecw:product-price:down']">{{scope.row.auditStatus == AuditStatusEnum.PASS ? $t('下架') : $t('上架')}}</el-button>
<!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['ecw:product-price:delete']">{{$t('删除')}}</el-button> -->
</template>
......
......@@ -73,15 +73,14 @@
</el-col>
<el-col :span="1.5">
<!--未指定商品-->
<el-button v-if="!$route.query.product_id" type="primary" plain icon="el-icon-setting" size="mini" @click="handleBatchEdit">{{$t('批量设置价格')}}</el-button>
<el-button v-if="!$route.query.product_id" type="primary" plain icon="el-icon-setting" size="mini" @click="batchBlock" :disabled="multiple">{{$t('批量加入黑名单')}}</el-button>
<el-button v-if="!$route.query.product_id" type="primary" plain icon="el-icon-setting" size="mini" @click="batchOff" :disabled="multiple">{{$t('批量下架')}}</el-button>
<el-button v-if="!$route.query.product_id" type="primary" v-hasPermi="['ecw:product-price:batch_update']" size="mini" @click="handleBatchEdit">{{$t('批量设置价格')}}</el-button>
<el-button v-if="!$route.query.product_id" type="primary" v-hasPermi="['ecw:product-price:bartch_black']" size="mini" @click="batchBlock" :disabled="multiple">{{$t('批量加入黑名单')}}</el-button>
<el-button v-if="!$route.query.product_id" type="primary" v-hasPermi="['ecw:product-price:batch_down']" size="mini" @click="batchOff" :disabled="multiple">{{$t('批量下架')}}</el-button>
<el-button v-if="!$route.query.product_id" type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" >{{$t('导出')}}</el-button>
</el-col>
<el-button v-if="!$route.query.product_id" type="warning" v-hasPermi="['ecw:product-price:export']" @click="handleExport" :loading="exportLoading" >{{$t('导出')}}</el-button>
<!--指定商品-->
<el-button v-if="$route.query.product_id" type="primary" plain icon="el-icon-setting" size="mini" @click="batchSetSingleProductPrice">{{$t('批量设置单个商品的路线')}}</el-button>
<el-button v-if="$route.query.product_id" type="primary" v-hasPermi="['ecw:product-price:single_product']" @click="batchSetSingleProductPrice">{{$t('批量设置单个商品的路线')}}</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
......@@ -215,14 +214,14 @@
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width" width="140">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row, true)"
v-hasPermi="['ecw:product-price:update']">{{$t('查看')}}</el-button>
v-hasPermi="['ecw:product-price:show']">{{$t('查看')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:product-price:update']">{{$t('编辑')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="updateStatus(scope.row, 'blacklist')"
>{{ scope.row.blacklist == 0 ? $t('加入黑名单') : $t('移除黑名单') }}</el-button>
v-hasPermi="['ecw:product-price:black']">{{ scope.row.blacklist == 0 ? $t('加入黑名单') : $t('移除黑名单') }}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="updateStatus(scope.row, 'auditStatus')"
>{{scope.row.auditStatus == AuditStatusEnum.PASS ? $t('下架') : $t('上架')}}</el-button>
v-hasPermi="['ecw:product-price:down']">{{scope.row.auditStatus == AuditStatusEnum.PASS ? $t('下架') : $t('上架')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['ecw:product-price:delete']">{{$t('删除')}}</el-button>
</template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment