首页,师傅规则,需求大厅,我的团队开发

This commit is contained in:
yangdanqi 2022-05-03 14:59:33 +08:00
parent dadab5fdf2
commit 496d4c46cb
8 changed files with 747 additions and 78 deletions

View File

@ -29,6 +29,7 @@ const myInfo = {
picUrl: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big5000.jpg', picUrl: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big5000.jpg',
name: '叮咚任务师傅端', name: '叮咚任务师傅端',
entryType: null, entryType: null,
hasCheckedRule: true,
order: { order: {
noReservation: 5, noReservation: 5,
noSchedule: 6, noSchedule: 6,
@ -78,8 +79,130 @@ const myTeamInfo = {
}] }]
} }
const masterRules = [
'0规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容',
'1规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容',
'2规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容',
'3规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容',
'4规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容',
'5规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容',
'6规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容',
'7规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容',
'8规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容'
]
// type: 0=升降序1=功能按钮order: 0=升序1=降序;
const taskConditions = [{
code: 'area',
title: '区域'
}, {
code: 'category',
title: '品类'
}, {
code: 'distance',
title: '距离',
type: 0,
value: 0,
}, {
code: 'time',
title: '时间',
type: 0,
value: 0,
}, {
code: 'reset',
type: 1,
title: '重置'
}]
const tasks = [{
id: 1,
title: '清洗-油烟机/油烟机全拆洗+空调挂机',
tag: ['油烟机全拆洗+空调挂机', '京东店铺'],
address: '广东省惠州市惠城区小金口街道兴华街10号',
doorTime: '2022-01-17 12:00:00-12:15:00',
price: '170.00',
expeditedPrice: '70.00',
phoneNum: '13455635441',
canQuote: true
}, {
id: 2,
title: '清洗-油烟机/油烟机全拆洗+空调挂机',
tag: ['油烟机全拆洗+空调挂机', '京东店铺'],
address: '广东省惠州市惠城区小金口街道兴华街10号',
doorTime: '2022-01-17 12:00:00-12:15:00',
price: '170.00',
expeditedPrice: '70.00',
phoneNum: '13455635442',
canQuote: true
}, {
id: 3,
title: '清洗-油烟机/油烟机全拆洗+空调挂机',
tag: ['油烟机全拆洗+空调挂机', '京东店铺'],
address: '广东省惠州市惠城区小金口街道兴华街10号',
doorTime: '2022-01-17 12:00:00-12:15:00',
price: '170.00',
expeditedPrice: '70.00',
phoneNum: '13455635443',
canQuote: true
}];
const takeCertify = true;
const areaList = [[{
id: 100,
name: '广东'
}, {
id: 101,
name: '海南'
}], [{
id: 200,
name: '广州'
}], [{
id: 300,
name: '天河'
}]]
const categoryList = [[{
id: 100,
name: '电器类'
}, {
id: 101,
name: '家政类'
}], [{
id: 200,
name: '全部'
}], [{
id: 300,
name: '全部'
}]];
const order = {
id: 1,
title: '清洗-油烟机/油烟机全拆洗+空调挂机',
tag: ['油烟机全拆洗+空调挂机', '京东店铺'],
address: '广东省惠州市惠城区小金口街道兴华街10号',
doorTime: '2022-01-17 12:00:00-12:15:00',
price: '170.00',
expeditedPrice: '70.00',
phoneNum: '13455635441',
contactPerson: '周梅',
picUrl: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big6001.jpg',
spec: '200*300cm',
servType: '空调清洗',
serialId: '12233342345223',
createTime: '2022-01-17 15:44:32',
comments: '上门前10分钟先电话联系'
}
export default { export default {
moduleBarInfos, moduleBarInfos,
myInfo, myInfo,
myTeamInfo myTeamInfo,
masterRules,
taskConditions,
tasks,
takeCertify,
categoryList,
areaList,
order
} }

View File

