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) {
if (index == 1) {
this.aindex = index
let chooseIdx = uni.getStorageSync("chooseIdx")
if (chooseIdx == 3) {
uni.reLaunch({
url: '/pages/businessManager/businessManager'
});
} else {
uni.reLaunch({
url: '/pages/staff/staff'
});
}
}
if (index == 3) {
this.aindex = index

View File

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

View File

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

View File

@ -34,6 +34,9 @@
<view class="bb-bai" :class="{'shendu' : shopinfo == 2}" @click="shopinfo = 2">
<text>员工登录</text>
</view>
<view class="bb-bai" :class="{'shendu' : shopinfo == 3}" @click="shopinfo = 3">
<text>业务登录</text>
</view>
</view>
<view class="bb-baibox">
@ -231,7 +234,7 @@
}).then((res) => {
if (res.code == 200) {
uni.setStorageSync('staffinfo', res.data.user)
uni.setStorageSync('staffinfo', res.data)
uni.setStorageSync('partnerId', res.data.partnerId)
uni.setStorageSync('roleSelect', 'worker')
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) {
uni.showLoading({

File diff suppressed because it is too large Load Diff

View File

@ -255,6 +255,7 @@
xinlist: [],
zhilist: [],
isLoading: false,
userInfo: {},
recordTime: Number(new Date()),
baseUrl: this.$baseImageUrl,
goodsId: '',
@ -266,6 +267,10 @@
{
name: '上门取车',
label: 1
},
{
name: '业务接车',
label: 2
}
],
radiovalue1: 0,
@ -299,6 +304,46 @@
async onLoad(options) {
this.isLoading = true
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
},
onShow() {
@ -322,13 +367,30 @@
this.customerSourceId = e.detail.value[1].value
this.businessChannel = e.detail.value[0].text
this.businessChannelId = e.detail.value[0].value
console.log('客户来源', this.customerSource);
console.log('bangding', this.cssj);
},
onnodeclick(e) {
console.log('选择的内容', e);
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) {
console.log('搜索内容', searchValue);
let res = await request({

View File

@ -81,7 +81,7 @@
</view>
<view class="on-input" v-if="item.nodeNames">
<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="multi-line" :style="true ? 'color:red' : ''">{{ item.nodeNames }}</text>
</view>
@ -148,17 +148,16 @@
text: "进行中",
value: "0"
},
{
text: "已完成",
value: "1",
},
// {
// text: "",
// value: "2"
// },
{
text: "待重检",
value: "2"
},
{
text: "待复检",
text: "待审核",
value: "4"
},
{
@ -293,8 +292,7 @@
method: 'get',
params: {
ids: ids.join(','),
status: 3,
type: this.tapValue == '7' ? '0' : ''
type: this.tapValue == '4' ? '0' : ''
}
})
} else if (this.tapValue == '5') {

View File

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

View File

@ -131,6 +131,18 @@
<uni-icons type="right" color="#999999" size="16"></uni-icons>
</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>
<uni-popup ref="alertDialog" type="dialog">
@ -157,13 +169,15 @@
msg: '3',
user: {},
baseUrl: '',
chooseIdx: undefined,
partnerId: '',
myindex: {},
lookAppointment: false
}
},
onLoad() {
this.baseUrl = this.$baseImageUrl + '/'
this.baseUrl = this.$baseImageUrl + '/',
this.chooseIdx = uni.getStorageSync("chooseIdx")
},
onShow() {
this.user = uni.getStorageSync('staffinfo')
@ -207,6 +221,20 @@
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() {
this.$refs.alertDialog.close()
console.log('点击关闭')

View File

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

View File

@ -103,15 +103,35 @@
</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>
</template>
<script>
import config from '@/config'
import request from '../../utils/request';
import * as utils from '../../utils/utils';
import headersVue from "@/components/header/headers.vue";
export default {
@ -126,6 +146,7 @@
range: ['2023-9-28', '2023-10-7'],
titles: '',
businessId: '',
type: '',
}
},
@ -170,11 +191,20 @@
this.getCustomerSourceCount()
this.titles = '客户来源统计'
}
if (this.id == 6) {
this.getMonth()
this.getFileBytype()
this.type = option.type
this.titles = '资料统计'
}
},
onShow() {
},
methods: {
formatDate(time) {
return utils.formatDateTimeToMinute(time);
},
gettime() {
//
var now = new Date();
@ -197,6 +227,28 @@
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() {
let data = {
startTime: this.range[0],
@ -241,6 +293,40 @@
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() {
let data = {
startTime: this.range[0],
@ -267,6 +353,23 @@
})
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) {
console.log('执行了吗');
if (this.id == 1) {
@ -356,6 +459,16 @@
margin-top: 10px;
}
.top-boxx2 {
border-radius: 5px;
box-sizing: border-box;
// padding: 18px;
background-color: white;
margin-top: 10px;
}
.cont-box {