Commit ee8648e6 authored by dragondean@qq.com's avatar dragondean@qq.com

Merge remote-tracking branch 'origin/dev' into dev

parents 60fc51b2 f79cee34
import request from "@/utils/request";
//操作积分
import request from '@/utils/request'
// 操作积分
export function operateMemberScore(data) {
return request({
url: "/member/user-score/operate",
method: "post",
data: data,
});
url: '/member/user-score/operate',
method: 'post',
data: data
})
}
//积分记录分页
// 积分记录分页
export function queryMemberScoreRecord(data) {
return request({
url: "/member/user-score-log/page",
method: "post",
data: data,
});
url: '/member/user-score-log/page',
method: 'post',
data: data
})
}
//兑换记录分页
// 兑换记录分页
export function queryMemberExchangeRecord(data) {
return request({
url: "/reward/redeem/record/page",
method: "post",
data: data,
});
url: '/reward/redeem/record/page',
method: 'post',
data: data
})
}
//批量核销按钮
// 批量核销按钮
export function batchVerifyAPI(data) {
return request({
url: "/reward/redeem/record/batch/verify",
method: "post",
data: data,
});
url: '/reward/redeem/record/batch/verify',
method: 'post',
data: data
})
}
//兑换记录导出
// 兑换记录导出
export function batchRecordExport(data) {
return request({
url: "/reward/redeem/record/export",
method: "post",
data: data,
});
url: '/reward/redeem/record/export',
method: 'post',
data: data
})
}
//兑换记录导入
// 兑换记录导入
export function batchRecordImport(data) {
return request({
url: "/reward/redeem/record/import",
method: "post",
data: data,
});
url: '/reward/redeem/record/import',
method: 'post',
data: data
})
}
//兑换记录导入模板下载
// 兑换记录导入模板下载
export function batchRecordImportTemplate() {
return request({
url: "/reward/redeem/record/import/template",
method: "post",
responseType: "blob",
});
url: '/reward/redeem/record/import/template',
method: 'post',
responseType: 'blob'
})
}
//撤销 操作
// 撤销 操作
export function rewardCancelQuery(data) {
return request({
url: "/reward/redeem/record/cancel",
method: "post",
data: data,
});
url: '/reward/redeem/record/cancel',
method: 'post',
data: data
})
}
//获取记录详情
// 获取记录详情
export function getRewardDetailQuery(data) {
return request({
url: "/reward/redeem/record/detail",
method: "post",
data: data,
});
url: '/reward/redeem/record/detail',
method: 'post',
data: data
})
}
//更新兑换记录
// 更新兑换记录
export function updatedRewardsDetails(data) {
return request({
url: "/reward/redeem/record/update",
method: "post",
data: data,
});
url: '/reward/redeem/record/update',
method: 'post',
data: data
})
}
//核销回退
// 核销回退
export function verifyRollback(data) {
return request({
url: "/reward/redeem/record/verify-back",
method: "post",
data: data,
});
url: '/reward/redeem/record/verify-back',
method: 'post',
data: data
})
}
//核销 操作
// 核销 操作
export function verifyRedeem(data) {
return request({
url: "/reward/redeem/record/verify",
method: "post",
data: data,
});
url: '/reward/redeem/record/verify',
method: 'post',
data: data
})
}
//获取积分规则记录
// 获取积分规则记录
export function getScoreRecordList(data) {
return request({
url: "/member/score-rule/page",
method: "post",
url: '/member/score-rule/page',
method: 'post',
params: {
page: data.page,
rows: data.rows,
rows: data.rows
},
data,
});
data
})
}
//会员积分等级列表
// 会员积分等级列表
export function getMemberLevelList(data) {
return request({
url: "/member/user-level/page",
method: "post",
data,
});
url: '/member/user-level/page',
method: 'post',
data
})
}
//新增会员等级设置
// 新增会员等级设置
export function addNewMemberLevel(data) {
return request({
url: "/member/user-level/add",
method: "post",
data,
});
url: '/member/user-level/add',
method: 'post',
data
})
}
//删除会员等级
// 删除会员等级
export function delMemberLevel(data) {
return request({
url: "/member/user-level/delete",
method: "post",
data,
});
url: '/member/user-level/delete',
method: 'post',
data
})
}
//edit member level
// edit member level
export function editMemberLevel(data) {
return request({
url: "/member/user-level/update",
method: "post",
data,
});
url: '/member/user-level/update',
method: 'post',
data
})
}
//获得目的国、目的城市、目的仓列表
// 获得目的国、目的城市、目的仓列表
export function getRegionTreeList() {
return request({
url: "/member/score-rule/warehouse-tree-region-list",
method: "get",
});
url: '/member/score-rule/warehouse-tree-region-list',
method: 'get'
})
}
//获取渠道列表
// 获取渠道列表
export function getChannelList() {
return request({
url: "/ecw/channel/list-all-simple",
method: "get",
});
url: '/ecw/channel/list-all-simple',
method: 'get'
})
}
//积分规则创建
// 积分规则创建
export function createIntegralRule(data) {
return request({
url: "/member/score-rule/create",
method: "post",
data,
});
url: '/member/score-rule/create',
method: 'post',
data
})
}
//启用关闭 积分规则
// 启用关闭 积分规则
export function integralRuleStatus(data) {
return request({
url: "/member/score-rule/status",
method: "post",
data,
});
url: '/member/score-rule/status',
method: 'post',
data
})
}
//复制积分规则
// 复制积分规则
export function integralRuleCopy(data) {
return request({
url: "/member/score-rule/copy",
method: "post",
data,
});
url: '/member/score-rule/copy',
method: 'post',
data
})
}
//延期积分规则
// 延期积分规则
export function integralRuleDelay(data) {
return request({
url: "/member/score-rule/delay",
method: "post",
data,
});
url: '/member/score-rule/delay',
method: 'post',
data
})
}
//删除积分规则
// 删除积分规则
export function integralRuleDelete(data) {
return request({
url: "/member/score-rule/delete",
method: "post",
data,
});
url: '/member/score-rule/delete',
method: 'post',
data
})
}
//获取积分规则详情
// 获取积分规则详情
export function integralRuleDetails(data) {
return request({
url: "/member/score-rule/get",
method: "post",
data,
});
url: '/member/score-rule/get',
method: 'post',
data
})
}
//编辑积分规则
// 编辑积分规则
export function integralRuleUpdated(data) {
return request({
url: "/member/score-rule/update",
method: "post",
data,
});
url: '/member/score-rule/update',
method: 'post',
data
})
}
// 获取会员功能开关
export function switchRuleGet() {
return request({
url: '/member/score-rule/switch/get',
method: 'get'
})
}
// 设置会员工能开关
export function switchRuleSet(data) {
return request({
url: '/member/score-rule/switch/set',
method: 'post',
data
})
}
......@@ -9,7 +9,7 @@
<el-select v-model="queryParams.attrId" :placeholder="$t('选择属性')" style="width:120px" clearable @change="getList" :disabled="loading">
<el-option v-for="item in attrList" :key="item.id" :label="item.attrName" :value="item.id" />
</el-select>
<el-input v-model="queryParams.titleZh" :placeholder="$t('产品关键字')" style="width:120px" clearable :disabled="loading"/>
<el-input v-model="queryParams.titleZh" :placeholder="$t('产品关键字')" style="width:120px" clearable onkeyup="this.value=this.value.replace(/\s+/g, '')" :disabled="loading"/>
<el-button type="primary" @click="reLoad" :loading="loading">{{$t('搜索')}}</el-button>
<div style="height: 36px; display: flex; align-items: center">
......@@ -34,7 +34,7 @@
<el-select v-model="selectedFilterParams.attrId" :placeholder="$t('选择属性')" style="width:120px" clearable :disabled="loading">
<el-option v-for="item in attrList" :key="item.id" :label="item.attrName" :value="item.id" />
</el-select>
<el-input v-model="selectedFilterParams.titleZh" :placeholder="$t('产品关键字')" style="width:120px" clearable :disabled="loading"/>
<el-input v-model="selectedFilterParams.titleZh" :placeholder="$t('产品关键字')" style="width:120px" clearable onkeyup="this.value=this.value.replace(/\s+/g, '')" :disabled="loading"/>
<!--<el-button type="primary" @click="reLoad" :loading="loading">{{$t('搜索')}}</el-button>-->
<div class="flex">
......
......@@ -10,14 +10,28 @@
<el-option v-for="item in exportCityList" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select>
{{$t('目的地')}}:
{{$t('目的国')}}:
<el-select :placeholder="$t('请选择目的国')" v-model="destCountryId" clearable>
<el-option v-for="item in countryList" :key="item.id" :label="$l(item, 'title')" :value="item.id" />
</el-select>
{{$t('目的城市')}}:
<!--
<el-select :placeholder="$t('请选择目的地')" v-model="importCity" clearable>
<el-option v-for="item in importCityList" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select>
-->
<el-select :placeholder="$t('请选择目的城市')" v-model="destCityId" clearable>
<el-option v-for="item in AddressCity" :key="item.shi" :label="item.shiName" :value="item.shi" />
</el-select>
{{$t('目的仓')}}:
<el-select :placeholder="$t('请选择目的仓')" v-model="destWarehouseId" clearable>
<el-option v-for="item in AddressTown" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select>
<template v-if="type != 'sea'">
{{$t('出货渠道')}}:
<el-select :placeholder="$t('请选择渠道')" v-model="channelId" clearable>
<el-select :placeholder="$t('请选择出货渠道')" v-model="channelId" clearable>
<el-option v-for="item in channelList" :key="item.channelId" :label="item.nameZh" :value="item.channelId" />
</el-select>
</template>
......@@ -82,7 +96,8 @@
</template>
<script>
import {getChannelList} from '@/api/ecw/channel'
import {getTradeCityList} from '@/api/ecw/region'
import {getListTree, getTradeCityList} from '@/api/ecw/region'
import {getRegionList} from "@/api/ecw/order";
import {openedRouterList} from '@/api/ecw/warehouse'
import {getProductAttrList} from "@/api/ecw/productAttr";
import Template from "@/views/cms/template";
......@@ -115,8 +130,14 @@ export default {
checkAll: null,
groupChecker: {}, // 分组全选状态
attrList:[], // 商品特性
inited: false
inited: false,
countryList: [], //目的国
AddressCity: [], //目的地
AddressTown: [], //目的仓
destCountryId: null,
destCityId: null,
destWarehouseId: null,
}
},
computed:{
......@@ -124,6 +145,7 @@ export default {
return this.tradeCityList.filter(item => item.type == 1 || item.type == 3)
},
exportCityList(){
//字典:贸易类型字典region_trade_type,0非进出口,1进口,2出口,3进出口
return this.tradeCityList.filter(item => item.type == 2 || item.type == 3)
},
exportCityIds(){
......@@ -185,6 +207,7 @@ export default {
transportTypeList.push(child)
}
})
console.log(transportTypeList)
return transportTypeList
},
// 是否显示商品特性(渠道)
......@@ -211,10 +234,10 @@ export default {
exportCity(){
this.getOpenedRouterList()
},
importCity(){
/*importCity(){
this.getChannelList()
this.getOpenedRouterList()
},
},*/
selectedRoutes(val){
this.$emit('input', val)
// 如果选择发生变化
......@@ -244,53 +267,150 @@ export default {
this.changeOption()
}
},
// 显示的路线发生变化之后,清空已勾选的路线
filteredRouterList(){
if(this.inited){
this.selectedRoutes = []
Object.keys(this.groupChecker).forEach(key => {
this.groupChecker[key] = false
})
}
}
// 显示的路线发生变化之后,清空已勾选的路线
filteredRouterList(){
if(this.inited){
this.selectedRoutes = []
Object.keys(this.groupChecker).forEach(key => {
this.groupChecker[key] = false
})
}
},
destCountryId: {
//监听当前地区值的变化,于与上方地区值进行了双向绑定
deep: true, //深度监听
handler() {
//每当值省份值改变时其下地区值进行清空
this.AddressCity = [];
this.AddressTown = [];
this.destWarehouseId = "";
this.destCityId = "";
this.findByprovinceCode();
if (this.destCountryId == "") {
//1 是所有区域,2 国家,3是市,
this.getAddressCity()
this.getAddressTown()
} else if (
this.destCountryId != "" &&
this.destCityId == "" &&
this.destWarehouseId == ""
) {
this.getAddressTown()
}
this.getOpenedRouterList()
},
},
destCityId: {
deep: true, //深度监听 目的仓
handler() {
this.AddressTown = [];
this.destWarehouseId = "";
this.findBycityCode();
if (
this.destCityId != "" &&
this.destCountryId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域
} else if (
this.destCountryId == "" &&
this.destCityId == "" &&
this.destWarehouseId == ""
) {
this.getAddressTown()
} else if (
this.destCountryId != "" &&
this.destCityId == "" &&
this.destWarehouseId == ""
) {
this.findByprovinceCode()
this.getAddressTown()
} else if (
this.destCountryId == "" &&
this.destCityId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域
}
this.getOpenedRouterList()
this.getChannelList()
},
},
destWarehouseId: {
deep: true, //深度监听
handler() {
if (
this.destCountryId != "" &&
this.destCityId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域
this.findBycityCode()
} else if (
this.destCountryId != "" &&
this.destCityId == "" &&
this.destWarehouseId == ""
) {
this.getAddressTown()
} else if (
this.destCountryId == "" &&
this.destCityId != "" &&
this.destWarehouseId == ""
) {
this.findBycityCode()
}
this.getOpenedRouterList()
},
},
},
async created(){
this.getChannelList()
this.tradeCityList = (await getTradeCityList()).data
// 路线需要过滤失效的进出口城市,所以在程序加载后再加载路线
await this.getOpenedRouterList()
if(this.option){
this.changeOption()
}
await this.$nextTick()
if(this.value && this.value.length){
this.selectedRoutes = this.value
}
this.tradeCityList = (await getTradeCityList()).data
// 路线需要过滤失效的进出口城市,所以在程序加载后再加载路线
await this.getOpenedRouterList()
if(this.option){
this.changeOption()
}
await this.$nextTick()
this.getCountryList()
this.getAddressCity()
this.getAddressTown()
this.getChannelList()
if(this.value && this.value.length){
this.selectedRoutes = this.value
}
// 如果显示特性,则需要查询特数据备用
if(this.showAttr){
this.getAttrList()
}
// 如果显示特性,则需要查询特数据备用
if(this.showAttr){
this.getAttrList()
}
await this.$nextTick()
this.inited = true
await this.$nextTick()
this.inited = true
},
methods:{
async getChannelList(){
let query = {
cityId: this.importCity
}
this.channelList = (await getChannelList(query)).data
},
getAttrList(){
getProductAttrList().then(res => {
this.attrList = res.data
})
},
getChannelList(){
if (this.type == 'sea') return
let query = {
// cityId: this.importCity
cityId: this.destCityId
}
getChannelList(query).then(res => {
this.channelList = res.data
})
},
getAttrList(){
getProductAttrList().then(res => {
this.attrList = res.data
})
},
changeOption(){
if(!this.option) return
this.importCity = +this.option.importCity || null
this.destCountryId = +this.option.destCountryId || null
this.destCityId = +this.option.destCityId || null
this.destWarehouseId = +this.option.destWarehouseId || null
// this.importCity = +this.option.importCity || null
this.exportCity = +this.option.exportCity || null
this.transportType = this.option.transportId || null
this.channelId = +this.option.channelId || null
......@@ -308,8 +428,14 @@ export default {
if(this.exportCity){
params.startCityId = this.exportCity
}
if(this.importCity){
params.destCityId = this.importCity
if(this.destCountryId){
params.destCountryId = this.destCountryId
}
if(this.destCityId){
params.destCityId = this.destCityId
}
if(this.destWarehouseId){
params.destWarehouseId = this.destWarehouseId
}
const res = await openedRouterList(params)
this.openedRouterList = res.data.filter(item => {
......@@ -368,6 +494,39 @@ export default {
if(!this.type) return true
return (this.type == 'sea' ? ['1','2'] : ['3', '4']).indexOf(item.value) > -1
},
/* 国家 */
getCountryList() {
getListTree({ treeType: 1 }).then((response) => {
this.countryList = response.data;
})
},
getAddressCity() {
getRegionList(4, 4).then(({ data }) => {
this.AddressCity = data;
})
},
getAddressTown() {
getRegionList(5, 5).then(({ data }) => {
this.AddressTown = data;
})
},
findByprovinceCode() {
if (this.destCountryId != null && this.destCountryId != '') {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList(2, this.destCountryId).then(({ data }) => {
this.AddressCity = data;
})
}
},
findBycityCode() {
if (this.destCityId != null && this.destCityId != '') {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityId).then(({ data }) => {
this.AddressTown = data;
})
}
},
}
}
</script>
......
......@@ -4689,6 +4689,7 @@
"发货评估": "Delivery evaluation",
"财务资料": "Finance Information",
"特殊设置": "Special setting",
"已卸柜/已到仓时间": "Unloaded/arrived Time"
"已卸柜/已到仓时间": "Unloaded/arrived Time",
"开启会员积分系统":"Enable member points system",
"是否确认{val}会员积分系统":"Confirm whether to {val} the member points system"
}
......@@ -19,7 +19,7 @@ const service = axios.create({
(localStorage.VUE_APP_BASE_API || process.env.VUE_APP_BASE_API) +
"/admin-api/", // 此处的 /admin-api/ 地址,原因是后端的基础路径为 /admin-api/
// 超时
timeout: 1000 * 30,
timeout: 1000 * 60,
});
// 如果是生产环境则打印提示
......
......@@ -88,24 +88,31 @@
range-separator="-"
:start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item>
<el-form-item :label="$t('目的国')">
<el-form-item :label="$t('目的国')" prop="destCountryId">
<el-select
v-model="destCountryId"
:label="destCountryId"
multiple
:placeholder="$t('请选择目的国')"
clearable
@change="handleQuery"
>
<el-option
v-for="item in countryList"
:key="item.id"
:label="$l(item, 'title')"
:value="item.id"
>
</el-option>
v-for="item in AddressProvince"
:key="item.guojia"
:label="item.guojiaName"
:value="item.guojia"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的地')">
<el-select v-model="destCityId" clearable @change="handleQuery">
<el-form-item :label="$t('目的城市')" prop="objectiveId">
<el-select
v-model="objectiveId"
multiple
:placeholder="$t('请根据目的国选择目的城市')"
style="width: 200px"
clearable
@change="handleQuery"
>
<el-option
v-for="item in AddressCity"
:key="item.shi"
......@@ -114,8 +121,15 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')">
<el-select v-model="destWarehouseId" clearable @change="handleQuery">
<el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select
v-model="destWarehouseId"
multiple
:placeholder="$t('请根据目的城市选择目的仓')"
style="width: 200px"
clearable
@change="handleQuery"
>
<el-option
v-for="item in AddressTown"
:key="item.id"
......@@ -132,6 +146,15 @@
</el-form-item>
</el-form>
</div>
<el-descriptions :column="2">
<el-descriptions-item :label="$t('海空联运/海运拼柜/海运整柜/专线空运')">{{orderStatisticsObj.hklyTotal || 0}}/{{orderStatisticsObj.hypgTotal || 0 }}/{{orderStatisticsObj.hyzgTotal || 0}}/{{orderStatisticsObj.zxkyTotal || 0}}</el-descriptions-item>
<el-descriptions-item :label="$t('最后交易日期')">{{orderStatisticsObj.lastBusinessDate}}</el-descriptions-item>
<el-descriptions-item :label="$t('全部订单/控货订单')">{{orderStatisticsObj.allOrderTotal || 0}}/{{orderStatisticsObj.controlOrderTotal || 0}}</el-descriptions-item>
<el-descriptions-item :label="$t('最后交易单号')">{{orderStatisticsObj.lastBusinessOrderNo}}</el-descriptions-item>
<el-descriptions-item :label="$t('报价/下单/入仓')">{{orderStatisticsObj.offerOrderTotal || 0}}/{{orderStatisticsObj.pickOrderTotal || 0}}/{{orderStatisticsObj.wareHousingTotal || 0}}</el-descriptions-item>
<el-descriptions-item :label="$t('储存量')">{{orderStatisticsObj.stock || 0}}</el-descriptions-item>
<el-descriptions-item :label="$t('已出货订单')">{{orderStatisticsObj.shipmentTotal || 0}}</el-descriptions-item>
</el-descriptions>
<el-table :data="orderList">
<el-table-column :label="$t('订单编号')" width="120px" align="center" prop="orderNo" >
<template slot-scope="scope">
......@@ -202,7 +225,7 @@
</el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerName" />
<el-table-column :label="$t('业绩归属客户方')" align="center" prop="customerName" />
</el-table>
</el-table>
<pagination @pagination="getorderList" :page.sync="queryParams.page" :limit.sync="queryParams.rows" :total="orderTotal" ></pagination>
</el-card>
</el-tab-pane>
......@@ -210,24 +233,31 @@
<el-card class="box-card">
<div slot="header" class="clearfix">
<el-form :inline="true" size="small">
<el-form-item :label="$t('目的国')">
<el-form-item :label="$t('目的国')" prop="destCountryId">
<el-select
v-model="destCountryId"
:label="destCountryId"
multiple
:placeholder="$t('请选择目的国')"
clearable
@change="handleQuery"
>
<el-option
v-for="item in countryList"
:key="item.id"
:label="$l(item, 'title')"
:value="item.id"
>
</el-option>
v-for="item in AddressProvince"
:key="item.guojia"
:label="item.guojiaName"
:value="item.guojia"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的地')">
<el-select v-model="destCityId" clearable @change="handleQuery">
<el-form-item :label="$t('目的城市')" prop="objectiveId">
<el-select
v-model="objectiveId"
multiple
:placeholder="$t('请根据目的国选择目的城市')"
style="width: 200px"
clearable
@change="handleQuery"
>
<el-option
v-for="item in AddressCity"
:key="item.shi"
......@@ -236,8 +266,15 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')">
<el-select v-model="destWarehouseId" clearable @change="handleQuery">
<el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select
v-model="destWarehouseId"
multiple
:placeholder="$t('请根据目的城市选择目的仓')"
style="width: 200px"
clearable
@change="handleQuery"
>
<el-option
v-for="item in AddressTown"
:key="item.id"
......@@ -249,7 +286,7 @@
<el-form-item>
<el-button type="primary" @click="getInfoListOfferPage">{{$t('搜索')}}</el-button>
<el-button type="primary" @click="()=>{
queryParams = { rows:10,page:1}; getInfoListOfferPage();rucangtime = [];
infoListOfferFrom = { pageNo:1,pageSize:10}; getInfoListOfferPage();rucangtime = [];
}">{{$t('重置')}}</el-button>
</el-form-item>
</el-form>
......@@ -349,6 +386,33 @@
:label="$t('创建时间')"
>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<!--
0 取消 恢复
1 特价审批 编辑、跟进、 取消 删除
2 草稿 编辑、 删除
3 需求确认 编辑、跟进、结果、特价、取消 删除
4 赢单 删除
5 输单 删除
6 完成 删除
7 跟进中 编辑、跟进、结果、特价、取消、 删除
-->
<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('/offer/detail?offerId=' + scope.row.offerId)" v-hasPermi="['ecw:offer:show']">{{$t('详情')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/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('/offer/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(`/offer/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>
</template>
</el-table-column>
</el-table>
<pagination @pagination="getInfoListOfferPage" :page.sync="infoListOfferFrom.pageNo" :limit.sync="infoListOfferFrom.pageSize" :total="infoListOfferTotal" ></pagination>
</el-card>
......@@ -713,6 +777,7 @@ import {checkPermi} from "@/utils/permission";
import ImageDisplay from "@/views/ecw/order/components/imageDisplay.vue";
import { getListTree } from "@/api/ecw/region";
import { getWarehouseList } from "@/api/ecw/warehouse";
import { deleteOffer, cancel, recovery } from "@/api/ecw/offer";
export default {
name: 'query',
components: {
......@@ -759,13 +824,10 @@ export default {
// this.creditLogPage()//等级日志
this.getorderList()//订单
// this.getInfoListOfferPage()//报价
// this.getOrderStatistics()//数据
this.getOrderStatistics()//数据
// this.creditScoreStatisticFn() //信用日志
// this.infoListReceiptFn()//账单
this.getData();
//获取城市列表
this.getCountryList();
this.getWarehouseList()
},
watch:{
......@@ -773,16 +835,16 @@ export default {
switch (val) {
case 'order':
this.destCountryId = ''
this.destCityId = ''
this.destWarehouseId = ''
this.queryParams = { rows:10, page:1}
this.objectiveId = ''
this.queryParams.page = 1
this.getorderList()//订单
break
case 'quote':
this.destCountryId = ''
this.destCityId = ''
this.destWarehouseId = ''
this.queryParams = { rows:10, page:1}
this.objectiveId = ''
this.infoListOfferFrom.pageNo = 1
this.getInfoListOfferPage()//报价
break
case 'bill':
......@@ -805,7 +867,6 @@ export default {
}
},
destCountryId: {
//监听当前地区值的变化,于与上方地区值进行了双向绑定
deep: true, //深度监听
......@@ -813,111 +874,48 @@ export default {
//每当值省份值改变时其下地区值进行清空
this.AddressCity = [];
this.AddressTown = [];
this.objectiveId = "";
this.destWarehouseId = "";
this.destCityId = "";
this.findByprovinceCode();
if (this.destCountryId == "") {
//1 是所有区域,2 国家,3是市,
getRegionList(4, 4)
.then(({ data }) => {
this.AddressCity = data;
})
.catch((error) => {
console.log(error);
});
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
this.getAddressCity()
this.getAddressTown()
} else if (
this.destCountryId != "" &&
this.destCityId == "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
/*getRegionList(2, this.destCountryId)
.then(({ data }) => {
this.AddressCity = data;
})
.catch((error) => {
console.log(error);
});*/
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
this.findByprovinceCode()
this.getAddressTown()
}
},
},
destCityId: {
deep: true, //深度监听 目的仓
objectiveId: {
deep: true, //深度监听
handler() {
this.AddressTown = [];
this.destWarehouseId = "";
this.findBycityCode();
if (
this.destCityId != "" &&
this.objectiveId != "" &&
this.destCountryId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域
/*getRegionList(3, this.destCityId)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});*/
this.findBycityCode()
} else if (
this.destCountryId == "" &&
this.destCityId == "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
this.getAddressCity()
this.getAddressTown()
} else if (
this.destCountryId != "" &&
this.destCityId == "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
getRegionList(2, this.destCountryId)
.then(({ data }) => {
this.AddressCity = data;
})
.catch((error) => {
console.log(error);
});
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
} else if (
this.destCountryId == "" &&
this.destCityId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityId)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
this.findByprovinceCode()
this.getAddressTown()
}
},
},
......@@ -925,42 +923,18 @@ export default {
deep: true, //深度监听
handler() {
if (
this.objectiveId != "" &&
this.destCountryId != "" &&
this.destCityId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityId)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
this.findBycityCode()
} else if (
this.destCountryId != "" &&
this.destCityId == "" &&
this.destWarehouseId == ""
) {
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
} else if (
this.destCountryId == "" &&
this.destCityId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
getRegionList(3, this.destCityId)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
this.getAddressTown()
}
},
},
......@@ -1070,14 +1044,12 @@ export default {
infoListReceiptTotal:0,
country: '',
showMore: true,
countryList: [], //目的国
AddressCity: [], //目的城市
AddressTown: [], //目的仓
AddressCity: [],
AddressProvince: [],
AddressTown: [],
destCountryId: null,
// objectiveId: null,
destCityId: null,
objectiveId: null,
destWarehouseId: null,
warehouseList: [],
}
},
computed: {
......@@ -1087,7 +1059,7 @@ export default {
customerId(){
return this.$route.params.customerId;
},
isChinese(){
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
pickupPoint(){
......@@ -1175,7 +1147,20 @@ export default {
},
//订单
getorderList(){
infoListOrderPage({customerDetailId:this.id,...this.queryParams}).then(r => {
let queryParams = {}
//目的国
if (this.destCountryId != null && this.destCountryId != "") {
queryParams.destCountryId = this.destCountryId;
}
//目的城市
if (this.objectiveId != null && this.objectiveId != "") {
queryParams.objectiveId = this.objectiveId;
}
//目的仓
if (this.destWarehouseId != null && this.destWarehouseId != "") {
queryParams.destWarehouseId = this.destWarehouseId;
}
infoListOrderPage({customerDetailId:this.id,...this.queryParams,...queryParams}).then(r => {
if(r.code === 0){
this.orderList = r.data.list
this.orderTotal = r.data.total
......@@ -1184,10 +1169,22 @@ export default {
},
// 客户报价
getInfoListOfferPage(){
infoListOfferPage({...this.infoListOfferFrom,customerId:this.id}).then(r => {
let queryParams = {}
//目的国
if (this.destCountryId != null && this.destCountryId != "") {
queryParams.destCountryId = this.destCountryId;
}
//目的城市
if (this.objectiveId != null && this.objectiveId != "") {
queryParams.objectiveId = this.objectiveId;
}
//目的仓
if (this.destWarehouseId != null && this.destWarehouseId != "") {
queryParams.destWarehouseId = this.destWarehouseId;
}
infoListOfferPage({...this.infoListOfferFrom,customerId:this.id,...queryParams}).then(r => {
this.infoListOfferList = r.data.list;
this.infoListOfferTotal = r.data.total;
}).catch(r => {
})
},
// 数据
......@@ -1238,68 +1235,47 @@ export default {
},
findByprovinceCode() {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList(2, this.destCountryId)
.then(({ data }) => {
if (this.destCountryId != null && this.destCountryId != "") {
getRegionList(2, this.destCountryId).then(({ data }) => {
this.AddressCity = data;
})
.catch((error) => {
console.log(error);
});
}
},
findBycityCode() {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityId)
.then(({ data }) => {
if (this.objectiveId != null && this.objectiveId != "") {
getRegionList(3, this.objectiveId).then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
}
},
getData() {
//加载时发起请求获取所有省份值
/*getRegionList(1, 1)
.then(({ data }) => {
this.AddressProvince = data;
})
.catch((error) => {
console.log(error);
});*/
//目的城市
getRegionList(4, 4)
.then(({ data }) => {
this.AddressCity = data;
})
.catch((error) => {
console.log(error);
});
//目的仓
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
this.getAddressProvince()
this.getAddressCity()
this.getAddressTown()
},
/* 国家 */
getCountryList() {
getListTree({ treeType: 1 }).then((response) => {
this.countryList = response.data;
});
getAddressProvince() {
getRegionList(1, 1).then(({ data }) => {
this.AddressProvince = data;
})
},
getAddressCity() {
getRegionList(4, 4).then(({ data }) => {
this.AddressCity = data;
})
},
getAddressTown() {
getRegionList(5, 5).then(({ data }) => {
this.AddressTown = data;
})
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
//目的国
this.queryParams.destCountryId = this.destCountryId;
//目的城市
this.queryParams.objectiveId = this.destCityId;
//目的仓
this.queryParams.destWarehouseId = this.destWarehouseId;
if (this.activeName == 'order') {
this.queryParams.page = 1
this.getorderList()
} else if (this.activeName == 'quote') {
this.infoListOfferFrom.pageNo = 1
this.getInfoListOfferPage()
}
},
......@@ -1319,6 +1295,23 @@ export default {
return warehouseName
},
},
cancel(id){
this.doAction(this.$t('确定要取消此报价单么?'), cancel, id);
},
recovery(id){
this.doAction(this.$t('确定要恢复此报价单么?'), recovery, id);
},
deleteOffer(id){
this.doAction(this.$t('确定要删除此报价单么?'), deleteOffer, id);
},
doAction(tips, action, id){
this.$confirm(tips).then(res => {
return action(id)
})
.then(() => {
this.$message.success('操作成功')
this.handleQuery()
})
}
}
</script>
<template>
<div class="app-container">
<el-form
:model="queryParams"
v-show="showSearch"
ref="queryForm"
:model="queryParams"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item :label="$t('礼品名称')">
......@@ -13,40 +13,38 @@
v-model.trim="queryParams.title"
:placeholder="$t('请输入礼品名称')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('兑换积分')">
<el-row :gutter="10">
<el-col :span="8">
<dict-selector
v-model="queryParams.pointsRequireSymbol"
clearable
:type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
v-model="queryParams.pointsRequireSymbol"
@change="handleQuery"
>
</dict-selector>
/>
</el-col>
<el-col :span="16">
<el-input
v-model.trim="queryParams.pointsRequire"
:placeholder="$t('请输入数字')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-col>
</el-row>
</el-form-item>
<el-form-item :label="$t('领取方式')" prop="level">
<dict-selector
v-model="queryParams.pickMethod"
clearable
:type="DICT_TYPE.WAY_OF_RECEIVING"
v-model="queryParams.pickMethod"
@change="handleQuery"
>
</dict-selector>
/>
</el-form-item>
<el-form-item :label="$t('兑换网点')" prop="level">
......@@ -68,50 +66,48 @@
<el-form-item :label="$t('状态')" prop="level">
<dict-selector
v-model="queryParams.status"
clearable
:type="DICT_TYPE.GIFT_STATUS"
v-model="queryParams.status"
@change="handleQuery"
>
</dict-selector>
/>
</el-form-item>
<el-form-item :label="$t('备注')" prop="level">
<el-input
v-model.trim="queryParams.remark"
:placeholder="$t('请输入备注')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('剩余数量')">
<el-row :gutter="10">
<el-col :span="8">
<dict-selector
v-model="queryParams.quantityRemainSymbol"
clearable
:type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
v-model="queryParams.quantityRemainSymbol"
@change="handleQuery"
>
</dict-selector>
/>
</el-col>
<el-col :span="16">
<el-input
v-model.trim="queryParams.quantityRemain"
:placeholder="$t('请输入数字')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-col>
</el-row>
</el-form-item>
<el-form-item :label="$t('创建时间')">
<el-date-picker
v-model="dateRangeCreateTime"
type="datetimerange"
clearable
placement="bottom-start"
v-model="dateRangeCreateTime"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
......@@ -130,17 +126,13 @@
</el-form>
<el-row class="mb8">
<el-button
v-hasPermi="['ecw:giftManagement:add']"
type="success"
size="mini"
icon="el-icon-plus"
@click="handleAddReward"
v-hasPermi="['ecw:giftManagement:add']"
>{{ $t("添加礼品") }}</el-button
>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
>{{ $t("添加礼品") }}</el-button>
<right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
</el-row>
<!-- 礼品列表 -->
<el-table ref="multipleTable" v-loading="loading" :data="list">
......@@ -149,7 +141,7 @@
:label="$t('礼品ID')"
align="center"
prop="code"
></el-table-column>
/>
<el-table-column :label="$t('礼品名称')" align="center">
<template slot-scope="scope">
<el-button type="text" @click="handleView(scope.row)">{{
......@@ -162,31 +154,27 @@
<el-image
:src="firstImg(isChinese ? scope.row.imgZh : scope.row.imgEn)"
style="width: 50px; height: 50px"
>{{ $t("") }}</el-image
>
>{{ $t("") }}</el-image>
</template>
</el-table-column>
<el-table-column width="100" :label="$t('开始日期')">
<template v-slot="{ row }">
<template #default="{ row }">
{{ parseTime(row.startTime, "{y}-{m}-{d}") || "/" }}
</template>
</el-table-column>
<el-table-column width="100" :label="$t('结束日期')">
<template v-slot="{ row }">
<template #default="{ row }">
{{ parseTime(row.endTime, "{y}-{m}-{d}") || "/" }}
</template>
</el-table-column>
<el-table-column
:label="$t('兑换积分')"
prop="pointsRequire"
></el-table-column>
<el-table-column :label="$t('兑换积分')" prop="pointsRequire" />
<el-table-column :label="$t('领取方式')" align="center" prop="pickMethod">
<template v-slot="{ row }">
<template #default="{ row }">
{{ handlePickMethod(row.pickMethod) }}
</template>
</el-table-column>
<el-table-column :label="$t('兑换网点')" align="center">
<template v-slot="{ row }">
<template #default="{ row }">
{{
isChinese
? handleExchangeNodeId(row.nodeId).titleZh
......@@ -198,7 +186,7 @@
:label="$t('允许兑换次数')"
align="center"
prop="allowCount"
></el-table-column>
/>
<el-table-column :label="$t('状态')">
<template slot-scope="{ row }">
{{
......@@ -232,15 +220,14 @@
<el-button
type="text"
@click="$router.push('/memberManagement/exchangeRecord')"
>{{ scope.row.exchangeCount }}</el-button
>
>{{ scope.row.exchangeCount }}</el-button>
</template>
</el-table-column>
<el-table-column
:label="$t('剩余次数')"
align="center"
prop="quantityRemain"
></el-table-column>
/>
<el-table-column
width="220px"
align="center"
......@@ -249,74 +236,66 @@
>
<template slot-scope="scope">
<el-button
v-hasPermi="['ecw:giftManagement:check']"
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row)"
v-hasPermi="['ecw:giftManagement:check']"
>{{ $t("查看") }}</el-button
>
>{{ $t("查看") }}</el-button>
<el-button
v-hasPermi="['ecw:giftManagement:close']"
size="mini"
type="text"
icon="el-icon-edit"
:disabled="scope.row.status == '2' || scope.row.status == '3'"
@click="handleCloseStatus(scope.row)"
:disabled="scope.row.status == '2'"
v-hasPermi="['ecw:giftManagement:close']"
>{{ $t("关闭") }}</el-button
>
>{{ $t("关闭") }}</el-button>
<el-button
v-hasPermi="['ecw:giftManagement:copy']"
size="mini"
type="text"
icon="el-icon-edit"
@click="copyRewards(scope.row)"
v-hasPermi="['ecw:giftManagement:copy']"
>{{ $t("复制") }}</el-button
>
>{{ $t("复制") }}</el-button>
<el-button
v-hasPermi="['ecw:giftManagement:postpone']"
size="mini"
type="text"
icon="el-icon-edit"
@click="handlePostpone(scope.row)"
:disabled="scope.row.status != '1'"
v-hasPermi="['ecw:giftManagement:postpone']"
>{{ $t("延期") }}</el-button
>
@click="handlePostpone(scope.row)"
>{{ $t("延期") }}</el-button>
<el-button
v-hasPermi="['ecw:giftManagement:delete']"
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
:disabled="scope.row.status != '2'"
v-hasPermi="['ecw:giftManagement:delete']"
>{{ $t("删除") }}</el-button
>
@click="handleDelete(scope.row)"
>{{ $t("删除") }}</el-button>
<el-button
size="mini"
v-has-permi="['ecw:giftManagement:edit']"
size="mini"
type="text"
:disabled="scope.row.status != '2' && scope.row.status != '1'"
icon="el-icon-collection"
@click="editRewards(scope.row)"
>{{ $t("编辑") }}</el-button
>
>{{ $t("编辑") }}</el-button>
<el-button
size="mini"
v-has-permi="['ecw:giftManagement:enable']"
size="mini"
type="text"
icon="el-icon-user"
@click="handleLaunchRewards(scope.row)"
>{{ $t("启用") }}</el-button
>
>{{ $t("启用") }}</el-button>
<el-button
:disabled="scope.row.isInOpenSea"
v-has-permi="['ecw:giftManagement:exchange']"
:disabled="scope.row.isInOpenSea"
size="mini"
type="text"
icon="el-icon-user"
@click="handleExchange(scope.row)"
>{{ $t("兑换") }}</el-button
>
>{{ $t("兑换") }}</el-button>
</template>
</el-table-column>
</el-table>
......@@ -333,11 +312,10 @@
<operating-gift
ref="operatingGift"
:title="operatingPagetitle"
:rewardsDetails="rewardsItem"
:rewards-details="rewardsItem"
:show.sync="dialogVisible"
:nodeList="nodeList"
>
</operating-gift>
:node-list="nodeList"
/>
<el-dialog
:title="$t('提示')"
:visible.sync="dialogPostponeVisible"
......@@ -345,14 +323,14 @@
>
<el-row class="mb8">{{ $t("请选择延期时间") }}</el-row>
<el-date-picker
v-model="postponeDatetime"
type="datetime"
clearable
v-model="postponeDatetime"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions"
:placeholder="$t('请选择时间')"
></el-date-picker>
/>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogPostponeVisible = false">{{
$t("取 消")
......@@ -371,20 +349,21 @@ import {
deleteRewards,
copyRewardsAPI,
changeRewardsStatus,
delayRewards,
} from "@/api/ecw/giftManagement";
import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import { parseTime } from "../../../utils/ruoyi";
import OperatingGift from "@/views/ecw/giftManagement/components/operatingGift.vue";
import { uploadFile } from "@/api/infra/file";
import ImageUpload from "@/components/ImageUpload";
delayRewards
} from '@/api/ecw/giftManagement'
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
import { parseTime } from '../../../utils/ruoyi'
import OperatingGift from '@/views/ecw/giftManagement/components/operatingGift.vue'
import { uploadFile } from '@/api/infra/file'
import ImageUpload from '@/components/ImageUpload'
export default {
name: "giftManagementList",
name: 'GiftManagementList',
components: {
OperatingGift,
OperatingGift
},
data() {
return {
getDictDatas,
env: process.env.NODE_ENV,
// 遮罩层
loading: true,
......@@ -397,13 +376,13 @@ export default {
// 礼品列表
list: [],
// 弹出层标题
operatingPagetitle: "",
operatingPagetitle: '',
// 是否显示弹出层
dialogVisible: false,
rewardsItem: {},
dateRangeCreateTime: [],
postponeDatetime: "",
postponeRewardsID: "",
postponeDatetime: '',
postponeRewardsID: '',
dialogPostponeVisible: false,
// 查询参数
queryParams: {
......@@ -419,197 +398,195 @@ export default {
quantityRemainSymbol: null,
quantityRemain: null,
beginCreateTime: null,
endCreateTime: null,
endCreateTime: null
},
// 网点
nodeList: [],
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7;
},
},
};
return time.getTime() < Date.now() - 8.64e7
}
}
}
},
computed: {
isChinese() {
return this.$i18n.locale === "zh_CN";
},
return this.$i18n.locale === 'zh_CN'
}
},
created() {
this.getList();
this.getNodeList();
this.getList()
this.getNodeList()
},
activated() {
this.getList();
this.getList()
},
methods: {
arraysEqual(arr1, arr2) {
return arr1.filter((current) => {
return arr2.find((item) => item == current.value.toString())
? true
: false;
});
return !!arr2.find((item) => item == current.value.toString())
})
},
handleRewardsStatus(status) {
return this.getDictDatas(DICT_TYPE.GIFT_STATUS).filter(
(dicItem) => dicItem.value.toString() == status
)[0];
)[0]
},
firstImg(imgString) {
if (!imgString || imgString == "") return imgString;
let imgs = imgString.split(",");
return imgs.length ? imgs[0] : null;
if (!imgString || imgString == '') return imgString
const imgs = imgString.split(',')
return imgs.length ? imgs[0] : null
},
handlePickMethod(pickMethod) {
let pickMethodLabel = [];
const pickMethodLabel = []
if (this.isChinese) {
this.arraysEqual(
this.getDictDatas(DICT_TYPE.WAY_OF_RECEIVING),
pickMethod.split(",")
pickMethod.split(',')
).forEach((element) => {
pickMethodLabel.push(element.label);
});
pickMethodLabel.push(element.label)
})
} else {
this.arraysEqual(
this.getDictDatas(DICT_TYPE.WAY_OF_RECEIVING),
pickMethod.split(",")
pickMethod.split(',')
).forEach((element) => {
pickMethodLabel.push(element.labelEn);
});
pickMethodLabel.push(element.labelEn)
})
}
return pickMethodLabel.join();
return pickMethodLabel.join()
},
handleExchangeNodeId(nodeId) {
return this.nodeList.filter((nodeItem) => nodeItem.id == nodeId)[0];
return this.nodeList.filter((nodeItem) => nodeItem.id == nodeId)[0]
},
handleAddReward() {
this.rewardsItem = {};
this.dialogVisible = true;
this.operatingPagetitle = "3";
this.rewardsItem = {}
this.dialogVisible = true
this.operatingPagetitle = '3'
},
handleExchange(row) {
this.$router.push({
path: "/giftManagement/bulkExchange",
query: { rewardsID: row.id },
});
path: '/giftManagement/bulkExchange',
query: { rewardsID: row.id }
})
},
/** 延期按钮操作 */
handlePostpone(row) {
this.postponeRewardsID = row.id;
this.dialogPostponeVisible = true;
this.postponeRewardsID = row.id
this.dialogPostponeVisible = true
},
confirmPostponeRewards() {
this.dialogPostponeVisible = false;
this.dialogPostponeVisible = false
delayRewards({
id: this.postponeRewardsID,
endTime: this.postponeDatetime,
endTime: this.postponeDatetime
}).then((res) => {
this.getList();
this.$message.success(this.$t("延期成功"));
});
this.getList()
this.$message.success(this.$t('延期成功'))
})
},
/** 关闭按钮操作 */
handleCloseStatus(row) {
this.$confirm(this.$t("是否关闭当前礼品?"), this.$t("提示"), {
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
type: "warning",
this.$confirm(this.$t('是否关闭当前礼品?'), this.$t('提示'), {
confirmButtonText: this.$t('确定'),
cancelButtonText: this.$t('取消'),
type: 'warning'
})
.then((_) => {
return changeRewardsStatus({ id: row.id, status: "3" });
return changeRewardsStatus({ id: row.id, status: '3' })
})
.then((res) => {
this.getList();
this.$message.success(this.$t("关闭成功"));
this.getList()
this.$message.success(this.$t('关闭成功'))
})
.catch((_) => {
// this.queryAllData();
});
})
},
//启用礼品状态
// 启用礼品状态
handleLaunchRewards(row) {
this.$confirm(this.$t("是否启用当前礼品?"), this.$t("提示"), {
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
type: "warning",
this.$confirm(this.$t('是否启用当前礼品?'), this.$t('提示'), {
confirmButtonText: this.$t('确定'),
cancelButtonText: this.$t('取消'),
type: 'warning'
})
.then(() => {
changeRewardsStatus({ id: row.id, status: "1" }).then((r) => {
this.$message.success(this.$t("启用成功"));
this.getList();
});
changeRewardsStatus({ id: row.id, status: '1' }).then((r) => {
this.$message.success(this.$t('启用成功'))
this.getList()
})
})
.catch(() => {});
.catch(() => {})
},
getNodeList() {
getNodeList().then((res) => {
this.nodeList = res.data;
});
this.nodeList = res.data
})
},
getList() {
this.loading = true;
this.loading = true
// 处理查询参数
let params = { ...this.queryParams };
const params = { ...this.queryParams }
this.addBeginAndEndTime(
params,
this.dateRangeCreateTime,
"createTime",
'createTime',
false
);
)
getGiftList(params).then((res) => {
this.loading = false;
this.list = res.data.list;
this.total = res.data.total;
});
this.loading = false
this.list = res.data.list
this.total = res.data.total
})
},
// 新增潜在客户
handleAddPotential() {
this.$refs.potentialCustom.dialogTableVisible = true;
this.$refs.potentialCustom.dialogTableVisible = true
},
/** 删除按钮操作 */
handleDelete(row) {
this.$modal
.confirm(this.$t("是否确认删除此礼品"))
.then(function () {
return deleteRewards({ id: row.id });
.confirm(this.$t('是否确认删除此礼品'))
.then(function() {
return deleteRewards({ id: row.id })
})
.then(() => {
this.getList();
this.$modal.msgSuccess(this.$t("删除成功"));
this.getList()
this.$modal.msgSuccess(this.$t('删除成功'))
})
.catch(() => {});
.catch(() => {})
},
/** 搜索按钮操作 */
handleQuery() {
this.$nextTick(() => {
this.queryParams.page = 1;
this.getList();
});
this.queryParams.page = 1
this.getList()
})
},
/** 查看按钮操作 */
handleView(row) {
this.dialogVisible = true;
this.operatingPagetitle = "1";
this.rewardsItem = row;
this.dialogVisible = true
this.operatingPagetitle = '1'
this.rewardsItem = row
},
/** 编辑按钮操作 */
editRewards(row) {
this.dialogVisible = true;
this.operatingPagetitle = "2";
this.rewardsItem = row;
this.dialogVisible = true
this.operatingPagetitle = '2'
this.rewardsItem = row
},
/** 复制按钮操作 */
copyRewards(row) {
copyRewardsAPI(row.id).then((res) => {
this.$modal.msgSuccess(this.$t("复制成功"));
this.handleQuery();
});
this.$modal.msgSuccess(this.$t('复制成功'))
this.handleQuery()
})
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeCreateTime = [];
this.dateRangeCreateTime = []
this.queryParams = {
page: 1,
rows: 10,
......@@ -625,12 +602,12 @@ export default {
memberCode: null,
memberName: null,
memberMobile: null,
memberAreaCode: null,
};
this.handleQuery();
},
},
};
memberAreaCode: null
}
this.handleQuery()
}
}
}
</script>
<style>
.rewardstToolTip {
......
<template>
<div class="app-container">
<el-form
:model="queryParams"
v-show="showSearch"
ref="queryForm"
:model="queryParams"
size="small"
v-show="showSearch"
:inline="true"
label-width="120px"
>
<el-form-item :label="$t('礼品名称')">
<el-input
style="width: 300px"
v-model.trim="queryParams.rewardTitle"
style="width: 300px"
:placeholder="$t('请输入礼品名称')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('会员昵称')">
<el-input
style="width: 300px"
v-model.trim="queryParams.memberName"
style="width: 300px"
:placeholder="$t('请输入会员昵称')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('兑换方式')">
<dict-selector
v-model="queryParams.redeemType"
clearable
:type="DICT_TYPE.WAY_OF_RECEIVING"
v-model="queryParams.redeemType"
>
</dict-selector>
/>
</el-form-item>
<el-form-item :label="$t('状态')">
<dict-selector
v-model="queryParams.status"
clearable
:type="DICT_TYPE.REWARD_REDEEM_STATUS"
v-model="queryParams.status"
>
</dict-selector>
/>
</el-form-item>
<el-form-item :label="$t('数量')">
<el-row :gutter="10" style="width: 300px">
<el-col :span="10">
<dict-selector
v-model="queryParams.rewardCountOperate"
clearable
:type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
v-model="queryParams.rewardCountOperate"
@change="handleQuery"
>
</dict-selector>
/>
</el-col>
<el-col :span="14">
<el-input
v-model.trim="queryParams.rewardCount"
:placeholder="$t('请输入数字')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-col>
</el-row>
</el-form-item>
<el-form-item :label="$t('兑换时间')">
<el-date-picker
v-model="dateRangeCreateTime"
type="datetimerange"
clearable
placement="bottom-start"
v-model="dateRangeCreateTime"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
......@@ -81,22 +78,21 @@
</el-form-item>
<el-form-item :label="$t('礼品ID')">
<el-input
style="width: 300px"
v-model.trim="queryParams.rewardCode"
style="width: 300px"
:placeholder="$t('请输入礼品ID')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('兑换入口')">
<dict-selector
v-model="queryParams.entrance"
clearable
:type="DICT_TYPE.PLATFORM_TYPE"
v-model="queryParams.entrance"
@change="handleQuery"
>
</dict-selector>
/>
</el-form-item>
<el-form-item :label="$t('兑换网点')">
......@@ -126,89 +122,83 @@
</el-form>
<el-row class="mb8">
<el-button
v-hasPermi="['ecw:memberManagement:newExchange']"
type="success"
size="mini"
icon="el-icon-plus"
v-hasPermi="['ecw:memberManagement:newExchange']"
@click="handleNewExchange"
>{{ $t("新增兑换") }}</el-button
>
>{{ $t("新增兑换") }}</el-button>
<el-button
v-hasPermi="['ecw:memberManagement:batchWriteOff']"
type="success"
size="mini"
icon="el-icon-plus"
v-hasPermi="['ecw:memberManagement:batchWriteOff']"
@click="handleBatchVerify"
>{{ $t("批量核销") }}</el-button
>
>{{ $t("批量核销") }}</el-button>
<el-button
v-hasPermi="['ecw:memberManagement:export']"
type="success"
size="mini"
icon="el-icon-plus"
@click="handleBatchExport"
v-hasPermi="['ecw:memberManagement:export']"
>{{ $t("导出") }}</el-button
>
>{{ $t("导出") }}</el-button>
<el-button
v-hasPermi="['ecw:memberManagement:exchangeoInfoImport']"
type="success"
size="mini"
icon="el-icon-plus"
@click="handleShowFileUploadDialog"
v-hasPermi="['ecw:memberManagement:exchangeoInfoImport']"
>{{ $t("兑换信息导入") }}</el-button
>
>{{ $t("兑换信息导入") }}</el-button>
<right-toolbar
:showSearch.sync="showSearch"
:show-search.sync="showSearch"
@queryTable="handleQueryPagination"
></right-toolbar>
/>
</el-row>
<el-table
ref="multipleTable"
v-loading="loading"
@selection-change="handleSelectionChange"
:data="memberList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column type="selection" width="55" />
<el-table-column
width="140"
:label="$t('兑换记录ID')"
align="center"
prop="id"
></el-table-column>
/>
<el-table-column
width="140"
:label="$t('礼品ID')"
align="center"
prop="rewardCode"
></el-table-column>
/>
<el-table-column
:label="$t('礼品名称')"
align="center"
:prop="isChinese ? 'rewardTitleZh' : 'rewardTitleEn'"
></el-table-column>
/>
<el-table-column :label="$t('会员名称')" align="center">
<template v-slot="{ row }">
<template #default="{ row }">
<el-button
type="text"
@click="
$router.push('/member/member/member-details/' + row.memberId)
"
>{{ isChinese ? row.memberNameZh : row.memberNameEn }}</el-button
>
>{{ isChinese ? row.memberNameZh : row.memberNameEn }}</el-button>
</template>
</el-table-column>
<el-table-column :label="$t('兑换时间')" align="center">
<template v-slot="{ row }">
{{ parseTime(row.redemptionTime) || "/" }}</template
>
<template #default="{ row }">
{{ parseTime(row.redemptionTime) || "/" }}</template>
</el-table-column>
<el-table-column
:label="$t('兑换积分')"
align="center"
prop="totalCount"
></el-table-column>
/>
<el-table-column width="140" :label="$t('兑换入口')" align="center">
<template v-slot="{ row }">
<template #default="{ row }">
{{
isChinese
? handleExchangeEntrance(row.entrance).label
......@@ -221,10 +211,9 @@
:label="$t('兑换网点')"
align="center"
:prop="isChinese ? 'nodeTitleZh' : 'nodeTitleEn'"
>
</el-table-column>
/>
<el-table-column width="140" :label="$t('领取方式')" align="center">
<template v-slot="{ row }">
<template #default="{ row }">
{{
isChinese
? handleExchangeRedeemType(row.redeemType).label
......@@ -233,7 +222,7 @@
</template>
</el-table-column>
<el-table-column width="140" :label="$t('状态')" align="center">
<template v-slot="{ row }">
<template #default="{ row }">
{{
isChinese
? handleExchangeStatus(row.status).label
......@@ -246,26 +235,25 @@
:label="$t('备注')"
align="center"
prop="remark"
></el-table-column
>
/>
<el-table-column
width="140"
:label="$t('数量')"
align="center"
prop="rewardCount"
></el-table-column>
/>
<el-table-column
width="140"
:label="$t('创建人')"
align="center"
prop="creatorName"
></el-table-column>
/>
<el-table-column
width="140"
:label="$t('更新人')"
align="center"
prop="updaterName"
></el-table-column>
/>
<el-table-column
width="220px"
align="center"
......@@ -274,49 +262,44 @@
>
<template slot-scope="scope">
<el-button
v-hasPermi="['ecw:memberManagement:cancel']"
size="mini"
type="text"
icon="el-icon-view"
@click="handleRewardCancel(scope.row)"
:disabled="scope.row.status != '1'"
v-hasPermi="['ecw:memberManagement:cancel']"
>{{ $t("撤销") }}</el-button
>
@click="handleRewardCancel(scope.row)"
>{{ $t("撤销") }}</el-button>
<el-button
v-hasPermi="['ecw:memberManagement:edit']"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleRewardEdit(scope.row)"
:disabled="scope.row.status != '1'"
v-hasPermi="['ecw:memberManagement:edit']"
>{{ $t("编辑") }}</el-button
>
@click="handleRewardEdit(scope.row)"
>{{ $t("编辑") }}</el-button>
<el-button
v-hasPermi="['ecw:memberManagement:view']"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleViewRecord(scope.row)"
v-hasPermi="['ecw:memberManagement:view']"
>{{ $t("查看") }}</el-button
>
>{{ $t("查看") }}</el-button>
<el-button
v-hasPermi="['ecw:memberManagement:verification']"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleVerify(scope.row)"
:disabled="scope.row.status != '1'"
v-hasPermi="['ecw:memberManagement:verification']"
>{{ $t("核销") }}</el-button
>
@click="handleVerify(scope.row)"
>{{ $t("核销") }}</el-button>
<el-button
v-hasPermi="['ecw:memberManagement:verificationRollback']"
size="mini"
type="text"
icon="el-icon-delete"
@click="handleVerificationRollback(scope.row)"
:disabled="scope.row.status != '2'"
v-hasPermi="['ecw:memberManagement:verificationRollback']"
>{{ $t("核销回退") }}</el-button
>
@click="handleVerificationRollback(scope.row)"
>{{ $t("核销回退") }}</el-button>
</template>
</el-table-column>
</el-table>
......@@ -349,18 +332,18 @@
:auto-upload="false"
drag
>
<i class="el-icon-upload"></i>
<i class="el-icon-upload" />
<div class="el-upload__text">
{{ $t("将文件拖到此处,或") }}<em>{{ $t("点击上传") }}</em>
</div>
<div class="el-upload__tip text-center" slot="tip">
<div slot="tip" class="el-upload__tip text-center">
<span>仅允许导入xls、xlsx格式文件。</span>
<el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>{{ $t("下载模板") }}
>{{ $t("下载模板") }}
</el-link>
</div>
</el-upload>
......@@ -380,8 +363,8 @@
:before-close="handleClose"
>
<el-form
:model="batchVerifyForm"
ref="numberValidateForm"
:model="batchVerifyForm"
label-width="100px"
class="demo-ruleForm"
>
......@@ -393,19 +376,19 @@
<el-input
v-model.number="batchVerifyForm.verifyUser"
autocomplete="off"
></el-input>
/>
</el-form-item>
<el-form-item
:label="$t('核销时间')"
:rules="[{ required: true, message: $t('核销时间不能为空') }]"
>
<el-date-picker
v-model="batchVerifyForm.verifyTime"
type="date"
placement="bottom-start"
value-format="yyyy-MM-dd HH:mm:ss"
:placeholder="$t('选择核销时间')"
v-model="batchVerifyForm.verifyTime"
></el-date-picker>
/>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
......@@ -434,8 +417,7 @@
:key="item.id"
:label="isChinese ? item.memberNameZh : item.memberNameEn"
:value="item.id"
>
</el-option>
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('操作')">
......@@ -444,8 +426,7 @@
v-for="dict in getDictDatas(DICT_TYPE.MEMBER_SCORE_OPERATE_TYPE)"
:key="dict.value"
:label="dict.value"
>{{ $l(dict, "label") }}</el-radio
>
>{{ $l(dict, "label") }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('积分')">
......@@ -456,7 +437,7 @@
/>
</el-form-item>
<el-form-item :label="$t('备注')">
<el-input type="textarea" v-model="formQuery.comment"></el-input>
<el-input v-model="formQuery.comment" type="textarea" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
......@@ -469,8 +450,8 @@
</div>
</template>
<script>
import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import { getNodeList } from "@/api/ecw/giftManagement";
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
import { getNodeList } from '@/api/ecw/giftManagement'
import {
queryMemberExchangeRecord,
batchVerifyAPI,
......@@ -478,19 +459,19 @@ import {
batchRecordImport,
batchRecordImportTemplate,
rewardCancelQuery,
verifyRollback,
} from "@/api/ecw/memberManagement";
import { getNowDateTime, parseTime } from "@/utils/ruoyi";
import { getBaseHeader } from "@/utils/request";
verifyRollback
} from '@/api/ecw/memberManagement'
import { getNowDateTime, parseTime } from '@/utils/ruoyi'
import { getBaseHeader } from '@/utils/request'
export default {
name: "exchangeRecord",
name: 'ExchangeRecord',
data() {
return {
upload: {
// 是否显示弹出层(用户导入)
open: false,
// 弹出层标题(用户导入)
title: this.$t("兑换信息导入"),
title: this.$t('兑换信息导入'),
// 是否禁用上传
isUploading: false,
// 设置上传的请求头部
......@@ -498,14 +479,14 @@ export default {
// 上传的地址
url:
process.env.VUE_APP_BASE_API +
"/admin-api/reward/redeem/record/import",
'/admin-api/reward/redeem/record/import'
},
//批量核销
// 批量核销
dialogBatchVerify: false,
batchVerifyForm: {
ids: [],
verifyTime: "",
verifyUser: "",
verifyTime: '',
verifyUser: ''
},
// 显示搜索条件
showSearch: true,
......@@ -517,278 +498,278 @@ export default {
dialogVisible: false,
memberList: [],
formQuery: {
comment: "",
comment: '',
memberIds: [],
operateType: null,
scoreCount: null,
scoreCount: null
},
queryParams: {
rewardTitle: "",
memberName: "", //会员昵称
redeemType: "", //兑换方式
status: "",
rewardCount: "",
rewardCountOperate: "",
rewardCode: "",
entrance: "", //兑换入口
startTime: "",
endTime: "",
nodeId: "",
rewardTitle: '',
memberName: '', // 会员昵称
redeemType: '', // 兑换方式
status: '',
rewardCount: '',
rewardCountOperate: '',
rewardCode: '',
entrance: '', // 兑换入口
startTime: '',
endTime: '',
nodeId: '',
pageNo: 1,
pageSize: 10,
pageSize: 10
},
// 网点
nodeList: [],
};
nodeList: []
}
},
computed: {
isChinese() {
return this.$i18n.locale === "zh_CN";
},
return this.$i18n.locale === 'zh_CN'
}
},
created() {
this.getNodeListAPI();
this.handleQuery();
this.getNodeListAPI()
this.handleQuery()
},
activated() {
this.handleQuery();
this.handleQuery()
},
methods: {
//核销回退
// 核销回退
handleVerificationRollback(row) {
this.$confirm(this.$t("是否继续核销回退?"), this.$t("提示"), {
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
type: "warning",
this.$confirm(this.$t('是否继续核销回退?'), this.$t('提示'), {
confirmButtonText: this.$t('确定'),
cancelButtonText: this.$t('取消'),
type: 'warning'
})
.then(() => {
let params = {
redeemIds: [row.id],
};
const params = {
redeemIds: [row.id]
}
verifyRollback(params).then((res) => {
this.$message({
type: "success",
message: this.$t("回退成功!"),
});
this.handleQuery();
});
type: 'success',
message: this.$t('回退成功!')
})
this.handleQuery()
})
})
.catch(() => {
this.$message({
type: "info",
message: this.$t("已取消回退"),
});
});
type: 'info',
message: this.$t('已取消回退')
})
})
},
//核销
// 核销
handleVerify(row) {
this.$router.push({
path: "/memberManagement/exchangeRecordOperation",
query: { exchangeRewardID: row.id, pageStatus: "verify" },
});
path: '/memberManagement/exchangeRecordOperation',
query: { exchangeRewardID: row.id, pageStatus: 'verify' }
})
},
//查看按钮操作
// 查看按钮操作
handleViewRecord(row) {
this.$router.push({
path: "/memberManagement/exchangeRecordOperation",
query: { exchangeRewardID: row.id, pageStatus: "view" },
});
path: '/memberManagement/exchangeRecordOperation',
query: { exchangeRewardID: row.id, pageStatus: 'view' }
})
},
//兑换记录编辑操作
// 兑换记录编辑操作
handleRewardEdit(row) {
this.$router.push({
path: "/memberManagement/exchangeRecordOperation",
query: { exchangeRewardID: row.id, pageStatus: "edit" },
});
path: '/memberManagement/exchangeRecordOperation',
query: { exchangeRewardID: row.id, pageStatus: 'edit' }
})
},
//撤销按钮操作
// 撤销按钮操作
handleRewardCancel(row) {
this.$confirm(
this.$t("此操作积分可能存在到期积分, 撤销后积分将进行扣除,是否继续?"),
this.$t("提示"),
this.$t('此操作积分可能存在到期积分, 撤销后积分将进行扣除,是否继续?'),
this.$t('提示'),
{
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
type: "warning",
confirmButtonText: this.$t('确定'),
cancelButtonText: this.$t('取消'),
type: 'warning'
}
)
.then(() => {
let params = {
id: row.id,
};
const params = {
id: row.id
}
rewardCancelQuery(params).then((res) => {
this.$message({
type: "success",
message: this.$t("撤销成功!"),
});
this.handleQuery();
});
type: 'success',
message: this.$t('撤销成功!')
})
this.handleQuery()
})
})
.catch(() => {
this.$message({
type: "info",
message: this.$t("已取消撤销"),
});
});
type: 'info',
message: this.$t('已取消撤销')
})
})
},
//下载导入模板
// 下载导入模板
importTemplate() {
batchRecordImportTemplate().then((res) => {
this.$download.excel(res, "用户导入模板.xls");
this.$download.excel(res, '用户导入模板.xls')
this.$message({
message: this.$t("下载模板成功"),
type: "success",
});
});
message: this.$t('下载模板成功'),
type: 'success'
})
})
},
//导入
// 导入
handleShowFileUploadDialog() {
this.upload.open = true;
this.upload.open = true
},
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
this.upload.isUploading = true
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
if (response.code == "1001011027") {
this.$message.error(response.msg);
if (response.code == '1001011027') {
this.$message.error(response.msg)
}
if (
!response.data.redeemIdFailedMap ||
JSON.stringify(response.data.redeemIdFailedMap) == "{}"
JSON.stringify(response.data.redeemIdFailedMap) == '{}'
) {
this.upload.open = false;
this.$modal.msgSuccess(this.$t("导入成功"));
this.handleQuery();
return;
this.upload.open = false
this.$modal.msgSuccess(this.$t('导入成功'))
this.$refs.upload.clearFiles()
this.upload.isUploading = false
this.handleQuery()
return
}
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.upload.open = false
this.upload.isUploading = false
this.$refs.upload.clearFiles()
// 拼接提示语
let data = response.data;
let text = `${this.$t("导入失败:")}`;
const data = response.data
let text = `${this.$t('导入失败:')}`
for (const username in data.redeemIdFailedMap) {
text +=
"<br />&nbsp;&nbsp;&nbsp;&nbsp;" +
'<br />&nbsp;&nbsp;&nbsp;&nbsp;' +
username +
this.$t("") +
data.redeemIdFailedMap[username];
this.$t('') +
data.redeemIdFailedMap[username]
}
text += `<br />&nbsp;&nbsp;&nbsp;&nbsp;${this.$t("以上数据格式有问题")}`;
this.$alert(text, this.$t("导入结果"), {
dangerouslyUseHTMLString: true,
});
text += `<br />&nbsp;&nbsp;&nbsp;&nbsp;${this.$t('以上数据格式有问题')}`
this.$alert(text, this.$t('导入结果'), {
dangerouslyUseHTMLString: true
})
},
// 提交上传文件
submitFileForm() {
this.$refs.upload.submit();
this.$refs.upload.submit()
},
//导出
// 导出
handleBatchExport() {
let params = { ...this.queryParams };
const params = { ...this.queryParams }
if (this.dateRangeCreateTime) {
params.startTime = this.dateRangeCreateTime[0];
params.endTime = this.dateRangeCreateTime[1];
params.pageNo = null;
params.pageSize = null;
params.startTime = this.dateRangeCreateTime[0]
params.endTime = this.dateRangeCreateTime[1]
}
batchRecordExport(params).then((res) => {
this.$message({
message: this.$t("已加入导出队列,请稍后在下载日志中下载"),
type: "success",
});
});
message: this.$t('已加入导出队列,请稍后在下载日志中下载'),
type: 'success'
})
})
},
//批量核销确认按钮
// 批量核销确认按钮
handleBatchVerifySubmit() {
this.$confirm(this.$t("确认提交?"))
this.$confirm(this.$t('确认提交?'))
.then((_) => {
let params = { ...this.batchVerifyForm };
const params = { ...this.batchVerifyForm }
batchVerifyAPI(params).then((res) => {
this.dialogBatchVerify = false;
this.dialogBatchVerify = false
this.$message({
message: this.$t("核销成功"),
type: "success",
});
});
message: this.$t('核销成功'),
type: 'success'
})
})
})
.catch((_) => {});
.catch((_) => {})
},
// 批量核销
handleBatchVerify() {
if (this.batchVerifyForm.ids.length > 0) {
this.dialogBatchVerify = true;
this.batchVerifyForm.verifyUser = this.$store.getters.name;
this.batchVerifyForm.verifyTime = getNowDateTime();
this.dialogBatchVerify = true
this.batchVerifyForm.verifyUser = this.$store.getters.name
this.batchVerifyForm.verifyTime = getNowDateTime()
} else {
this.$message({
message: this.$t("请先选择兑换记录"),
type: "warning",
});
message: this.$t('请先选择兑换记录'),
type: 'warning'
})
}
},
// 新增兑换
handleNewExchange() {
this.$router.push({
path: "/memberManagement/exchangeRecordOperation",
});
path: '/memberManagement/exchangeRecordOperation'
})
},
getNodeListAPI() {
getNodeList().then((res) => {
this.nodeList = res.data;
});
this.nodeList = res.data
})
},
handleExchangeRedeemType(id) {
return this.getDictDatas(DICT_TYPE.WAY_OF_RECEIVING).filter(
(item) => item.value == id
)[0];
)[0]
},
//兑换入口
// 兑换入口
handleExchangeEntrance(id) {
return this.getDictDatas(DICT_TYPE.PLATFORM_TYPE).filter(
(item) => item.value == id
)[0];
)[0]
},
//兑换状态
// 兑换状态
handleExchangeStatus(id) {
return this.getDictDatas(DICT_TYPE.REWARD_REDEEM_STATUS).filter(
(item) => item.value == id
)[0];
)[0]
},
handleScoreSubmit() {
this.$confirm(this.$t("确认提交?"))
this.$confirm(this.$t('确认提交?'))
.then((_) => {
let params = { ...this.formQuery };
const params = { ...this.formQuery }
operateMemberScore(params).then((res) => {
this.dialogVisible = true;
this.dialogVisible = true
this.formQuery = {
comment: "",
comment: '',
memberIds: [],
operateType: null,
scoreCount: null,
};
this.selectedMember = [];
this.$message.success(this.$t("操作成功"));
});
scoreCount: null
}
this.selectedMember = []
this.$message.success(this.$t('操作成功'))
})
})
.catch((_) => {});
.catch((_) => {})
},
handleClose(done) {
this.$confirm(this.$t("确认关闭?"))
this.$confirm(this.$t('确认关闭?'))
.then((_) => {
done();
done()
})
.catch((_) => {});
.catch((_) => {})
},
handleSelectionChange(val) {
this.selectedMember = val;
this.selectedMember = val
this.batchVerifyForm.ids = val.map((item) => {
return item.id;
});
return item.id
})
},
dialogBeforeClose() {
this.loading = true;
this.loading = true
this.queryParams = {
country: null,
city: null,
......@@ -800,37 +781,37 @@ export default {
pageSize: 10,
startTime: null,
usedScore: null,
usedScoreOperate: null,
};
usedScoreOperate: null
}
},
handleQuery() {
this.queryParams.pageNo = 1;
let params = { ...this.queryParams };
this.queryParams.pageNo = 1
const params = { ...this.queryParams }
if (this.dateRangeCreateTime) {
params.startTime = this.dateRangeCreateTime[0];
params.endTime = this.dateRangeCreateTime[1];
params.startTime = this.dateRangeCreateTime[0]
params.endTime = this.dateRangeCreateTime[1]
}
queryMemberExchangeRecord(params).then((res) => {
this.loading = false;
this.memberList = res.data.list;
this.total = res.data.total;
});
this.loading = false
this.memberList = res.data.list
this.total = res.data.total
})
},
handleQueryPagination() {
let params = { ...this.queryParams };
const params = { ...this.queryParams }
if (this.dateRangeCreateTime) {
params.startTime = this.dateRangeCreateTime[0];
params.endTime = this.dateRangeCreateTime[1];
params.startTime = this.dateRangeCreateTime[0]
params.endTime = this.dateRangeCreateTime[1]
}
queryMemberExchangeRecord(params).then((res) => {
this.loading = false;
this.memberList = res.data.list;
this.total = res.data.total;
});
this.loading = false
this.memberList = res.data.list
this.total = res.data.total
})
},
resetQuery() {
this.loading = true;
this.dateRangeCreateTime = [];
this.loading = true
this.dateRangeCreateTime = []
this.queryParams = {
country: null,
city: null,
......@@ -842,10 +823,10 @@ export default {
pageSize: 10,
startTime: null,
usedScore: null,
usedScoreOperate: null,
};
this.handleQuery();
},
},
};
usedScoreOperate: null
}
this.handleQuery()
}
}
}
</script>
<template>
<div class="app-container">
<el-form
:model="queryParams"
v-show="showSearch"
ref="queryForm"
:model="queryParams"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item :label="$t('指标类型')">
<dict-selector
v-model="queryParams.type"
clearable
:type="DICT_TYPE.SCORE_RULE_TYPE"
v-model="queryParams.type"
@change="handleQuery"
>
</dict-selector>
/>
</el-form-item>
<el-form-item :label="$t('标题:')">
<el-input
style="width: 300px"
v-model.trim="queryParams.title"
style="width: 300px"
:placeholder="$t('请输入查找')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('规则说明')">
<el-input
style="width: 300px"
v-model.trim="queryParams.desc"
style="width: 300px"
:placeholder="$t('请输入关键词查找')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('状态')">
<dict-selector
v-model="queryParams.status"
clearable
:type="DICT_TYPE.GIFT_STATUS"
v-model="queryParams.status"
>
</dict-selector>
/>
</el-form-item>
<el-form-item :label="$t('单次积分')">
<el-row :gutter="10" style="width: 300px">
<el-col :span="10">
<dict-selector
v-model="queryParams.getScoreOnceSymbol"
clearable
:type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
v-model="queryParams.getScoreOnceSymbol"
@change="handleQuery"
>
</dict-selector>
/>
</el-col>
<el-col :span="14">
<el-input
v-model.trim="queryParams.getScoreOnce"
:placeholder="$t('请输入数字')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-col>
</el-row>
......@@ -71,30 +68,29 @@
<el-row :gutter="10" style="width: 300px">
<el-col :span="10">
<dict-selector
v-model="queryParams.maxScoreTotalSymbol"
clearable
:type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
v-model="queryParams.maxScoreTotalSymbol"
@change="handleQuery"
>
</dict-selector>
/>
</el-col>
<el-col :span="14">
<el-input
v-model.trim="queryParams.maxScoreTotal"
:placeholder="$t('请输入数字')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-col>
</el-row>
</el-form-item>
<el-form-item :label="$t('创建时间')">
<el-date-picker
v-model="dateRangeCreateTime"
type="datetimerange"
clearable
placement="bottom-start"
v-model="dateRangeCreateTime"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
......@@ -112,17 +108,27 @@
</el-form-item>
</el-form>
<el-row class="mb8">
<el-button
type="success"
size="mini"
icon="el-icon-plus"
@click="handleNewScoreRule"
>{{ $t("添加规则") }}</el-button
>
>{{ $t("添加规则") }}</el-button>
<right-toolbar
:showSearch.sync="showSearch"
:show-search.sync="showSearch"
@queryTable="handleQueryPagination"
></right-toolbar>
/>
<el-tooltip v-hasPermi="['ecw:memberManagement:enableMemberPointsSystem']" :content="`${$t('开启会员积分系统')} : ${switchState} `" placement="top" class="switchBtn">
<el-switch
v-model="switchState"
:active-value="true"
:inactive-text="$t('开启会员积分系统')"
:inactive-value="false"
@change="openSwitch($event)"
/>
</el-tooltip>
</el-row>
<el-table
ref="multipleTable"
......@@ -142,64 +148,53 @@
:label="$t('标题')"
align="center"
:prop="isChinese ? 'titleZh' : 'titleEn'"
></el-table-column>
/>
<el-table-column :label="$t('开始时间')" align="center">
<template v-slot="{ row }">
{{ parseTime(row.startTime) || "/" }}</template
>
<template #default="{ row }">
{{ parseTime(row.startTime) || "/" }}</template>
</el-table-column>
<el-table-column :label="$t('结束时间')" align="center">
<template v-slot="{ row }">
{{ parseTime(row.endTime) || "/" }}</template
>
<template #default="{ row }">
{{ parseTime(row.endTime) || "/" }}</template>
</el-table-column>
<el-table-column
:label="$t('单次积分')"
align="center"
prop="getScoreOnce"
>
</el-table-column>
/>
<el-table-column
:label="$t('累计最高积分')"
align="center"
prop="maxScoreTotal"
>
</el-table-column>
/>
<el-table-column
:label="$t('规则说明')"
align="center"
:prop="isChinese ? 'descZh' : 'descEn'"
>
</el-table-column>
/>
<el-table-column :label="$t('展示平台')" align="center">
<template v-slot="{ row }">
{{ handlePlatform(row.showPlatform) || "/" }}</template
>
<template #default="{ row }">
{{ handlePlatform(row.showPlatform) || "/" }}</template>
</el-table-column>
<el-table-column :label="$t('状态')" align="center">
<template v-slot="{ row }">
{{ $l(handleStatus(row.status), "label") || "/" }}</template
>
<template #default="{ row }">
{{ $l(handleStatus(row.status), "label") || "/" }}</template>
</el-table-column>
<el-table-column :label="$t('创建人')" align="center" prop="creator">
</el-table-column>
<el-table-column :label="$t('创建人')" align="center" prop="creator" />
<el-table-column :label="$t('创建时间')" align="center">
<template v-slot="{ row }">
{{ parseTime(row.createTime) || "/" }}</template
>
<template #default="{ row }">
{{ parseTime(row.createTime) || "/" }}</template>
</el-table-column>
<el-table-column :label="$t('最后更新人')" align="center" prop="updater">
</el-table-column>
<el-table-column :label="$t('最后更新人')" align="center" prop="updater" />
<el-table-column :label="$t('最后更新时间')" align="center">
<template v-slot="{ row }">
{{ parseTime(row.updateTime) || "/" }}</template
>
<template #default="{ row }">
{{ parseTime(row.updateTime) || "/" }}</template>
</el-table-column>
<el-table-column width="220px" :label="$t('操作')" align="center">
<template slot-scope="scope">
......@@ -207,49 +202,42 @@
size="mini"
type="text"
@click="handleViewDetails(scope.row)"
>{{ $t("查看") }}</el-button
>
>{{ $t("查看") }}</el-button>
<el-button
size="mini"
type="text"
:disabled="scope.row.status != '1'"
@click="handleCloseButton(scope.row)"
>{{ $t("关闭") }}</el-button
>
>{{ $t("关闭") }}</el-button>
<el-button
size="mini"
type="text"
@click="handleCopyButton(scope.row)"
>{{ $t("复制") }}</el-button
>
>{{ $t("复制") }}</el-button>
<el-button
size="mini"
type="text"
:disabled="scope.row.status != '1'"
@click="handleDelayButton(scope.row)"
>{{ $t("延期") }}</el-button
>
>{{ $t("延期") }}</el-button>
<el-button
size="mini"
:disabled="scope.row.status != '2'"
type="text"
@click="handleDelete(scope.row)"
>{{ $t("删除") }}</el-button
>
>{{ $t("删除") }}</el-button>
<el-button
size="mini"
type="text"
:disabled="scope.row.status != '2'"
@click="handleUpdate(scope.row)"
>{{ $t("编辑") }}</el-button
>
>{{ $t("编辑") }}</el-button>
<el-button
size="mini"
type="text"
:disabled="scope.row.status != '2'"
@click="handleEnabledStatus(scope.row)"
>{{ $t("启用") }}</el-button
>
>{{ $t("启用") }}</el-button>
</template>
</el-table-column>
</el-table>
......@@ -268,14 +256,14 @@
>
<el-row class="mb8">{{ $t("请选择延期时间") }}</el-row>
<el-date-picker
v-model="postponeDatetime"
type="datetime"
clearable
v-model="postponeDatetime"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions"
:placeholder="$t('请选择时间')"
></el-date-picker>
/>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogPostponeVisible = false">{{
$t("取 消")
......@@ -288,230 +276,258 @@
</div>
</template>
<script>
import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
import {
getScoreRecordList,
integralRuleStatus,
integralRuleCopy,
integralRuleDelay,
integralRuleDelete,
} from "@/api/ecw/memberManagement";
switchRuleSet,
switchRuleGet
} from '@/api/ecw/memberManagement'
export default {
name: "integralRecord",
name: 'IntegralRecord',
data() {
return {
switchState: true,
dateRangeCreateTime: [],
total: 0,
showSearch: true,
loading: true,
dialogPostponeVisible: false,
integrationRuleList: [],
postponeIntegralID: "",
postponeDatetime: "",
postponeIntegralID: '',
postponeDatetime: '',
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7;
},
return time.getTime() < Date.now() - 8.64e7
}
},
queryParams: {
type: "",
title: "",
desc: "",
status: "",
getScoreOnceSymbol: "",
getScoreOnce: "",
maxScoreTotalSymbol: "",
maxScoreTotal: "",
type: '',
title: '',
desc: '',
status: '',
getScoreOnceSymbol: '',
getScoreOnce: '',
maxScoreTotalSymbol: '',
maxScoreTotal: '',
page: 1,
rows: 10,
},
};
rows: 10
}
}
},
computed: {
isChinese() {
return this.$i18n.locale === "zh_CN";
},
return this.$i18n.locale === 'zh_CN'
}
},
created() {
this.handleQuery();
this.handleQuery()
this.getSwitchRuleStatus()
},
activated() {
this.handleQuery();
this.handleQuery()
},
methods: {
//编辑操作按钮
openSwitch(status) {
this.$modal
.confirm(this.$t('是否确认{val}会员积分系统', { val: status ? this.$t('开启') : this.$t('关闭') }))
.then(async() => {
// return integralRuleDelete({ id: row.id })
const { code } = await switchRuleSet({ switchState: status })
if (code === 0) {
this.$modal.msgSuccess(this.$t('成功'))
}
})
.catch(() => {
this.switchState = !status
})
},
getSwitchRuleStatus() {
switchRuleGet().then(res => {
this.switchState = res.data
})
},
// 编辑操作按钮
handleUpdate(row) {
this.$router.push({
path: "/memberManagement/addIntegrationRuleOperation",
query: { id: row.id, pageStatus: "edit" },
});
path: '/memberManagement/addIntegrationRuleOperation',
query: { id: row.id, pageStatus: 'edit' }
})
},
//查看按钮操作
// 查看按钮操作
handleViewDetails(row) {
this.$router.push({
path: "/memberManagement/addIntegrationRuleOperation",
query: { id: row.id, pageStatus: "view" },
});
path: '/memberManagement/addIntegrationRuleOperation',
query: { id: row.id, pageStatus: 'view' }
})
},
//延期按钮操作
// 延期按钮操作
handleDelayButton(row) {
this.postponeIntegralID = row.id;
this.dialogPostponeVisible = true;
this.postponeIntegralID = row.id
this.dialogPostponeVisible = true
},
confirmPostponeIntegral() {
integralRuleDelay({
id: this.postponeIntegralID,
endTime: this.postponeDatetime,
endTime: this.postponeDatetime
}).then((res) => {
this.postponeDatetime = "";
this.$modal.msgSuccess(this.$t("延期成功"));
});
this.postponeDatetime = ''
this.$modal.msgSuccess(this.$t('延期成功'))
})
},
//删除按钮操作
// 删除按钮操作
handleDelete(row) {
this.$modal
.confirm(this.$t("是否确认删除此礼品规则"))
.then(function () {
return integralRuleDelete({ id: row.id });
.confirm(this.$t('是否确认删除此礼品规则'))
.then(function() {
return integralRuleDelete({ id: row.id })
})
.then(() => {
this.handleQuery();
this.$modal.msgSuccess(this.$t("删除成功"));
this.handleQuery()
this.$modal.msgSuccess(this.$t('删除成功'))
})
.catch(() => {});
.catch(() => {})
},
//启用按钮操作
// 启用按钮操作
handleEnabledStatus(row) {
this.$modal
.confirm(this.$t("是否确认启用此礼品规则"))
.then(function () {
return integralRuleStatus({ id: row.id, status: "1" });
.confirm(this.$t('是否确认启用此礼品规则'))
.then(function() {
return integralRuleStatus({ id: row.id, status: '1' })
})
.then(() => {
this.handleQuery();
this.$modal.msgSuccess(this.$t("启用成功"));
this.handleQuery()
this.$modal.msgSuccess(this.$t('启用成功'))
})
.catch(() => {});
.catch(() => {})
},
//复制按钮操作
// 复制按钮操作
handleCopyButton(row) {
this.$modal
.confirm(this.$t("是否确认复制礼品规则"))
.then(function () {
return integralRuleCopy({ id: row.id });
.confirm(this.$t('是否确认复制礼品规则'))
.then(function() {
return integralRuleCopy({ id: row.id })
})
.then(() => {
this.handleQuery();
this.$modal.msgSuccess(this.$t("复制成功"));
this.handleQuery()
this.$modal.msgSuccess(this.$t('复制成功'))
})
.catch(() => {});
.catch(() => {})
},
//关闭按钮操作
// 关闭按钮操作
handleCloseButton(row) {
this.$modal
.confirm(this.$t("是否确认关闭此礼品规则"))
.then(function () {
return integralRuleStatus({ id: row.id, status: "3" });
.confirm(this.$t('是否确认关闭此礼品规则'))
.then(function() {
return integralRuleStatus({ id: row.id, status: '3' })
})
.then(() => {
this.handleQuery();
this.$modal.msgSuccess(this.$t("关闭成功"));
this.handleQuery()
this.$modal.msgSuccess(this.$t('关闭成功'))
})
.catch(() => {});
.catch(() => {})
},
// new score rule func
handleNewScoreRule() {
this.$router.push({
path: "/memberManagement/addIntegrationRuleOperation",
query: { pageStatus: "new" },
});
path: '/memberManagement/addIntegrationRuleOperation',
query: { pageStatus: 'new' }
})
},
//积分来源
// 积分来源
handleSourceType(id) {
return this.getDictDatas(DICT_TYPE.SCORE_RULE_TYPE).filter(
(item) => item.value == id
)[0];
)[0]
},
// 活动状态
handleStatus(id) {
return this.getDictDatas(DICT_TYPE.GIFT_STATUS).filter(
(item) => item.value == id
)[0];
)[0]
},
arraysEqual(arr1, arr2) {
return arr1.filter((current) => {
return arr2.find((item) => item == current.value.toString())
? true
: false;
});
return !!arr2.find((item) => item == current.value.toString())
})
},
//展示平台
// 展示平台
handlePlatform(platformId) {
let platformIdLabel = [];
const platformIdLabel = []
if (this.isChinese) {
this.arraysEqual(
this.getDictDatas(DICT_TYPE.PLATFORM_TYPE),
platformId.split(",")
platformId.split(',')
).forEach((element) => {
platformIdLabel.push(element.label);
});
platformIdLabel.push(element.label)
})
} else {
this.arraysEqual(
this.getDictDatas(DICT_TYPE.PLATFORM_TYPE),
platformId.split(",")
platformId.split(',')
).forEach((element) => {
platformIdLabel.push(element.labelEn);
});
platformIdLabel.push(element.labelEn)
})
}
return platformIdLabel.join();
return platformIdLabel.join()
},
handleQuery() {
this.queryParams.page = 1;
let params = { ...this.queryParams };
this.queryParams.page = 1
const params = { ...this.queryParams }
this.addBeginAndEndTime(
params,
this.dateRangeCreateTime,
"createTime",
'createTime',
false
);
)
getScoreRecordList(params).then((res) => {
this.loading = false;
this.integrationRuleList = res.data.list;
this.total = res.data.total;
});
this.loading = false
this.integrationRuleList = res.data.list
this.total = res.data.total
})
},
handleQueryPagination() {
let params = { ...this.queryParams };
const params = { ...this.queryParams }
this.addBeginAndEndTime(
params,
this.dateRangeCreateTime,
"createTime",
'createTime',
false
);
)
getScoreRecordList(params).then((res) => {
this.loading = false;
this.integrationRuleList = res.data.list;
this.total = res.data.total;
});
this.loading = false
this.integrationRuleList = res.data.list
this.total = res.data.total
})
},
resetQuery() {
this.loading = true;
this.dateRangeCreateTime = [];
this.loading = true
this.dateRangeCreateTime = []
this.queryParams = {
ruleTitle: "",
ruleDesc: "",
key: "",
sourceType: "",
scoreCount: "",
scoreCountOperate: "",
endTime: "",
ruleTitle: '',
ruleDesc: '',
key: '',
sourceType: '',
scoreCount: '',
scoreCountOperate: '',
endTime: '',
pageNo: 1,
pageSize: 10,
startTime: "",
};
this.handleQuery();
},
},
};
startTime: ''
}
this.handleQuery()
}
}
}
</script>
<style scoped>
.switchBtn{
float: right;
padding-right: 70px;
padding-top: 6px;
}
</style>
......@@ -13,6 +13,7 @@
:placeholder="$t('请输入订单号、唛头、提单号')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/\s+/g, '')"
>
<template slot="prepend">
<dict-selector
......@@ -34,7 +35,7 @@
:placeholder="$t('发货人')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
onkeyup="this.value=this.value.replace(/\s+/g, '')"
/>
</el-form-item>
<el-form-item :label="$t('收货人')" prop="consigneeKey">
......@@ -43,7 +44,7 @@
:placeholder="$t('收货人')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
onkeyup="this.value=this.value.replace(/\s+/g, '')"
/>
</el-form-item>
<el-form-item label="">
......@@ -213,7 +214,8 @@
<el-form-item :label="$t('订单状态')" prop="status">
<dict-selector
:type="DICT_TYPE.ORDER_STATUS"
v-model="queryParams.status"
multiple
v-model="queryParams.statusList"
@keyup.enter.native="handleQuery"
:filter="statusDictFilter"
clearable
......@@ -261,7 +263,7 @@
:placeholder="$t('快递单号')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
onkeyup="this.value=this.value.replace(/\s+/g, '')"
/>
</el-form-item>
<el-form-item :label="$t('外部仓')" prop="number">
......@@ -281,7 +283,7 @@
<dict-selector
:type="DICT_TYPE.ORDER_ABNORMAL_STATE"
multiple
v-model="queryParams.abnormalState"
v-model="queryParams.abnormalStateList"
@keyup.enter.native="handleQuery"
clearable
@change="handleQuery"
......@@ -291,7 +293,7 @@
<dict-selector
:type="DICT_TYPE.ECW_ORDER_APPROVAL_TYPE"
multiple
v-model="queryParams.auditType"
v-model="queryParams.auditTypeList"
@keyup.enter.native="handleQuery"
clearable
@change="handleQuery"
......@@ -1675,16 +1677,16 @@ export default {
}
//目的国
if (this.destCountryId != null && this.destCountryId != "") {
queryParams.destCountryId = this.destCountryId;
queryParams.destCountryIds = this.destCountryId;
}
if (this.objectiveId != null && this.objectiveId != "") {
//目的城市
queryParams.objectiveId = this.objectiveId;
queryParams.objectiveIds = this.objectiveId;
}
if (this.destWarehouseId != null && this.destWarehouseId != "") {
//目的仓
queryParams.destWarehouseId = this.destWarehouseId;
queryParams.destWarehouseIds = this.destWarehouseId;
}
return queryParams;
......
......@@ -4,15 +4,15 @@
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('商品编码')" prop="productCode">
<el-input v-model="queryParams.productCode" :placeholder="$t('请输入商品编码')" clearable @keyup.enter.native="handleQuery"/>
<el-input v-model="queryParams.productCode" :placeholder="$t('请输入商品编码')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" />
</el-form-item>
<el-form-item :label="$t('海关编码')" prop="customsCode">
<el-input v-model="queryParams.customsCode" :placeholder="$t('请输入海关编码')" clearable @keyup.enter.native="handleQuery"/>
<el-input v-model="queryParams.customsCode" :placeholder="$t('请输入海关编码')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" />
</el-form-item>
<el-form-item :label="$t('商品名称')" prop="titleZh">
<el-input v-model="queryParams.titleZh" :placeholder="$t('请输入商品名称')" clearable @keyup.enter.native="handleQuery"/>
<el-input v-model="queryParams.titleZh" :placeholder="$t('请输入商品名称')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" />
</el-form-item>
<el-form-item :label="$t('商品类型')" prop="typeId">
......
......@@ -25,6 +25,7 @@
:placeholder="$t('请输入中英文名称、商品编码、海关编码')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/\s+/g, '')"
>
<template #prepend>
<el-select v-model="queryParams.searchType" style="width: 100px">
......
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