@ -8,6 +8,15 @@
"pages": [{ "pages": [{
"path": "my-team" "path": "my-team"
}] }]
}, {
"root": "pages/demand-center/",
"pages": [{
"path": "rule"
}, {
"path": "accept-demand-center"
}, {
"path": "demand-detail"
}]
}], }],
"globalStyle": { "globalStyle": {
"navigationStyle": "custom", "navigationStyle": "custom",

View File

@ -39,11 +39,41 @@
</view> </view>
<!-- 底部操作栏 --> <!-- 底部操作栏 -->
<view class="cu-bar bg-white tabbar border shop fixed-bottom-bar"> <view class="cu-bar bg-white tabbar border shop fixed-bottom-bar">
<view class="left-grid text-center"> <view class="left-grid text-center" @click="showTakeRateSetModal">
<view>设置扣点</view> <view>设置扣点</view>
<view>(扣点<text class="text-red">{{myTeamInfo.takeRate}}%</text>)</view> <view>(扣点<text class="text-red">{{myTeamInfo.takeRate}}%</text>)</view>
</view> </view>
<view class="bg-main-color submit" @click="submit">提交订单</view> <view class="bg-main-color submit" @click="">邀请团队</view>
</view>
<!-- 设置扣点模态框 -->
<view class="cu-modal" :class="isShowTakeRateSet?'show':''">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end">
<view class="content">设置扣点</view>
<view class="action" @tap="hideModal">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<view class="padding-xl">
<view>设置区域代理扣点可按百分比扣取或金额扣取的方式建议二选一进行申请</view>
<view class="flex justify-center align-center margin-top-sm">
<text>扣点</text>
<input class="radius-input" type="digit" placeholder="请输入订单扣取的比例"></input>
<text>%</text>
</view>
<view class="flex justify-center align-center margin-top-sm">
<text>金额</text>
<input class="radius-input" type="digit" placeholder="请输入按单扣取的金额"></input>
<text></text>
</view>
</view>
<view class="cu-bar bg-white">
<view class="action margin-0 flex-sub text-black" @tap="hideModal">取消</view>
<view class="action margin-0 flex-sub text-main-color solid-left" @tap="hideModal"
@click="applySetTakeRate">提交申请</view>
</view>
</view>
</view> </view>
</view> </view>
</template> </template>
@ -53,7 +83,8 @@
data() { data() {
return { return {
myTeamInfo: {}, myTeamInfo: {},
members: [] members: [],
isShowTakeRateSet: false
} }
}, },
onLoad() { onLoad() {
@ -86,6 +117,22 @@
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: phoneNum phoneNumber: phoneNum
}) })
},
showTakeRateSetModal(e) {
this.showModal(e);
},
showModal(e) {
this.isShowTakeRateSet = true
},
hideModal(e) {
this.isShowTakeRateSet = false
},
applySetTakeRate() {
uni.showToast({
title: '保存成功',
icon: 'success',
mask: true
})
} }
}, },
} }
@ -96,13 +143,6 @@
width: 50%; width: 50%;
} }
.radius-input {
border: 1rpx solid rgba(0, 0, 0, 0.1);
border-radius: 10rpx;
padding: 10rpx;
box-sizing: content-box;
}
.bottom-border { .bottom-border {
border-bottom: 1rpx solid rgba(0, 0, 0, 0.1); border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
} }

View File

