This commit is contained in:
xyc 2025-06-10 17:53:26 +08:00
parent 17b1ae834f
commit 2d8bc14de2
11 changed files with 2007 additions and 197 deletions

View File

@ -106,10 +106,16 @@
getgogo(index) { getgogo(index) {
if (index == 1) { if (index == 1) {
this.aindex = index this.aindex = index
let chooseIdx = uni.getStorageSync("chooseIdx")
if (chooseIdx == 3) {
uni.reLaunch({
url: '/pages/businessManager/businessManager'
});
} else {
uni.reLaunch({ uni.reLaunch({
url: '/pages/staff/staff' url: '/pages/staff/staff'
}); });
}
} }
if (index == 3) { if (index == 3) {
this.aindex = index this.aindex = index

View File

@ -532,6 +532,13 @@
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "pages/businessManager/businessManager",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
} }
], ],
"globalStyle": { "globalStyle": {

View File

@ -11,8 +11,12 @@
<script> <script>
import request from '../../utils/request'; import request from '../../utils/request';
import {setToken} from '@/utils/auth.js' import {
import { getToken } from '@/utils/auth' setToken
} from '@/utils/auth.js'
import {
getToken
} from '@/utils/auth'
export default { export default {
data() { data() {
return { return {
@ -21,9 +25,12 @@
yd: false, yd: false,
isButtonDisabled: false, isButtonDisabled: false,
countdownTime: 60, countdownTime: 60,
qh:[ qh: [{
{text:'密码登录'}, text: '密码登录'
{text:'验证码登录'}, },
{
text: '验证码登录'
},
// {text:''} // {text:''}
], ],
tel: '', tel: '',
@ -40,8 +47,7 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/Login/login' url: '/pages/Login/login'
}) })
} } else if (chooseIdx == 0) {
else if(chooseIdx == 0){
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/newindex' url: '/pages/index/newindex'
}) })
@ -49,8 +55,11 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/staff/staff' url: '/pages/staff/staff'
}) })
} } else if (chooseIdx == 3) {
else if(chooseIdx == 1){ uni.navigateTo({
url: '/pages/businessManager/businessManager'
})
} else if (chooseIdx == 1) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/authority/authority' url: '/pages/authority/authority'
}) })
@ -270,7 +279,6 @@
}, },
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -281,17 +289,20 @@
font-weight: 400; font-weight: 400;
color: #0078FF; color: #0078FF;
} }
button { button {
border: none !important; border: none !important;
background: none !important; background: none !important;
margin: 0px; margin: 0px;
display: block; display: block;
} }
button:focus { button:focus {
color: #0078FF; color: #0078FF;
outline: none; outline: none;
box-shadow: none; box-shadow: none;
} }
.content { .content {
box-sizing: border-box; box-sizing: border-box;
background: linear-gradient(180deg, rgba(13, 46, 141, 0.2) 0%, rgba(255, 255, 255, 0) 100%); background: linear-gradient(180deg, rgba(13, 46, 141, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
@ -308,6 +319,7 @@
width: 100%; width: 100%;
height: calc(100vh); height: calc(100vh);
} }
.touxiang { .touxiang {
width: 88px; width: 88px;
height: 88px; height: 88px;
@ -316,16 +328,19 @@
margin: 0 auto; margin: 0 auto;
margin-bottom: 40px; margin-bottom: 40px;
overflow: hidden; overflow: hidden;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.twotap { .twotap {
margin-top: 10px; margin-top: 10px;
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
view { view {
font-size: 12px; font-size: 12px;
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
@ -334,10 +349,12 @@
margin-right: 38.5px; margin-right: 38.5px;
} }
} }
.blck { .blck {
color: #333333 !important; color: #333333 !important;
font-weight: bold !important; font-weight: bold !important;
} }
.inputs { .inputs {
height: 54px; height: 54px;
box-sizing: border-box; box-sizing: border-box;
@ -347,6 +364,7 @@
border-bottom: 2px solid #E8E8E8; border-bottom: 2px solid #E8E8E8;
margin-top: 20px; margin-top: 20px;
} }
.wjworb { .wjworb {
margin-top: 5px; margin-top: 5px;
width: 100%; width: 100%;
@ -357,6 +375,7 @@
align-items: center; align-items: center;
} }
.dl { .dl {
width: 90%; width: 90%;
height: 44px; height: 44px;
@ -370,6 +389,7 @@
align-items: center; align-items: center;
margin-top: 22px; margin-top: 22px;
} }
.hging { .hging {
width: 100%; width: 100%;
text-align: center; text-align: center;
@ -378,6 +398,7 @@
color: #636363; color: #636363;
margin-top: 20px; margin-top: 20px;
} }
.wx { .wx {
width: 38px; width: 38px;
height: 38px; height: 38px;
@ -385,11 +406,13 @@
box-sizing: border-box; box-sizing: border-box;
margin: 0px auto; margin: 0px auto;
margin-top: 20px; margin-top: 20px;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.hui { .hui {
font-size: 10px; font-size: 10px;
width: 100%; width: 100%;
@ -397,6 +420,7 @@
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
} }
.dbottom { .dbottom {
display: flex; display: flex;
align-items: center; align-items: center;
@ -413,12 +437,14 @@
.lan { .lan {
color: #0D2E8D; color: #0D2E8D;
} }
.box-box { .box-box {
width: 95%; width: 95%;
margin: 20px auto; margin: 20px auto;
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
} }
.bb-top { .bb-top {
height: 65px; height: 65px;
width: 100%; width: 100%;
@ -426,6 +452,7 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.bb-bai { .bb-bai {
width: 50%; width: 50%;
height: 100%; height: 100%;
@ -437,6 +464,7 @@
background: #FFFFFF; background: #FFFFFF;
color: #0D2E8D; color: #0D2E8D;
} }
.bb-hui { .bb-hui {
height: 100%; height: 100%;
width: 50%; width: 50%;
@ -448,12 +476,14 @@
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
} }
.bb-baibox { .bb-baibox {
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
padding: 15px; padding: 15px;
background-color: white; background-color: white;
} }
.anniulanan { .anniulanan {
width: 90%; width: 90%;
height: 42px; height: 42px;
@ -465,12 +495,14 @@
background-color: #0D2E8D; background-color: #0D2E8D;
color: white; color: white;
} }
.dalan { .dalan {
font-size: 25px; font-size: 25px;
font-weight: bold; font-weight: bold;
color: #0D2E8D; color: #0D2E8D;
margin-left: 10px; margin-left: 10px;
} }
.axquan { .axquan {
width: 14px; width: 14px;
height: 14px; height: 14px;
@ -478,6 +510,7 @@
border: 1px solid #AAAAAA; border: 1px solid #AAAAAA;
margin-right: 5px; margin-right: 5px;
} }
.axquanl { .axquanl {
width: 14px; width: 14px;
height: 14px; height: 14px;
@ -486,5 +519,4 @@
margin-right: 5px; margin-right: 5px;
background-color: #0D2E8D; background-color: #0D2E8D;
} }
</style> </style>

View File

@ -34,6 +34,9 @@
<view class="bb-bai" :class="{'shendu' : shopinfo == 2}" @click="shopinfo = 2"> <view class="bb-bai" :class="{'shendu' : shopinfo == 2}" @click="shopinfo = 2">
<text>员工登录</text> <text>员工登录</text>
</view> </view>
<view class="bb-bai" :class="{'shendu' : shopinfo == 3}" @click="shopinfo = 3">
<text>业务登录</text>
</view>
</view> </view>
<view class="bb-baibox"> <view class="bb-baibox">
@ -231,7 +234,7 @@
}).then((res) => { }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
uni.setStorageSync('staffinfo', res.data.user) uni.setStorageSync('staffinfo', res.data)
uni.setStorageSync('partnerId', res.data.partnerId) uni.setStorageSync('partnerId', res.data.partnerId)
uni.setStorageSync('roleSelect', 'worker') uni.setStorageSync('roleSelect', 'worker')
uni.setStorageSync('userId', res.data.user.id) uni.setStorageSync('userId', res.data.user.id)
@ -243,6 +246,29 @@
} }
}) })
}
if (this.shopinfo == 3) {
uni.showLoading({
title: '加载中'
});
request({
url: '/rescue/getJcWorkerInfo',
method: 'get',
}).then((res) => {
if (res.code == 200) {
uni.setStorageSync('staffinfo', res.data)
uni.setStorageSync('partnerId', res.data.partnerId)
uni.setStorageSync('roleSelect', 'businessManager')
uni.setStorageSync('userId', res.data.user.id)
uni.hideLoading();
this.$startSocketConnect(res.data.user.id)
uni.redirectTo({
url: '/pages/businessManager/businessManager'
})
}
})
} }
if (this.shopinfo == 1) { if (this.shopinfo == 1) {
uni.showLoading({ uni.showLoading({

File diff suppressed because it is too large Load Diff

View File

@ -255,6 +255,7 @@
xinlist: [], xinlist: [],
zhilist: [], zhilist: [],
isLoading: false, isLoading: false,
userInfo: {},
recordTime: Number(new Date()), recordTime: Number(new Date()),
baseUrl: this.$baseImageUrl, baseUrl: this.$baseImageUrl,
goodsId: '', goodsId: '',
@ -266,6 +267,10 @@
{ {
name: '上门取车', name: '上门取车',
label: 1 label: 1
},
{
name: '业务接车',
label: 2
} }
], ],
radiovalue1: 0, radiovalue1: 0,
@ -299,6 +304,46 @@
async onLoad(options) { async onLoad(options) {
this.isLoading = true this.isLoading = true
await this.getinitialize() await this.getinitialize()
this.userInfo = uni.getStorageSync('staffinfo')
if (!this.userInfo || !this.userInfo.userInfo) {
request({
url: '/rescue/getJcWorkerInfo',
method: 'get',
}).then((res) => {
if (res.code == 200) {
uni.setStorageSync('staffinfo', res.data)
uni.setStorageSync('userId', res.data.user.id)
}
})
}
console.log('当前用户信息', this.userInfo);
if (this.userInfo.userInfo) {
this.otherPhone = this.userInfo.userInfo.mobile
this.otherName = this.userInfo.userInfo.nickname
}
if (options.type) {
if (options.type === 'business') {
//
//1.
this.radiovalue1 = 2
//2.
console.log('客户来源', this.columns);
console.log('当前userId', uni.getStorageSync('userId'));
const result = this.findUserWithParent(this.columns, uni.getStorageSync('userId'))
console.log('查询出来的shuju ', result)
if (result) {
this.customerSource = result.child.name
this.customerSourceId = result.child.id
this.businessChannel = result.parent.name
this.businessChannelId = result.parent.id
this.cssj = this.customerSourceId
}
console.log(this.customerSource, this.businessChannel);
}
}
this.isLoading = false this.isLoading = false
}, },
onShow() { onShow() {
@ -322,13 +367,30 @@
this.customerSourceId = e.detail.value[1].value this.customerSourceId = e.detail.value[1].value
this.businessChannel = e.detail.value[0].text this.businessChannel = e.detail.value[0].text
this.businessChannelId = e.detail.value[0].value this.businessChannelId = e.detail.value[0].value
console.log('客户来源', this.customerSource);
console.log('bangding', this.cssj);
}, },
onnodeclick(e) { onnodeclick(e) {
console.log('选择的内容', e); console.log('选择的内容', e);
console.log('bangding', this.cssj); console.log('bangding', this.cssj);
}, },
/**
* @param {Object} data
* @param {Object} userId
*/
findUserWithParent(data, userId) {
for (const parent of data) {
if (Array.isArray(parent.children)) {
for (const child of parent.children) {
if (child.userIds && child.userIds.includes(userId)) {
return {
parent,
child
};
}
}
}
}
return null; //
},
async getCustomerSource(searchValue) { async getCustomerSource(searchValue) {
console.log('搜索内容', searchValue); console.log('搜索内容', searchValue);
let res = await request({ let res = await request({

View File

@ -81,7 +81,7 @@
</view> </view>
<view class="on-input" v-if="item.nodeNames"> <view class="on-input" v-if="item.nodeNames">
<uni-icons type="more" color="#999999" size="16"></uni-icons> <uni-icons type="more" color="#999999" size="16"></uni-icons>
<text class="single-line" style="color: red;" v-if="tapValue == '4'">需复检项目</text> <text class="single-line" style="color: red;" v-if="tapValue == '4'">需复检|重检项目</text>
<text class="single-line" style="color: red;width: 150rpx;" v-else>异常项目</text> <text class="single-line" style="color: red;width: 150rpx;" v-else>异常项目</text>
<text class="multi-line" :style="true ? 'color:red' : ''">{{ item.nodeNames }}</text> <text class="multi-line" :style="true ? 'color:red' : ''">{{ item.nodeNames }}</text>
</view> </view>
@ -148,17 +148,16 @@
text: "进行中", text: "进行中",
value: "0" value: "0"
}, },
{ {
text: "已完成", text: "已完成",
value: "1", value: "1",
}, },
// {
// text: "",
// value: "2"
// },
{ {
text: "待重检", text: "待审核",
value: "2"
},
{
text: "待复检",
value: "4" value: "4"
}, },
{ {
@ -293,8 +292,7 @@
method: 'get', method: 'get',
params: { params: {
ids: ids.join(','), ids: ids.join(','),
status: 3, type: this.tapValue == '4' ? '0' : ''
type: this.tapValue == '7' ? '0' : ''
} }
}) })
} else if (this.tapValue == '5') { } else if (this.tapValue == '5') {

View File

@ -259,9 +259,15 @@
console.log('当前选择的汇报对象', this.reportTosStr) console.log('当前选择的汇报对象', this.reportTosStr)
if (res.data.filePath) { if (res.data.filePath) {
this.fileList1 = res.data.filePath.split(',').map(item => { this.fileList1 = res.data.filePath.split(',').map(item => {
if (!item.includes('http')) {
return { return {
url: this.baseImageUrl + "/" + item url: this.baseImageUrl + "/" + item
} }
} else {
return {
url: item
}
}
}) })
} }
}) })

View File

@ -131,6 +131,18 @@
<uni-icons type="right" color="#999999" size="16"></uni-icons> <uni-icons type="right" color="#999999" size="16"></uni-icons>
</view> </view>
</view> </view>
<view class="on-input" @click="checkoutRole()">
<view class="dix">
<view class="d-icon">
<image src="../../static/detection/tc.png" mode=""></image>
</view>
<view class="aa">{{chooseIdx == 3 ? '切换员工端' : '切换业务经理端'}}</view>
</view>
<view class="">
<uni-icons type="right" color="#999999" size="16"></uni-icons>
</view>
</view>
</view> </view>
</view> </view>
<uni-popup ref="alertDialog" type="dialog"> <uni-popup ref="alertDialog" type="dialog">
@ -157,13 +169,15 @@
msg: '3', msg: '3',
user: {}, user: {},
baseUrl: '', baseUrl: '',
chooseIdx: undefined,
partnerId: '', partnerId: '',
myindex: {}, myindex: {},
lookAppointment: false lookAppointment: false
} }
}, },
onLoad() { onLoad() {
this.baseUrl = this.$baseImageUrl + '/' this.baseUrl = this.$baseImageUrl + '/',
this.chooseIdx = uni.getStorageSync("chooseIdx")
}, },
onShow() { onShow() {
this.user = uni.getStorageSync('staffinfo') this.user = uni.getStorageSync('staffinfo')
@ -207,6 +221,20 @@
url: `/pages/editUserInfo/editUserInfo` url: `/pages/editUserInfo/editUserInfo`
}); });
}, },
checkoutRole() {
uni.showLoading({
title: '加载中'
});
if (this.chooseIdx == 3) {
uni.setStorageSync("chooseIdx", 2)
} else {
uni.setStorageSync("chooseIdx", 3)
}
setTimeout(function() {
uni.hideLoading();
}, 1000);
this.chooseIdx = uni.getStorageSync("chooseIdx")
},
dialogClose() { dialogClose() {
this.$refs.alertDialog.close() this.$refs.alertDialog.close()
console.log('点击关闭') console.log('点击关闭')

View File

@ -69,11 +69,11 @@
<view class="title_">资料统计</view> <view class="title_">资料统计</view>
<view class="box_"> <view class="box_">
<view class="d_b" style="display: flex; flex-wrap: wrap;"> <view class="d_b" style="display: flex; flex-wrap: wrap;">
<view class="three_"> <view class="three_" @click="goxiangqing2(6,'add')">
<view class="text_">新增</view> <view class="text_">新增</view>
<view class=""> {{fileRes.addCount || 0}}</view> <view class=""> {{fileRes.addCount || 0}}</view>
</view> </view>
<view class="three_"> <view class="three_" @click="goxiangqing2(6,'update')">
<view class="text_">修改</view> <view class="text_">修改</view>
<view class=""> {{fileRes.updateCount || 0}}</view> <view class=""> {{fileRes.updateCount || 0}}</view>
</view> </view>
@ -467,6 +467,12 @@
}) })
} }
}, },
//
goxiangqing2(id, type) {
uni.navigateTo({
url: '/pages/statistics/statislist?id=' + id + '&type=' + type
})
},
goOrderList() { goOrderList() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/ordermanage' url: '/pages/index/ordermanage'

View File

@ -103,15 +103,35 @@
</view> </view>
</view> </view>
</view> </view>
<view v-if="id == 6">
<view class="jsy" v-if="datas.length == 0">
<image src="http://www.nuoyunr.com/lananRsc/detection/qs.png" mode=""></image>
</view>
<view class="">
<view class="top-boxx2" v-for="(item,index) in datas" :key="index"
style="display: flex;padding: 15rpx;justify-content: space-between;">
<view class="" style="">
<view class="" style=" ">
资料名称{{ item.fileName || '' }}
</view>
<view style="margin-top: 20rpx;">{{ type=='add' ? '新增时间' : '修改时间' }}
{{formatDate(item.createTime)}}
</view>
<view class="" style="margin-top: 20rpx;">类型 {{ item.type == 2 ?'文件' :'文件夹' }}</view>
</view>
<view v-if="item.type=='2'" style="color: #3D89FC;" @click="viewFile(item.filePath)">查看文件</view>
</view>
</view>
</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import config from '@/config' import config from '@/config'
import request from '../../utils/request'; import request from '../../utils/request';
import * as utils from '../../utils/utils';
import headersVue from "@/components/header/headers.vue"; import headersVue from "@/components/header/headers.vue";
export default { export default {
@ -126,6 +146,7 @@
range: ['2023-9-28', '2023-10-7'], range: ['2023-9-28', '2023-10-7'],
titles: '', titles: '',
businessId: '', businessId: '',
type: '',
} }
}, },
@ -170,11 +191,20 @@
this.getCustomerSourceCount() this.getCustomerSourceCount()
this.titles = '客户来源统计' this.titles = '客户来源统计'
} }
if (this.id == 6) {
this.getMonth()
this.getFileBytype()
this.type = option.type
this.titles = '资料统计'
}
}, },
onShow() { onShow() {
}, },
methods: { methods: {
formatDate(time) {
return utils.formatDateTimeToMinute(time);
},
gettime() { gettime() {
// //
var now = new Date(); var now = new Date();
@ -197,6 +227,28 @@
this.range[1] = currentTime this.range[1] = currentTime
}, },
getMonth() {
//
const now = new Date();
//
const year = now.getFullYear();
let month = now.getMonth() + 1; // 0
//
const formatNumber = (num) => (num < 10 ? '0' + num : num);
//
const firstDay = `${year}-${formatNumber(month)}-01`;
//
const lastDate = new Date(year, month, 0).getDate();
const lastDay = `${year}-${formatNumber(month)}-${formatNumber(lastDate)}`;
//
this.range[0] = firstDay;
this.range[1] = lastDay;
},
async getone() { async getone() {
let data = { let data = {
startTime: this.range[0], startTime: this.range[0],
@ -241,6 +293,40 @@
this.datas = res.data this.datas = res.data
}, },
viewFile(filePath) {
let url = ''
//http
if (filePath.indexOf('http') === -1) {
url = this.$baseImageUrl + '/' + filePath
} else {
url = filePath
}
uni.downloadFile({
url: url,
success: (res) => { // 使
var filePath = res.tempFilePath;
this.isLoading = false;
uni.openDocument({
filePath: filePath,
showMenu: true,
success: (res) => {
console.log("文件打开成功");
},
fail: (err) => {
console.error("文件打开失败", err);
uni.showToast({
title: '文件打开失败',
icon: 'none'
});
}
});
},
fail: (err) => {
console.error("文件下载失败", err);
}
});
},
async getfour() { async getfour() {
let data = { let data = {
startTime: this.range[0], startTime: this.range[0],
@ -267,6 +353,23 @@
}) })
this.datas = res.data this.datas = res.data
}, },
async getFileBytype() {
let data = {
startTime: this.range[0],
endTime: this.range[1],
servicePackageId: 'jiance'
}
let res = await request({
url: '/partnerOwn/partner/getFileByType',
method: 'get',
params: data
})
if (this.type == 'add') {
this.datas = res.data.insertFile
} else {
this.datas = res.data.updateFile
}
},
maskClick(e) { maskClick(e) {
console.log('执行了吗'); console.log('执行了吗');
if (this.id == 1) { if (this.id == 1) {
@ -356,6 +459,16 @@
margin-top: 10px; margin-top: 10px;
}
.top-boxx2 {
border-radius: 5px;
box-sizing: border-box;
// padding: 18px;
background-color: white;
margin-top: 10px;
} }
.cont-box { .cont-box {