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

延期等bug

parent 391ea75a
......@@ -541,3 +541,30 @@ export function orderDeptStatistics(params){
params
})
}
// 参数搜索导出订单管理 Excel
export function orderExportSearch(params){
return request({
url: '/ecw/order/export/search',
method: 'GET',
params
})
}
// 参数搜索导出我的订单管理 Excel
export function orderExportMySearch(params){
return request({
url: '/ecw/order/export/my/search',
method: 'GET',
params
})
}
// 参数搜索导出部门订单管理 Excel
export function orderExportDeptSearch(params){
return request({
url: '/ecw/order/export/dept/search',
method: 'GET',
params
})
}
\ No newline at end of file
......@@ -159,7 +159,7 @@
</el-table-column>
<el-table-column :label="$t('结束时间')" align="center" prop="endTime" width="180">
<template slot-scope="{row}">
<div :style="{red: row.overdueStatus ==0 ? 'red' : null}">{{ parseTime(row.endTime, '{y}-{m}-{d}') }}</div>
<div :style="{red: row.overdueStatus == 0 ? 'red' : null}">{{ parseTime(row.endTime, '{y}-{m}-{d}') }}</div>
<div v-if="row.overdueStatus == 0" style="color: red">{{ $t('已过期') }}</div>
</template>
</el-table-column>
......@@ -188,7 +188,7 @@
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>
<el-button size="mini" type="text" icon="el-icon-edit" @click="updateEndtimeItem = scope.row"
<el-button size="mini" type="text" icon="el-icon-edit" @click="updateEndtimeItem = scope.row" v-if="scope.row.endTime"
v-hasPermi="['ecw:coupon:update']">{{ $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>
......@@ -209,7 +209,7 @@
<div>{{$t('请问您确定延长活动吗?')}}</div>
<el-form :model="updateEndtimeForm" :rules="updateEndtimeRules" label-position="left" >
<el-form-item :label="$t('活动结束时间')" prop="endTime">
<el-date-picker type="datetime" value-format="yyyy-MM-dd HH:mm:ss" v-model="updateEndtimeForm.endTime" placeholder=""></el-date-picker>
<el-date-picker v-if="!updateEndtimeForm.forever" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" v-model="updateEndtimeForm.endTime" placeholder=""></el-date-picker>
<el-checkbox :label="$t('永久有效')" v-model="updateEndtimeForm.forever" class="ml-10"></el-checkbox>
</el-form-item>
</el-form>
......@@ -296,6 +296,11 @@ export default {
}
}
},
watch:{
updateEndtimeItem(){
this.updateEndtimeForm = {}
}
},
created() {
this.getList();
},
......
......@@ -60,7 +60,7 @@
</template>
</el-table-column>
<el-table-column label="100外币兑人民币汇率" align="center" prop="huilv" />
<el-table-column label="100人民币兑外币汇率" align="center" prop="exchangeToFc">
<el-table-column label="100人民币兑外币汇率" align="center" prop="exchangeToFc" />
<el-table-column :label="$t('排序')" align="center" prop="aorder" />
<!-- <el-table-column label="" align="center" prop="createAt" width="180">-->
<!-- <template slot-scope="scope">-->
......
......@@ -126,13 +126,14 @@
<el-col :span="1.5">
<!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
:loading="exportLoading" v-hasPermi="['ecw:order:export']">{{$t('导出')}}</el-button> -->
<el-dropdown v-hasPermi="['ecw:order:export']">
<el-dropdown v-hasPermi="['ecw:order:export:other','ecw:order:export:checked','ecw:order:export:search' ]">
<el-button type="primary" :loading="exportLoading" size="mini">
导出 <i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="exportChecked">导出勾选</el-dropdown-item>
<el-dropdown-item @click.native="exportSearch">导出搜索</el-dropdown-item>
<el-dropdown-item v-hasPermi="['ecw:order:export:checked']" @click.native="exportChecked">导出勾选</el-dropdown-item>
<el-dropdown-item v-hasPermi="['ecw:order:export:search']" @click.native="exportSearch">导出搜索</el-dropdown-item>
<template v-if="isAll" v-hasPermi="['ecw:order:export:other']">
<el-dropdown-item @click.native="$message('// TODO')">异常单统计</el-dropdown-item>
<el-dropdown-item @click.native="$message('// TODO')">重货单统计</el-dropdown-item>
<el-dropdown-item @click.native="$message('// TODO')">退仓单统计</el-dropdown-item>
......@@ -141,6 +142,7 @@
<el-dropdown-item @click.native="$message('// TODO')">客户出货量统计</el-dropdown-item>
<el-dropdown-item @click.native="$message('// TODO')">预付运费统计</el-dropdown-item>
<el-dropdown-item @click.native="$message('// TODO')">卸货费统计</el-dropdown-item>
</template>
</el-dropdown-menu>
</el-dropdown>
</el-col>
......@@ -443,7 +445,10 @@ import {
deptOrderPage,
orderStatistics,
orderMyStatistics,
orderDeptStatistics
orderDeptStatistics,
orderExportSearch,
orderExportMySearch,
orderExportDeptSearch
} from "@/api/ecw/order";
/* import { getDictDatas, DICT_TYPE } from '@/utils/dict'; */
import PrintTag from './components/PrintTag'
......@@ -537,6 +542,10 @@ export default {
}
},
computed: {
// 是否全部订单
isAll(){
return !(this.mine || this.dept || this.transportId)
},
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
......@@ -592,16 +601,23 @@ export default {
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
},
methods: {
// 获得导出函数
getExportFunc(){
let func = orderExportSearch
if(this.mine)func = orderExportMySearch
if(this.dept)func = orderExportDeptSearch
return func
},
// 导出勾选
exportChecked(){
if(!this.ids.length){
return this.$message.error(this.$t('请勾选需要导出的订单'))
}
return this.exportExcel(exportOrderExcel, {orderIdList: this.ids}, this.$t("导出勾选"))
return this.exportExcel(this.getExportFunc(), {orderIdList: this.ids}, this.$t("导出勾选"))
},
// 导出搜索
exportSearch(){
return this.exportExcel(exportOrderExcel, this.combinedQueryParams, this.$t("导出搜索"))
return this.exportExcel(this.getExportFunc(), this.combinedQueryParams, this.$t("导出搜索"))
},
// 通用导出函数
exportExcel(func, params, fileName = null){
......
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