@ -0,0 +1,256 @@
<template>
<view>
<!-- 顶部操作条 -->
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">任务大厅</block>
</cu-custom>
<view class="sticky-bar" :style="[{top: stickyTop + 'px'}]">
<!-- 搜索栏 -->
<view class="cu-bar search bg-white">
<view class="search-form round">
<text class="cuIcon-search"></text>
<input @confirm="searchTasks" :adjust-position="true" type="text" placeholder="输入搜索的内容"
confirm-type="search"></input>
</view>
<view class="action">
<button class="cu-btn bg-main-color shadow-blur round">搜索</button>
</view>
</view>
<!-- 条件筛选栏 -->
<scroll-view scroll-x class="bg-white nav text-center" :scroll-with-animation="true"
:scroll-left="scrollLeft">
<view class="cu-item"
v-for="(item,index) in taskConditions" v-if="item.type !== 1" :key="index" @tap="tabSelect" :data-id="index">
<!-- 区域筛选picker -->
<picker v-if="item.code === 'area'" :mode="'multiSelector'" @change="regionChange" :value="areaMultiIndex" :range-key="'name'" :range="areaList">
{{item.title}}
<text class="text-lg"><text class="cuIcon-triangledownfill"></text></text>
</picker>
<!-- 品类筛选picker -->
<picker v-else-if="item.code === 'category'" :mode="'multiSelector'" @change="categoryChange" :value="categoryMultiIndex" :range-key="'name'" :range="categoryList">
{{item.title}}
<text class="text-lg"><text class="cuIcon-triangledownfill"></text></text>
</picker>
<text v-else>
{{item.title}}
<text v-if="item.type === 0" class="text-lg"><text :class="item.value === 0 ? 'cuIcon-triangleupfill' : 'cuIcon-triangledownfill'"></text></text>
<text v-else class="text-lg"><text class="cuIcon-triangledownfill"></text></text>
</text>
</view>
<view class="cu-item" v-else>
<button class="cu-btn bg-grey round shadow-blur">{{item.title}}</button>
</view>
</scroll-view>
</view>
<!-- 任务单 -->
<view class="margin-lr-sm margin-bottom-lg">
<view v-for="(task, index) in tasks" class="padding bg-white margin-top-sm">
<view class="flex justify-between">
<view class="text-lg text-bold text-cut" style="width: 70%;">{{task.title}}</view>
<view class="text-right">
<view class="text-lg text-price text-red text-bold">{{task.price}}</view>
<view v-if="task.expeditedPrice">
<text>加急</text><text class="text-price text-red text-bold">{{task.expeditedPrice}}</text>
</view>
</view>
</view>
<view class="flex justify-start">
<view v-for="(tagContent, index1) in task.tag" class='cu-tag margin-right-xs'>{{tagContent}}</view>
</view>
<view class="margin-top-sm">
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-locationfill"></text></text>
<text>{{task.address}}</text>
</view>
<view class="margin-top-sm">
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-timefill"></text></text>
<text>{{task.doorTime}}</text>
</view>
<view class="padding-top-sm flex justify-end">
<button class="cu-btn bg-main-color margin-right-xs shadow-blur" data-modal="showForwardModal" @click="showModal($event, index)">转发</button>
<button class="cu-btn bg-main-color margin-right-xs shadow-blur" data-modal="showAddPriceModal" @click="showModal($event, index)">加价</button>
<button class="cu-btn bg-main-color margin-right-xs shadow-blur" v-if="task.canQuote">报价</button>
<button class="cu-btn bg-main-color margin-right-xs shadow-blur" @click="showDemandDetail($event, index)">查看</button>
<button class="cu-btn bg-main-color shadow-blur" data-take-modal="showTakeSuccessModal" data-certify-modal="showTakeCertifiedModal" @click="takeTask($event, index)">接单</button>
</view>
</view>
</view>
<!-- 加价模态框 -->
<view class="cu-modal" :class="showAddPriceModal?'show':''">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end solid-bottom">
<view class="content">加价申请</view>
<view class="action" data-modal="showAddPriceModal" @tap="hideModal">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<view class="padding-xl bg-white text-left">
<view class="flex justify-center align-center margin-top-sm">
<text>加价金额</text>
<input class="radius-input" type="digit"></input>
<text></text>
</view>
<view class="margin-top-sm flex justify-center">
<textarea class="solid radius text-left padding-sm" maxlength="-1" name="comments" placeholder="加价原因备注"></textarea>
</view>
</view>
<view class="cu-bar bg-white solid-top">
<view class="action margin-0 flex-sub text-black" data-modal="showAddPriceModal" @tap="hideModal">取消</view>
<view class="action margin-0 flex-sub text-main-color solid-left" @tap="hideModal" data-modal="showAddPriceModal"
@click="applyAddPrice">立即提交</view>
</view>
</view>
</view>
<!-- 推荐奖励模态框 -->
<view class="cu-modal" :class="showForwardModal?'show':''">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end solid-bottom">
<view class="content">推荐奖励</view>
<view class="action" data-modal="showForwardModal" @tap="hideModal">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<view class="padding-xl bg-white">
<view>推荐转发有奖励按每个奖励链接计算累计200单每单一元合计200元进行持续奖励</view>
<view class="margin-top-sm">推荐本单另行奖励的金额如下</view>
<view class="flex justify-center align-center margin-top-sm">
<text>奖励金额</text>
<input class="radius-input" type="digit"></input>
<text></text>
</view>
</view>
<view class="cu-bar bg-white solid-top">
<view class="action margin-0 flex-sub text-black" data-modal="showForwardModal" @tap="hideModal">取消</view>
<view class="action margin-0 flex-sub text-main-color solid-left" data-modal="showForwardModal" @tap="hideModal"
@click="forwardTask">立即推荐</view>
</view>
</view>
</view>
<!-- 接单认证模态框 -->
<view class="cu-modal" :class="showTakeCertifiedModal?'show':''">
<view class="cu-dialog">
<view class="padding-xl">
<view class="cuIcon-profile big-icon padding-tb text-main-color"></view>
<view>您还未进行认证</view>
</view>
<view class="cu-bar bg-white solid-top">
<view class="action margin-0 flex-sub text-black" data-modal="showTakeCertifiedModal" @tap="hideModal">以后认证</view>
<view class="action margin-0 flex-sub text-main-color solid-left" data-modal="showTakeCertifiedModal" @tap="hideModal"
@click="goToCertify">立即认证</view>
</view>
</view>
</view>
<!-- 接单成功模态框 -->
<view class="cu-modal" :class="showTakeSuccessModal?'show':''">
<view class="cu-dialog">
<view class="padding-xl">
<view class="cuIcon-roundcheck big-icon padding-tb text-main-color"></view>
<view class="text-bold text-lg margin-bottom-sm">接单成功</view>
<view>请在30分钟内联系客户预约好上门时间并在订单中操作排单时间超时6倍将受平台处罚管理该订单佣金在完成任务24小时内计入您的账户</view>
</view>
<view class="cu-bar bg-white solid-top">
<view class="action margin-0 flex-sub text-black" data-modal="showTakeSuccessModal" @click="contactCustomer">联系客户</view>
<view class="action margin-0 flex-sub text-main-color solid-left" data-modal="showTakeSuccessModal" @tap="hideModal">继续接单</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
tabCur: 0,
scrollLeft: 0,
stickyTop: this.CustomBar,
taskConditions: [],
tasks: [],
curTask: null,
takeCertify: false,
showAddPriceModal: false,
showForwardModal: false,
showTakeCertifiedModal: false,
showTakeSuccessModal: false,
areaList: [],
areaMultiIndex: [0, 0, 0],
categoryList: [],
categoryMultiIndex: [0, 0, 0]
}
},
onLoad() {
this.loadData();
},
methods: {
async loadData() {
this.taskConditions = await this.$api.data('taskConditions');
this.tasks = await this.$api.data('tasks');
this.takeCertify = await this.$api.data('takeCertify');
this.areaList = await this.$api.data('areaList');
this.categoryList = await this.$api.data('categoryList');
},
tabSelect(e) {
this.tabCur = e.currentTarget.dataset.id;
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 70;
let conditionType = this.taskConditions[this.tabCur].type;
let conditionCode = this.taskConditions[this.tabCur].code;
if (conditionType === 0) {
//
let orderVal = this.taskConditions[this.tabCur].value;
this.taskConditions[this.tabCur].value = orderVal === 0 ? 1 : 0;
}
},
regionChange(e) {
this.areaMultiIndex = e.detail.value;
let chosenArea = [];
for(let i = 0; i < this.areaList.length; i++) {
chosenArea.push(this.areaList[i][this.areaMultiIndex[i]]);
}
this.taskConditions[this.tabCur].value = chosenArea;
},
categoryChange(e) {
this.categoryMultiIndex = e.detail.value;
let chosenCategory = [];
for(let i = 0; i < this.categoryList.length; i++) {
chosenCategory.push(this.categoryList[i][this.categoryMultiIndex[i]]);
}
this.taskConditions[this.tabCur].value = chosenCategory;
},
showDemandDetail(e, taskIndex) {
let paramObj = {
orderId: this.tasks[taskIndex].id
}
uni.navigateTo({
url: '/pages/demand-center/demand-detail?paramObj=' + encodeURIComponent(JSON.stringify(paramObj))
})
},
takeTask(e, taskIndex) {
if (this.takeCertify) {
//
e.currentTarget.dataset.modal = e.currentTarget.dataset.takeModal;
this.showModal(e, taskIndex);
} else {
//
e.currentTarget.dataset.modal = e.currentTarget.dataset.certifyModal;
this.showModal(e, taskIndex);
}
},
contactCustomer() {
//
},
showModal(e, taskIndex) {
this.curTask = this.tasks[taskIndex];
this[e.currentTarget.dataset.modal] = true;
},
hideModal(e) {
this.curTask = null;
this[e.currentTarget.dataset.modal] = false;
}
},
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,129 @@
<template>
<view>
<!-- 顶部操作条 -->
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">任务详情</block>
</cu-custom>
<view class="padding bg-white margin-top-sm margin-lr-sm">
<view class="flex justify-between">
<view class="text-lg text-bold text-cut" style="width: 70%;">{{order.title}}</view>
<view class="text-right">
<view class="text-lg text-price text-red text-bold">{{order.price}}</view>
<view v-if="order.expeditedPrice">
<text>加急</text><text class="text-price text-red text-bold">{{order.expeditedPrice}}</text>
</view>
</view>
</view>
<view class="flex justify-start">
<view v-for="(tagContent, index1) in order.tag" class='cu-tag margin-right-xs'>{{tagContent}}</view>
</view>
<view class="margin-top-sm">
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-locationfill"></text></text>
<text>{{order.address}}</text>
</view>
<view class="margin-top-sm">
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-timefill"></text></text>
<text>{{order.doorTime}}</text>
</view>
<view class="margin-top-sm">
<text class="text-main-color text-lg margin-right-xs"><text class="cuIcon-phone"></text></text>
<text class="margin-right-xs">{{order.contactPerson}}</text>
<text>{{order.phoneNum}}</text>
</view>
</view>
<view class="margin-top-sm bg-white margin-lr-sm margin-bottom-with-bar">
<view class="cu-bar solid-bottom">
<view class="action bar-first-action">
<text class="cuIcon-titles text-main-color"></text> 商品信息
</view>
</view>
<view class="padding">
<view class="cu-avatar margin-bottom-sm" :style="'background-image:url(' + order.picUrl + '); width: 180rpx; height: 180rpx'"></view>
<view class="margin-bottom-sm"><text class="text-bold">商品规格</text>{{order.spec}}</view>
<view class="margin-bottom-sm"><text class="text-bold">服务类别</text>{{order.servType}}</view>
<view class="margin-bottom-sm"><text class="text-bold">订单编码</text>{{order.serialId}}</view>
<view class="margin-bottom-sm"><text class="text-bold">订单时间</text>{{order.createTime}}</view>
<view class="margin-bottom-sm"><text class="text-bold">备注</text>{{order.comments}}</view>
</view>
</view>
<view class="cu-bar tabbar border shop fixed-bottom-bar">
<button class="bg-main-color long-btn margin-lr-sm" data-take-modal="showTakeSuccessModal" data-certify-modal="showTakeCertifiedModal" @click="takeTask">立即接单</button>
</view>
<!-- 接单认证模态框 -->
<view class="cu-modal" :class="showTakeCertifiedModal?'show':''">
<view class="cu-dialog">
<view class="padding-xl">
<view class="cuIcon-profile big-icon padding-tb text-main-color"></view>
<view>您还未进行认证</view>
</view>
<view class="cu-bar bg-white solid-top">
<view class="action margin-0 flex-sub text-black" data-modal="showTakeCertifiedModal" @tap="hideModal">以后认证</view>
<view class="action margin-0 flex-sub text-main-color solid-left" data-modal="showTakeCertifiedModal" @tap="hideModal"
@click="goToCertify">立即认证</view>
</view>
</view>
</view>
<!-- 接单成功模态框 -->
<view class="cu-modal" :class="showTakeSuccessModal?'show':''">
<view class="cu-dialog">
<view class="padding-xl">
<view class="cuIcon-roundcheck big-icon padding-tb text-main-color"></view>
<view class="text-bold text-lg margin-bottom-sm">接单成功</view>
<view>请在30分钟内联系客户预约好上门时间并在订单中操作排单时间超时6倍将受平台处罚管理该订单佣金在完成任务24小时内计入您的账户</view>
</view>
<view class="cu-bar bg-white solid-top">
<view class="action margin-0 flex-sub text-black" data-modal="showTakeSuccessModal" @click="contactCustomer">联系客户</view>
<view class="action margin-0 flex-sub text-main-color solid-left" data-modal="showTakeSuccessModal" @tap="hideModal" @click="continueAcceptDemand">继续接单</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
order: {},
takeCertify: false,
showTakeCertifiedModal: false,
showTakeSuccessModal: false
}
},
onLoad(options) {
let paramObj = JSON.parse(decodeURIComponent(options.paramObj));
this.loadData(paramObj.orderId);
},
methods: {
async loadData(orderId) {
this.order = await this.$api.data('order');
this.takeCertify = await this.$api.data('takeCertify');
},
takeTask(e) {
if (this.takeCertify) {
//
e.currentTarget.dataset.modal = e.currentTarget.dataset.takeModal;
} else {
//
e.currentTarget.dataset.modal = e.currentTarget.dataset.certifyModal;
}
this.showModal(e);
},
showModal(e) {
this[e.currentTarget.dataset.modal] = true;
},
hideModal(e) {
this[e.currentTarget.dataset.modal] = false;
},
continueAcceptDemand() {
uni.navigateBack({
delta: -1
})
}
}
}
</script>
<style>
</style>

