Commit da3dbf3b by 张立顺

Merge branch 'SAAS+V4.56.2' into SAAS+V5.1.0

2 parents 608fa93d da7aa914
......@@ -122,16 +122,19 @@ Page({
color: '#35C376'
}
},
userPermissions: [], // 人员权限
userPermissions: [] // 人员权限
},
onRoute(options) {
this.setData({
queryOptions: options
}, () => {
this.getDetail()
this.getStaffPermissions()
})
this.setData(
{
queryOptions: options
},
() => {
this.getDetail()
this.getStaffPermissions()
}
)
},
/**
......@@ -139,12 +142,15 @@ Page({
*/
onLoad(options) {
if (options.id) {
this.setData({
queryOptions: options
}, () => {
this.getDetail()
this.getStaffPermissions()
})
this.setData(
{
queryOptions: options
},
() => {
this.getDetail()
this.getStaffPermissions()
}
)
}
if (options?.scene) {
this.setSceneData(options.scene)
......@@ -159,34 +165,37 @@ Page({
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
onShow() {},
// 人员权限
getStaffPermissions() {
// 假数据开始
const res = {
code: 0,
data: [{
name: '施工确认',
code: 'SHIGONGQUEREN'
}, {
name: '完成施工',
code: 'WANCHENGSHIGONG'
}, {
name: '物料出库',
code: 'WULIAOCHUKU'
}, {
name: '审核施工单',
code: 'SHENHESHIGONGDAN'
}]
data: [
{
name: '施工确认',
code: 'SHIGONGQUEREN'
},
{
name: '完成施工',
code: 'WANCHENGSHIGONG'
},
{
name: '物料出库',
code: 'WULIAOCHUKU'
},
{
name: '审核施工单',
code: 'SHENHESHIGONGDAN'
}
]
}
this.setData({
userPermissions: res.data
})
return
let { userInfo } = this.data
staffPermissions({phone: userInfo?.phone}).then(res => {
staffPermissions({ phone: userInfo?.phone }).then(res => {
let { code, data, message } = res
if (code == 0) {
this.setData({
......@@ -638,11 +647,16 @@ Page({
submitFlag: false
})
if (code == 0) {
wx.$router.redirectTo('repairOrderDetail', {id: detailInfo.id, constructionCode: detailInfo.constructionCode, orderCode: detailInfo.orderCode})
wx.$router.redirectTo('repairOrderDetail', {
id: detailInfo.id,
constructionCode: detailInfo.constructionCode,
orderCode: detailInfo.orderCode
})
} else {
wx.$util.showToast(message)
}
}).catch(() => {
})
.catch(() => {
this.setData({
submitFlag: false
})
......@@ -659,25 +673,27 @@ Page({
confirmText: '审核通过',
cancelText: '不通过',
success(res) {
api.approvalRepairOrder({
id: detailInfo.id,
constructionCode: detailInfo.constructionCode,
approvalStatus: res.confirm ? 1 : res.cancel ? 2 : ''
}).then(result => {
let { code, message } = result
if (code == 0) {
wx.$util.showToast('')
wx.showToast({
title: '操作成功',
icon: 'success'
})
setTimeout(() => {
wx.$router.back()
}, 200)
} else {
wx.$util.showToast(message)
}
})
api
.approvalRepairOrder({
id: detailInfo.id,
constructionCode: detailInfo.constructionCode,
approvalStatus: res.confirm ? 1 : res.cancel ? 2 : ''
})
.then(result => {
let { code, message } = result
if (code == 0) {
wx.$util.showToast('')
wx.showToast({
title: '操作成功',
icon: 'success'
})
setTimeout(() => {
wx.$router.back()
}, 200)
} else {
wx.$util.showToast(message)
}
})
}
})
},
......
......@@ -14,22 +14,26 @@ page {
color: #FFFFFF;
padding: var(--fontSize48) var(--fontSize40) var(--fontSize48) var(--fontSize60);
box-sizing: border-box;
.user-info {
display: flex;
align-items: flex-end;
.hide-text {
display: -webkit-box;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
.car {
font-size: var(--fontSize40);
font-weight: 600;
margin-right: var(--fontSize8);
max-width: var(--fontSize400);
image {
width: var(--fontSize40);
height: var(--fontSize40);
......@@ -37,44 +41,52 @@ page {
margin-top: var(--fontSize8);
}
}
.staff-name {
position: relative;
background: none;
max-width: var(--fontSize242);
&::before {
content: "(";
position: absolute;
left: 0;
top: 0;
}
&::after {
content: ")";
position: absolute;
right: 0;
bottom: 0;
}
.name {
padding-right: 1.2em;
text-indent: 1.2em;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2; /* 限制显示两行 */
-webkit-line-clamp: 2;
/* 限制显示两行 */
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
}
}
margin-bottom: var(--fontSize32);
}
.content {
display: flex;
align-items: center;
justify-content: space-between;
.tips {
font-size: var(--fontSize24);
margin-right: var(--fontSize50);
}
.btn {
flex-shrink: 0;
padding: var(--fontSize8) var(--fontSize28);
......@@ -83,6 +95,7 @@ page {
}
}
}
.box {
background: #FFFFFF;
box-shadow: 0 var(--fontSize4) var(--fontSize20) 0 rgba(0, 0, 0, 0.10);
......@@ -90,12 +103,14 @@ page {
padding: var(--fontSize40) var(--fontSize40) var(--fontSize2);
position: relative;
margin: var(--fontSize20) var(--fontSize20) 0;
.title {
font-size: var(--fontSize32);
color: #292D33;
margin-bottom: var(--fontSize20);
position: relative;
font-weight: 600;
&::after {
position: absolute;
content: '';
......@@ -107,38 +122,47 @@ page {
transform: translateY(-50%);
}
}
.flex {
display: flex;
align-items: center;
justify-content: space-between;
.example {
font-weight: 400;
color: #347BFF;
font-size: var(--fontSize26);
}
}
.cell {
font-size: var(--fontSize28);
color: #999EA8;
display: flex;
align-items: flex-start;
margin-bottom: var(--fontSize32);
.label {
flex-shrink: 0;
width: var(--fontSize208);
}
.value {
color: #292D33;
display: flex;
flex-flow: wrap;
align-items: center;
}
.placeholder {
color: #BEC1C7;
}
.copy,.edit {
.copy,
.edit {
color: #347BFF;
margin-left: auto;
.image {
width: var(--fontSize32);
height: var(--fontSize32);
......@@ -146,10 +170,12 @@ page {
}
}
}
.image-box {
display: flex;
flex-wrap: wrap;
margin-bottom: var(--fontSize32);
.tire-block {
width: var(--fontSize196);
height: var(--fontSize196);
......@@ -161,20 +187,25 @@ page {
text-align: center;
border-radius: var(--fontSize8);
overflow: hidden;
&:not(:nth-child(3n)) {
margin-right: var(--fontSize20);
}
&:nth-child(n+4) {
margin-top: var(--fontSize20);
}
.tire-img-box {
position: relative;
width: 100%;
height: 100%;
.tire-img {
width: 100%;
height: 100%;
}
.icon-delete {
position: absolute;
top: var(--fontSize12);
......@@ -183,29 +214,35 @@ page {
height: var(--fontSize40);
}
}
.icon-plus {
width: var(--fontSize80);
height: var(--fontSize80);
}
.plus-text {
color: #999EA8;
font-size: var(--fontSize28);
}
}
}
.service {
padding-bottom: var(--fontSize16);
.category {
padding-bottom: var(--fontSize8);
font-size: var(--fontSize28);
color: #292D33;
}
.service-item {
background: #F7F8FA;
border-radius: var(--fontSize12);
padding: var(--fontSize24);
font-size: var(--fontSize26);
margin: var(--fontSize16) calc(-1 * var(--fontSize8));
.name {
color: #EA6612;
margin-bottom: var(--fontSize12);
......@@ -216,19 +253,23 @@ page {
text-overflow: ellipsis;
word-break: break-all;
}
.bott {
display: flex;
font-size: var(--fontSize24);
color: #5A5E66;
.split {
margin: 0 var(--fontSize6);
}
}
}
.edit-item {
display: flex;
align-items: center;
image {
width: var(--fontSize32);
height: var(--fontSize32);
......@@ -237,6 +278,7 @@ page {
}
}
}
.empty-box {
width: 100%;
font-size: var(--fontSize24);
......@@ -244,27 +286,32 @@ page {
display: flex;
align-items: center;
justify-content: center;
image {
width: var(--fontSize86);
height: var(--fontSize86);
margin-right: var(--fontSize16);
}
}
.goods {
margin: 0 calc(-1 * var(--fontSize8));
font-size: var(--fontSize28);
color: #292D33;
padding-bottom: var(--fontSize32);
.goods-item {
padding: var(--fontSize24);
background: #F7F8FA;
border-radius: var(--fontSize12);
margin-bottom: var(--fontSize16);
position: relative;
.goods-name {
width: calc(100% - var(--fontSize52));
padding-left: var(--fontSize28);
}
&::after {
position: absolute;
width: var(--fontSize12);
......@@ -276,24 +323,29 @@ page {
background: #347BFF;
border-radius: 100%;
}
&:last-child {
margin-bottom: 0;
}
}
.bott {
margin-top: var(--fontSize12);
padding-left: var(--fontSize28);
font-size: var(--fontSize24);
color: #999EA8;
.split {
margin: 0 var(--fontSize6);
}
}
}
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.btns {
position: fixed;
left: 0;
......@@ -309,6 +361,7 @@ page {
font-weight: 500;
z-index: 99;
flex-direction: column;
.tips_box {
display: flex;
align-items: center;
......@@ -320,28 +373,33 @@ page {
font-size: var(--fontSize24);
color: #FF9D0A;
background: #FEF5E7;
.tipsIcon {
flex-shrink: 0;
width: var(--fontSize28);
height: var(--fontSize28);
margin-right: var(--fontSize8);
}
.contentText {
margin-right: auto;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.close-image {
width: var(--fontSize32);
height: var(--fontSize32);
}
}
.btns-con {
box-sizing: border-box;
display: flex;
padding: var(--fontSize10) 0;
width: calc(100% - var(--fontSize80));
.confirm {
border-radius: var(--fontSize12);
height: var(--fontSize80);
......
......@@ -15,8 +15,9 @@
</view>
<view class="main {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="mainheader">
<!-- catchtap="showStaffPicker" -->
<view class="title">日报切换</view>
<view class="navigation-title templateNameTitle" bindtap="showStaffPicker">
<view class="navigation-title templateNameTitle">
<picker bindchange="handleTemplagePickerChange" value="{{ orderObj.templateType-1 }}" range-key="name" range="{{ pickerTemplateList }}" disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) || isHmStore}}">
<view class="picker">
<view class="text-hide templateName">{{pickerTemplateList[orderObj.templateType-1]['name']}}</view>
......@@ -93,7 +94,7 @@
<block wx:if="{{ item.brandType == 0 }}">
<view class="mainheader">
<view class="title">问界</view>
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" bindtap="showStaffPicker">
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" catchtap="showStaffPicker">
<view class="navigation-title-text text-hide">{{orderObj.staffName}}</view>
<view class="arrow" wx:if="{{ role == 'super' }}">
<image src="/images/arrow_bottom.png" />
......@@ -119,7 +120,7 @@
<block wx:if="{{ item.brandType == 1 }}">
<view class="mainheader">
<view class="title">鸿蒙</view>
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" bindtap="showStaffPicker">
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" catchtap="showStaffPicker">
<view class="navigation-title-text text-hide">{{orderObj.staffName}}</view>
<view class="arrow" wx:if="{{ role == 'super' }}">
<image src="/images/arrow_bottom.png" />
......@@ -145,7 +146,7 @@
<block wx:if="{{ item.brandType == 2 }}">
<view class="mainheader">
<view class="title">{{ item.brandType == 1? '非问界': item.firstBrandName}}</view>
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" bindtap="showStaffPicker">
<view class="navigation-title" wx:if="{{ orderObj.staffName && arr_index == 0 }}" catchtap="showStaffPicker">
<view class="navigation-title-text text-hide">{{orderObj.staffName}}</view>
<view class="arrow" wx:if="{{ role == 'super' }}">
<image src="/images/arrow_bottom.png" />
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!