Commit aabbdae3 by 张立顺

功能开发

1 parent b1a0eb1f
...@@ -86,7 +86,8 @@ ...@@ -86,7 +86,8 @@
"pages/fullSignture/fullSignture", "pages/fullSignture/fullSignture",
"pages/ocr/ocr", "pages/ocr/ocr",
"pages/premiumUpgrade/premiumUpgrade", "pages/premiumUpgrade/premiumUpgrade",
"pages/defeatOrder/defeatOrder" "pages/defeatOrder/defeatOrder",
"pages/staffDaily/staffDaily"
] ]
}, },
{ {
......
...@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd' ...@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布 * 4预发布
* 5cdptest * 5cdptest
*/ */
let index = 3 let index = 1
const accountInfo = wx.getAccountInfoSync() const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync() const systemInfo = wx.getSystemInfoSync()
......
...@@ -4,6 +4,20 @@ ...@@ -4,6 +4,20 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "经营数据统计",
"pathName": "tabOperating/pages/4sOverview/4sOverview",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "员工日报",
"pathName": "tabWorkOrder/pages/staffDaily/staffDaily",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "创建权益订单", "name": "创建权益订单",
"pathName": "packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple", "pathName": "packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple",
"query": "", "query": "",
......
...@@ -5,7 +5,7 @@ import { envIndex } from '~/config' ...@@ -5,7 +5,7 @@ import { envIndex } from '~/config'
// console.log(wx)globalData // console.log(wx)globalData
/** 判断是不是超管角色 */ /** 判断是不是超管角色 */
export const checkYqdSuper = (userInfo, globalData) => { export const checkYqdSuper = (userInfo, globalData) => {
console.log(userInfo,'checkYqdSuper'); // console.log(userInfo,'checkYqdSuper');
let merchantAccountType = userInfo.merchantAccountList.every(item => { let merchantAccountType = userInfo.merchantAccountList.every(item => {
return item == 6 || item == 8 return item == 6 || item == 8
}) })
...@@ -69,8 +69,8 @@ export const getYQInfo = userInfo => { ...@@ -69,8 +69,8 @@ export const getYQInfo = userInfo => {
}) })
} }
arr = [all, ...data] arr = [all, ...data]
} else if (data.length == 1){ } else if (data.length == 1) {
arr = [ ...data] arr = [...data]
} else { } else {
arr = [ arr = [
{ {
...@@ -213,8 +213,8 @@ export const checkScene = options => { ...@@ -213,8 +213,8 @@ export const checkScene = options => {
} }
console.log(options, 'options') console.log(options, 'options')
wx.$SCENE = options wx.$SCENE = options
console.log(options.path,'options.path') console.log(options.path, 'options.path')
if (!userInfo && !( ['pages/accountItems/accountItems', 'pages/wxLogin/wxLogin'].includes(options.path))) { if (!userInfo && !(['pages/accountItems/accountItems', 'pages/wxLogin/wxLogin'].includes(options.path))) {
// if (!userInfo) { // if (!userInfo) {
// console.log(userInfo); // console.log(userInfo);
console.log('未登录,请登录。'); console.log('未登录,请登录。');
...@@ -318,7 +318,7 @@ export const getPositionList = options => { ...@@ -318,7 +318,7 @@ export const getPositionList = options => {
export const getShopSceneConfig = options => { export const getShopSceneConfig = options => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
api.getYqMerchantSceneConfigAPI(options).then(res => { api.getYqMerchantSceneConfigAPI(options).then(res => {
let { data, code, message} = res let { data, code, message } = res
if (code == 0) { if (code == 0) {
resolve(data || []) resolve(data || [])
} else { } else {
...@@ -333,7 +333,7 @@ export const getYQList = () => { ...@@ -333,7 +333,7 @@ export const getYQList = () => {
// debugger // debugger
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const app = getApp() const app = getApp()
console.log(app.globalData.YQList,'app.globalData.YQList'); console.log(app.globalData.YQList, 'app.globalData.YQList');
// 如果有 直接返回 // 如果有 直接返回
if (app.globalData.YQList) { if (app.globalData.YQList) {
return resolve(app.globalData.YQList) return resolve(app.globalData.YQList)
......
...@@ -157,5 +157,19 @@ module.exports = { ...@@ -157,5 +157,19 @@ module.exports = {
/** 子订单设置膜卷号 */ /** 子订单设置膜卷号 */
setfilmRollNo(data) { setfilmRollNo(data) {
return api.post('dj.api.smartcarlife.order.updateFilmRoll', data) return api.post('dj.api.smartcarlife.order.updateFilmRoll', data)
},
/** 保存员工日报(员工、管理员操作)*/
staffDailyReportSave(data) {
return api.post('dj.api.smartcarlife.staff.daily.report.save', data)
},
/** 员工日报详情 */
staffDailyReportDetail(data) {
return api.post('dj.api.smartcarlife.staff.daily.report.detail', data)
},
/** 查询当周员工日报是否填写列表 */
staffDailyReportDetailWeeklyList(data) {
return api.post('dj.api.smartcarlife.staff.daily.report.weekly.list', data)
} }
} }
// components/GlCell/GlCell.js
Component({
options: {
styleIsolation: 'apply-shared'
// styleIsolation: 'shared'
},
/**
* 组件的属性列表
*/
properties: {
label: String,
border: Boolean,
haveArrow: Boolean,
value: String,
valueAlign: String,
required: Boolean,
placeholder: String,
iconSrc: String,
labelStyle: String,
cellStyle: String,
cellBoxStyle: String,
labelText: String,
labelWidth: {
type: String,
value: '300rpx'
},
background: {
type: String,
value: '#FFFFFF'
},
cellHeight: {
type: Boolean,
value: true
},
requiredBefore: {
type: Boolean,
value: true
},
requiredAfter: {
type: Boolean,
value: false,
observer: function (n, o) {
if (n) {
this.setData({
requiredBefore: false
})
}
}
},
disabled: Boolean,
titleBtn: String
},
/**
* 组件的初始数据
*/
data: {},
/**
* 组件的方法列表
*/
methods: {
click(e) {
if (this.data.disabled) return
this.triggerEvent('click')
},
titleClick() {
this.triggerEvent('titleClick')
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<view class="cell-box" style="background:{{ background}};{{cellBoxStyle }}">
<view class="cell {{ cellHeight?'cellHeight': ''}} {{border?'border':'' }}" style="{{ cellStyle }}" bindtap="click">
<view class="cell-label title-style" style="width:{{ labelWidth}};{{labelStyle }}" bindtap="titleClick">
<view class="header">
<text wx:if="{{ required&&requiredBefore }}" class="required">*</text>
{{label||'标题'}}
<text wx:if="{{ required&&requiredAfter }}" class="required">*</text>
<image webp class="titleIcon" wx:if="{{ iconSrc }}" src="{{ iconSrc }}" />
<text class="titleBtn" wx:if="{{ titleBtn }}">{{titleBtn}}</text>
</view>
<view class="footer" wx:if="{{ labelText }}">{{labelText}}</view>
</view>
<view class="cell-value" style="width:calc(100% - {{ labelWidth }});">
<view class="value {{ valueAlign}} {{haveArrow }}">
<view class="slot">
<slot />
</view>
<block wx:if="{{ value }}">
<view class="details">{{value}}</view>
</block>
<block wx:if="{{ placeholder }}">
<view class="placeholder">{{placeholder}}</view>
</block>
</view>
<!-- <image wx:if="{{ haveArrow }}" class="arrow" src="../images/arrow-x.png" /> -->
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
/* components/GlCell/GlCell.wxss */
.cell-box {
background: #fff;
font-size: 28rpx;
color: #333333;
box-sizing: border-box;
}
.cell {
width: 100%;
box-sizing: border-box;
display: flex;
padding-left: 40rpx;
align-items: center;
}
.cellHeight {
height: 120rpx;
}
.cell.border {
border-bottom: 1rpx solid #EFF0F2;
}
.cell-label {
width: 25%;
}
.titleIcon {
width: 32rpx;
height: 32rpx;
margin-left: 8rpx;
}
.titleBtn {
display: inline-block;
background: #FFFFFF;
border: 1rpx solid #347BFF;
border-radius: 26px;
color: #347BFF;
height: 48rpx;
line-height: 48rpx;
padding: 0 24rpx;
font-size: 24rpx;
margin-left: 8rpx;
}
.cell-value {
width: 75%;
position: relative;
height: 100%;
}
.cell-value .false {
padding-right: 40rpx !important;
}
.value {
width: 100%;
height: 100%;
display: flex;
align-items: center;
padding-right: 70rpx;
box-sizing: border-box;
}
.header {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 28rpx;
color: #292D33;
}
.required {
color: #f00;
}
.footer {
font-size: 24rpx;
color: #999999;
}
.details,
.placeholder {
display: none;
}
.slot:empty+.details,
.slot:empty+.placeholder {
display: block;
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.placeholder {
color: #C3C3C3;
}
.cell-value .right {
justify-content: flex-end;
height: 100%;
box-sizing: border-box;
}
.cell-value .right .details,
.cell-value .right .placeholder {
text-align: right;
}
.slot {
width: 100%;
}
.slot:empty {
display: none;
}
.arrow {
position: absolute;
right: 40rpx;
top: 50%;
transform: translateY(-50%);
width: 28rpx;
height: 26rpx;
margin: 0 !important;
}
\ No newline at end of file \ No newline at end of file
// packageEquity/components/storePicker/storePicker.js
Component({
options: {
// 在组件定义时的选项中启用多slot支持
multipleSlots: true
},
/**
* 组件的属性列表
*/
properties: {
subIndex: {
type: Number,
observer: function (n) {
this.setData({
selectStoreIndex: [n]
})
}
},
pickList: {
type: Array,
value: []
},
show: {
type: Boolean
},
pickerType: String
},
/**
* 组件的初始数据
*/
data: {
searchValue: '',
selectStoreIndex: '',
edit: false
},
/**
* 组件的方法列表
*/
methods: {
open() {
if (this.data.disabled) return
this.setData({
edit: true,
inputFocus: true
})
},
setValue(value) {
if (this.properties.filterEmoji) {
if (wx.$util.haveEmoji(value)) value = wx.$util.replaceEmoji(value)
}
this.setData({
searchValue: value
})
},
input(e) {
let { value } = e.detail
this.setValue(value)
this.triggerEvent('input', {
value
})
},
inputBlur(e) {
this.emit(e)
},
inputConfifm(e) {
this.emit(e)
},
emit(e) {
let {
detail: { value },
type
} = e
this.setData({
edit: false
})
this.setValue(value)
console.log('123')
this.triggerEvent(type == 'confirm' ? 'search' : 'blur', { value })
},
confirm() {
let { selectStoreIndex, pickList } = this.data
let value = selectStoreIndex[0]
console.log(value)
console.log(pickList)
if (!pickList[value]?.merchantName) {
return wx.$util.showToast('请选择门店')
}
// console.log(value)
this.triggerEvent('confirm', { value })
// this.triggerEvent('search', { value })
this.setData({
show: false
})
},
changeStore(e) {
// console.log(e.detail.value[0])
this.setData({
selectStoreIndex: [e.detail.value[0]]
})
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!--packageEquity/components/storePicker/storePicker.wxml-->
<popup class="date-background" popup-slot-class="popup-style" show="{{ show }}" bindconfirm="confirm" height="800rpx">
<view class="date-container">
<view class="date-confirm" wx:if="{{ pickerType == 'merchant' }}">
<view class="search-box">
<view class="search-input">
<block wx:if="{{ !edit }}">
<view class="input {{ searchValue?'':'placeholder' }}" bindtap="open">
<block wx:if="{{ searchValue }}">{{searchValue}}</block>
<block wx:else>
<image src="/images/search.png" class="icon"></image>
{{'请输入门店'}}
</block>
</view>
</block>
<block wx:else>
<input
type="text"
class="input"
value="{{ searchValue }}"
focus="{{ inputFocus }}"
confirm-type="search"
bindinput="input"
bindblur="inputBlur"
bindconfirm="inputConfifm"
/>
</block>
</view>
</view>
</view>
<view class="picker-box">
<picker-view
class="picker"
value="{{ selectStoreIndex }}"
immediate-change="true"
indicator-class="indicator"
bindchange="changeStore"
>
<picker-view-column>
<block wx:for="{{ pickList }}" wx:key="merchantId">
<view class="view pickViewColumn">{{pickerType == 'merchant'?item.merchantName:item.staffName}}</view>
</block>
</picker-view-column>
</picker-view>
</view>
</view>
</popup>
\ No newline at end of file \ No newline at end of file
/* packageEquity/components/storePicker/storePicker.wxss */
.search-box {
height: 104rpx;
display: flex;
align-items: center;
justify-content: center;
margin: 0 32rpx;
font-size: 28rpx;
}
.search-box .search-input {
width: 686rpx;
height: 72rpx;
background: #F7F8FA;
border-radius: 38rpx;
color: #333;
}
.search-input .input{
display: flex;
align-items: center;
justify-content: center;
height: 100%;
width: 100%;
text-align: center;
}
.search-input .icon{
width: 28rpx;
height: 28rpx;
margin-right: 10rpx;
}
.search-input .placeholder{
color: #C8C9CC;
}
.date-confirm {
display: flex;
justify-content: center;
align-items: center;
padding:0 20rpx;
font-size:34rpx;
line-height: 70rpx;
}
.picker-box{
height: 450rpx;
display: flex;
}
.picker-box .picker{
width: 100%;
}
.tbn_class{
font-size: 26rpx;
color: #333;
}
.pickViewColumn{
text-align: center;
line-height: 34px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.popup-style{
height: calc(100% - 100rpx)!important;
}
\ No newline at end of file \ No newline at end of file
// compoents/weekCalendar/weekCalendar.js
Component({
options: {
multipleSlots: true // 在组件定义时的选项中启用多slot支持
},
/** * 组件的属性列表 * 用于组件自定义设置 */
properties: {
timeBean: { // 属性名 在wxml调用组件时利用该属性传递组件显示的数据
type: Object, // 类型(必填),目前接受的类型包括:String, Number, Boolean, Object, Array, null(表示任意类型)
value: ''// 属性初始值(可选),如果未指定则会根据类型选择一个
},
},
/**
* 组件的方法列表
*/
methods: {
lastWeek:function(e){ //点击了上一周
this.triggerEvent("lastWeek")
},
nextWeek:function(e){ //点击了下一周
this.triggerEvent("nextWeek")
},
itemClick: function (e) { //点击了某一日,传递该日的下标
var index = e.currentTarget.dataset.index
this.triggerEvent("dayClick", index);
},
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/pages/staffDaily/weekCalendar/weekCalendar.wxss */
/* compoents/weekCalendar/weekCalendar.wxss */
.row {
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
background: #fff;
}
.column {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding-bottom: 5rpx;
padding-top: 5rpx;
margin-top: 10rpx;
flex: 1;
}
.select-column {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding-bottom: 5rpx;
padding-top: 5rpx;
margin-left: 5rpx;
margin-right: 5rpx;
margin-top: 10rpx;
flex: 1;
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
background: #347BFF;
}
.timeType {
font-size: 35rpx;
font-weight: bold;
}
.dateType {
font-size: 35rpx;
font-weight: bold;
}
.weekType {
font-size: 28rpx;
color: darkgrey;
}
.line {
height: 1rpx;
width: 100%;
background-color: gainsboro;
}
.line-shadow {
height: 3rpx;
width: 100%;
background-color: gainsboro;
box-shadow: 5px 0px 5px 0px gainsboro;
}
@font-face {
font-family: "iconfont";
src: url('iconfont.eot?t=1533031583450');
/* IE9*/
src: url('iconfont.eot?t=1533031583450#iefix') format('embedded-opentype'),
/* IE6-IE8 */
url('data:application/x-font-woff;charset=utf-8;base64,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') format('woff'),
url('iconfont.ttf?t=1533031583450') format('truetype'),
/* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('iconfont.svg?t=1533031583450#iconfont') format('svg');
/* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/**
*字体图标,左右箭头,书,米饭,可以修改界面对图标进行修改替换
*/
.icon-sanjiaoleft:before {
content: "\e6b6";
}
.icon-sanjiaoright:before {
content: "\e6b7";
}
.icon-book1:before {
content: "\e631";
}
.icon-mifan:before {
content: "\e606";
}
\ No newline at end of file \ No newline at end of file
<!--tabWorkOrder/pages/staffDaily/weekCalendar/weekCalendar.wxml-->
<!--compoents/weekCalendar/weekCalendar.wxml-->
<view class='line'></view>
<view class='row'>
<view class='row' bindtap='lastWeek'>
<text class='iconfont icon-sanjiaoleft' style='padding:15rpx;color:#999999'></text>
<view style='font-size:28rpx;color:#999999'>上一周</view>
</view>
<view class='timeType'>{{timeBean.yearMonth}}</view>
<view class='row' bindtap='nextWeek'>
<view style='font-size:28rpx; color:#999999'>下一周</view>
<text class='iconfont icon-sanjiaoright' style='padding:15rpx;color:#999999'></text>
</view>
</view>
<view class='row'>
<view wx:for="0123456" data-index="{{index}}" class='{{index==timeBean.selectDay?"select-column":"column"}}' bindtap='itemClick' wx:key="index">
<view class='weekType'>{{timeBean.weekDayList[index].week}}</view>
<view class='dateType'>{{timeBean.weekDayList[index].day}}</view>
<text class='iconfont icon-mifan' style='color:#fff'></text>
</view>
</view>
<view class='line-shadow'></view>
<view class='suspension' bindtap='addMenuClick'>
<text class='iconfont icon-tianjia' style='font-size:60rpx; color:#fff;'></text>
</view>
\ No newline at end of file \ No newline at end of file
// 1-流量正常 2-流量不足 3-流量下降 4-门店关系欠佳
export const trafficProblemList = [
{ confId: 1, confName: '流量正常' },
{ confId: 2, confName: '流量不足' },
{ confId: 3, confName: '流量下降' },
{ confId: 4, confName: '门店关系欠佳' }
]
// 11-技能正常 12-驻店关系提升技巧 13-流量提升技巧 14-话术提升技巧
export const skillProblemList = [
{ confId: 11, confName: '技能正常' },
{ confId: 12, confName: '驻店关系提升技巧' },
{ confId: 13, confName: '流量提升技巧' },
{ confId: 14, confName: '话术提升技巧' }
]
// 21-套餐正常 22-套餐不合适客户 23-需要增加套餐 24-套餐价格过高
export const packageProblemList = [
{ confId: 21, confName: '套餐正常' },
{ confId: 22, confName: '套餐不合适客户' },
{ confId: 23, confName: '需要增加套餐' },
{ confId: 24, confName: '套餐价格过高' }
]
export const formData = [
{
label: '流量问题',
isMult: true,
name: 'trafficProblemList',
optionList: trafficProblemList,
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'trafficProblemList'
},
{
label: '技能问题',
isMult: true,
name: 'skillProblemList',
optionList: skillProblemList,
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'skillProblemList'
},
{
label: '套餐问题',
isMult: true,
name: 'packageProblemList',
optionList: packageProblemList,
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'packageProblemList'
}
]
{
"navigationStyle": "custom",
"usingComponents": {
"weekCalendar": "./components/weekCalendar/weekCalendar",
"gl-cell-staff": "./components/GlCell/GlCell",
"store-picker": "./components/storePicker/storePicker"
}
}
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/pages/staffDaily/staffDaily.wxss */
page {
background-color: rgb(246, 247, 247);
}
.layout {
opacity: 0;
// height: 100%;
height: 100vh;
// display: flex;
// flex-direction: column;
}
// 去除滚动条样式
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.navigation-title {
display: flex;
align-items: center;
justify-content: center;
}
.navigation-title-text {
text-align: center;
max-width: calc(100% - 24rpx);
}
.navigation-title .arrow {
width: 20rpx;
height: 16rpx;
margin-left: 4rpx;
transform: translateY(25%);
transition: all 0.5s;
}
.arrow {
width: 10rpx;
height: 6rpx;
margin-left: 12rpx;
transform: translateY(25%);
transition: all 0.5s;
}
.move {
transform: rotate(-180deg) translateY(0);
}
// .noListText {
// // padding: 40rpx;
// height: calc(100% - 88rpx);
// text-align: center;
// // line-height: 100%;
// display: flex;
// justify-content: center;
// background-color: #fff;
// align-items: center;
// border-radius: 12rpx;
// flex-direction: column;
// color: #969799;
// .image {
// width: 320rpx;
// height: 392rpx;
// }
// .text {
// margin-top: -65rpx;
// }
// }
.opacity {
opacity: 1;
}
.main {
padding: 0 20rpx 136rpx;
.header {
margin: 20rpx 10rpx 0rpx;
display: flex;
justify-content: space-between;
align-items: center;
.navigation-title-text {
margin-right: 10rpx;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #347BFF;
}
}
.title {
font-family: PingFangSC-SNaNrpxibold;
font-weight: 500;
font-size: 28rpx;
color: #292D33;
}
}
.isFullSucreen {
padding-bottom: 102px !important;
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.box {
background: #FFFFFF;
box-shadow: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.10);
border-radius: 16rpx;
overflow: hidden;
margin-top: 20rpx;
height: calc(100% - 100rpx);
}
.box .remark_box {
padding: 20rpx;
}
.box .remark_box .label {
font-size: 28rpx;
color: #292D33;
margin: 20rpx 0 24rpx 20rpx;
}
.box .remark_box .textArea_box {
font-size: 28rpx;
background: #F7F8FA;
border: 2rpx solid #EFF0F2;
border-radius: 16rpx;
padding: 24rpx;
}
.box .remark_box .textArea_box .textarea {
height: 130rpx;
}
.box .remark_box .textArea_box .currentWordNumber {
color: #BEC1C7;
text-align: right;
}
.input {
text-align: right;
font-size: 28rpx;
}
.placeholder-class {
color: #BEC1C7;
}
.box .item-disabled {
opacity: .4;
}
.btns {
position: fixed;
left: 0;
width: 100%;
bottom: 0;
min-height: 100rpx;
background: #FFFFFF;
box-sizing: border-box;
/* padding: 10rpx 32rpx; */
display: flex;
align-items: center;
justify-content: space-between;
font-size: 32rpx;
font-weight: 500;
z-index: 99;
flex-direction: column;
}
.btns-con {
box-sizing: border-box;
display: flex;
padding: 10rpx 0;
}
.tipsIcon,
.closeIcon {
width: 32rpx;
height: 32rpx;
}
.btns .btns-con view {
border: 2rpx solid #0075F9;
border-radius: 12rpx;
height: 80rpx;
box-sizing: border-box;
}
.btns .save,
.confirm {
border: 2rpx solid #0075F9;
border-radius: 12rpx;
height: 80rpx;
box-sizing: border-box;
}
.btns .save {
width: 186rpx;
margin-right: 20rpx;
color: #347BFF;
margin-right: 20rpx;
}
.btns .confirm {
width: 480rpx;
color: #fff;
background-color: #347BFF;
}
.btns .save.disabled {
border: 1px solid #DCDEE0;
color: #c0c0cc;
}
.btns .tips {
box-sizing: border-box;
display: flex;
justify-content: space-between;
/* align-items: center; */
padding: 20rpx;
font-weight: 500;
background: #EFF5FE;
height: 72rpx;
width: 100%;
color: #347BFF;
font-size: 24rpx;
}
.tips .contentText {
margin-left: 20rpx;
margin-right: auto;
display: flex;
font-weight: 500;
flex-direction: column;
justify-content: space-between;
}
.user-portrait {
background: #ffffff;
// padding: 48rpx 40rpx 120rpx;
}
.user-portrait .label {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 28rpx;
color: #292D33;
padding: 24rpx 40rpx 0;
}
.user-portrait .check-block {
display: flex;
flex-wrap: wrap;
padding: 24rpx 40rpx;
border-bottom: 1rpx solid #EFF0F2;
}
.check-box:nth-child(n+4) {
margin-top: 10rpx;
}
.user-portrait .check-box {
position: relative;
box-sizing: border-box;
width: calc((100% - 40rpx) / 3);
height: 64rpx;
line-height: 64rpx;
text-align: center;
// background: #F7F7F7;
font-size: 24rpx;
// color: #666666;
color: #292D33;
margin-right: 20rpx;
background: #F7F8FA;
border-radius: 4rpx;
}
.user-portrait .check-box.active {
background: #347BFF14;
border: 2rpx solid #347BFF;
color: #347BFF;
font-family: PingFangSC-Medium;
font-weight: 500;
line-height: 60rpx;
}
.user-portrait .check-box.active .mult {
position: absolute;
bottom: 0;
right: 0;
width: 20rpx;
height: 20rpx;
}
.input-box {
height: 280rpx;
background: #F4F5F7;
border: 2rpx solid #EFF0F2;
border-radius: 12rpx;
padding: 32rpx 24rpx;
margin-bottom: 16rpx;
color: #323436;
}
.user-portrait .check-box:nth-child(3n) {
margin-right: 0;
}
.btns {
position: fixed;
bottom: 0;
width: 100%;
padding: 20rpx;
background: #ffffff;
display: flex;
text-align: center;
font-size: 32rpx;
font-weight: 500;
}
.btn-default {
box-sizing: border-box;
width: 186rpx;
height: 80rpx;
line-height: 80rpx;
background: #FFFFFF;
border: 2rpx solid #0075F9;
border-radius: 12rpx;
margin-right: 20rpx;
color: #347BFF;
}
.btn-blue {
width: calc(100% - 246rpx);
height: 80rpx;
line-height: 80rpx;
background: #347BFF;
border-radius: 12rpx;
color: #FFFFFF;
}
\ No newline at end of file \ No newline at end of file
<!--tabWorkOrder/pages/staffDaily/staffDaily.wxml-->
<!-- <block wx:if="{{ flag }}"> -->
<view class="layout {{ flag?'opacity':'' }}">
<navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{ true }}">
<view class="navigation-title" bindtap="showStorePicker">
<view class="navigation-title-text text-hide">{{merchantRange[subIndex].merchantName}}</view>
<view class="arrow" wx:if="{{ merchantRange.length > 1 }}">
<image src="/images/arrow-bottom.png" />
</view>
</view>
</navigation-bar>
<view style="margin-top:{{ statusBarHeight }}px">
<weekCalendar timeBean="{{ timeBean }}" bind:lastWeek="lastWeek" bind:nextWeek="nextWeek" bind:dayClick="dayClick"></weekCalendar>
</view>
<view class="main {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="header">
<view class="title">日报填写</view>
<view class="navigation-title" bindtap="showStaffPicker">
<view class="navigation-title-text text-hide">{{staffList[staffCurrent].staffName}}</view>
<view class="arrow" wx:if="{{ staffList.length > 1 }}">
<image src="/images/arrow-bottom.png" />
</view>
</view>
</view>
<view class="box">
<gl-cell-staff border valueAlign="right" labelText="每日按门店填写新车交付数" label="新车交付数" requiredAfter labelWidth="375rpx" required>
<input
placeholder="点击输入"
class="input"
placeholder-class="placeholder-class"
maxlength="3"
type="number"
value="{{ orderObj.deliveryCount }}"
bindinput="input"
data-name="deliveryCount"
disabled="{{ role != 'staff' && role != 'super' }}"
always-embed
></input>
</gl-cell-staff>
<gl-cell-staff border valueAlign="right" labelText="每日填写本人该业务的接待客户数" label="到店流量(太阳膜)" requiredAfter labelWidth="375rpx" required>
<input
placeholder="点击输入"
class="input"
type="number"
placeholder-class="placeholder-class"
maxlength="3"
value="{{ orderObj.filmToShopCount }}"
bindinput="input"
data-name="filmToShopCount"
disabled="{{ role != 'staff' }}"
always-embed
></input>
</gl-cell-staff>
<gl-cell-staff border valueAlign="right" labelText="每日填写本人该业务的接待客户数" label="到店流量(会员权益)" requiredAfter labelWidth="375rpx" required>
<input
placeholder="点击输入"
class="input"
type="number"
placeholder-class="placeholder-class"
maxlength="3"
value="{{ orderObj.equityToShopCount }}"
bindinput="input"
data-name="equityToShopCount"
disabled="{{ role != 'staff' }}"
always-embed
></input>
</gl-cell-staff>
<view class="user-portrait">
<view wx:for="{{ formData }}" wx:key="index">
<view class="label">{{item.label}}</view>
<!-- <gl-cell-staff border valueAlign="right" label="{{ item.label }}" requiredAfter labelWidth="375rpx">
<input placeholder="下方选项请点击选择" class="input" placeholder-class="placeholder-class" disabled="{{ true }}" always-embed></input>
</gl-cell-staff> -->
<!-- <view class="input-box" wx:if="{{ item.type == 'textarea' }}">
<textarea
type="text"
placeholder="{{ item.placeholder || '请输入' + item.label }}"
maxlength="{{ item.maxlength }}"
class="input"
value="{{ detailForm[item.name] }}"
placeholder-class="input-placeholder"
data-attr="{{ item.name }}"
bindinput="handleInput"
/>
</view> -->
<view wx:if="{{ item.optionList }}" class="check-block">
<view
class="check-box {{ subItem.active ? 'active' : '' }}"
wx:for="{{ item.optionList }}"
wx:for-item="subItem"
wx:for-index="idx"
wx:key="idx"
bindtap="click"
data-pidx="{{ index }}"
data-idx="{{ idx }}"
>
{{subItem.confName}}
<image wx:if="{{ item.isMult && subItem.active }}" class="mult" src="../../images/check-active.png"></image>
</view>
</view>
</view>
</view>
<view class="remark_box">
<view class="label">备注</view>
<view class="textArea_box">
<textarea
value="{{ orderObj.remark }}"
maxlength="800"
placeholder="请输入"
class="textarea"
bindinput="remarkInput"
disabled="{{ role != 'staff' }}"
/>
<view class="currentWordNumber">{{currentWordNumber || 0}} / 800</view>
</view>
</view>
</view>
<view class="approvalFromSuperiorsCon">
<view class="title">上级批复</view>
<view class="tips">数据来源生意助手小程序,每周更新</view>
<!-- approval -->
<view class="approvalBox">
<view class="title">历史记录</view>
<block wx:for="{{ approvalList }}" wx:key="index" wx:for-item="item" wx:for-index="idx">
<view class="item">
<view class="content">{{ item.remark }}</view>
<view class="time">{{ item.createTime }} 区域督导</view>
</view>
</block>
<block>
<view class="label">填写批复</view>
<view class="textArea_box">
<textarea
value="{{ orderObj.remark }}"
maxlength="800"
placeholder="请输入"
class="textarea"
bindinput="remarkInput"
disabled="{{ role != 'staff' }}"
/>
<view class="currentWordNumber">{{currentWordNumber || 0}} / 800</view>
</view>
</block>
</view>
</view>
</view>
<view class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<!-- <text class="tips x-center">客户信息仅支持修改以上部分。</text> -->
<!-- <tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" /> -->
<view class="btns-con">
<!-- <view class="save text-center" data-giveUp="{{ true }}" bindtap="submit" data-save>放弃</view> -->
<view class="confirm text-center" bindtap="submit">提交</view>
</view>
</view>
</view>
<store-picker
subIndex="{{ subIndex }}"
pickList="{{ rangeList }}"
show="{{ showPicker }}"
bindsearch="getListShop4s"
bindconfirm="changePicker"
pickerType="{{ pickerType }}"
/>
<!-- </block> -->
\ No newline at end of file \ No newline at end of file
/**
* 获取该周的所要显示的周和日期的对应数据,数据结构如下
* var weekDay = {week: '',day: ''}
* 参数:selectWeek 0为本周,数字代表前几周或者后几周,例如1是下一周
*/
function getWeekDayList(selectWeek) {
// 1.获取周一对应得时间
// 2.用循环七次添加周一到周日对应得周几和几号
var selectWeekTime = getCurrentTimeStamp() + selectWeek * 7 * 24 * 60 * 60 * 1000
var mondayTime = selectWeekTime - (getWeekNumber(selectWeekTime) - 1) * 24 * 60 * 60 * 1000
var timeBean = {
selectDay: 0,
yearMonth: '',
weekDayList: []
}
for (var i = 0; i < 7; i++) {
var weekDay = {
week: '',
day: ''
}
weekDay.week = getWeek(mondayTime + i * 24 * 60 * 60 * 1000)
weekDay.day = getMyDay(mondayTime + i * 24 * 60 * 60 * 1000)
timeBean.weekDayList.push(weekDay)
if (i == 0) {
timeBean.starDay = getMyDay(mondayTime + i * 24 * 60 * 60 * 1000)
}
// if ( i == 6) {
// timeBean.endDay =
// }
}
timeBean.yearMonth = getYearMonth(selectWeekTime)
timeBean.selectDay = getCurrenrWeek()
timeBean.formatYearMonth = getFormatYearMonth(selectWeekTime)
return timeBean
}
//获取当前时间戳 --
function getCurrentTimeStamp() {
var timestamp = new Date().getTime()
return timestamp
}
//获取当前周几
function getCurrenrWeek() {
var str = '6012345'.charAt(new Date().getDay())
return str
}
//时间戳获得年月
function getYearMonth(res) {
var time = new Date(res)
var y = time.getFullYear()
var m = time.getMonth() + 1
// 将月份转换成两位数的字符串
// var formattedMonth = month < 10 ? '0' + month : '' + month;
return y + '-' + m
}
//时间戳获得年月
function getFormatYearMonth(res) {
var time = new Date(res)
var y = time.getFullYear()
var m = time.getMonth() + 1
// 将月份转换成两位数的字符串
var formattedMonth = m < 10 ? '0' + m : '' + m
return y + '-' + formattedMonth
}
//时间戳转几号
function getMyDay(res) {
var time = new Date(res)
var d = time.getDate()
return d
}
//时间戳转周几
function getWeek(res) {
var time = new Date(res)
var y = time.getFullYear()
var m = time.getMonth() + 1
var d = time.getDate()
return '日一二三四五六'.charAt(new Date(y + '-' + m + '-' + d).getDay())
}
//时间戳转周几 0123456 --
function getWeekNumber(res) {
var time = new Date(res)
var y = time.getFullYear()
var m = time.getMonth() + 1
var d = time.getDate()
return '0123456'.charAt(new Date(y + '-' + m + '-' + d).getDay())
}
module.exports = {
//把方法共享,让引用的地方可以调用
getWeekDayList: getWeekDayList
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!