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 140 additions and 53 deletions
......@@ -14,7 +14,8 @@ Component({
data: {
title: '',
type: '',
btnText: ''
btnText: '',
customContent: ''
},
/**
......
......@@ -11,7 +11,7 @@
<view class="modal-content">
<block wx:if="{{type == 'permission'}}">
<view class="content-title">优秀的技能是您接单的通行证,磨刀不误砍柴工,您的专业能力是赢得客户信任的关键。</view>
<view class="content-text">到学习中心-我的课程-待学习,完成课程学习后,即可解锁开单权限。</view>
<view class="content-text">到学习中心-{{customContent}},完成课程学习后,即可解锁开单权限。</view>
<view class="content-footer">只差一步即可开启您的接单之旅!</view>
</block>
<block wx:else>
......
......@@ -21,6 +21,9 @@ let time = null;
import {
quotedImgUrl
} from '~/config'
import {
checkStudyTask
} from "~/store/ModalToQueueControl";
import dataForm from '../components/constant/stepData'
import NP from 'number-precision'
Page({
......@@ -510,6 +513,9 @@ Page({
} = this.data
let staffCheck = await this.staffDailyReportMerchantValid(userInfo)
if (staffCheck) return false
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
orderInfo.paymentDocList = orderInfo.paymentDocList || []
// 先校验
let status = this.selectComponent(`#FirstStep`).handleConfirm()
......
......@@ -6,7 +6,8 @@
"order-popup": "../components/OrderPopup/OrderPopup",
"vin-sec-dialog": "../components/VinSecDialog/VinSecDialog",
"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"
}
\ No newline at end of file
......@@ -41,4 +41,5 @@
<!-- vin二次复核 -->
<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>
\ No newline at end of file
<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
......@@ -5,6 +5,9 @@ import {
} from '~/config';
import { quotationGoodsList, defeatOrderCreate } from '../../api'
import NP from 'number-precision'
import {
checkStudyTask
} from "~/store/ModalToQueueControl";
Page({
/**
* 页面的初始数据
......@@ -400,8 +403,11 @@ Page({
})
},
// 接口请求
toPostData(params, type) {
async toPostData(params, type) {
console.log(params);
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
// 添加收款方 0:嘀加收款
params.payee = 0
wx.showLoading({ title: "提交中..." })
......
......@@ -3,7 +3,8 @@
"merchant-seles": "/components/Merchant-Seles/Merchant-Seles",
"customerInfo": "/components/CustomerInfo/CustomerInfo",
"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":"战败下单"
}
\ No newline at end of file
......@@ -51,4 +51,5 @@
<customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" />
<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-popup>
\ No newline at end of file
</van-popup>
<study-permission-modal id="customModal" />
\ No newline at end of file
......@@ -33,16 +33,10 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getStaticData()
this.getResidueTime()
if (options?.tabIndex) {
this.setData({
tabIndex: Number(options.tabIndex)
}, () => {
this.getList()
})
} else {
this.getList()
}
},
......@@ -57,7 +51,9 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
this.getStaticData()
this.getResidueTime()
this.getList()
},
// 获取我的课程剩余开单时间
......@@ -210,9 +206,9 @@ Page({
val._imageUrl = constantData.TYPEIMG[val.courseFileType]
val._tagImage = constantData.IMGTAG[val.planCourseType]
val._tagText = constantData.TAGTEXT[val.courseFileType]
val.completeStatus = val.process >= 1 ? 1 : 0 // 学习进度是否已完成
val._process = `${Math.floor(val.process * 100)}%`
val._showCompleteIcon = val.process >= 1
val.completeStatus = val.process >= 100 ? 1 : 0 // 学习进度是否已完成
val._process = `${Math.floor(val.process)}%`
val._showCompleteIcon = val.process >= 100
})
this.setData({
loading: false
......
......@@ -201,11 +201,9 @@ Page({
},
goPage(e) {
console.log(e)
let { target } = e.currentTarget.dataset
commonApi.findBeiSenSSOToken({}).then(res => {
const beisenToken = res.data;
const COURSE_ID = target?.examination
const COURSE_ID = e.detail?.examination
if (beisenToken) {
const baseUrl = 'https://cloud.italent.cn/PageHome/Index';
const params = {
......
......@@ -20,7 +20,6 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getBeisenToken()
},
/**
......@@ -34,7 +33,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
this.getBeisenToken()
},
async getBeisenToken() {
......
......@@ -79,14 +79,12 @@ Page({
// 判断是否有考试
this.getExamInfo()
this.getStaticData()
this.getList()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
......@@ -100,6 +98,8 @@ Page({
}
// 判断是否展示我的任务入口
this.getShowMyTaskMenu()
this.getStaticData(true)
this.getList()
},
async getShowMyTaskMenu() {
......@@ -151,6 +151,7 @@ Page({
if (code == 0) {
if (data) {
this.examHandleCancel()
this.setData({examSubmitText: ''})
// 查询是否有下一个考试
this.getExamInfo()
} else {
......@@ -235,10 +236,10 @@ Page({
},
// 获取统计数据
getStaticData() {
getStaticData(flag) {
let userInfo = wx.$util.getUserInfo()
api.getStudyStatistics({staffPhone: userInfo?.phone}).then(res => {
this.getCourseList()
this.getCourseList(flag)
let {code, data, message} = res
if (code == 0) {
data._monHourRatio = Math.abs(data.monHourRatio)
......@@ -252,35 +253,37 @@ Page({
},
// 获取我的课程(正在学习)
getCourseList() {
getCourseList(flag) {
let params = {
pageNum: 1,
pageSize: 6,
learnStatus: 1
}
api.getMyCourseList(params).then(res => {
// 获取tab位置
const query = wx.createSelectorQuery()
query.select('.all-list').boundingClientRect((tabRect) => {
this.setData({
tabScrollTop: tabRect.top
})
}).exec()
query.select('.sticky-box').boundingClientRect()
query.exec(res => {
const height = res[1]?.height
this.setData({
fixedHeight: height
if (!flag) {
// 获取tab位置
const query = wx.createSelectorQuery()
query.select('.all-list').boundingClientRect((tabRect) => {
this.setData({
tabScrollTop: tabRect.top
})
}).exec()
query.select('.sticky-box').boundingClientRect()
query.exec(res => {
const height = res[1]?.height
this.setData({
fixedHeight: height
})
})
})
}
res?.data?.list?.forEach(val => {
if (val.planCourseType) {
val._tagImage = constantData.IMGTAG[val.planCourseType]
}
val._imageUrl = constantData.TYPEIMG[val.courseFileType]
val._tagText = constantData.TAGTEXT[val.courseFileType]
val.completeStatus = val.process >= 1 ? 1 : 0 // 学习进度是否已完成
val._process = `${Math.floor(val.process * 100)}%`
val.completeStatus = val.process >= 100 ? 1 : 0 // 学习进度是否已完成
val._process = `${Math.floor(val.process)}%`
})
this.setData({
myCourseList: res?.data?.list || []
......
......@@ -216,7 +216,7 @@ const checkStudyTask = () => {
wx.hideLoading()
const modal = initModal()
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)
})
......
......@@ -6,6 +6,9 @@ import {
getPositionList,
setConfigInfo
} from '~/store/index'
import {
checkStudyTask
} from "~/store/ModalToQueueControl";
import NP from 'number-precision'
const app = getApp()
let toastList = {
......@@ -500,6 +503,9 @@ Page({
// 校验是否填写昨日日报
let staffCheck = await this.staffDailyReportMerchantValid(userInfo)
if (staffCheck) return false;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
// console.log(wx.$storage.get('outTradeNo'))
// wx.$storage.rm('outTradeNo')
// 判断手机号是否用配置的默认值
......
......@@ -8,6 +8,7 @@
"customerInfo": "/components/CustomerInfo/CustomerInfo",
"sub-shop-merchant" : "/components/subShopMerchant/subShopMerchant",
"van-picker": "@vant/weapp/picker/index",
"van-popup": "@vant/weapp/popup/index"
"van-popup": "@vant/weapp/popup/index",
"study-permission-modal": "/components/studyPermissionModal/studyPermissionModal"
}
}
......@@ -572,4 +572,5 @@
<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-popup>
\ No newline at end of file
</van-popup>
<study-permission-modal id="customModal" />
\ No newline at end of file
......@@ -3,6 +3,9 @@
// import deepClone from '~/utils/deepClone'
import api from '../../api'
import { getYQorderInfo } from '~/store/index'
import {
checkStudyTask
} from "~/store/ModalToQueueControl";
const app = getApp()
let toastList = {
employeeName: '销售顾问不能为空',
......@@ -361,6 +364,9 @@ Page({
// 校验是否填写昨日日报
let staffCheck = await this.staffDailyReportMerchantValid(userInfo)
if (staffCheck) return false;
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
this.checkPhoneUseConfig()
let { type } = i.currentTarget.dataset
let { orderObj, notUpgradeOrderList, dateObj } = this.data
......
......@@ -3,6 +3,7 @@
"usingComponents": {
"car-brands": "/components/CarBrands/CarBrands",
"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 @@
title="选择二级流量方"
selectedSelesMerchantId="{{orderObj.merchantId}}"
selectedSubShopMerchantId="{{orderObj.subShopMerchantId}}" />
<study-permission-modal id="customModal" />
......@@ -3,6 +3,9 @@ import api from '../../api'
import api2 from '~/api/api.js'
import { getYQorderInfo, getPositionList, setConfigInfo } from '~/store/index'
import { validateVin, formatVinInput } from '~/utils/vinVaildate'
import {
checkStudyTask
} from "~/store/ModalToQueueControl";
const phoneRex = /^[1]([3-9])[0-9]{9}$/
const app = getApp()
let toastList = {
......@@ -689,6 +692,9 @@ Page({
// 校验是否填写昨日日报
let staffCheck = await this.staffDailyReportMerchantValid(userInfo)
if (staffCheck) return false
// 校验学习中心开单限制
let staffStudyTask = await checkStudyTask()
if (staffStudyTask) return false
this.checkPhoneUseConfig()
let {
orderObj,
......
......@@ -5,6 +5,7 @@
"merchant-seles": "/components/Merchant-Seles/Merchant-Seles",
"goods": "../GoodsPackage/Goods",
"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
......@@ -725,4 +725,5 @@
selectedSelesMerchantId="{{ orderObj.merchantId }}"
selectedCustomerInfo="{{ orderObj.customer.customerId }}"
selectedSubShopMerchantId="{{ orderObj.subShopMerchantId }}"
/>
\ No newline at end of file
/>
<study-permission-modal id="customModal" />
\ No newline at end of file
......@@ -22,6 +22,7 @@ Page({
IMG_URL,
imgShow: false,
isDisable: false,
hasDailyValue: false,
isUpload: false,
// userInfo: {},
// 模版表单提交数据
......@@ -207,6 +208,9 @@ Page({
sDate: timeBean.reportStartDate,
eDate: timeBean.reportEndDate
}
this.setData({
hasDailyValue: false
})
wx.$util.showLoading()
api.getDateRecord(params).then(res => {
console.log(res, 'res-----')
......@@ -221,10 +225,10 @@ Page({
if (timeBean.weekDayList[timeBean.selectDay].date == new Date().format('yyyy-MM-dd')) {
//改----------------
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)) {
console.log('???')
// 往期编辑
this.setData({
isDisable: timeBean.weekDayList[timeBean.selectDay].hasDailyValue || false
......@@ -666,7 +670,7 @@ Page({
let that = this
wx.showModal({
title: "确认提示",
content: "日报提交后将无法二次修改并将触发群消息推送,是否确认提交?",
content: "日报提交后将触发群消息推送,是否确认提交?",
// showCancel: false,
cancelText: '取消', // '取消
cancelColor: "#292D33",
......@@ -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() {
let { isConfirm } = this.data
if (isConfirm) {
......
......@@ -242,6 +242,28 @@ page {
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 {
border: var(--fontSize2) solid #0075F9;
border-radius: var(--fontSize12);
......
......@@ -17,7 +17,7 @@
<view class="cust-form-box">
<gl-cust-form wx:if="{{tmlpObj && tabChange}}" id="{{tabActive}}" formData="{{ tmlpFormData }}" disable="{{isDisable}}" dataAttrName="{{ dataAttrName }}" formDataList="{{ tmlpObj[tabActive] }}" bind:radioEvent="radioEvent">
<!-- 与会人员 -->
<view wx:if="{{tabActive == ('organizeTraining' + trainTmlpSuffix)}}" slot='attendingStaff' class="attendingStaff">
<view wx:if="{{tabActive == ('organizeTraining' + trainTmlpSuffix)}}" slot='attendingStaff' class="attendingStaff">
<view class="picker" bindtap="handleStaffPicker" data-name="attendingStaff" data-pname="organizeTraining">
<image class="pickerArrow" src="/components/images/arrow-x.png" />
<view class="flex" wx:if="{{selectedStr}}">
......@@ -59,6 +59,15 @@
<view class="confirm text-center" bindtap="handleConfirm">提交</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 wx:else class="empty-box">
......@@ -72,7 +81,7 @@
</view>
<!-- 与会人员多选 -->
<!-- <select-item-popup show="{{showSelectItemPopup}}" title="{{selectItemTitle}}" optionList="{{mutiOption[selectItemName].optionList}}" index="1" optionLabel="staffName" bindconfirm="changeStaff" bindcancel="closeSlectItemPopup" bindclick="click" /> -->
<select-popup show="{{showSelectItemPopup}}" id="staffPopup" title="{{selectItemTitle}}" optionList="{{mutiOption[selectItemName].optionList}}" index="1" optionLabel="staffName" bindconfirm="changeStaff" bindcancel="closeSlectItemPopup" bindclick="click" bindsearch="staffSearch"></select-popup>
<select-popup show="{{showSelectItemPopup}}" id="staffPopup" title="{{selectItemTitle}}" optionList="{{mutiOption[selectItemName].optionList}}" index="1" optionLabel="staffName" bindconfirm="changeStaff" bindcancel="closeSlectItemPopup" bindclick="click" bindsearch="staffSearch"></select-popup>
<van-overlay show="{{ imgShow }}" bind:click="onClickHide" z-index="99999999">
<view class="wrapper">
<image src="{{IMG_URL}}/{{imgName}}.png" mode="widthFix" />
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!