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>
......
This diff is collapsed.
......@@ -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