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

物流公司渠道页面完善

parent 7b5f1c9f
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
<el-form :inline="true" :model="companyParams" 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="companyParams.companyName" clearable size="mini" placeholder="输入物流公司名" <el-input v-model="companyParams.companyName" clearable size="mini" placeholder="输入物流公司名"
@keyup.enter.native="getCompanyPage"/> @keyup.enter.native="searchCompanyPage"/>
</el-form-item> </el-form-item>
<el-button type="primary" size="mini" @click="getCompanyPage" class="mt7 mr15 r mb10"> <el-button type="primary" size="mini" @click="searchCompanyPage" class="mt7 mr15 r mb10">
查询 查询
</el-button> </el-button>
</el-form> </el-form>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</el-button> </el-button>
</div> </div>
<el-table ref="multipleTable" :data="companyTableData" class="pl15 mb47" <el-table ref="multipleTable" :data="companyTableData" class="pl15 mb47"
@selection-change="getChannelPage" :height="tableMaxHeight"> @selection-change="companySearchChannel" :height="tableMaxHeight">
<el-table-column type="selection" align="center"/> <el-table-column type="selection" align="center"/>
<el-table-column prop="companyName" label="公司名称"/> <el-table-column prop="companyName" label="公司名称"/>
<el-table-column prop="contacts" label="联系人"/> <el-table-column prop="contacts" label="联系人"/>
...@@ -52,9 +52,9 @@ ...@@ -52,9 +52,9 @@
<el-form :inline="true" :model="channelParams" class="demo-form-inline"> <el-form :inline="true" :model="channelParams" class="demo-form-inline">
<el-form-item label="渠道查询:"> <el-form-item label="渠道查询:">
<el-input v-model="channelParams.channelName" clearable size="mini" placeholder="输入渠道名称" <el-input v-model="channelParams.channelName" clearable size="mini" placeholder="输入渠道名称"
@keyup.enter.native="getChannelPage"/> @keyup.enter.native="searchChannelPage"/>
</el-form-item> </el-form-item>
<el-button type="primary" size="mini" @click="getChannelPage" class="mt7 mr15 r mb10"> <el-button type="primary" size="mini" @click="searchChannelPage" class="mt7 mr15 r mb10">
查询 查询
</el-button> </el-button>
</el-form> </el-form>
...@@ -78,14 +78,14 @@ ...@@ -78,14 +78,14 @@
<el-table-column prop="maxWeight" label="最大重量"/> <el-table-column prop="maxWeight" label="最大重量"/>
<el-table-column label="是否启用"> <el-table-column label="是否启用">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{scope.row.isEnabled?'是':'否'}}</div> <div>{{ scope.row.isEnabled ? '是' : '否' }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="agentCode" label="代理编码"/> <el-table-column prop="agentCode" label="代理编码"/>
<el-table-column prop="warehouseCode" label="分仓代码"/> <el-table-column prop="warehouseCode" label="分仓代码"/>
<el-table-column label="结账方式"> <el-table-column label="结账方式">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{scope.row.isOnline?'线上':'线下'}}</div> <div>{{ scope.row.isOnline ? '线上' : '线下' }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
center> center>
<el-row> <el-row>
<el-form label-position="right" label-width="110px" :model="insertChannelParams"> <el-form label-position="right" label-width="110px" :model="insertChannelParams">
<el-form-item prop="account" label-width="100px" :required="true"> <el-form-item prop="companyId" label-width="100px" :required="true">
<span slot="label">物流公司:</span> <span slot="label">物流公司:</span>
<el-select size="small" v-model="insertChannelParams.companyId" clearable placeholder="请选择"> <el-select size="small" v-model="insertChannelParams.companyId" clearable placeholder="请选择">
<el-option <el-option
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="bizTag" label-width="100px" :required="true"> <el-form-item prop="position" label-width="100px" :required="true">
<span slot="label">货物类型:</span> <span slot="label">货物类型:</span>
<el-checkbox <el-checkbox
v-model="checkAllBizTag" v-model="checkAllBizTag"
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
>全选 >全选
</el-checkbox> </el-checkbox>
<el-checkbox-group <el-checkbox-group
v-model="insertChannelParams.bizTag" v-model="insertChannelParams.position"
@change="(val)=>{handleCheckedAgentChange(val)}" @change="(val)=>{handleCheckedAgentChange(val)}"
> >
<el-checkbox <el-checkbox
...@@ -281,10 +281,10 @@ export default { ...@@ -281,10 +281,10 @@ export default {
maxWeight: '', maxWeight: '',
agentCode: '', agentCode: '',
warehouseCode: '', warehouseCode: '',
labelExpired: '', labelExpired: 0,
labelSize: '', labelSize: '',
isEnabled: '', isEnabled: '',
bizTag: [1], position: [1],
isOnline: '', isOnline: '',
channelType: '', channelType: '',
}, },
...@@ -302,7 +302,7 @@ export default { ...@@ -302,7 +302,7 @@ export default {
{name: '液体', id: 3}, {name: '液体', id: 3},
{name: '粉尘', id: 4}, {name: '粉尘', id: 4},
{name: '口罩', id: 5}], {name: '口罩', id: 5}],
companyList: [{name: '请选择', id: ''}, {name: '燕文物流', id: 'yanwen'}, {name: '某物流', id: 'mouwuliu'}], companyList: [{name: '请选择', id: ''},],
channelTypeList: [{name: '请选择', id: ''}, {name: '境内', id: '1'}, {name: '境外', id: '0'}], channelTypeList: [{name: '请选择', id: ''}, {name: '境内', id: '1'}, {name: '境外', id: '0'}],
isOnlineList: [{name: '请选择', id: ''}, {name: '线下', id: '0'}, {name: '线上', id: '1'}], isOnlineList: [{name: '请选择', id: ''}, {name: '线下', id: '0'}, {name: '线上', id: '1'}],
labelSizeList: [{name: '请选择', id: ''}, {name: '10*10', id: 'Lbl10*10'}, {name: '10*15', id: 'Lbl10*15'}], labelSizeList: [{name: '请选择', id: ''}, {name: '10*10', id: 'Lbl10*10'}, {name: '10*15', id: 'Lbl10*15'}],
...@@ -313,6 +313,19 @@ export default { ...@@ -313,6 +313,19 @@ export default {
} }
}, },
methods: { methods: {
getCompanyList() {
this.axios({
data: null,
url: 'logisticsConfig/logisticsCompany/getCompanyList',
method: 'post'
}).then(res => {
if (res.success) {
res.module.forEach(x => {
this.companyList.push({name:x.companyName,id:x.id})
})
}
})
},
getCompanyPage() { getCompanyPage() {
this.axios({ this.axios({
data: this.companyParams, data: this.companyParams,
...@@ -325,6 +338,23 @@ export default { ...@@ -325,6 +338,23 @@ export default {
} }
}) })
}, },
searchCompanyPage() {
this.companyParams.pageNo = 1;
this.getCompanyPage();
},
searchChannelPage() {
this.channelParams.pageNo = 1;
this.getChannelPage();
},
companySearchChannel(val) {
this.channelParams.companyIds = [];
if (val.length > 0) {
val.forEach(x => {
this.channelParams.companyIds.push(x.id)
})
}
this.searchChannelPage();
},
getChannelPage() { getChannelPage() {
this.axios({ this.axios({
data: this.channelParams, data: this.channelParams,
...@@ -345,6 +375,7 @@ export default { ...@@ -345,6 +375,7 @@ export default {
}).then(res => { }).then(res => {
if (res.success) { if (res.success) {
this.$message("录入成功") this.$message("录入成功")
this.insertCompanyVisible = false;
this.getCompanyPage(); this.getCompanyPage();
} }
}) })
...@@ -357,6 +388,7 @@ export default { ...@@ -357,6 +388,7 @@ export default {
}).then(res => { }).then(res => {
if (res.success) { if (res.success) {
this.$message("录入成功") this.$message("录入成功")
this.insertChannelVisible = false;
this.getChannelPage(); this.getChannelPage();
} }
}) })
...@@ -395,7 +427,8 @@ export default { ...@@ -395,7 +427,8 @@ export default {
} }
}) })
}).catch(() => {}); }).catch(() => {
});
}, },
removeChannel(item) { removeChannel(item) {
this.$confirm('确定删除该渠道?', '删除', { this.$confirm('确定删除该渠道?', '删除', {
...@@ -419,7 +452,8 @@ export default { ...@@ -419,7 +452,8 @@ export default {
} }
}) })
}).catch(() => {}); }).catch(() => {
});
}, },
openInsertCompany() { openInsertCompany() {
this.insertCompanyVisible = true; this.insertCompanyVisible = true;
...@@ -428,7 +462,7 @@ export default { ...@@ -428,7 +462,7 @@ export default {
this.insertChannelVisible = true; this.insertChannelVisible = true;
}, },
handleAllAgentChange(val) { handleAllAgentChange(val) {
this.insertChannelParams.bizTag = val ? this.bizTagList.map(x => x.id) : []; this.insertChannelParams.position = val ? this.bizTagList.map(x => x.id) : [];
}, },
handleCheckedAgentChange(value) { handleCheckedAgentChange(value) {
let checkedCount = value.length; let checkedCount = value.length;
...@@ -462,8 +496,9 @@ export default { ...@@ -462,8 +496,9 @@ export default {
that.tableMaxHeight = window.innerHeight - 263 that.tableMaxHeight = window.innerHeight - 263
})(); })();
}; };
this.getCompanyPage(); this.searchCompanyPage();
this.getChannelPage(); this.searchChannelPage();
this.getCompanyList();
}, },
activated() { activated() {
this.tableMaxHeight = window.innerHeight - 263; this.tableMaxHeight = window.innerHeight - 263;
......
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