Commit 43d69de7 authored by 冯腾骁's avatar 冯腾骁

物流公司渠道

parent b117b54f
let host = window.location.protocol + '//' + window.location.host + '/'; let host = window.location.protocol + '//' + window.location.host + '/';
if (window.location.host === 'localhost:8097') host = 'http://finance.winwchain.com/finance-web'; let protocol=window.location.protocol
let currenthost=window.location.host
if (window.location.host === 'localhost:8097') host = `${protocol}//localhost:8090/logistics-config-center-web/`;
// http://sitpurchasing.rubansh.com/ // http://sitpurchasing.rubansh.com/
// http://localhost:8192/ // http://localhost:8192/
export const devtools = true; export const devtools = true;
......
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
password: that.financeForm.checkPass password: that.financeForm.checkPass
}; };
that.axios({ that.axios({
url: "finance/login/financeLogin", url: "logisticsConfig/login/configCenterLogin",
method: "POST", method: "POST",
data: loginData data: loginData
}).then(res => { }).then(res => {
......
<template> <template>
<el-col :span="24" class="mw"> <el-col :span="24" class="mw">
<div class="content-include"> <div class="content-include">
<div class="content-title">发货仓库配置>发货仓库</div> <div class="content-title">物流配置>物流公司和渠道</div>
<div class="df"> <div class="df">
<div class="pct50"> <div class="pct50">
<div class="search-input"> <div class="search-input">
<el-form :inline="true" :model="queryParams" class="demo-form-inline"> <el-form :inline="true" :model="companyParams" class="demo-form-inline">
<el-form-item label="仓库编码:"> <el-form-item label="物流公司查询:">
<el-input v-model="queryParams.batchCode" clearable size="mini" placeholder="批次编码" <el-input v-model="companyParams.companyName" clearable size="mini" placeholder="输入物流公司名"
@change="searchClick" @keyup.enter.native="getPage"/> @keyup.enter.native="getCompanyPage"/>
</el-form-item> </el-form-item>
<el-form-item label="仓库名字:"> <el-button type="primary" size="mini" @click="getCompanyPage" class="mt7 mr15 r mb10">
<el-input v-model="queryParams.importAccount" clearable size="mini" placeholder="导入账号" 查询
@change="searchClick" @keyup.enter.native="getPage"/> </el-button>
</el-form-item> </el-form>
<el-button type="primary" size="mini" @click="getPage" class="mt7 mr15 r mb10"> </div>
查询 <div class="pl15 mt10">
</el-button> <el-button type="primary" size="mini" class="mb10" @click="openInsertCompany">+ 物流公司录入
</el-form> </el-button>
</div> </div>
<div class="pl15 mt10"> <el-table ref="multipleTable" :data="companyTableData" class="pl15 mb47"
<el-button type="primary" size="mini" class="mb10" @click="importPlatformBill">+ 新建 @selection-change="getChannelPage" :height="tableMaxHeight">
</el-button> <el-table-column type="selection" align="center"/>
</div> <el-table-column prop="companyName" label="公司名称"/>
<el-table ref="multipleTable" :data="importTableData" class="pl15 mb47" <el-table-column prop="contacts" label="联系人"/>
@selection-change="importTableDataSelectionChange" :height="tableMaxHeight"> <el-table-column prop="contactWay" label="联系方式"/>
<el-table-column type="selection" align="center"/> <el-table-column label="操作">
<el-table-column prop="createAccount" label="仓库名称"/> <template slot-scope="scope">
<el-table-column prop="createDate" label="仓库地址信息"/> <span class="poi textButton" @click="editCompany(scope.row)">编辑</span>
<el-table-column prop="batchCode" label="状态" sortable/> <span class="poi textButton" @click="removeCompany(scope.row)">删除</span>
<el-table-column label="操作"> </template>
<template slot-scope="scope"> </el-table-column>
<span class="poi textButton" @click="searchDetail(scope.row)">编辑</span> </el-table>
<span class="poi textColor" <el-col :span="24">
@click="fileDownload(scope.row.fileUrl, scope.row.fileName)">删除成功</span> <div>
<span class="poi textColor" @click="delFile(scope.row.id, scope.row.importStatus)">应用</span> <el-pagination
</template> @size-change="handleSizeChange1"
</el-table-column> @current-change="handleCurrentChange1"
</el-table> :current-page="companyParams.pageNo"
</div> :page-sizes="[30, 50, 100]"
<div class="pct50"> :page-size="companyParams.pageSize"
<div class="search-input"> layout="total, sizes, prev, pager, next, jumper"
<el-form :inline="true" :model="queryParams" class="demo-form-inline"> :total="companyParams.total"
<el-form-item label="仓库编码:"> style="float:right;display:inline-block"
<el-input v-model="queryParams.batchCode" clearable size="mini" placeholder="批次编码" />
@change="searchClick" @keyup.enter.native="getPage"/> </div>
</el-form-item> </el-col>
<el-form-item label="仓库名字:">
<el-input v-model="queryParams.importAccount" clearable size="mini" placeholder="导入账号"
@change="searchClick" @keyup.enter.native="getPage"/>
</el-form-item>
<el-button type="primary" size="mini" @click="getPage" class="mt7 mr15 r mb10">
查询
</el-button>
</el-form>
</div>
<div class="pl15 mt10">
<el-button type="primary" size="mini" class="mb10" @click="importPlatformBill">+ 新建
</el-button>
</div>
<el-table ref="multipleTable2" :data="importTableData" class="pl15 mb47"
@selection-change="importTableDataSelectionChange" :height="tableMaxHeight">
<el-table-column type="selection" align="center"/>
<el-table-column prop="createAccount" label="仓库名称"/>
<el-table-column prop="createDate" label="仓库地址信息"/>
<el-table-column prop="timeCode" label="仓库编码"/>
<el-table-column prop="batchCode" label="状态" sortable/>
<el-table-column prop="agentCode" label="更新时间" sortable/>
<el-table-column label="操作">
<template slot-scope="scope">
<span class="poi textButton" @click="searchDetail(scope.row)">编辑</span>
<span class="poi textColor"
@click="fileDownload(scope.row.fileUrl, scope.row.fileName)">删除成功</span>
<span class="poi textColor" @click="delFile(scope.row.id, scope.row.importStatus)">应用</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div> </div>
<el-col :span="24"> <div class="pct50">
<div class="ceiling-pagination"> <div class="search-input">
<el-pagination <el-form :inline="true" :model="channelParams" class="demo-form-inline">
@size-change="handleSizeChange" <el-form-item label="渠道查询:">
@current-change="handleCurrentChange" <el-input v-model="channelParams.channelName" clearable size="mini" placeholder="输入渠道名称"
:current-page="queryParams.currentPage" @keyup.enter.native="getChannelPage"/>
:page-sizes="[30, 50, 100]" </el-form-item>
:page-size="queryParams.pageSize" <el-button type="primary" size="mini" @click="getChannelPage" class="mt7 mr15 r mb10">
layout="total, sizes, prev, pager, next, jumper" 查询
:total="queryParams.total" </el-button>
style="float:right;display:inline-block" </el-form>
/> </div>
<div class="pl15 mt10">
<el-button type="primary" size="mini" class="mb10" @click="openInsertChannel">+ 渠道录入
</el-button>
</div>
<el-table ref="multipleTable2" :data="channelTableData" class="pl15 mb47"
@selection-change="importTableDataSelectionChange" :height="tableMaxHeight">
<el-table-column type="index" label="序号">
<!-- <template slot-scope="scope">-->
<!-- <span>{{-->
<!-- (queryParams.pageNo - 1) * queryParams.pageSize + scope.$index + 1-->
<!-- }}</span>-->
<!-- </template>-->
</el-table-column>
<el-table-column type="selection" align="center"/>
<el-table-column prop="companyName" label="物流公司"/>
<el-table-column prop="channelName" label="渠道名称"/>
<el-table-column prop="channelCode" label="渠道编码"/>
<el-table-column prop="channelNo" label="渠道号"/>
<el-table-column prop="maxWeight" label="最大重量"/>
<el-table-column prop="isEnabled" label="是否启用"/>
<el-table-column prop="agentCode" label="代理编码"/>
<el-table-column prop="warehouseCode" label="分仓代码"/>
<el-table-column prop="isOnline" label="结账方式"/>
<el-table-column label="操作">
<template slot-scope="scope">
<span class="poi textButton" @click="removeChannel(scope.row)">删除</span>
</template>
</el-table-column>
</el-table>
<el-col :span="24">
<div style="float: top">
<el-pagination
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"
:current-page="channelParams.pageNo"
:page-sizes="[30, 50, 100]"
:page-size="channelParams.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="channelParams.total"
style="float:right;display:inline-block"
/>
</div> </div>
</el-col> </el-col>
</el-col> <el-dialog
:visible="insertChannelVisible"
title="录入渠道"
width="600px"
@close="insertChannelVisible = false"
center>
<el-row>
<el-form label-position="right" label-width="110px" :model="insertChannelParams">
<el-form-item prop="account" label-width="100px" :required="true">
<span slot="label">物流公司:</span>
<el-select size="small" v-model="insertChannelParams.companyId" clearable placeholder="请选择">
<el-option
v-for="item in companyList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="channelName" label-width="100px" :required="true">
<span slot="label">渠道名称:</span>
<el-input v-model="insertChannelParams.channelName" placeholder="请输入" class="pct75" ></el-input>
</el-form-item>
<el-form-item prop="maxWeight" label-width="100px" :required="true">
<span slot="label">最大重量:</span>
<el-input v-model="insertChannelParams.maxWeight" placeholder="请输入" class="pct75" ></el-input>
</el-form-item>
<el-form-item prop="agentCode" label-width="100px" :required="true">
<span slot="label">代理编码:</span>
<el-select size="small" v-model="insertChannelParams.agentCode" clearable placeholder="请选择">
<el-option
v-for="item in companyList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="warehouseCode" label-width="100px" :required="true">
<span slot="label">关联分仓:</span>
<el-select size="small" v-model="insertChannelParams.warehouseCode" clearable placeholder="请选择">
<el-option
v-for="item in companyList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="labelExpired" label-width="100px" :required="true">
<span slot="label">运单过期天数:</span>
<el-select size="small" v-model="insertChannelParams.labelExpired" clearable placeholder="请选择">
<el-option
v-for="item in companyList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="labelSize" label-width="100px" :required="true">
<span slot="label">运单尺寸:</span>
<el-select size="small" v-model="insertChannelParams.labelSize" clearable placeholder="请选择">
<el-option
v-for="item in companyList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="isEnabled" label-width="100px" :required="true">
<span slot="label">是否启用:</span>
<el-select size="small" v-model="insertChannelParams.isEnabled" clearable placeholder="请选择">
<el-option
v-for="item in companyList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="channelType" label-width="100px" :required="true">
<span slot="label">境内境外:</span>
<el-select size="small" v-model="insertChannelParams.channelType" clearable placeholder="请选择">
<el-option
v-for="item in companyList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="account" label-width="100px" :required="true">
<span slot="label">货物类型:</span>
<el-checkbox
v-model="checkAllBizTag"
@change="handleAllAgentChange"
>全选</el-checkbox>
<el-checkbox-group
v-model="insertChannelParams.bizTag"
@change="(val)=>{handleCheckedAgentChange(val)}"
>
<el-checkbox
v-for="item in bizTagList"
:label="item.id"
:key="item.id"
>{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<div class="discuss-buy" @click="insertChannel">确认</div>
</el-form>
</el-row>
</el-dialog>
<el-dialog
:visible="insertCompanyVisible"
title="录入物流公司"
width="600px"
@close="insertCompanyVisible = false"
center>
<el-row>
<el-form label-position="right" label-width="110px" :model="insertCompanyParams">
<el-form-item prop="account" label-width="100px" :required="true">
<span slot="label">公司名称:</span>
<el-input v-model="insertCompanyParams.companyName" placeholder="请输入" class="pct75" ></el-input>
</el-form-item>
<el-form-item prop="account" label-width="100px" :required="true">
<span slot="label">联系人:</span>
<el-input v-model="insertCompanyParams.contacts" placeholder="请输入" class="pct75" ></el-input>
</el-form-item>
<el-form-item prop="account" label-width="100px" :required="true">
<span slot="label">联系方式:</span>
<el-input v-model="insertCompanyParams.contactWay" placeholder="请输入" class="pct75" ></el-input>
</el-form-item>
<div class="discuss-buy" @click="insertCompany">确认</div>
</el-form>
</el-row>
</el-dialog>
</div>
</div>
</div>
</el-col>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
table: true, table: true,
queryParams: { companyParams: {
batchCode: '', pageNo: 1,
importAccount: '', pageSize: 30,
timeCode: '', total: 0,
authCode: '', companyName: '',
feeType: '', },
feeTypeList: [], channelParams: {
fileName: '', pageNo: 1,
importStatus: '', pageSize: 30,
importStatusList: [], total: 0,
syncStatus: '', channelName: '',
syncStatusList: [], companyIds:[],
orderId: '', },
sourceId: '', insertChannelParams:{
currentPage: 1, companyId:'',
pageSize: 30, channelName:'',
total: 0, maxWeight:'',
isPage: true agentCode:'',
}, warehouseCode:'',
total: 0, labelExpired:'',
tableData: [], labelSize:'',
importTableData: [], isEnabled:'',
importRecordData: [], bizTag:'',
importTableDataSelectionLength: 0, channelType:[],
tableMaxHeight: window.innerHeight - 263, },
insertCompanyParams:{
companyName:'',
contacts:'',
contactWay:''
},
insertCompanyVisible:false,
insertChannelVisible:false,
checkAllBizTag:false,
bizTagList: [{name: '平台物流', id: 0},
{name: '普货', id: 1},
{name: '带电', id: 2},
{name: '液体', id: 3},
{name: '粉尘', id: 4},
{name: '口罩', id: 5}],
companyList:[{name:'请选择',id:''},{name:'燕文物流',id:'yanwen'},{name:'某物流',id:'mouwuliu'}],
companyTableData:[],
channelTableData:[],
tableMaxHeight: window.innerHeight - 263,
}
},
methods: {
getCompanyPage() {
this.axios({
data: this.companyParams,
url: 'logisticsConfig/logisticsCompany/pageCompany',
method: 'post'
}).then(res => {
if(res.success()){
this.companyTableData = res.module.result;
this.companyParams.total = res.module.total;
}
})
},
getChannelPage(){
this.axios({
data: this.channelParams,
url: 'logisticsConfig/logisticsCompany/pageChannel',
method: 'post'
}).then(res => {
if(res.success()){
this.channelTableData = res.module.result;
this.channelParams.total = res.module.total;
} }
})
}, },
methods: { insertCompany(){
this.axios({
data: this.insertCompanyParams,
url: 'logisticsConfig/logisticsCompany/insertCompany',
method: 'post'
}).then(res => {
if(res.success()){
this.$message("录入成功")
this.getCompanyPage();
}
})
},
insertChannel(){
this.axios({
data: this.insertChannelParams,
url: 'logisticsConfig/logisticsCompany/insertChannel',
method: 'post'
}).then(res => {
if(res.success()){
this.$message("录入成功")
this.getChannelPage();
}
})
}, },
mounted() { updateCompany(){
window.onresize = () => { this.axios({
return (() => { data: this.insertChannelParams,
that.tableMaxHeight = window.innerHeight - 263 url: 'logisticsConfig/logisticsCompany/updateCompany',
})(); method: 'post'
}).then(res => {
if(res.success()){
this.$message("更新成功")
this.getChannelPage();
} }
})
}, },
activated() { updateChannel(){
this.tableMaxHeight = window.innerHeight - 263; this.axios({
data: this.insertChannelParams,
url: 'logisticsConfig/logisticsCompany/updateChannel',
method: 'post'
}).then(res => {
if(res.success()){
this.$message("更新成功")
this.getChannelPage();
}
})
}, },
openInsertCompany(){
this.insertCompanyVisible = true;
},
openInsertChannel(){
this.insertChannelVisible = true;
},
handleAllAgentChange(val) {
this.insertChannelParams.bizTag = val ? this.bizTagList.map(x=>x.id) : [];
this.getChannelPage();
},
handleCheckedAgentChange(value) {
let checkedCount = value.length;
this.checkAllBizTag = checkedCount === this.bizTagList.length;
this.getChannelPage();
},
},
mounted() {
window.onresize = () => {
return (() => {
that.tableMaxHeight = window.innerHeight - 263
})();
};
this.getCompanyPage();
this.getChannelPage();
},
activated() {
this.tableMaxHeight = window.innerHeight - 263;
},
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.el-drawer__body { .el-drawer__body {
.el-pagination { .el-pagination {
margin-right: 0px margin-right: 0px
} }
} }
.textButton { .textButton {
color: #4E74FC; color: #4E74FC;
} }
.textColor { .textColor {
color: #555555; color: #555555;
} }
.el-table th.gutter { .el-table th.gutter {
display: table-cell !important; display: table-cell !important;
} }
.test { .test {
margin-top: 14px; margin-top: 14px;
} }
.f13 { .f13 {
font-size: 13px; font-size: 13px;
font-weight: normal; font-weight: normal;
} }
.el-table th > .cell { .el-table th > .cell {
display: inline-block; display: inline-block;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
vertical-align: middle; vertical-align: middle;
padding-right: 10px; padding-right: 10px;
width: 100%; width: 100%;
} }
.show-overflow { .show-overflow {
max-width: 100px; max-width: 100px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
word-break: break-all; word-break: break-all;
} }
.errorRow { .errorRow {
color: #F56C6C; color: #F56C6C;
} }
.very-long-font { .very-long-font {
font-size: 12px; font-size: 12px;
display: -webkit-box; display: -webkit-box;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.pl0 { .pl0 {
padding-left: 0; padding-left: 0;
} }
.pt0 { .pt0 {
padding-top: 0; padding-top: 0;
}
.has-choose {
height: 25px;
border: 1px solid #4E74FC;
background: rgb(224, 244, 255);
border-radius: 4px;
line-height: 25px;
} }
.has-choose{ .discuss-buy {
height: 25px; padding: 10px;
border: 1px solid #4E74FC; text-align: center;
background:rgb(224, 244, 255); color: #FFFFFF;
border-radius: 4px; background: #B70037;
line-height: 25px; width: 150px;
margin: 20px auto 0px auto;
cursor: pointer;
} }
</style> </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