Commit 2e47ee0d authored by 邓春圆's avatar 邓春圆

添加全部列表

parent 98b69d40
......@@ -81,3 +81,11 @@ export function getCustomerContactsListByCustomer(query) {
return Promise.resolve()
}
}
//全部列表数据
export function warehouseLinePage(params){
return request({
url:'/ecw/warehouse-line/page',
method:'get',
params,
})
}
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('运输方式')" prop="transportType">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportType" formatter="number"
clearable/>
</el-form-item>
<el-form-item>
<el-form-item :label="$t('始发仓')" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发仓')" clearable>
<el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id"
:key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseIdArr">
<el-select :multiple="true" v-model="queryParams.destWarehouseIdArr" multiple
:placeholder="$t('请选择目的仓')" clearable>
<el-option v-for="item in importWarehouseList" :label="$l(item, 'title')" :value="item.id"
:key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('出货渠道')" prop="shippingChannel">
<el-select v-model="queryParams.shippingChannel" :placeholder="$t('请选择出货渠道')" clearable>
<el-option v-for="item in channelList" :label="item.nameZh" :value="item.channelId"
:key="item.channelId"></el-option>
</el-select>
</el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('搜索') }}</el-button>
</el-form-item>
</el-form>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('序号')" align="center" type="index" />
<el-table-column :label="$t('始发仓')" align="center">
<template slot-scope="{row}">
{{$l(exportWarehouseList.find(i=>i.id === row.startWarehouseId),'title')}}
</template>
</el-table-column>
<el-table-column :label="$t('目的仓')" align="center">
<template slot-scope="{row}">
{{$l(importWarehouseList.find(i=>i.id === row.destWarehouseId),'title')}}
</template>
</el-table-column>
<el-table-column :label="$t('运输方式')" align="center" >
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportType"></dict-tag>
</template>
</el-table-column>
<el-table-column :label="$t('出货渠道')" align="center" >
<template slot-scope="{row}">
<!-- {{channelList.find(i=>i.channelId === row.)}}-->
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center">
<template slot-scope="{row}">
<el-button v-if="row.transportType === 3" type="text">空运渠道包装清关费</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
</div>
</template>
<script>
import {
createDeptTarget,
updateDeptTarget,
deleteDeptTarget,
getDeptTarget,
getDeptTargetPage,
exportDeptTargetExcel,
getCreateInitData,
getPersonTargetPage,
myAchievementByPage
} from "@/api/ecw/deptTarget";
import {listSimpleDepts} from "@/api/system/dept";
import {getChannelList} from '@/api/ecw/channel';
import dayjs from "dayjs";
import {listServiceUser} from "@/api/system/user";
import {getWarehouseList} from '@/api/ecw/warehouse'
import {DICT_TYPE} from "@/utils/dict";
import {warehouseLinePage} from "@/api/ecw/customerContacts";
export default {
name: "all-routes-list",
components: {},
data() {
return {
// 遮罩层
loading: true,
// 总条数
total: 0,
list: [],
// 是否显示弹出层
open: false,
tableOpen: false,
channelList: [],
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
},
// 表单校验
myAchievementData: {},
warehouseList: []
};
},
computed: {
DICT_TYPE() {
return DICT_TYPE
},
exportWarehouseList() {
/* tradeType 1 进口,2出口,3进出口 */
return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3)
},
importWarehouseList() {
return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3)
},
},
activated() {
this.getChannelList();
this.getList();
},
created() {
this.getChannelList();
this.getList();
listServiceUser().then(r => {
this.customerServiceList = r.data;
})
getWarehouseList().then(res => {
this.warehouseList = res.data
})
},
methods: {
getChannelList() {
getChannelList().then(res => this.channelList = res.data)
},
customerServiceFn(val) {
if (this.customerServiceList.length > 0) {
let index = this.customerServiceList.findIndex(item => item.id === val.userId);
return index !== -1 ? this.customerServiceList[index]?.nickname : ''
} else {
return ''
}
},
/** 查询列表 */
getList() {
this.loading = true;
const params = {...this.queryParams}
// 执行查询
warehouseLinePage(params).then(r =>{
this.loading = false;
console.log(r,'rrr')
this.list = r.data.list;
this.total = r.data.total
})
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
}
};
</script>
<style scoped>
.total_num {
display: flex;
align-items: center;
justify-content: center;
margin: 20px 0;
font-size: 15px;
}
.total_num span {
margin: 0 8px;
}
</style>
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