View File

@ -0,0 +1,84 @@
<template>
<view>
<!-- 顶部操作条 -->
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">服务规则</block>
</cu-custom>
<!-- 规则内容 -->
<view class="padding bg-white">
<checkbox-group class="block" @change="checkRule">
<view class="flex justify-start align-start margin-top-xs" v-for="(item, index) in masterRules">
<checkbox style="transform:scale(0.7)" class="main-color" :checked="hasCheckedRule" value='1'>
</checkbox>
<text>{{item}}</text>
</view>
</checkbox-group>
<view class="margin-top-xl">总结约单迅速上门准时友好客气分清责任不踩红线流程沟通验收评价完单复查前后确认</view>
<!-- 操作按钮 -->
<view class="cu-bar tabbar border shop margin-top-lg">
<button class="cu-btn bg-main-color long-btn margin-lr-sm" type="" :disabled="hasCheckedRule"
@click="acceptRules">{{hasCheckedRule ? '已同意' : '同意'}}</button>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
masterRules: [],
hasCheckedRule: false,
checkRuleArr: [],
navigate: false
}
},
onLoad(options) {
let paramObj = JSON.parse(decodeURIComponent(options.paramObj));
this.navigate = Boolean(paramObj.navigate) ? true : false;
this.hasCheckedRule = Boolean(paramObj.hasCheckedRule) ? true : false;
this.loadData();
},
methods: {
async loadData() {
this.masterRules = await this.$api.data('masterRules');
},
checkRule(e) {
this.checkRuleArr = e.detail.value;
},
acceptRules() {
if (this.hasCheckedRule) {
return;
}
let checkedTimes = 0;
for (let checked of this.checkRuleArr) {
if (checked === '1') {
checkedTimes++;
}
}
if (checkedTimes === this.masterRules.length) {
uni.showToast({
icon: 'success',
mask: true
})
if (this.navigate) {
uni.navigateTo({
url: '/pages/demand-center/accept-demand-center'
})
}
} else {
uni.showToast({
title: '请逐条阅读,并在框内打勾,完成规则学习',
icon: 'none',
mask: true
})
}
}
},
}
</script>
<style>
</style>

