Commit b77c9546 by 张立顺

Merge branch 'SAAS+V5.5.0' of http://192.168.3.233:8090/saas_plus/dj-car-boutiqu…

…e-work-wechat into SAAS+V5.5.0
2 parents bb179c5c 7e54013f
Showing 25 changed files with 121 additions and 34 deletions
...@@ -14,7 +14,8 @@ Component({ ...@@ -14,7 +14,8 @@ Component({
data: { data: {
title: '', title: '',
type: '', type: '',
btnText: '' btnText: '',
customContent: ''
}, },
/** /**
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<view class="modal-content"> <view class="modal-content">
<block wx:if="{{type == 'permission'}}"> <block wx:if="{{type == 'permission'}}">
<view class="content-title">优秀的技能是您接单的通行证,磨刀不误砍柴工,您的专业能力是赢得客户信任的关键。</view> <view class="content-title">优秀的技能是您接单的通行证,磨刀不误砍柴工,您的专业能力是赢得客户信任的关键。</view>
<view class="content-text">到学习中心-我的课程-待学习,完成课程学习后,即可解锁开单权限。</view> <view class="content-text">到学习中心-{{customContent}},完成课程学习后,即可解锁开单权限。</view>
<view class="content-footer">只差一步即可开启您的接单之旅!</view> <view class="content-footer">只差一步即可开启您的接单之旅!</view>
</block> </block>
<block wx:else> <block wx:else>
......
...@@ -21,6 +21,9 @@ let time = null; ...@@ -21,6 +21,9 @@ let time = null;
import { import {
quotedImgUrl quotedImgUrl
} from '~/config' } from '~/config'
import {
checkStudyTask
} from "~/store/ModalToQueueControl";
import dataForm from '../components/constant/stepData' import dataForm from '../components/constant/stepData'
import NP from 'number-precision' import NP from 'number-precision'
Page({ Page({
...@@ -510,6 +513,9 @@ Page({ ...@@ -510,6 +513,9 @@ Page({
} = this.data } = this.data
let staffCheck = await this.staffDailyReportMerchantValid(userInfo) let staffCheck = await this.staffDailyReportMerchantValid(userInfo)
if (staffCheck) return false if (staffCheck) return false
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
orderInfo.paymentDocList = orderInfo.paymentDocList || [] orderInfo.paymentDocList = orderInfo.paymentDocList || []
// 先校验 // 先校验
let status = this.selectComponent(`#FirstStep`).handleConfirm() let status = this.selectComponent(`#FirstStep`).handleConfirm()
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
"order-popup": "../components/OrderPopup/OrderPopup", "order-popup": "../components/OrderPopup/OrderPopup",
"vin-sec-dialog": "../components/VinSecDialog/VinSecDialog", "vin-sec-dialog": "../components/VinSecDialog/VinSecDialog",
"zy-pay-popup": "../components/zyPayPopup/zyPayPopup", "zy-pay-popup": "../components/zyPayPopup/zyPayPopup",
"order-no-popup": "../../../components/OrderNoPopup/OrderNoPopup" "order-no-popup": "../../../components/OrderNoPopup/OrderNoPopup",
"study-permission-modal": "/components/studyPermissionModal/studyPermissionModal"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
\ No newline at end of file \ No newline at end of file
...@@ -42,3 +42,4 @@ ...@@ -42,3 +42,4 @@
<vin-sec-dialog wx:if="{{showVinDialog}}" showVinDialog="{{showVinDialog}}" secFormData="{{secFormData}}" bindonClose="handleSecClose" bindonConfirm="handleSecConfirm"></vin-sec-dialog> <vin-sec-dialog wx:if="{{showVinDialog}}" showVinDialog="{{showVinDialog}}" secFormData="{{secFormData}}" bindonClose="handleSecClose" bindonConfirm="handleSecConfirm"></vin-sec-dialog>
<!-- 上传合同协议 --> <!-- 上传合同协议 -->
<zy-pay-popup show="{{showZyPopup}}" wx:if="{{showZyPopup}}" supplementaryFlag="{{supplementaryFlag}}" bindconfirm="zyPayConfirm"></zy-pay-popup> <zy-pay-popup show="{{showZyPopup}}" wx:if="{{showZyPopup}}" supplementaryFlag="{{supplementaryFlag}}" bindconfirm="zyPayConfirm"></zy-pay-popup>
<study-permission-modal id="customModal" />
\ No newline at end of file \ No newline at end of file
...@@ -5,6 +5,9 @@ import { ...@@ -5,6 +5,9 @@ import {
} from '~/config'; } from '~/config';
import { quotationGoodsList, defeatOrderCreate } from '../../api' import { quotationGoodsList, defeatOrderCreate } from '../../api'
import NP from 'number-precision' import NP from 'number-precision'
import {
checkStudyTask
} from "~/store/ModalToQueueControl";
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -400,8 +403,11 @@ Page({ ...@@ -400,8 +403,11 @@ Page({
}) })
}, },
// 接口请求 // 接口请求
toPostData(params, type) { async toPostData(params, type) {
console.log(params); console.log(params);
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
// 添加收款方 0:嘀加收款 // 添加收款方 0:嘀加收款
params.payee = 0 params.payee = 0
wx.showLoading({ title: "提交中..." }) wx.showLoading({ title: "提交中..." })
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
"merchant-seles": "/components/Merchant-Seles/Merchant-Seles", "merchant-seles": "/components/Merchant-Seles/Merchant-Seles",
"customerInfo": "/components/CustomerInfo/CustomerInfo", "customerInfo": "/components/CustomerInfo/CustomerInfo",
"van-popup": "@vant/weapp/popup/index", "van-popup": "@vant/weapp/popup/index",
"van-picker": "@vant/weapp/picker/index" "van-picker": "@vant/weapp/picker/index",
"study-permission-modal": "/components/studyPermissionModal/studyPermissionModal"
}, },
"navigationBarTitleText":"战败下单" "navigationBarTitleText":"战败下单"
} }
\ No newline at end of file \ No newline at end of file
...@@ -52,3 +52,4 @@ ...@@ -52,3 +52,4 @@
<van-popup show="{{ salesTypeShow }}" position="bottom" bind:close="onCloseSaleType"> <van-popup show="{{ salesTypeShow }}" position="bottom" bind:close="onCloseSaleType">
<van-picker show-toolbar columns="{{ saleTypesList }}" value-key="name" bind:cancel="onCloseSaleType" bind:confirm="onChangeSaleType" /> <van-picker show-toolbar columns="{{ saleTypesList }}" value-key="name" bind:cancel="onCloseSaleType" bind:confirm="onChangeSaleType" />
</van-popup> </van-popup>
<study-permission-modal id="customModal" />
\ No newline at end of file \ No newline at end of file
...@@ -33,16 +33,10 @@ Page({ ...@@ -33,16 +33,10 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.getStaticData()
this.getResidueTime()
if (options?.tabIndex) { if (options?.tabIndex) {
this.setData({ this.setData({
tabIndex: Number(options.tabIndex) tabIndex: Number(options.tabIndex)
}, () => {
this.getList()
}) })
} else {
this.getList()
} }
}, },
...@@ -57,7 +51,9 @@ Page({ ...@@ -57,7 +51,9 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
this.getStaticData()
this.getResidueTime()
this.getList()
}, },
// 获取我的课程剩余开单时间 // 获取我的课程剩余开单时间
...@@ -210,9 +206,9 @@ Page({ ...@@ -210,9 +206,9 @@ Page({
val._imageUrl = constantData.TYPEIMG[val.courseFileType] val._imageUrl = constantData.TYPEIMG[val.courseFileType]
val._tagImage = constantData.IMGTAG[val.planCourseType] val._tagImage = constantData.IMGTAG[val.planCourseType]
val._tagText = constantData.TAGTEXT[val.courseFileType] val._tagText = constantData.TAGTEXT[val.courseFileType]
val.completeStatus = val.process >= 1 ? 1 : 0 // 学习进度是否已完成 val.completeStatus = val.process >= 100 ? 1 : 0 // 学习进度是否已完成
val._process = `${Math.floor(val.process * 100)}%` val._process = `${Math.floor(val.process)}%`
val._showCompleteIcon = val.process >= 1 val._showCompleteIcon = val.process >= 100
}) })
this.setData({ this.setData({
loading: false loading: false
......
...@@ -201,11 +201,9 @@ Page({ ...@@ -201,11 +201,9 @@ Page({
}, },
goPage(e) { goPage(e) {
console.log(e)
let { target } = e.currentTarget.dataset
commonApi.findBeiSenSSOToken({}).then(res => { commonApi.findBeiSenSSOToken({}).then(res => {
const beisenToken = res.data; const beisenToken = res.data;
const COURSE_ID = target?.examination const COURSE_ID = e.detail?.examination
if (beisenToken) { if (beisenToken) {
const baseUrl = 'https://cloud.italent.cn/PageHome/Index'; const baseUrl = 'https://cloud.italent.cn/PageHome/Index';
const params = { const params = {
......
...@@ -20,7 +20,6 @@ Page({ ...@@ -20,7 +20,6 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.getBeisenToken()
}, },
/** /**
...@@ -34,7 +33,7 @@ Page({ ...@@ -34,7 +33,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
this.getBeisenToken()
}, },
async getBeisenToken() { async getBeisenToken() {
......
...@@ -79,14 +79,12 @@ Page({ ...@@ -79,14 +79,12 @@ Page({
// 判断是否有考试 // 判断是否有考试
this.getExamInfo() this.getExamInfo()
this.getStaticData() this.getStaticData()
this.getList()
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {
}, },
/** /**
...@@ -100,6 +98,8 @@ Page({ ...@@ -100,6 +98,8 @@ Page({
} }
// 判断是否展示我的任务入口 // 判断是否展示我的任务入口
this.getShowMyTaskMenu() this.getShowMyTaskMenu()
this.getStaticData(true)
this.getList()
}, },
async getShowMyTaskMenu() { async getShowMyTaskMenu() {
...@@ -151,6 +151,7 @@ Page({ ...@@ -151,6 +151,7 @@ Page({
if (code == 0) { if (code == 0) {
if (data) { if (data) {
this.examHandleCancel() this.examHandleCancel()
this.setData({examSubmitText: ''})
// 查询是否有下一个考试 // 查询是否有下一个考试
this.getExamInfo() this.getExamInfo()
} else { } else {
...@@ -235,10 +236,10 @@ Page({ ...@@ -235,10 +236,10 @@ Page({
}, },
// 获取统计数据 // 获取统计数据
getStaticData() { getStaticData(flag) {
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
api.getStudyStatistics({staffPhone: userInfo?.phone}).then(res => { api.getStudyStatistics({staffPhone: userInfo?.phone}).then(res => {
this.getCourseList() this.getCourseList(flag)
let {code, data, message} = res let {code, data, message} = res
if (code == 0) { if (code == 0) {
data._monHourRatio = Math.abs(data.monHourRatio) data._monHourRatio = Math.abs(data.monHourRatio)
...@@ -252,13 +253,14 @@ Page({ ...@@ -252,13 +253,14 @@ Page({
}, },
// 获取我的课程(正在学习) // 获取我的课程(正在学习)
getCourseList() { getCourseList(flag) {
let params = { let params = {
pageNum: 1, pageNum: 1,
pageSize: 6, pageSize: 6,
learnStatus: 1 learnStatus: 1
} }
api.getMyCourseList(params).then(res => { api.getMyCourseList(params).then(res => {
if (!flag) {
// 获取tab位置 // 获取tab位置
const query = wx.createSelectorQuery() const query = wx.createSelectorQuery()
query.select('.all-list').boundingClientRect((tabRect) => { query.select('.all-list').boundingClientRect((tabRect) => {
...@@ -273,14 +275,15 @@ Page({ ...@@ -273,14 +275,15 @@ Page({
fixedHeight: height fixedHeight: height
}) })
}) })
}
res?.data?.list?.forEach(val => { res?.data?.list?.forEach(val => {
if (val.planCourseType) { if (val.planCourseType) {
val._tagImage = constantData.IMGTAG[val.planCourseType] val._tagImage = constantData.IMGTAG[val.planCourseType]
} }
val._imageUrl = constantData.TYPEIMG[val.courseFileType] val._imageUrl = constantData.TYPEIMG[val.courseFileType]
val._tagText = constantData.TAGTEXT[val.courseFileType] val._tagText = constantData.TAGTEXT[val.courseFileType]
val.completeStatus = val.process >= 1 ? 1 : 0 // 学习进度是否已完成 val.completeStatus = val.process >= 100 ? 1 : 0 // 学习进度是否已完成
val._process = `${Math.floor(val.process * 100)}%` val._process = `${Math.floor(val.process)}%`
}) })
this.setData({ this.setData({
myCourseList: res?.data?.list || [] myCourseList: res?.data?.list || []
......
...@@ -216,7 +216,7 @@ const checkStudyTask = () => { ...@@ -216,7 +216,7 @@ const checkStudyTask = () => {
wx.hideLoading() wx.hideLoading()
const modal = initModal() const modal = initModal()
if (modal && res.data.lockOrder) { if (modal && res.data.lockOrder) {
modal.open({title: '未完成学习任务,暂不能开单', type: 'permission', btnText: '去往学习中心'}) modal.open({title: '未完成学习任务,暂不能开单', type: 'permission', btnText: '去往学习中心', customContent: res.data?.lockReason == '0' ? '我的课程-待学习' : '我的任务'})
} }
resolve(res.data.lockOrder) resolve(res.data.lockOrder)
}) })
......
...@@ -6,6 +6,9 @@ import { ...@@ -6,6 +6,9 @@ import {
getPositionList, getPositionList,
setConfigInfo setConfigInfo
} from '~/store/index' } from '~/store/index'
import {
checkStudyTask
} from "~/store/ModalToQueueControl";
import NP from 'number-precision' import NP from 'number-precision'
const app = getApp() const app = getApp()
let toastList = { let toastList = {
...@@ -500,6 +503,9 @@ Page({ ...@@ -500,6 +503,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await this.staffDailyReportMerchantValid(userInfo) let staffCheck = await this.staffDailyReportMerchantValid(userInfo)
if (staffCheck) return false; if (staffCheck) return false;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
// console.log(wx.$storage.get('outTradeNo')) // console.log(wx.$storage.get('outTradeNo'))
// wx.$storage.rm('outTradeNo') // wx.$storage.rm('outTradeNo')
// 判断手机号是否用配置的默认值 // 判断手机号是否用配置的默认值
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
"customerInfo": "/components/CustomerInfo/CustomerInfo", "customerInfo": "/components/CustomerInfo/CustomerInfo",
"sub-shop-merchant" : "/components/subShopMerchant/subShopMerchant", "sub-shop-merchant" : "/components/subShopMerchant/subShopMerchant",
"van-picker": "@vant/weapp/picker/index", "van-picker": "@vant/weapp/picker/index",
"van-popup": "@vant/weapp/popup/index" "van-popup": "@vant/weapp/popup/index",
"study-permission-modal": "/components/studyPermissionModal/studyPermissionModal"
} }
} }
...@@ -573,3 +573,4 @@ ...@@ -573,3 +573,4 @@
<van-popup show="{{ showSource }}" position="bottom" bind:close="onCloseSource"> <van-popup show="{{ showSource }}" position="bottom" bind:close="onCloseSource">
<van-picker show-toolbar title="客户来源" bind:cancel="onCloseSource" columns="{{ Sourcecolumns }}" value-key="name" bind:confirm="onChangeSource" /> <van-picker show-toolbar title="客户来源" bind:cancel="onCloseSource" columns="{{ Sourcecolumns }}" value-key="name" bind:confirm="onChangeSource" />
</van-popup> </van-popup>
<study-permission-modal id="customModal" />
\ No newline at end of file \ No newline at end of file
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
// import deepClone from '~/utils/deepClone' // import deepClone from '~/utils/deepClone'
import api from '../../api' import api from '../../api'
import { getYQorderInfo } from '~/store/index' import { getYQorderInfo } from '~/store/index'
import {
checkStudyTask
} from "~/store/ModalToQueueControl";
const app = getApp() const app = getApp()
let toastList = { let toastList = {
employeeName: '销售顾问不能为空', employeeName: '销售顾问不能为空',
...@@ -361,6 +364,9 @@ Page({ ...@@ -361,6 +364,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await this.staffDailyReportMerchantValid(userInfo) let staffCheck = await this.staffDailyReportMerchantValid(userInfo)
if (staffCheck) return false; if (staffCheck) return false;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
this.checkPhoneUseConfig() this.checkPhoneUseConfig()
let { type } = i.currentTarget.dataset let { type } = i.currentTarget.dataset
let { orderObj, notUpgradeOrderList, dateObj } = this.data let { orderObj, notUpgradeOrderList, dateObj } = this.data
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"usingComponents": { "usingComponents": {
"car-brands": "/components/CarBrands/CarBrands", "car-brands": "/components/CarBrands/CarBrands",
"merchant-seles": "/components/Merchant-Seles/Merchant-Seles", "merchant-seles": "/components/Merchant-Seles/Merchant-Seles",
"sub-shop-merchant" : "/components/subShopMerchant/subShopMerchant" "sub-shop-merchant" : "/components/subShopMerchant/subShopMerchant",
"study-permission-modal": "/components/studyPermissionModal/studyPermissionModal"
} }
} }
...@@ -284,4 +284,5 @@ ...@@ -284,4 +284,5 @@
title="选择二级流量方" title="选择二级流量方"
selectedSelesMerchantId="{{orderObj.merchantId}}" selectedSelesMerchantId="{{orderObj.merchantId}}"
selectedSubShopMerchantId="{{orderObj.subShopMerchantId}}" /> selectedSubShopMerchantId="{{orderObj.subShopMerchantId}}" />
<study-permission-modal id="customModal" />
...@@ -3,6 +3,9 @@ import api from '../../api' ...@@ -3,6 +3,9 @@ import api from '../../api'
import api2 from '~/api/api.js' import api2 from '~/api/api.js'
import { getYQorderInfo, getPositionList, setConfigInfo } from '~/store/index' import { getYQorderInfo, getPositionList, setConfigInfo } from '~/store/index'
import { validateVin, formatVinInput } from '~/utils/vinVaildate' import { validateVin, formatVinInput } from '~/utils/vinVaildate'
import {
checkStudyTask
} from "~/store/ModalToQueueControl";
const phoneRex = /^[1]([3-9])[0-9]{9}$/ const phoneRex = /^[1]([3-9])[0-9]{9}$/
const app = getApp() const app = getApp()
let toastList = { let toastList = {
...@@ -689,6 +692,9 @@ Page({ ...@@ -689,6 +692,9 @@ Page({
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await this.staffDailyReportMerchantValid(userInfo) let staffCheck = await this.staffDailyReportMerchantValid(userInfo)
if (staffCheck) return false if (staffCheck) return false
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
this.checkPhoneUseConfig() this.checkPhoneUseConfig()
let { let {
orderObj, orderObj,
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"merchant-seles": "/components/Merchant-Seles/Merchant-Seles", "merchant-seles": "/components/Merchant-Seles/Merchant-Seles",
"goods": "../GoodsPackage/Goods", "goods": "../GoodsPackage/Goods",
"customerInfo": "/components/CustomerInfo/CustomerInfo", "customerInfo": "/components/CustomerInfo/CustomerInfo",
"sub-shop-merchant" : "/components/subShopMerchant/subShopMerchant" "sub-shop-merchant" : "/components/subShopMerchant/subShopMerchant",
"study-permission-modal": "/components/studyPermissionModal/studyPermissionModal"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -726,3 +726,4 @@ ...@@ -726,3 +726,4 @@
selectedCustomerInfo="{{ orderObj.customer.customerId }}" selectedCustomerInfo="{{ orderObj.customer.customerId }}"
selectedSubShopMerchantId="{{ orderObj.subShopMerchantId }}" selectedSubShopMerchantId="{{ orderObj.subShopMerchantId }}"
/> />
<study-permission-modal id="customModal" />
\ No newline at end of file \ No newline at end of file
...@@ -22,6 +22,7 @@ Page({ ...@@ -22,6 +22,7 @@ Page({
IMG_URL, IMG_URL,
imgShow: false, imgShow: false,
isDisable: false, isDisable: false,
hasDailyValue: false,
isUpload: false, isUpload: false,
// userInfo: {}, // userInfo: {},
// 模版表单提交数据 // 模版表单提交数据
...@@ -207,6 +208,9 @@ Page({ ...@@ -207,6 +208,9 @@ Page({
sDate: timeBean.reportStartDate, sDate: timeBean.reportStartDate,
eDate: timeBean.reportEndDate eDate: timeBean.reportEndDate
} }
this.setData({
hasDailyValue: false
})
wx.$util.showLoading() wx.$util.showLoading()
api.getDateRecord(params).then(res => { api.getDateRecord(params).then(res => {
console.log(res, 'res-----') console.log(res, 'res-----')
...@@ -221,10 +225,10 @@ Page({ ...@@ -221,10 +225,10 @@ Page({
if (timeBean.weekDayList[timeBean.selectDay].date == new Date().format('yyyy-MM-dd')) { if (timeBean.weekDayList[timeBean.selectDay].date == new Date().format('yyyy-MM-dd')) {
//改---------------- //改----------------
this.setData({ this.setData({
isDisable: timeBean.weekDayList[timeBean.selectDay].hasDailyValue || false isDisable: timeBean.weekDayList[timeBean.selectDay].hasDailyValue || false,
hasDailyValue: timeBean.weekDayList[timeBean.selectDay].hasDailyValue || false
}) })
} else if (tmlpEditList.includes(tmlpCode)) { } else if (tmlpEditList.includes(tmlpCode)) {
console.log('???')
// 往期编辑 // 往期编辑
this.setData({ this.setData({
isDisable: timeBean.weekDayList[timeBean.selectDay].hasDailyValue || false isDisable: timeBean.weekDayList[timeBean.selectDay].hasDailyValue || false
...@@ -666,7 +670,7 @@ Page({ ...@@ -666,7 +670,7 @@ Page({
let that = this let that = this
wx.showModal({ wx.showModal({
title: "确认提示", title: "确认提示",
content: "日报提交后将无法二次修改并将触发群消息推送,是否确认提交?", content: "日报提交后将触发群消息推送,是否确认提交?",
// showCancel: false, // showCancel: false,
cancelText: '取消', // '取消 cancelText: '取消', // '取消
cancelColor: "#292D33", cancelColor: "#292D33",
...@@ -714,6 +718,21 @@ Page({ ...@@ -714,6 +718,21 @@ Page({
} }
}, },
changeVal(attr, val) {
this.setData({
[attr]: val
})
},
handleEdit() {
this.changeVal('isDisable', false)
},
handleCancel() {
this.changeVal('isDisable', true)
this.onLoad()
},
handleConfirm() { handleConfirm() {
let { isConfirm } = this.data let { isConfirm } = this.data
if (isConfirm) { if (isConfirm) {
......
...@@ -242,6 +242,28 @@ page { ...@@ -242,6 +242,28 @@ page {
box-sizing: border-box; box-sizing: border-box;
} }
.btns.two-btns .btns-con {
justify-content: space-between;
flex-flow: row;
flex-wrap: nowrap;
}
.btns.two-btns .btns-con view {
width: 45%;
border: var(--fontSize2) solid #0075F9;
border-radius: var(--fontSize12);
height: var(--fontSize80);
box-sizing: border-box;
color: #fff;
background-color: #347BFF;
}
.btns-con .cancel {
background-color: #F2F3F5 !important;
border: var(--fontSize2) solid #F2F3F5 !important;
color: #292D33 !important;
}
.confirm { .confirm {
border: var(--fontSize2) solid #0075F9; border: var(--fontSize2) solid #0075F9;
border-radius: var(--fontSize12); border-radius: var(--fontSize12);
......
...@@ -59,6 +59,15 @@ ...@@ -59,6 +59,15 @@
<view class="confirm text-center" bindtap="handleConfirm">提交</view> <view class="confirm text-center" bindtap="handleConfirm">提交</view>
</view> </view>
</view> </view>
<view class="btns two-btns {{ isFullSucreen ? 'isFullSucreen-btn':'' }}" wx:if="{{tmlpCode == 'uuid-temp-001' && hasDailyValue}}">
<view class="btns-con" wx:if="{{isDisable}}">
<view class="confirm text-center" style="width: 100%;" bindtap="handleEdit">修改</view>
</view>
<view wx:else class="btns-con">
<view class="cancel text-center" bindtap="handleCancel">取消</view>
<view class="edit text-center" bindtap="handleConfirm">提交</view>
</view>
</view>
</view> </view>
<!-- 未配置模版 --> <!-- 未配置模版 -->
<view wx:else class="empty-box"> <view wx:else class="empty-box">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!