|
|
@@ -1,6 +1,6 @@
|
|
|
<!--
|
|
|
供货商 PC 采购入库列表。
|
|
|
- 时间筛选:入库时间对应入库日 entryTime,发货时间对应 sendTime;导出区间与当前类型一致。
|
|
|
+ 时间筛选:记账时间对应入库日 entryTime,发货/送货时间对应 sendTime(文案由 pfLevel 决定);导出区间与当前类型一致。
|
|
|
-->
|
|
|
<template>
|
|
|
<div class="app-list-content">
|
|
|
@@ -153,8 +153,8 @@
|
|
|
</el-select>
|
|
|
|
|
|
<el-button-group style="margin-left:20px;margin-right:8px;">
|
|
|
- <el-button size="medium" :type="searchTimeType === 0 ? 'primary' : 'default'" @click="changeSearchTimeType(0)">入库时间</el-button>
|
|
|
- <el-button size="medium" :type="searchTimeType === 2 ? 'primary' : 'default'" @click="changeSearchTimeType(2)">发货时间</el-button>
|
|
|
+ <el-button size="medium" :type="searchTimeType === 0 ? 'primary' : 'default'" @click="changeSearchTimeType(0)">记账时间</el-button>
|
|
|
+ <el-button size="medium" :type="searchTimeType === 2 ? 'primary' : 'default'" @click="changeSearchTimeType(2)">{{ sendName }}</el-button>
|
|
|
</el-button-group>
|
|
|
<el-date-picker v-model="currentDateList" type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="开始日期" @change="getSearchDate" value-format="yyyy-MM-dd"
|
|
|
end-placeholder="结束日期" :picker-options="pickerOptions" size="medium">
|
|
|
@@ -217,8 +217,10 @@ export default {
|
|
|
startTime:'',
|
|
|
endTime:'',
|
|
|
searchTime:'',
|
|
|
- /** 时间筛选类型:0 开单 entryTime(原入库时间),2 发货 sendTime */
|
|
|
+ /** 时间筛选类型:0 开单 entryTime(原记账时间),2 发货/送货 sendTime */
|
|
|
searchTimeType: 0,
|
|
|
+ /** sendTime 文案:pfLevel=0 发货时间,pfLevel=1 送货时间(列表接口返回后更新) */
|
|
|
+ sendName: '发货时间',
|
|
|
name:'',
|
|
|
currentDateList:[],
|
|
|
staffList:[],
|
|
|
@@ -256,7 +258,7 @@ export default {
|
|
|
computed: {
|
|
|
/** 当前筛选时间类型文案,导出按钮和提示共用 */
|
|
|
searchTimeTypeName() {
|
|
|
- return this.searchTimeType === 2 ? '发货时间' : '入库时间'
|
|
|
+ return this.searchTimeType === 2 ? this.sendName : '记账时间'
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -287,7 +289,7 @@ export default {
|
|
|
methods: {
|
|
|
/**
|
|
|
* 组装采购列表查询参数。
|
|
|
- * 开单筛 entryTime(searchTime);发货筛 sendTime(sendSearchTime);日期控件共用 start/end。
|
|
|
+ * 开单筛 entryTime(searchTime);发货/送货筛 sendTime(sendSearchTime);日期控件共用 start/end。
|
|
|
*/
|
|
|
getListSearchParams(extra = {}) {
|
|
|
const params = {
|
|
|
@@ -307,7 +309,7 @@ export default {
|
|
|
}
|
|
|
return Object.assign(params, extra)
|
|
|
},
|
|
|
- /** 切换开单 / 发货时间筛选 */
|
|
|
+ /** 切换开单 / 发货(送货)时间筛选 */
|
|
|
changeSearchTimeType(type) {
|
|
|
if (this.searchTimeType === type) {
|
|
|
return
|
|
|
@@ -505,6 +507,13 @@ export default {
|
|
|
this.currentCgStaffName = this.$route.query.currentCgStaffName
|
|
|
}
|
|
|
|
|
|
+ // 表头对象单独持有,便于列表返回 pfLevel 后改文案
|
|
|
+ const sendTimeColumn = {
|
|
|
+ prop: 'sendTime',
|
|
|
+ label: this.sendName,
|
|
|
+ align: 'center',
|
|
|
+ width: 120
|
|
|
+ }
|
|
|
ctx.service(this.$service.purchaseOrder)
|
|
|
.set('table', {
|
|
|
columns: [
|
|
|
@@ -588,15 +597,10 @@ export default {
|
|
|
width: 80,
|
|
|
emptyText: '-'
|
|
|
},
|
|
|
- {
|
|
|
- prop: 'sendTime',
|
|
|
- label: '发货时间',
|
|
|
- align: 'center',
|
|
|
- width: 120
|
|
|
- },
|
|
|
+ sendTimeColumn,
|
|
|
{
|
|
|
prop: 'entryTime',
|
|
|
- label: '入库时间',
|
|
|
+ label: '记账时间',
|
|
|
align: 'center',
|
|
|
width: 120
|
|
|
},
|
|
|
@@ -638,7 +642,11 @@ export default {
|
|
|
['flex1', 'pagination']
|
|
|
])
|
|
|
.on('refresh', async (params, { next }) => {
|
|
|
- let asset = await next(params)
|
|
|
+ let asset = await next(params)
|
|
|
+ // 批发商 pfLevel=1 用「送货时间」,否则「发货时间」(与 App 采购列表一致)
|
|
|
+ const sendName = Number(asset && asset.pfLevel) === 1 ? '送货时间' : '发货时间'
|
|
|
+ this.sendName = sendName
|
|
|
+ sendTimeColumn.label = sendName
|
|
|
})
|
|
|
.done();
|
|
|
app.refresh(this.getListSearchParams())
|