更新
This commit is contained in:
parent
78b0019cf0
commit
4e37c0a541
@ -132,12 +132,15 @@
|
|||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.customInfo = res.data
|
this.customInfo = res.data
|
||||||
if (this.customInfo.avatar) {
|
if (this.customInfo) {
|
||||||
this.customInfo.avatar = config.baseImageUrl + this.customInfo.avatar
|
setStorageWithExpiry("userInfo", this.customInfo)
|
||||||
|
this.generateUniCode(this.customInfo.uniqueCode)
|
||||||
|
if (this.customInfo.avatar) {
|
||||||
|
this.customInfo.avatar = config.baseImageUrl + this.customInfo.avatar
|
||||||
|
}
|
||||||
|
this.customInfo.roleNames = roleNames
|
||||||
}
|
}
|
||||||
this.customInfo.roleNames = roleNames
|
|
||||||
setStorageWithExpiry("userInfo", this.customInfo)
|
|
||||||
this.generateUniCode(this.customInfo.uniqueCode)
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.customInfo = data
|
this.customInfo = data
|
||||||
|
|||||||
@ -4,14 +4,10 @@
|
|||||||
<u-icon name="arrow-left" color="#fff" size="18"></u-icon>
|
<u-icon name="arrow-left" color="#fff" size="18"></u-icon>
|
||||||
</headersVue>
|
</headersVue>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view style="margin-top: 20rpx">
|
<view style="margin-top: 20rpx">
|
||||||
<uni-datetime-picker
|
<uni-datetime-picker v-model="queryParams.datetimeRange" type="daterange" rangeSeparator="至"
|
||||||
v-model="queryParams.datetimeRange"
|
@change="getStaffCount" />
|
||||||
type="daterange"
|
</view>
|
||||||
rangeSeparator="至"
|
|
||||||
@change ="getStaffCount"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
<!-- 顶部选择区域 -->
|
<!-- 顶部选择区域 -->
|
||||||
<!-- <view class="top_">
|
<!-- <view class="top_">
|
||||||
<view class="select-container" @click="showDropdown">
|
<view class="select-container" @click="showDropdown">
|
||||||
@ -93,14 +89,12 @@
|
|||||||
headersVue,
|
headersVue,
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
this.queryParams.datetimeRange = [
|
this.setCurrentMonthRange()
|
||||||
new Date(now.getFullYear(), now.getMonth(), 1).getTime(),
|
|
||||||
now.getTime()
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
this.getStaffCount();
|
|
||||||
|
this.getStaffCount();
|
||||||
this.getInspectionProject();
|
this.getInspectionProject();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -115,6 +109,23 @@
|
|||||||
this.List = res.data;
|
this.List = res.data;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}, // 补零:1 → 01
|
||||||
|
pad(n) {
|
||||||
|
return n.toString().padStart(2, '0');
|
||||||
|
},
|
||||||
|
// Date → "YYYY-MM-DD"
|
||||||
|
formatDate(d) {
|
||||||
|
return `${d.getFullYear()}-${this.pad(d.getMonth() + 1)}-${this.pad(d.getDate())}`;
|
||||||
|
},
|
||||||
|
// 设置本月起止日期:月初到今天
|
||||||
|
setCurrentMonthRange() {
|
||||||
|
const now = new Date();
|
||||||
|
const firstDay = new Date(now.getFullYear(), now.getMonth(), 1);
|
||||||
|
|
||||||
|
this.queryParams.datetimeRange = [
|
||||||
|
this.formatDate(firstDay),
|
||||||
|
this.formatDate(now)
|
||||||
|
];
|
||||||
},
|
},
|
||||||
// 获取工作内容列表
|
// 获取工作内容列表
|
||||||
getInspectionProject() {
|
getInspectionProject() {
|
||||||
|
|||||||
@ -261,11 +261,11 @@
|
|||||||
goodsId: '',
|
goodsId: '',
|
||||||
msg: '3',
|
msg: '3',
|
||||||
radiolist1: [{
|
radiolist1: [{
|
||||||
name: '接待',
|
name: '接车拍照',
|
||||||
label: 0
|
label: 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '上门取车',
|
name: '上门接车',
|
||||||
label: 1
|
label: 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -212,6 +212,8 @@
|
|||||||
methods: {
|
methods: {
|
||||||
dialogToggle() {
|
dialogToggle() {
|
||||||
this.$refs.alertDialog.open()
|
this.$refs.alertDialog.open()
|
||||||
|
uni.removeStorageSync('userInfo')
|
||||||
|
uni.removeStorageSync('staffinfo')
|
||||||
},
|
},
|
||||||
modifyPassword() {
|
modifyPassword() {
|
||||||
// 跳转到修改密码页面
|
// 跳转到修改密码页面
|
||||||
@ -295,7 +297,11 @@
|
|||||||
this.user = ress.data
|
this.user = ress.data
|
||||||
this.generateUniCode(ress.data.uniqueCode)
|
this.generateUniCode(ress.data.uniqueCode)
|
||||||
// 判断角色是否只有一个业务经理
|
// 判断角色是否只有一个业务经理
|
||||||
if (ress.data.userRoles.length == 1 && ress.data.userRoles[0].roleCode == 'jcywjl') {
|
const hasJcywjl = ress.data.userRoles
|
||||||
|
?.flatMap(r => r.roleCode) // 把所有 roleCode 数组合并成一个大数组
|
||||||
|
.includes('jcywjl'); // 判断是否包含目标代码
|
||||||
|
|
||||||
|
if (hasJcywjl) {
|
||||||
this.showCheckout = false
|
this.showCheckout = false
|
||||||
} else {
|
} else {
|
||||||
this.showCheckout = true
|
this.showCheckout = true
|
||||||
|
|||||||
@ -160,6 +160,11 @@
|
|||||||
<u-popup :show="openMeetCar" @close="openMeetCar = false" :round="10">
|
<u-popup :show="openMeetCar" @close="openMeetCar = false" :round="10">
|
||||||
<view class="popup-box">
|
<view class="popup-box">
|
||||||
<u--textarea v-model="remark" placeholder="请输入内容" border="bottom"></u--textarea>
|
<u--textarea v-model="remark" placeholder="请输入内容" border="bottom"></u--textarea>
|
||||||
|
<u-radio-group v-model="radiovalue1" iconPlacement="left" name="name" placement="row">
|
||||||
|
<u-radio style="margin-right: 10rpx;" :customStyle="{marginBottom: '8px'}"
|
||||||
|
v-for="(item, index) in radiolist1" :key="index" :label="item.name" :name="item.label">
|
||||||
|
</u-radio>
|
||||||
|
</u-radio-group>
|
||||||
<view class="on-inputx">
|
<view class="on-inputx">
|
||||||
<text>施工图片:</text>
|
<text>施工图片:</text>
|
||||||
</view>
|
</view>
|
||||||
@ -243,7 +248,7 @@
|
|||||||
openMeetCar: false,
|
openMeetCar: false,
|
||||||
isTriggered: false,
|
isTriggered: false,
|
||||||
selectedInfo: undefined,
|
selectedInfo: undefined,
|
||||||
selectType: undefined,
|
selectType: undefined,
|
||||||
partnerId: uni.getStorageSync("partnerId"),
|
partnerId: uni.getStorageSync("partnerId"),
|
||||||
goodsTitle: '',
|
goodsTitle: '',
|
||||||
tapindex: 0,
|
tapindex: 0,
|
||||||
@ -321,6 +326,16 @@
|
|||||||
value: "5",
|
value: "5",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
radiolist1: [{
|
||||||
|
name: '还车拍照',
|
||||||
|
label: 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '上门还车',
|
||||||
|
label: 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
radiovalue1: 0,
|
||||||
tapValue: 1,
|
tapValue: 1,
|
||||||
chooseWorkNodes: [],
|
chooseWorkNodes: [],
|
||||||
columnsMeetMan: [],
|
columnsMeetMan: [],
|
||||||
@ -666,48 +681,49 @@
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.selectType) {
|
if (this.selectType) {
|
||||||
request({
|
request({
|
||||||
url: '/system/info/returnCarPhoto',
|
url: '/system/info/returnCarPhoto',
|
||||||
data: {
|
data: {
|
||||||
inspectionInfoId: this.selectedInfo.id,
|
inspectionInfoId: this.selectedInfo.id,
|
||||||
remark: this.remark,
|
remark: this.remark,
|
||||||
dealImages: this.fileList1.map(item => item.url).join(',')
|
dealImages: this.fileList1.map(item => item.url).join(','),
|
||||||
},
|
returnType: this.radiovalue1
|
||||||
method: 'post'
|
},
|
||||||
}).then(res => {
|
method: 'post'
|
||||||
if (res.code === 200) {
|
}).then(res => {
|
||||||
uni.showToast({
|
if (res.code === 200) {
|
||||||
title: '提交成功',
|
uni.showToast({
|
||||||
icon: 'none',
|
title: '提交成功',
|
||||||
duration: 2000
|
icon: 'none',
|
||||||
});
|
duration: 2000
|
||||||
}
|
});
|
||||||
})
|
}
|
||||||
}else {
|
})
|
||||||
request({
|
} else {
|
||||||
url: '/system/info/meetCarPhoto',
|
request({
|
||||||
data: {
|
url: '/system/info/meetCarPhoto',
|
||||||
meetCarId: this.selectedInfo.id,
|
data: {
|
||||||
remark: this.remark,
|
meetCarId: this.selectedInfo.id,
|
||||||
sourceType: this.selectedInfo.sourceType,
|
remark: this.remark,
|
||||||
dealImages: this.fileList1.map(item => item.url).join(',')
|
sourceType: this.selectedInfo.sourceType,
|
||||||
},
|
dealImages: this.fileList1.map(item => item.url).join(',')
|
||||||
method: 'post'
|
},
|
||||||
}).then(res => {
|
method: 'post'
|
||||||
if (res.code === 200) {
|
}).then(res => {
|
||||||
uni.showToast({
|
if (res.code === 200) {
|
||||||
title: '提交成功',
|
uni.showToast({
|
||||||
icon: 'none',
|
title: '提交成功',
|
||||||
duration: 2000
|
icon: 'none',
|
||||||
});
|
duration: 2000
|
||||||
}
|
});
|
||||||
})
|
}
|
||||||
}
|
})
|
||||||
this.openMeetCar = false
|
}
|
||||||
this.remark = ''
|
this.openMeetCar = false
|
||||||
this.fileList1 = []
|
this.remark = ''
|
||||||
this.onRefresherrefresh()
|
this.fileList1 = []
|
||||||
|
this.onRefresherrefresh()
|
||||||
},
|
},
|
||||||
async afterRead(event) {
|
async afterRead(event) {
|
||||||
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
||||||
@ -1034,7 +1050,7 @@
|
|||||||
/**接车拍照 */
|
/**接车拍照 */
|
||||||
returnCarPhoto(data) {
|
returnCarPhoto(data) {
|
||||||
this.selectedInfo = data
|
this.selectedInfo = data
|
||||||
this.selectType = 1
|
this.selectType = 1
|
||||||
},
|
},
|
||||||
gogogo() {
|
gogogo() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|||||||
@ -328,7 +328,8 @@
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
data: {
|
data: {
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
pageNo: this.pageNum
|
pageNo: this.pageNum,
|
||||||
|
systemCode: 'jiance'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// this.arrlist = res.rows
|
// this.arrlist = res.rows
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user