Commit 87ca8ab6 authored by 刘用法's avatar 刘用法
parents 8ccb2be9 9476107a
<!-- 完工校验弹窗 -->
<template>
<view class="check-wrap">
<u-modal
v-model="show"
border-radius="12"
width="690"
:cancel-style="{
'margin': '36rpx 15rpx 52rpx 30rpx',
'height': '104rpx',
'border-radius': '52rpx',
'border': '2px solid #2272FF',
'font-size': '32rpx',
'font-weight': '600',
'color': '#2272FF',
}"
:confirm-style="{
'margin': '36rpx 30rpx 52rpx 15rpx',
'height': '104rpx',
'border-radius': '52rpx',
'background': '#2272FF',
'font-size': '32rpx',
'font-weight': '600',
'color': '#FFFFFF',
}"
:confirm-text="confirmText"
@confirm="confirmModel" ref="checkModel"
:show-cancel-button="true"
:show-title="false">
<view class="slot-content">
<view class="check-status">
<u-image width="224rpx" height="224rpx" :src="statusImage"></u-image>
<text class="check-status-txt">{{statusTxt}}</text>
</view>
<view class="check-list">
<view class="u-flex u-row-between list-title">
<view>验证项</view>
<view>已提交/需提交</view>
<view>结果</view>
</view>
<view class="u-flex u-row-between list-item"
v-for="(item, index) in listData" :key="index">
<view class="item-txt">
<u-icon
:name="item.pass ? passIcon : noPassIcon"
:label="item.label"
margin-left="12"
label-color="#333333"
label-size="28"
size="32"></u-icon>
</view>
<view class="item-txt">{{item.submitted}}/{{item.required}}</view>
<view class="item-txt" :class="item.pass ? 'pass-color' : 'no-pass-color'">
{{item.pass ? "通过" : "未通过"}}
</view>
</view>
</view>
</view>
</u-modal>
</view>
</template>
<script>
export default {
name:"complete-check",
props: {
pass: {
type: Boolean,
default: false
},
listData: {
type: Array,
default(){
return [
{label: '基本信息', submitted: 3, required: 3, pass: false},
{label: '勘察信息', submitted: 20, required: 20, pass: true},
{label: '安装信息', submitted: 15, required: 20, pass: false}
]
}
}
},
data() {
return {
show: true,
};
},
computed: {
statusImage() {
if(this.pass) {
return process.uniEnv.qn_base_url + 'successful.png'
} else {
return process.uniEnv.qn_base_url + 'failure.png'
}
},
statusTxt() {
return this.pass ? "完工校验已通过" : "完工校验未通过"
},
confirmText() {
return this.pass ? "确定" : "去处理"
},
passIcon() { return process.uniEnv.qn_base_url + 'icon/pass.png'},
noPassIcon() { return process.uniEnv.qn_base_url + 'icon/no-pass.png'},
},
methods: {
confirm() {
if(this.pass) {
uni.navigateTo({
url: "pages/order/index"
})
} else {
let data = this.listData.find((item, index) => {
return item.pass == false;
})
this.$emit('handle-problem', data)
}
}
},
}
</script>
<style lang="scss">
.slot-content {
padding: 40rpx 30rpx 0rpx 30rpx;
.check-status {
margin-bottom: 50rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.check-status-txt {
height: 46rpx;
font-size: 40rpx;
font-weight: bold;
color: #FA5A49;
line-height: 46rpx;
}
}
.check-list {
padding-top: 40rpx;
border-top: 2rpx solid #F4F5F7;
.list-title {
height: 28rpx;
font-size: 28rpx;
font-weight: 400;
color: #999999;
line-height: 28rpx;
margin-bottom: 42rpx;
}
.list-item {
margin-bottom: 40rpx;
}
}
}
.item-txt {
height: 32rpx;
font-size: 28rpx;
font-weight: 500;
color: #333333;
line-height: 32rpx;
}
.pass-color {
color: #2272FF;
}
.no-pass-color {
color: #FA5A49;
}
.u-border-top {
position: unset;
}
</style>
......@@ -45,7 +45,7 @@
<text class="txt">{{ txt }}</text>
</view>
</view>
<view class="input-view" v-show="showRemark">
<view class="input-view">
<u-input v-model="trace.remark" class="textarea" height="156" type="textarea" placeholder="请补充详细说明,以便于记录您的接单信用分"></u-input>
</view>
</view>
......@@ -480,10 +480,6 @@ export default {
border: none;
}
}
button[disabled]:not([type]) {
background: #d1d4d4;
color: #ffffff;
}
.btn {
padding: 30rpx;
border-radius: 52rpx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment