|
@@ -1,3 +1,7 @@
|
|
|
|
|
+<!--
|
|
|
|
|
+ 供货商 PC 采购入库列表。
|
|
|
|
|
+ 时间筛选:入库时间对应入库日 entryTime,发货时间对应 sendTime;导出区间与当前类型一致。
|
|
|
|
|
+-->
|
|
|
<template>
|
|
<template>
|
|
|
<div class="app-list-content">
|
|
<div class="app-list-content">
|
|
|
<x-crud class="liu-crud-wrap order-list-wrap" @load="onLoad">
|
|
<x-crud class="liu-crud-wrap order-list-wrap" @load="onLoad">
|
|
@@ -71,7 +75,12 @@
|
|
|
</template>
|
|
</template>
|
|
|
<template #table-column-entryTime="{scope}">
|
|
<template #table-column-entryTime="{scope}">
|
|
|
<div>
|
|
<div>
|
|
|
- {{ scope.row.entryTime?scope.row.entryTime.substr(5,11):'' }}
|
|
|
|
|
|
|
+ {{ scope.row.entryTime && scope.row.entryTime.indexOf('0000-00-00') < 0 ? scope.row.entryTime.substr(5,11) : '' }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template #table-column-sendTime="{scope}">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ {{ scope.row.sendTime && scope.row.sendTime.indexOf('0000-00-00') < 0 ? scope.row.sendTime.substr(5,11) : '-' }}
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -133,7 +142,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template #slot-export-order>
|
|
<template #slot-export-order>
|
|
|
- <el-button type="primary" size="mini" style="margin-left:60px;" @click="exportData()">导出数据</el-button>
|
|
|
|
|
|
|
+ <el-button type="primary" size="mini" style="margin-left:60px;" @click="exportData()">导出{{ searchTimeTypeName }}</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template #slot-search-option="{scope}">
|
|
<template #slot-search-option="{scope}">
|
|
@@ -143,7 +152,10 @@
|
|
|
<el-option v-for="item in staffList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
<el-option v-for="item in staffList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
|
|
|
|
|
- <span style="font-size:22px;margin-left:20px;">入库时间:</span>
|
|
|
|
|
|
|
+ <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-group>
|
|
|
<el-date-picker v-model="currentDateList" type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="开始日期" @change="getSearchDate" value-format="yyyy-MM-dd"
|
|
<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">
|
|
end-placeholder="结束日期" :picker-options="pickerOptions" size="medium">
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
@@ -205,6 +217,8 @@ export default {
|
|
|
startTime:'',
|
|
startTime:'',
|
|
|
endTime:'',
|
|
endTime:'',
|
|
|
searchTime:'',
|
|
searchTime:'',
|
|
|
|
|
+ /** 时间筛选类型:0 开单 entryTime(原入库时间),2 发货 sendTime */
|
|
|
|
|
+ searchTimeType: 0,
|
|
|
name:'',
|
|
name:'',
|
|
|
currentDateList:[],
|
|
currentDateList:[],
|
|
|
staffList:[],
|
|
staffList:[],
|
|
@@ -239,6 +253,12 @@ export default {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ /** 当前筛选时间类型文案,导出按钮和提示共用 */
|
|
|
|
|
+ searchTimeTypeName() {
|
|
|
|
|
+ return this.searchTimeType === 2 ? '发货时间' : '入库时间'
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
created() {
|
|
created() {
|
|
|
this.init();
|
|
this.init();
|
|
|
},
|
|
},
|
|
@@ -265,6 +285,36 @@ export default {
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 组装采购列表查询参数。
|
|
|
|
|
+ * 开单筛 entryTime(searchTime);发货筛 sendTime(sendSearchTime);日期控件共用 start/end。
|
|
|
|
|
+ */
|
|
|
|
|
+ getListSearchParams(extra = {}) {
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ status: this.tabIndex,
|
|
|
|
|
+ search: this.searchContent,
|
|
|
|
|
+ cgStaffId: this.currentCgStaffId,
|
|
|
|
|
+ searchTimeType: this.searchTimeType
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.searchTimeType === 2) {
|
|
|
|
|
+ params.sendSearchTime = this.searchTime
|
|
|
|
|
+ params.sendStartTime = this.startTime
|
|
|
|
|
+ params.sendEndTime = this.endTime
|
|
|
|
|
+ } else {
|
|
|
|
|
+ params.searchTime = this.searchTime
|
|
|
|
|
+ params.startTime = this.startTime
|
|
|
|
|
+ params.endTime = this.endTime
|
|
|
|
|
+ }
|
|
|
|
|
+ return Object.assign(params, extra)
|
|
|
|
|
+ },
|
|
|
|
|
+ /** 切换开单 / 发货时间筛选 */
|
|
|
|
|
+ changeSearchTimeType(type) {
|
|
|
|
|
+ if (this.searchTimeType === type) {
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ this.searchTimeType = type
|
|
|
|
|
+ this.app.refresh(this.getListSearchParams())
|
|
|
|
|
+ },
|
|
|
doMore(cmd,data){
|
|
doMore(cmd,data){
|
|
|
if(cmd == 'cancelCurrentOrder'){
|
|
if(cmd == 'cancelCurrentOrder'){
|
|
|
this.cancelOrder(data)
|
|
this.cancelOrder(data)
|
|
@@ -291,7 +341,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
getCgStaff(e){
|
|
getCgStaff(e){
|
|
|
this.currentCgStaffId = e
|
|
this.currentCgStaffId = e
|
|
|
- this.app.refresh({ status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,cgStaffId:this.currentCgStaffId})
|
|
|
|
|
|
|
+ this.app.refresh(this.getListSearchParams())
|
|
|
},
|
|
},
|
|
|
changeSearch(){
|
|
changeSearch(){
|
|
|
let that = this
|
|
let that = this
|
|
@@ -299,11 +349,15 @@ export default {
|
|
|
clearTimeout(this.T)
|
|
clearTimeout(this.T)
|
|
|
}
|
|
}
|
|
|
this.T = setTimeout(function(){
|
|
this.T = setTimeout(function(){
|
|
|
- that.app.refresh({ status: that.tabIndex,searchTime:that.searchTime,startTime:that.startTime,endTime:that.endTime,search:that.searchContent,cgStaffId:that.currentCgStaffId})
|
|
|
|
|
|
|
+ that.app.refresh(that.getListSearchParams())
|
|
|
},650)
|
|
},650)
|
|
|
},
|
|
},
|
|
|
exportData(){
|
|
exportData(){
|
|
|
- this.$service.purchaseOrder.getOrderList({status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,export:1,pageSize:9999999}).then(res => {
|
|
|
|
|
|
|
+ if (!this.searchTime) {
|
|
|
|
|
+ this.$message.warning('请选 ' + this.searchTimeTypeName + ' 和时间段')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$service.purchaseOrder.getOrderList(this.getListSearchParams({export:1,pageSize:9999999})).then(res => {
|
|
|
if(res.file){
|
|
if(res.file){
|
|
|
window.location.href = res.file
|
|
window.location.href = res.file
|
|
|
}
|
|
}
|
|
@@ -313,7 +367,7 @@ export default {
|
|
|
this.$prompt('请输入货位号','提示',{confirmButtonText:'确定',cancelButtonText:'取消'}).then(({value}) => {
|
|
this.$prompt('请输入货位号','提示',{confirmButtonText:'确定',cancelButtonText:'取消'}).then(({value}) => {
|
|
|
this.$service.purchaseOrder.modifySeatSn({ seatSn: value,id:info.id}).then(data => {
|
|
this.$service.purchaseOrder.modifySeatSn({ seatSn: value,id:info.id}).then(data => {
|
|
|
this.$notify({ title: '成功', message: '操作成功', type: 'success'})
|
|
this.$notify({ title: '成功', message: '操作成功', type: 'success'})
|
|
|
- this.app.refresh({ status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,cgStaffId:this.currentCgStaffId})
|
|
|
|
|
|
|
+ this.app.refresh(this.getListSearchParams())
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -400,7 +454,7 @@ export default {
|
|
|
this.$confirm('确认取消?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
|
this.$confirm('确认取消?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
|
|
this.$service.purchaseOrder.cancelOrder({id:item.id}).then(data => {
|
|
this.$service.purchaseOrder.cancelOrder({id:item.id}).then(data => {
|
|
|
this.$notify({ title: '已取消', message: '操作成功', type: 'success'})
|
|
this.$notify({ title: '已取消', message: '操作成功', type: 'success'})
|
|
|
- this.app.refresh({ status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,cgStaffId:this.currentCgStaffId})
|
|
|
|
|
|
|
+ this.app.refresh(this.getListSearchParams())
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -411,7 +465,7 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
changeTab(tab, e) {
|
|
changeTab(tab, e) {
|
|
|
- this.app.refresh({ status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,cgStaffId:this.currentCgStaffId});
|
|
|
|
|
|
|
+ this.app.refresh(this.getListSearchParams());
|
|
|
},
|
|
},
|
|
|
getSearchDate(){
|
|
getSearchDate(){
|
|
|
if (this.$util.isEmpty(this.currentDateList)) {
|
|
if (this.$util.isEmpty(this.currentDateList)) {
|
|
@@ -423,7 +477,7 @@ export default {
|
|
|
this.startTime = this.currentDateList[0]
|
|
this.startTime = this.currentDateList[0]
|
|
|
this.endTime = this.currentDateList[1]
|
|
this.endTime = this.currentDateList[1]
|
|
|
}
|
|
}
|
|
|
- this.app.refresh({ status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,cgStaffId:this.currentCgStaffId})
|
|
|
|
|
|
|
+ this.app.refresh(this.getListSearchParams())
|
|
|
},
|
|
},
|
|
|
onLoad({ ctx, app }) {
|
|
onLoad({ ctx, app }) {
|
|
|
this.app = app;
|
|
this.app = app;
|
|
@@ -534,6 +588,12 @@ export default {
|
|
|
width: 80,
|
|
width: 80,
|
|
|
emptyText: '-'
|
|
emptyText: '-'
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'sendTime',
|
|
|
|
|
+ label: '发货时间',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ width: 120
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
prop: 'entryTime',
|
|
prop: 'entryTime',
|
|
|
label: '入库时间',
|
|
label: '入库时间',
|
|
@@ -581,7 +641,7 @@ export default {
|
|
|
let asset = await next(params)
|
|
let asset = await next(params)
|
|
|
})
|
|
})
|
|
|
.done();
|
|
.done();
|
|
|
- app.refresh({ status: this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,cgStaffId:this.currentCgStaffId})
|
|
|
|
|
|
|
+ app.refresh(this.getListSearchParams())
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|