From 3913b3c5c8cde03f8c92d1c738d28c4a9bae7e55 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期三, 22 十一月 2023 08:48:02 +0800
Subject: [PATCH] #
---
pages/business/cstmr/cstmrDetails.vue | 361 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 361 insertions(+), 0 deletions(-)
diff --git a/pages/business/cstmr/cstmrDetails.vue b/pages/business/cstmr/cstmrDetails.vue
index 02409e3..96d12ea 100644
--- a/pages/business/cstmr/cstmrDetails.vue
+++ b/pages/business/cstmr/cstmrDetails.vue
@@ -1,8 +1,369 @@
<template>
+ <view>
+ <scroll-view scroll-y="true" >
+ <view class="header">
+ <view class="cstmr-name">
+ <image src="../../../static/image/infoSea.png" mode="aspectFit"></image>
+ <view>{{cstmr.name}}</view>
+ </view>
+ <!-- {{cstmr.tel}} | {{cstmr.addr}} | {{cstmr.director$ ? cstmr.director$ : '--'}} -->
+ <view class="cstmr-tel">
+ <view class="tel-box">
+ <view>瀹㈡埛鐢佃瘽</view>
+ <view >{{cstmr.tel ? cstmr.tel : '--'}}</view>
+ </view>
+ <view class="tel-box">
+ <view>瀹㈡埛璇︾粏鍦板潃</view>
+ <view >{{cstmr.addr ? cstmr.addr : '--'}}</view>
+ </view>
+ <view class="tel-box">
+ <view>璐熻矗浜�</view>
+ <view >{{cstmr.director$ ? cstmr.director$ : '--'}}</view>
+ </view>
+ </view>
+
+ </view>
+ <view class="container">
+ <view><y-title title="鍩烘湰淇℃伅"></y-title></view><view></view>
+ <view class="list-item1">瀹㈡埛浠e彿</view><view class="list-item2">{{cstmr.uuid}}</view>
+ <view class="list-item1">鎵�灞為儴闂�</view><view class="list-item2">{{cstmr.deptId$}}</view>
+ <view class="list-item1">瀹㈡埛鍚嶇О</view><view class="list-item2">{{cstmr.name}}</view>
+ <view class="list-item1">瀹㈡埛绫诲埆</view><view class="list-item2">{{cstmr.cstmrType$}}</view>
+ <view class="list-item1">鐪佸競鍖�</view><view class="list-item2">{{cstmr.pcd$}}</view>
+ <view class="list-item1">瀹㈡埛鑱旂郴浜�</view><view class="list-item2">{{cstmr.contacts}}</view>
+ <view class="list-item1">鍖哄垎</view><view class="list-item2">{{cstmr.type$}}</view>
+ <view class="list-item1">瀹㈡埛琛屼笟</view><view class="list-item2">{{cstmr.industry}}</view>
+ <view class="list-item1">浜у搧绫诲埆</view><view class="list-item2">{{cstmr.productCategory}}</view>
+ <view class="list-item1">澶囨敞</view><view class="list-item2">{{cstmr.remarks ? cstmr.remarks : '--'}}</view>
+
+ <!-- <view class="list-item1">瀹㈡埛鍏崇郴</view><view class="list-item2">{{cstmr.rela ? cstmr.rela : '--'}}</view> -->
+ <!-- <view class="list-item1">璇︾粏鍦板潃</view><view class="list-item2">{{cstmr.addr}}</view> -->
+ <!-- <view class="list-item1">鐢佃瘽</view><view class="list-item2 color-main">{{cstmr.tel}}</view> -->
+
+ </view>
+ <view class="container2">
+ <view><y-title title="鍏朵粬淇℃伅"></y-title></view><view></view>
+ <view class="container2-sub">
+ <view class="sub-item">
+ <view class="list-item1">娣诲姞浜哄憳</view><view class="list-item2 color-main">{{cstmr.createBy$}}</view>
+ </view>
+ <view class="sub-item">
+ <view class="list-item1">娣诲姞鏃堕棿</view><view class="list-item2">{{cstmr.createTime$}}</view>
+ </view>
+ <view class="sub-item">
+ <view class="list-item1">淇敼浜哄憳</view><view class="list-item2">{{cstmr.updateBy$}}</view>
+ </view>
+ <view class="sub-item">
+ <view class="list-item1">淇敼鏃堕棿</view><view class="list-item2 color-main">{{cstmr.updateTime$}}</view>
+ </view>
+ </view>
+ </view>
+
+ </scroll-view>
+ <view class="foot">
+ <button size="mini" type="primary" @click="edite(id)">淇敼</button>
+ <button size="mini" type="warn" @click="del(id)" v-show="isDel">鍒犻櫎</button>
+ </view>
+
+ <!-- 杈撳叆妗嗙ず渚� -->
+ <!-- <view>
+ <uni-popup ref="inputDialog" type="dialog">
+ <uni-popup-dialog ref="inputClose" mode="input" title="娣诲姞璺熻繘浜�" value="瀵硅瘽妗嗛缃彁绀哄唴瀹�!"
+ placeholder="璇疯緭鍏ュ唴瀹�" @confirm="confirm">
+ <uni-combox :candidates="addFollower.followers" placeholder="璇烽�夋嫨"
+ v-model="addFollower.follower" @input="autoLoad('follower',addFollower.follower)"></uni-combox>
+ </uni-popup-dialog>
+ </uni-popup>
+ </view> -->
+ </view>
</template>
<script>
+ export default {
+ data() {
+ return {
+ id: 0,
+ cstmr: {
+ id: '',
+ name: '',
+ tel: '',
+ addr: '',
+ cstman: ''
+ },
+ addFollower: {
+ follower: '',
+ followers: '',
+ followerList: []
+ },
+ followers: [],
+ cstmrId: '',
+ isDel: true
+ }
+ },
+ onLoad(option) {
+ if (option.type == 'info') {
+ this.isDel = false
+ }
+ this.id = option.id
+ this.init()
+ this.autoLoad('follower','')
+ setTimeout(()=>{
+ this.getFollowers()
+ },500)
+ },
+ methods: {
+ init() {
+ let that = this
+ uni.request({
+ url: that.baseUrl + '/cstmr/' + that.id +'/auth',
+ header: {'token' : uni.getStorageSync('token')},
+ method: 'GET',
+ success(res) {
+ res = res.data
+ that.cstmr = res.data
+ that.cstmrId = that.cstmr.id
+ }
+ })
+ },
+ edite() {
+ let _this = this
+ uni.navigateTo({
+ url: '/pages/business/cstmr/modiCsmter',
+ success: function(res) {
+ res.eventChannel.emit('cstmr', {
+ data: _this.cstmr
+ })
+ }
+ })
+ },
+ del(e) {
+ let that = this
+ e = Number(e)
+ uni.request({
+ url: that.baseUrl + '/cstmr/delete/one/' + e,
+ header: {'token' : uni.getStorageSync('token'),
+ },
+ method: 'GET',
+ success(res) {
+ res = res.data
+ if (res.code === 200) {
+ uni.navigateBack()
+ } else if (res.code === 403) {
+ uni.showToast({title: res.msg, icon: "none", position: 'top'})
+ setTimeout(() => {
+ uni.reLaunch({
+ url: '../../login/login'
+ });
+ }, 1000);
+ } else {
+ uni.showToast({title: res.msg, icon: "none",position: 'top'})
+ }
+ }
+ })
+ },
+ addPerson() {
+ this.$refs.inputDialog.open()
+ },
+ // 纭閫夋嫨宸ヤ綔浜�
+ confirm() {
+ let that = this
+ var followerId
+ var followerList = that.addFollower.followerList
+ for (var i = 0;i < followerList.length; i++) {
+ if (followerList[i].name == this.addFollower.follower) {
+ followerId =followerList[i].value
+ }
+ }
+ uni.request({
+ url: that.baseUrl + '/cstmr/followers/add/json',
+ header:{'token':uni.getStorageSync('token'),
+ // 'content-type':'application/x-www-form-urlencoded',
+ },
+ data: {
+ cstmrId: that.cstmrId,
+ followerIds:followerId},
+ method: 'POST',
+ success(result) {
+ var res = result.data
+ that.getFollowers()
+ }
+ })
+ this.addFollower.follower = ''
+ },
+ // 宸ヤ綔浜哄垪琛�
+ autoLoad(type,condition) {
+ let that = this
+ that.addFollower.followers = []
+ that.addFollower.followerList = []
+ uni.request({
+ url: that.baseUrl + '/user/all/get/kv',
+ header:{'token':uni.getStorageSync('token')},
+ data: {condition:condition},
+ method: 'POST',
+ success(result) {
+ var res = result.data
+ if (res.code === 200) {
+ var element;
+ if (type == 'follower') {
+ for(element of res.data) {
+ that.addFollower.followers.push(element.name)
+ that.addFollower.followerList.push(element)
+ }
+ return
+ }
+ }
+ }
+ })
+ },
+ getFollowers() {
+ let that = this
+ uni.request({
+ url: that.baseUrl + '/cstmr/followers/table/auth',
+ header:{'token':uni.getStorageSync('token')},
+ data: {cstmrId:that.cstmrId},
+ method:'GET',
+ success(res) {
+ res = res.data
+ that.followers = res.data
+ }
+ })
+ },
+ removeFollowers(userId) {
+ let that = this
+ uni.request({
+ url: that.baseUrl + '/cstmr/followers/remove/auth',
+ header:{
+ 'token':uni.getStorageSync('token'),
+ 'content-type': 'application/x-www-form-urlencoded'
+ },
+ data: {
+ cstmrId:that.cstmrId,
+ userId: userId
+ },
+ method:'POST',
+ success(res) {
+ res = res.data
+ that.getFollowers()
+ }
+ })
+ },
+
+ }
+ }
</script>
<style>
+ .header {
+ width: auto;
+ min-height: 110rpx;
+ background-color: #fff;
+ padding: 30px 20px 10px 20px;
+ }
+ .cstmr-name {
+ display: flex;
+ height: 35rpx;
+ line-height: 35rpx;
+ text-indent: 10rpx;
+ font-size: 36rpx;
+ color: #606266;
+ }
+ .cstmr-name image {
+ width: 35rpx;
+ height: 35rpx;
+ }
+ .cstmr-tel {
+ font-size: 24rpx;
+ color: #303133;
+ display: flex;
+ }
+ .tel-box {
+ margin-top: 20rpx;
+ padding-right: 8rpx;
+ margin-left: 10rpx;
+ border-right: 1px solid #b1b3b8;
+ }
+ .tel-box:last-child {
+ border: none
+ }
+ .container {
+ margin-top: 10px;
+ padding: 10rpx 20rpx 0 20rpx;
+ background-color: #fff;
+ display: grid;
+ grid-template-columns: 1fr 3fr;
+ }
+ .container:last-child {
+ grid-template-columns: 5fr 5fr 2fr;
+ margin-bottom: 120rpx;
+ }
+ .container2 {
+ display: flex;
+ flex-direction: column;
+ margin-top: 10px;
+ padding: 10rpx 20rpx 0 20rpx;
+ background-color: #fff;
+ }
+ .container2-sub {
+ display: flex;
+ flex-direction: column;
+ }
+ .sub-item {
+ display: flex;
+ }
+ .list-item1 {
+ min-height: 45rpx;
+ line-height: 45rpx;
+ color: #909399;
+ text-indent: 30rpx;
+ }
+ .list-item2 {
+ margin-left: 10rpx;
+ min-height: 45rpx;
+ line-height: 45rpx;
+ color: black;
+ }
+ .color-main {
+ color: #55aaff
+ }
+ .foot {
+ position: fixed;
+ width: 100%;
+ min-height: 100rpx;
+ bottom: 0;
+ margin-bottom: 0;
+ background-color: #fff;
+ border-top: 1px solid #efefef;
+ display: flex;
+ align-items: center;
+ }
+ .list {
+ min-height: 60rpx;
+ margin-top: 20rpx;
+ grid-column: 1 / 10;
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ position: relative;
+ }
+ .list-left {
+ min-height: 60rpx;
+ line-height: 60rpx;
+ padding-left: 20rpx;
+ color: #55aaff
+ }
+ .list-right {
+ min-height: 60rpx;
+ line-height: 60rpx;
+ /* background-color: #222; */
+ padding-right: 30rpx;
+ }
+ .list-none {
+ min-height: 60rpx;
+ margin-top: 20rpx;
+ text-align: center;
+ /* background-color: #303133; */
+ color: #b1b3b8;
+ grid-column: 1 / 10;
+ display: grid;
+ position: relative;
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.1