You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
339 lines
11 KiB
339 lines
11 KiB
<template>
|
|
<view class="">
|
|
<view class="">
|
|
<view class="" v-if="popleType== 'khName' || popleType== 'gysName'" @tap="">
|
|
<!-- 供应商、客户走这一套 -->
|
|
<view>
|
|
<button size="default" type="default" @tap="goAddPeople" hover-class="is-hover">新增人员</button>
|
|
</view>
|
|
<view class="list-1" v-for="item in popleList" :key="item" @tap="clickList(item)"
|
|
style="display: flex;flex-direction: column;height: auto;padding-bottom: 20rpx;">
|
|
<view class="name-tel" style="width: 100%;" v-if="popleType=='gysName'">
|
|
<text style="line-height: 75rpx;">{{item.consigneeName}}</text>
|
|
<text>{{item.consigneeMobile}}</text>
|
|
</view>
|
|
<view class="name-tel" style="width: 100%;" v-else>
|
|
<text style="line-height: 75rpx;">{{item.name}}</text>
|
|
<text>{{item.phone}}</text>
|
|
</view>
|
|
<view class="name-tel" style="width: 100%;display: flex;flex-direction: column;height:auto;font-size: 30rpx;">
|
|
<text>{{item.province + item.city + item.area}}</text>
|
|
<text style="font-size: 26rpx;color:#747474;height: 30rpx;line-height: 30rpx;">{{item.address}}</text>
|
|
</view>
|
|
<view class="name-edit" @tap.stop="goAddPeople('edit',item)">
|
|
<u-icon name="edit-pen-fill" size="28"></u-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 物流公司啦包公走这一套 -->
|
|
<view class="" v-if="popleType== 'wlName' || popleType== 'fcName' || popleType== 'dbName'">
|
|
<view class="list-1" :style="{height:popleType == 'kdName'?'75rpx':'120rpx'}" style="display: flex;position: relative;" @tap="clickList(item)" v-for="item in popleList[0]" :key="item">
|
|
<view class="name-tel">
|
|
<text style="line-height: 75rpx;">{{item.companyName}}</text>
|
|
<text style="line-height: 75rpx;">{{item.shippingMethod}}</text>
|
|
<text style="line-height: 75rpx;">{{item.workerName}}</text>
|
|
</view>
|
|
<view class="standard-box" @tap.stop="toggle('center',item.remark || item.chargingStandard)">
|
|
<view class="">
|
|
<text style="padding-left:40rpx;">收费标准</text>
|
|
<uni-icons type="info" color='#088FEB' size="16" style="line-height: 75rpx;"></uni-icons>
|
|
</view>
|
|
<view class="phone-btn" @tap.stop="clickPhone(item.mobile)" v-if="popleType != 'kdName'">拨打电话</view>
|
|
</view>
|
|
<view style="position: absolute;bottom: 0;left: 40rpx;" v-if="popleType == 'fcName' || popleType == 'lbgName' || popleType == 'wlName'">
|
|
<text style="line-height: 45rpx;color:red;font-size: 24rpx;" v-if="item.rebateAmount">本单返佣{{item.rebateAmount}}元</text>
|
|
</view>
|
|
</view>
|
|
<view class="list-1" :style="{height:popleType == 'kdName'?'75rpx':'120rpx'}" style="display: flex;position: relative;" @tap="clickList(item)" v-for="item in popleList[1]" :key="item">
|
|
<view class="name-tel">
|
|
<text style="line-height: 75rpx;">{{item.companyName}}</text>
|
|
<text style="line-height: 75rpx;">{{item.shippingMethod}}</text>
|
|
<text style="line-height: 75rpx;">{{item.workerName}}</text>
|
|
</view>
|
|
<view class="standard-box" @tap.stop="toggle('center',item.remark || item.chargingStandard)">
|
|
<view class="">
|
|
<text style="padding-left:40rpx;">收费标准</text>
|
|
<uni-icons type="info" color='#088FEB' size="16" style="line-height: 75rpx;"></uni-icons>
|
|
</view>
|
|
<view class="phone-btn" @tap.stop="clickPhone(item.mobile)" v-if="popleType != 'kdName'">拨打电话</view>
|
|
</view>
|
|
<view style="position: absolute;bottom: 0;left: 40rpx;" v-if="popleType == 'fcName' || popleType == 'lbgName' || popleType == 'wlName'">
|
|
<text style="line-height: 45rpx;color:red;font-size: 24rpx;" v-if="item.rebateAmount">本单返佣{{item.rebateAmount}}元</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!--快递公司 -->
|
|
<view class="" v-if="popleType== 'kdName' || popleType== 'lbgName'">
|
|
<view class="list-1" :style="{height:popleType == 'kdName'?'75rpx':'120rpx'}" style="display: flex;position: relative;" @tap="clickList(item)" v-for="item in popleList" :key="item">
|
|
<view class="name-tel">
|
|
<text style="line-height: 75rpx;">{{item.companyName}}</text>
|
|
<text style="line-height: 75rpx;">{{item.shippingMethod}}</text>
|
|
<text style="line-height: 75rpx;">{{item.workerName}}</text>
|
|
</view>
|
|
<view class="standard-box" @tap.stop="toggle('center',item.remark || item.chargingStandard)">
|
|
<view class="">
|
|
<text style="padding-left:40rpx;">收费标准</text>
|
|
<uni-icons type="info" color='#088FEB' size="16" style="line-height: 75rpx;"></uni-icons>
|
|
</view>
|
|
<view class="phone-btn" @tap.stop="clickPhone(item.mobile)" v-if="popleType != 'kdName'">拨打电话</view>
|
|
</view>
|
|
<!-- <view style="position: absolute;bottom: 0;left: 40rpx;" v-if="popleType == 'fcName' || popleType == 'lbgName' || popleType == 'wlName'">
|
|
<text style="line-height: 45rpx;color:red;font-size: 24rpx;" v-if="item.rebateAmount">本单返佣{{item.rebateAmount}}元</text>
|
|
</view> -->
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view>
|
|
<uni-popup ref="popup" background-color="#fff">
|
|
<view class="popup-content">
|
|
<view class="popup-title">
|
|
<text>收费标准</text>
|
|
<uni-icons @tap='close' type="closeempty" color='red' size="16"
|
|
style="height:40rpx;line-height: 40rpx;position: absolute;right: 0;"></uni-icons>
|
|
</view>
|
|
<view class="popup-container">
|
|
<text style="display: inline-block;text-indent: 2em;">{{remark}}</text>
|
|
</view>
|
|
</view>
|
|
</uni-popup>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
popleType: '',
|
|
popleList: [],
|
|
signCompany: '', // 1物流 2快递 3发车
|
|
people: '', //快递、物流、发车的id
|
|
radioType: '', //选择的是快递还是物流
|
|
companyType: '', //运输公司类型 快递公司有值 物流公司直接传空
|
|
modelShow:false,
|
|
remark:'',
|
|
khName:{}
|
|
}
|
|
},
|
|
onShow(){
|
|
if(this.modelShow == true){
|
|
this.popleType = this.popleType
|
|
this.khOrGysList();
|
|
}
|
|
},
|
|
onLoad(options) {
|
|
this.popleType = options.popleType
|
|
this.companyType = options.companyType || ''
|
|
if(options.khName){
|
|
this.khName = JSON.parse(options.khName) || ''
|
|
}
|
|
if (options.popleType == 'khName' || options.popleType == 'gysName') { //供应商或者客户
|
|
this.khOrGysList();
|
|
} else if (options.popleType == 'wlName' || options.popleType == 'kdName') { //物流快递
|
|
this.wlOrKdList(options.popleType)
|
|
} else if (options.popleType == 'fcName' || options.popleType == 'dbName') {
|
|
this.wlOrKdList(options.popleType)
|
|
} else {
|
|
this.kdyOrlbgList();
|
|
}
|
|
},
|
|
methods: {
|
|
//客户、供应商列表
|
|
khOrGysList() {
|
|
if(this.popleType == 'gysName'){ //供应商
|
|
this.tui.request("/app/supplier/getbyShopId", "post", {}, false, true).then((res) => {
|
|
if (res.code == 200) {
|
|
this.popleList = res.result;
|
|
}else{
|
|
this.tui.toast(res.message)
|
|
}
|
|
})
|
|
}else{ //客户
|
|
this.tui.request("/app/customer/list", "get", {}, false, true).then((res) => {
|
|
if (res.code == 200) {
|
|
this.popleList = res.result;
|
|
}else{
|
|
this.tui.toast(res.message)
|
|
}
|
|
})
|
|
}
|
|
},
|
|
//物流或者快递列表
|
|
wlOrKdList(e) {
|
|
let url,
|
|
data = {},
|
|
isTrue
|
|
//物流:1 快递:2 发车3
|
|
if (e == 'wlName') {
|
|
url = '/app/operatingArea/getByArea'
|
|
isTrue = true
|
|
data = {
|
|
province:this.khName.province,
|
|
city:this.khName.city,
|
|
area:this.khName.area,
|
|
shippingType:0
|
|
}
|
|
} else if (e == 'kdName') {
|
|
isTrue = false
|
|
url = '/app/logitics/getAll'
|
|
data = {
|
|
signCompany:1
|
|
}
|
|
} else if (e == 'fcName') {
|
|
isTrue = true
|
|
data = {
|
|
province:this.khName.province,
|
|
city:this.khName.city,
|
|
area:this.khName.area,
|
|
shippingType:4
|
|
}
|
|
url = '/app/operatingArea/getByArea'
|
|
}else if (e == 'dbName') {
|
|
isTrue = true
|
|
data = {
|
|
province:this.khName.province,
|
|
city:this.khName.city,
|
|
area:this.khName.area,
|
|
shippingType:5
|
|
}
|
|
url = '/app/operatingArea/getByArea'
|
|
}
|
|
this.tui.request(url, "post", data, false, isTrue).then((res) => {
|
|
if (res.code == 200) {
|
|
if(e == 'kdName'){
|
|
this.popleList = res.result;
|
|
}else{
|
|
this.popleList.push(res.result.operatingAreaList)
|
|
this.popleList.push(res.result.logiticsCompanyList)
|
|
console.log(this.popleList)
|
|
}
|
|
}else{
|
|
this.tui.toast(res.message)
|
|
}
|
|
})
|
|
},
|
|
//点击选择列表,带参数 返回上一页
|
|
clickList(item) {
|
|
let pages = getCurrentPages(); // 获取当前页面栈的实例,以数组形式按栈的顺序给出,第一个元素为首页,最后一个元素为当前页面。
|
|
let prevPage = pages[pages.length - 2]; //上一页页面实例
|
|
//客户和供应商用一个名字
|
|
if (this.popleType == 'khName' || this.popleType == 'gysName') {
|
|
prevPage.$vm.khName = item
|
|
} else if (this.popleType == 'kdName' || this.popleType == 'wlName' || this.popleType == 'fcName' ||this.popleType == 'dbName') {
|
|
prevPage.$vm.wlName = item
|
|
} else if (this.popleType == 'lbgName') {
|
|
prevPage.$vm.lbgName = item
|
|
} else if (this.popleType == 'kdyName') {
|
|
prevPage.$vm.kdyName = item
|
|
}
|
|
prevPage.$vm.clearMsg = '1'
|
|
uni.navigateBack({
|
|
delta: 1
|
|
})
|
|
},
|
|
//拨打电话
|
|
clickPhone(phone) {
|
|
uni.makePhoneCall({
|
|
phoneNumber: phone
|
|
});
|
|
},
|
|
//查询拉包工和快递人员的列表
|
|
kdyOrlbgList() {
|
|
this.tui.request("/worker/getWXByCondition", "post", {
|
|
ownerCompany: this.companyType, //公司id,如果是快递公司,才需要传
|
|
}, false, false).then((res) => {
|
|
if (res.code == 200) {
|
|
this.popleList = res.result;
|
|
}else{
|
|
this.tui.toast(res.message)
|
|
}
|
|
})
|
|
|
|
},
|
|
//新增人员
|
|
goAddPeople(type,data){
|
|
this.modelShow = true;
|
|
console.log(data)
|
|
uni.navigateTo({
|
|
url: "/pages/billing/addUser?type="+type+'&data='+JSON.stringify(data) + '&popleType=' + this.popleType
|
|
})
|
|
},
|
|
//打开弹出层
|
|
toggle(type,remark) {
|
|
this.type = type
|
|
this.remark = remark
|
|
this.$refs.popup.open(type)
|
|
},
|
|
//关闭弹出层
|
|
close() {
|
|
this.$refs.popup.close()
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
button {
|
|
color: #ffffff;
|
|
background: #5fd9ee;
|
|
width: 90%;
|
|
margin-top: 20rpx;
|
|
}
|
|
|
|
.list-1 {
|
|
display: flex;
|
|
height: 150rpx;
|
|
border-bottom: 1px solid #eee;
|
|
background: #fff;
|
|
font-size: 32rpx;
|
|
margin-top: 20rpx;
|
|
position: relative;
|
|
}
|
|
|
|
.name-tel {
|
|
width: 70%;
|
|
height: 75rpx;
|
|
line-height: 75rpx;
|
|
padding-left: 40rpx;
|
|
}
|
|
.name-edit{
|
|
width: 80rpx;
|
|
height: 80rpx;
|
|
position: absolute;
|
|
top: 35rpx;
|
|
right: 35rpx;
|
|
}
|
|
.standard-box {
|
|
color: #088FEB;
|
|
width: 30%;
|
|
font-size: 26rpx;
|
|
}
|
|
|
|
|
|
.popup-content {
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 15px;
|
|
width: 500rpx;
|
|
height: 700rpx;
|
|
background-color: #fff;
|
|
}
|
|
|
|
.popup-title {
|
|
font-size: 36rpx;
|
|
font-weight: bold;
|
|
text-align: center;
|
|
position: relative;
|
|
}
|
|
|
|
.popup-container {
|
|
margin-top: 20rpx;
|
|
}
|
|
|
|
.phone-btn {
|
|
width: 150rpx;
|
|
color: #088FEB;
|
|
font-size: 26rpx;
|
|
padding-left:40rpx;
|
|
}
|
|
</style>
|