View File

@ -13,7 +13,7 @@
</view> --> </view> -->
</view> </view>
</view> </view>
<view class="right-tag padding-lr padding-tb-xs">师傅规则</view> <view class="right-tag padding-lr padding-tb-xs" @click="showMasterRule">师傅规则</view>
</view> </view>
<!-- 未预约未派单上门超时 --> <!-- 未预约未派单上门超时 -->
<view class="cu-list grid no-border col-3 margin-top-sm" style="background-color: inherit;"> <view class="cu-list grid no-border col-3 margin-top-sm" style="background-color: inherit;">
@ -136,17 +136,17 @@
name: '查看详情', name: '查看详情',
color: 'pink', color: 'pink',
cuIcon: 'profile', cuIcon: 'profile',
pageUrl: '/pages/area-proxy/my-team' pageUrl: ''
}, { }, {
id: 5, id: 5,
title: '区域代理', title: '区域代理',
name: '查看详情', name: '查看详情',
color: 'olive', color: 'olive',
cuIcon: 'group', cuIcon: 'group',
pageUrl: '' pageUrl: '/pages/area-proxy/my-team'
}], }],
myInfo: {}, myInfo: {},
isShowSteer: false, isShowSteer: false
} }
}, },
onReady() { onReady() {
@ -156,12 +156,32 @@
async loadData() { async loadData() {
this.myInfo = await this.$api.data('myInfo'); this.myInfo = await this.$api.data('myInfo');
this.isShowSteer = !this.myInfo.entryType; this.isShowSteer = !this.myInfo.entryType;
let newServModules = this.servModules.concat();
if (this.myInfo.hasCheckedRule) {
newServModules[0].pageUrl = '/pages/demand-center/accept-demand-center';
} else {
let paramObj = {
hasCheckedRule: this.myInfo.hasCheckedRule,
navigate: true
}
newServModules[0].pageUrl = '/pages/demand-center/rule?paramObj=' + encodeURIComponent(JSON.stringify(paramObj));
}
this.servModules = newServModules;
}, },
chooseEntryType(typeCode) { chooseEntryType(typeCode) {
}, },
hideModal(e) { hideModal(e) {
this.isShowSteer = false this.isShowSteer = false
},
showMasterRule() {
let paramObj = {
hasCheckedRule: this.myInfo.hasCheckedRule,
navigate: false
}
uni.navigateTo({
url: '/pages/demand-center/rule?paramObj=' + encodeURIComponent(JSON.stringify(paramObj))
})
} }
}, },
} }
@ -205,13 +225,4 @@
right: -30rpx; right: -30rpx;
border-radius: 40rpx 0 0 40rpx; border-radius: 40rpx 0 0 40rpx;
} }
.cu-bar .action:first-child {
margin-left: 30rpx;
font-size: inherit;
}
.big-icon {
font-size: 111rpx;
}
</style> </style>

View File

@ -127,6 +127,7 @@
transform: translateY(0px); transform: translateY(0px);
} }
} }
/* colorui end */ /* colorui end */
.margin-bottom-with-bar { .margin-bottom-with-bar {
margin-bottom: calc(120rpx + constant(safe-area-inset-bottom) / 2); margin-bottom: calc(120rpx + constant(safe-area-inset-bottom) / 2);
@ -227,3 +228,19 @@
margin: 0 0 20rpx 0 !important; margin: 0 0 20rpx 0 !important;
padding: 20rpx !important; padding: 20rpx !important;
} }
.radius-input {
border: 1rpx solid rgba(0, 0, 0, 0.1);
border-radius: 10rpx;
padding: 10rpx;
box-sizing: content-box;
}
.cu-dialog .cu-bar .action:first-child {
margin-left: 30rpx !important;
font-size: inherit !important;
}
.big-icon {
font-size: 111rpx !important;
}