更新
This commit is contained in:
@@ -49,39 +49,12 @@ export default {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 删除
|
||||||
|
deleteByUserId(data) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 油站渠道
|
|
||||||
getSiteChannelList(data) {
|
|
||||||
return request({
|
return request({
|
||||||
url: '/oil-site/oilSiteChannel/getSiteChannelList',
|
url: '/oil-user/oilCustomerCompanyRelation/deleteByUserId',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 权限
|
|
||||||
getSiteCloudRoles() {
|
|
||||||
return request({
|
|
||||||
url: '/oil-user/sysRole/getSiteCloudRoles',
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 新增
|
|
||||||
saveCustomerRelationSite(data) {
|
|
||||||
return request({
|
|
||||||
url: '/oil-user/oilCustomerChannelRelation/saveCustomerRelationSite',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,5 +41,12 @@ export default {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 删除
|
||||||
|
removeCustomerRelationSite(data) {
|
||||||
|
return request({
|
||||||
|
url: '/oil-user/oilCustomerChannelRelation/removeCustomerRelationSite',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,8 +79,9 @@
|
|||||||
</uni-list>
|
</uni-list>
|
||||||
</view>
|
</view>
|
||||||
<view class="button-group">
|
<view class="button-group">
|
||||||
<view v-if="!wantUpdate" class="button red" @tap="update">修改</view>
|
<view v-if="!wantUpdate" class="button orange" @tap="update">修改</view>
|
||||||
<view v-else class="button blue" @tap="submit">保存</view>
|
<view v-else class="button blue" @tap="submit">保存</view>
|
||||||
|
<view class="button special red" @tap="deleteData">删除</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -134,6 +135,28 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
deleteData() {
|
||||||
|
uni.showModal({
|
||||||
|
title: '确定删除吗?',
|
||||||
|
success: res => {
|
||||||
|
if (res.confirm) {
|
||||||
|
serve.deleteByUserId({
|
||||||
|
id: this.postData.id
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 20000) {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack()
|
||||||
|
}, 1500)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
getByUserId() {
|
getByUserId() {
|
||||||
serve.getByUserId(this.postData.id).then(res => {
|
serve.getByUserId(this.postData.id).then(res => {
|
||||||
this.$set(this.postData, 'sysUserRoleList', res.data.sysUserRoleList)
|
this.$set(this.postData, 'sysUserRoleList', res.data.sysUserRoleList)
|
||||||
@@ -344,9 +367,13 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
|
|
||||||
// &:nth-of-type(2) {
|
&.special {
|
||||||
// margin-top: 50rpx;
|
margin-top: 35rpx;
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
&.orange {
|
||||||
|
background: #FF8C00;
|
||||||
|
}
|
||||||
|
|
||||||
&.red {
|
&.red {
|
||||||
background: #EA0000;
|
background: #EA0000;
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
<uni-list>
|
<uni-list>
|
||||||
<uni-list-item>
|
<uni-list-item>
|
||||||
<view class="list_header" slot="header">
|
<view class="list_header" slot="header">
|
||||||
<image v-if="isAdd" src="@/static/bt.png" style="width: 12rpx;position: absolute;left: -20rpx;" mode="widthFix" ></image>
|
<image src="@/static/bt.png" style="width: 12rpx;position: absolute;left: -23rpx;"
|
||||||
|
mode="widthFix"></image>
|
||||||
用户手机号
|
用户手机号
|
||||||
</view>
|
</view>
|
||||||
<view slot="body" class="list_right">
|
<view slot="body" class="list_right">
|
||||||
@@ -18,7 +19,8 @@
|
|||||||
</uni-list-item>
|
</uni-list-item>
|
||||||
<uni-list-item>
|
<uni-list-item>
|
||||||
<view class="list_header" slot="header">
|
<view class="list_header" slot="header">
|
||||||
<image v-if="isAdd" src="@/static/bt.png" style="width: 12rpx;position: absolute;left: -20rpx;" mode="widthFix" ></image>
|
<image src="@/static/bt.png" style="width: 12rpx;position: absolute;left: -23rpx;"
|
||||||
|
mode="widthFix"></image>
|
||||||
用户姓名
|
用户姓名
|
||||||
</view>
|
</view>
|
||||||
<view slot="body" class="list_right">
|
<view slot="body" class="list_right">
|
||||||
@@ -35,7 +37,8 @@
|
|||||||
<uni-list-item
|
<uni-list-item
|
||||||
@tap="jump('/userManagement/yunSite/components/serviceStation',{siteId:postData.siteId}, isAdd)">
|
@tap="jump('/userManagement/yunSite/components/serviceStation',{siteId:postData.siteId}, isAdd)">
|
||||||
<view class="list_header" slot="header">
|
<view class="list_header" slot="header">
|
||||||
<image v-if="isAdd" src="@/static/bt.png" style="width: 12rpx;position: absolute;left: -20rpx;" mode="widthFix" ></image>
|
<image src="@/static/bt.png" style="width: 12rpx;position: absolute;left: -23rpx;"
|
||||||
|
mode="widthFix"></image>
|
||||||
油站渠道
|
油站渠道
|
||||||
</view>
|
</view>
|
||||||
<view slot="body" class="list-frame site">
|
<view slot="body" class="list-frame site">
|
||||||
@@ -44,24 +47,11 @@
|
|||||||
<uni-icons v-show="isAdd" color="#999" type="right" size="15"></uni-icons>
|
<uni-icons v-show="isAdd" color="#999" type="right" size="15"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</uni-list-item>
|
</uni-list-item>
|
||||||
<!-- <uni-list-item direction="column"
|
|
||||||
@tap="jump('/userManagement/yunSite/components/serviceStation',postData.oilSiteInfoList)">
|
|
||||||
<view class="list_header" slot="header">
|
|
||||||
油站渠道
|
|
||||||
</view>
|
|
||||||
<view slot="body" class="list-frame">
|
|
||||||
<view>
|
|
||||||
<text class="label" v-for="(item,index) in postData.oilSiteInfoList"
|
|
||||||
:key="index">{{item.siteName}}</text>
|
|
||||||
</view>
|
|
||||||
<view v-if="!postData.oilSiteInfoList.length" class="tips">选择油站渠道</view>
|
|
||||||
<uni-icons v-show="wantUpdate" color="#999" type="right" size="15"></uni-icons>
|
|
||||||
</view>
|
|
||||||
</uni-list-item> -->
|
|
||||||
<uni-list-item direction="column"
|
<uni-list-item direction="column"
|
||||||
@tap="jump('/userManagement/yunSite/components/auth',postData.sysRoleList)">
|
@tap="jump('/userManagement/yunSite/components/auth',postData.sysRoleList)">
|
||||||
<view class="list_header" slot="header">
|
<view class="list_header" slot="header">
|
||||||
<image v-if="isAdd" src="@/static/bt.png" style="width: 12rpx;position: absolute;left: -20rpx;" mode="widthFix" ></image>
|
<image src="@/static/bt.png" style="width: 12rpx;position: absolute;left: -23rpx;"
|
||||||
|
mode="widthFix"></image>
|
||||||
所属权限
|
所属权限
|
||||||
</view>
|
</view>
|
||||||
<view slot="body" class="list-frame">
|
<view slot="body" class="list-frame">
|
||||||
@@ -77,8 +67,9 @@
|
|||||||
</uni-list>
|
</uni-list>
|
||||||
</view>
|
</view>
|
||||||
<view class="button-group">
|
<view class="button-group">
|
||||||
<view v-if="!wantUpdate" class="button red" @tap="update">修改</view>
|
<view v-if="!wantUpdate" class="button orange" @tap="update">修改</view>
|
||||||
<view v-else class="button blue" @tap="submit">保存</view>
|
<view v-else class="button blue" @tap="submit">保存</view>
|
||||||
|
<view class="button special red" @tap="deleteData">删除</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -126,6 +117,26 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
deleteData() {
|
||||||
|
uni.showModal({
|
||||||
|
title: '确定删除吗?',
|
||||||
|
success: res => {
|
||||||
|
if (res.confirm) {
|
||||||
|
serve.removeCustomerRelationSite(this.postData).then(res => {
|
||||||
|
if (res.code === 20000) {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack()
|
||||||
|
}, 1500)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
submit() {
|
submit() {
|
||||||
let needCheckMap = {
|
let needCheckMap = {
|
||||||
customerName: {
|
customerName: {
|
||||||
@@ -276,9 +287,10 @@
|
|||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|
||||||
&.rel2rpx {
|
&.rel2rpx {
|
||||||
position: 'relative';
|
position: relative;
|
||||||
top: 2rpx
|
top: 5rpx
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -314,9 +326,13 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
|
|
||||||
// &:nth-of-type(2) {
|
&.special {
|
||||||
// margin-top: 50rpx;
|
margin-top: 35rpx;
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
&.orange {
|
||||||
|
background: #FF8C00;
|
||||||
|
}
|
||||||
|
|
||||||
&.red {
|
&.red {
|
||||||
background: #EA0000;
|
background: #EA0000;
|
||||||
|
|||||||
Reference in New Issue
Block a user