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

延期等bug

parent 391ea75a
...@@ -540,4 +540,31 @@ export function orderDeptStatistics(params){ ...@@ -540,4 +540,31 @@ export function orderDeptStatistics(params){
method: 'GET', method: 'GET',
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 @@ ...@@ -159,7 +159,7 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('结束时间')" align="center" prop="endTime" width="180"> <el-table-column :label="$t('结束时间')" align="center" prop="endTime" width="180">
<template slot-scope="{row}"> <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> <div v-if="row.overdueStatus == 0" style="color: red">{{ $t('已过期') }}</div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
v-hasPermi="['ecw:coupon:update']">{{ $t('编辑') }}</el-button> v-hasPermi="['ecw:coupon:update']">{{ $t('编辑') }}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleCopy(scope.row)" <el-button size="mini" type="text" icon="el-icon-edit" @click="handleCopy(scope.row)"
v-hasPermi="['ecw:coupon:create']">{{ $t('复制') }}</el-button> v-hasPermi="['ecw:coupon: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> v-hasPermi="['ecw:coupon:update']">{{ $t('延期') }}</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['ecw:coupon:delete']">{{ $t('删除') }}</el-button> v-hasPermi="['ecw:coupon:delete']">{{ $t('删除') }}</el-button>
...@@ -209,7 +209,7 @@ ...@@ -209,7 +209,7 @@
<div>{{$t('请问您确定延长活动吗?')}}</div> <div>{{$t('请问您确定延长活动吗?')}}</div>
<el-form :model="updateEndtimeForm" :rules="updateEndtimeRules" label-position="left" > <el-form :model="updateEndtimeForm" :rules="updateEndtimeRules" label-position="left" >
<el-form-item :label="$t('活动结束时间')" prop="endTime"> <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-checkbox :label="$t('永久有效')" v-model="updateEndtimeForm.forever" class="ml-10"></el-checkbox>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -296,6 +296,11 @@ export default { ...@@ -296,6 +296,11 @@ export default {
} }
} }
}, },
watch:{
updateEndtimeItem(){
this.updateEndtimeForm = {}
}
},
created() { created() {
this.getList(); this.getList();
}, },
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="100外币兑人民币汇率" align="center" prop="huilv" /> <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="$t('排序')" align="center" prop="aorder" />
<!-- <el-table-column label="" align="center" prop="createAt" width="180">--> <!-- <el-table-column label="" align="center" prop="createAt" width="180">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
......
...@@ -126,21 +126,23 @@ ...@@ -126,21 +126,23 @@
<el-col :span="1.5"> <el-col :span="1.5">
<!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" <!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
:loading="exportLoading" v-hasPermi="['ecw:order:export']">{{$t('导出')}}</el-button> --> :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"> <el-button type="primary" :loading="exportLoading" size="mini">
导出 <i class="el-icon-arrow-down el-icon--right"></i> 导出 <i class="el-icon-arrow-down el-icon--right"></i>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="exportChecked">导出勾选</el-dropdown-item> <el-dropdown-item v-hasPermi="['ecw:order:export:checked']" @click.native="exportChecked">导出勾选</el-dropdown-item>
<el-dropdown-item @click.native="exportSearch">导出搜索</el-dropdown-item> <el-dropdown-item v-hasPermi="['ecw:order:export:search']" @click.native="exportSearch">导出搜索</el-dropdown-item>
<el-dropdown-item @click.native="$message('// TODO')">异常单统计</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> <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>
<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> <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>
<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-menu>
</el-dropdown> </el-dropdown>
</el-col> </el-col>
...@@ -443,7 +445,10 @@ import { ...@@ -443,7 +445,10 @@ import {
deptOrderPage, deptOrderPage,
orderStatistics, orderStatistics,
orderMyStatistics, orderMyStatistics,
orderDeptStatistics orderDeptStatistics,
orderExportSearch,
orderExportMySearch,
orderExportDeptSearch
} from "@/api/ecw/order"; } from "@/api/ecw/order";
/* import { getDictDatas, DICT_TYPE } from '@/utils/dict'; */ /* import { getDictDatas, DICT_TYPE } from '@/utils/dict'; */
import PrintTag from './components/PrintTag' import PrintTag from './components/PrintTag'
...@@ -537,6 +542,10 @@ export default { ...@@ -537,6 +542,10 @@ export default {
} }
}, },
computed: { computed: {
// 是否全部订单
isAll(){
return !(this.mine || this.dept || this.transportId)
},
isChinese(){ isChinese(){
return this.$i18n.locale === 'zh_CN' return this.$i18n.locale === 'zh_CN'
}, },
...@@ -592,16 +601,23 @@ export default { ...@@ -592,16 +601,23 @@ export default {
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list) getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
}, },
methods: { methods: {
// 获得导出函数
getExportFunc(){
let func = orderExportSearch
if(this.mine)func = orderExportMySearch
if(this.dept)func = orderExportDeptSearch
return func
},
// 导出勾选 // 导出勾选
exportChecked(){ exportChecked(){
if(!this.ids.length){ if(!this.ids.length){
return this.$message.error(this.$t('请勾选需要导出的订单')) 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(){ exportSearch(){
return this.exportExcel(exportOrderExcel, this.combinedQueryParams, this.$t("导出搜索")) return this.exportExcel(this.getExportFunc(), this.combinedQueryParams, this.$t("导出搜索"))
}, },
// 通用导出函数 // 通用导出函数
exportExcel(func, params, fileName = null){ 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