Commit c599cf0e authored by 冯腾骁's avatar 冯腾骁

物流公司渠道页面查询

parent 43d69de7
......@@ -147,7 +147,7 @@ export default {
token: that.token
};
that.axios({
url: "finance/login/roleLogin",
url: "logisticsConfig/login/roleLogin",
method: "POST",
data: roleData
}).then(res => {
......
......@@ -8,7 +8,7 @@
<el-form :inline="true" :model="companyParams" class="demo-form-inline">
<el-form-item label="物流公司查询:">
<el-input v-model="companyParams.companyName" clearable size="mini" placeholder="输入物流公司名"
@keyup.enter.native="getCompanyPage"/>
@keyup.enter.native="getCompanyPage"/>
</el-form-item>
<el-button type="primary" size="mini" @click="getCompanyPage" class="mt7 mr15 r mb10">
查询
......@@ -52,7 +52,7 @@
<el-form :inline="true" :model="channelParams" class="demo-form-inline">
<el-form-item label="渠道查询:">
<el-input v-model="channelParams.channelName" clearable size="mini" placeholder="输入渠道名称"
@keyup.enter.native="getChannelPage"/>
@keyup.enter.native="getChannelPage"/>
</el-form-item>
<el-button type="primary" size="mini" @click="getChannelPage" class="mt7 mr15 r mb10">
查询
......@@ -64,24 +64,30 @@
</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>-->
:height="tableMaxHeight">
<el-table-column type="index" label="序号" fixed>
<template slot-scope="scope">
<span>{{ (channelParams.pageNo - 1) * channelParams.pageSize + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column type="selection" align="center"/>
<el-table-column type="selection" align="center" fixed/>
<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 label="是否启用">
<template slot-scope="scope">
<div>{{scope.row.isEnabled?'是':'否'}}</div>
</template>
</el-table-column>
<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">
<div>{{scope.row.isOnline?'线上':'线下'}}</div>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<span class="poi textButton" @click="removeChannel(scope.row)">删除</span>
......@@ -123,13 +129,13 @@
</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-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-input v-model="insertChannelParams.maxWeight" placeholder="请输入" class="pct75"></el-input>
</el-form-item>
<el-form-item prop="agentCode" label-width="100px" :required="true">
<el-form-item prop="agentCode" label-width="100px">
<span slot="label">代理编码:</span>
<el-select size="small" v-model="insertChannelParams.agentCode" clearable placeholder="请选择">
<el-option
......@@ -140,7 +146,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="warehouseCode" label-width="100px" :required="true">
<el-form-item prop="warehouseCode" label-width="100px">
<span slot="label">关联分仓:</span>
<el-select size="small" v-model="insertChannelParams.warehouseCode" clearable placeholder="请选择">
<el-option
......@@ -153,20 +159,13 @@
</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-input v-model="insertChannelParams.labelExpired" placeholder="请输入" class="pct75"></el-input>
</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"
v-for="item in labelSizeList"
:key="item.id"
:label="item.name"
:value="item.id">
......@@ -177,7 +176,7 @@
<span slot="label">是否启用:</span>
<el-select size="small" v-model="insertChannelParams.isEnabled" clearable placeholder="请选择">
<el-option
v-for="item in companyList"
v-for="item in isEnabledList"
:key="item.id"
:label="item.name"
:value="item.id">
......@@ -185,22 +184,34 @@
</el-select>
</el-form-item>
<el-form-item prop="channelType" label-width="100px" :required="true">
<span slot="label">境内境外:</span>
<span slot="label">境内境外:</span>
<el-select size="small" v-model="insertChannelParams.channelType" clearable placeholder="请选择">
<el-option
v-for="item in companyList"
v-for="item in channelTypeList"
: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">
</el-form-item>
<el-form-item prop="channelType" label-width="100px" :required="true">
<span slot="label">结账方式:</span>
<el-select size="small" v-model="insertChannelParams.isOnline" clearable placeholder="请选择">
<el-option
v-for="item in isOnlineList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="bizTag" label-width="100px" :required="true">
<span slot="label">货物类型:</span>
<el-checkbox
v-model="checkAllBizTag"
@change="handleAllAgentChange"
>全选</el-checkbox>
>全选
</el-checkbox>
<el-checkbox-group
v-model="insertChannelParams.bizTag"
@change="(val)=>{handleCheckedAgentChange(val)}"
......@@ -209,7 +220,8 @@
v-for="item in bizTagList"
:label="item.id"
:key="item.id"
>{{item.name}}</el-checkbox>
>{{ item.name }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<div class="discuss-buy" @click="insertChannel">确认</div>
......@@ -224,17 +236,17 @@
center>
<el-row>
<el-form label-position="right" label-width="110px" :model="insertCompanyParams">
<el-form-item prop="account" label-width="100px" :required="true">
<el-form-item prop="companyName" label-width="100px" :required="true">
<span slot="label">公司名称:</span>
<el-input v-model="insertCompanyParams.companyName" placeholder="请输入" class="pct75" ></el-input>
<el-input v-model="insertCompanyParams.companyName" placeholder="请输入" class="pct75"></el-input>
</el-form-item>
<el-form-item prop="account" label-width="100px" :required="true">
<el-form-item prop="contacts" label-width="100px" :required="true">
<span slot="label">联系人:</span>
<el-input v-model="insertCompanyParams.contacts" placeholder="请输入" class="pct75" ></el-input>
<el-input v-model="insertCompanyParams.contacts" placeholder="请输入" class="pct75"></el-input>
</el-form-item>
<el-form-item prop="account" label-width="100px" :required="true">
<el-form-item prop="contactWay" label-width="100px" :required="true">
<span slot="label">联系方式:</span>
<el-input v-model="insertCompanyParams.contactWay" placeholder="请输入" class="pct75" ></el-input>
<el-input v-model="insertCompanyParams.contactWay" placeholder="请输入" class="pct75"></el-input>
</el-form-item>
<div class="discuss-buy" @click="insertCompany">确认</div>
</el-form>
......@@ -261,127 +273,174 @@ export default {
pageSize: 30,
total: 0,
channelName: '',
companyIds:[],
companyIds: [],
},
insertChannelParams:{
companyId:'',
channelName:'',
maxWeight:'',
agentCode:'',
warehouseCode:'',
labelExpired:'',
labelSize:'',
isEnabled:'',
bizTag:'',
channelType:[],
insertChannelParams: {
companyId: '',
channelName: '',
maxWeight: '',
agentCode: '',
warehouseCode: '',
labelExpired: '',
labelSize: '',
isEnabled: '',
bizTag: [1],
isOnline: '',
channelType: '',
},
insertCompanyParams:{
companyName:'',
contacts:'',
contactWay:''
insertCompanyParams: {
companyName: '',
contacts: '',
contactWay: ''
},
insertCompanyVisible:false,
insertChannelVisible:false,
checkAllBizTag:false,
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:[],
companyList: [{name: '请选择', id: ''}, {name: '燕文物流', id: 'yanwen'}, {name: '某物流', id: 'mouwuliu'}],
channelTypeList: [{name: '请选择', id: ''}, {name: '境内', id: '1'}, {name: '境外', id: '0'}],
isOnlineList: [{name: '请选择', id: ''}, {name: '线下', id: '0'}, {name: '线上', id: '1'}],
labelSizeList: [{name: '请选择', id: ''}, {name: '10*10', id: 'Lbl10*10'}, {name: '10*15', id: 'Lbl10*15'}],
isEnabledList: [{name: '请选择', id: ''}, {name: '是', id: '1'}, {name: '否', id: '0'}],
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;
}
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(){
getChannelPage() {
this.axios({
data: this.channelParams,
url: 'logisticsConfig/logisticsCompany/pageChannel',
method: 'post'
}).then(res => {
if(res.success()){
if (res.success) {
this.channelTableData = res.module.result;
this.channelParams.total = res.module.total;
}
})
},
insertCompany(){
insertCompany() {
this.axios({
data: this.insertCompanyParams,
url: 'logisticsConfig/logisticsCompany/insertCompany',
method: 'post'
}).then(res => {
if(res.success()){
if (res.success) {
this.$message("录入成功")
this.getCompanyPage();
}
})
},
insertChannel(){
insertChannel() {
this.axios({
data: this.insertChannelParams,
url: 'logisticsConfig/logisticsCompany/insertChannel',
method: 'post'
}).then(res => {
if(res.success()){
if (res.success) {
this.$message("录入成功")
this.getChannelPage();
}
})
},
updateCompany(){
updateCompany() {
this.axios({
data: this.insertChannelParams,
url: 'logisticsConfig/logisticsCompany/updateCompany',
method: 'post'
}).then(res => {
if(res.success()){
if (res.success) {
this.$message("更新成功")
this.getChannelPage();
}
})
},
updateChannel(){
updateChannel() {
this.axios({
data: this.insertChannelParams,
url: 'logisticsConfig/logisticsCompany/updateChannel',
method: 'post'
}).then(res => {
if(res.success()){
if (res.success) {
this.$message("更新成功")
this.getChannelPage();
}
})
},
openInsertCompany(){
removeCompany(item) {
this.$confirm('确定删除该物流公司?', '删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.axios({
url: 'logisticsConfig/logisticsCompany/removeCompany',
method: 'post',
data: {
id: item.id
}
}).then(result => {
if (result.success) {
this.$message({
type: 'success',
message: '删除成功!'
});
this.getProductList();
}
})
}).catch(() => {});
},
openInsertCompany() {
this.insertCompanyVisible = true;
},
openInsertChannel(){
openInsertChannel() {
this.insertChannelVisible = true;
},
handleAllAgentChange(val) {
this.insertChannelParams.bizTag = val ? this.bizTagList.map(x=>x.id) : [];
this.getChannelPage();
this.insertChannelParams.bizTag = val ? this.bizTagList.map(x => x.id) : [];
},
handleCheckedAgentChange(value) {
let checkedCount = value.length;
this.checkAllBizTag = checkedCount === this.bizTagList.length;
this.getChannelPage();
},
handleSizeChange1(val) {
let that = this;
that.companyParams.pageSize = val;
that.getCompanyPage();
},
handleCurrentChange1(val) {
let that = this;
that.companyParams.pageNo = val;
that.getCompanyPage();
},
handleSizeChange2(val) {
let that = this;
that.channelParams.pageSize = val;
that.getCompanyPage();
},
handleCurrentChange2(val) {
let that = this;
that.channelParams.pageNo = val;
that.getCompanyPage();
},
},
......@@ -391,8 +450,8 @@ export default {
that.tableMaxHeight = window.innerHeight - 263
})();
};
this.getCompanyPage();
this.getChannelPage();
this.getCompanyPage();
this.getChannelPage();
},
activated() {
this.tableMaxHeight = window.innerHeight - 263;
......@@ -472,6 +531,7 @@ export default {
border-radius: 4px;
line-height: 25px;
}
.discuss-buy {
padding: 10px;
text-align: center;
......
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