Commit d6a34207 by 张晓玮

Merge branch 'dev_v4.23.0' into 'dev_v4.24.0'

Dev v4.23.0

See merge request !109
2 parents b6d23c83 03a08936
Showing 42 changed files with 526 additions and 321 deletions
......@@ -39,6 +39,9 @@ App({
checkYqdSuper(userInfo, this.globalData)
},
onShow(options) {
wx.onMemoryWarning(function () {
console.log('onMemoryWarningReceive')
})
getUpdateManager()
if (options) {
......@@ -57,6 +60,7 @@ App({
if (relogin) {
// 判断有没有 30 天免登陆 有直接跳选园区
let noSignInUuid = getNoSignInUuid()
console.log('noSignInUuid',noSignInUuid);
if (noSignInUuid) {
api.reNoSignIn({ noSignInUuid: noSignInUuid }).then(res => {
let {
......
......@@ -9,8 +9,8 @@ Component({
show: {
type: Boolean,
observer: function (n) {
wx.$util.pointRecord(19)
let { isFirst } = this.data
n && wx.$util.pointRecord(19)
if (n && isFirst) {
this.init()
this.setData({
......@@ -106,7 +106,7 @@ Component({
if (!flag) {
return wx.$util.showToast('请选择客户')
}
this.triggerEvent('confirm', orderInfo)
this.setData({
show: false
......
......@@ -168,14 +168,14 @@ Component({
let { goodsList } = this.data
if (goodsList.length < 1) return
if (!chooseList.length) return wx.$util.showToast('请勾选商品')
let thisPage = wx.$router.getPageInstance()
// thisPage.setGoodsTotal(chooseList)
// console.log(chooseList)
thisPage.setData({
goodsList: chooseList
})
thisPage.setGoodsTotal(chooseList)
console.log(chooseList)
this.setData({
show: false
})
......
// tabWorkOrder/pages/createOrder/createOrderComponents/Popup/Popup.js
Component({
externalClasses: ['popup-slot-class'],
/**
* 组件的属性列表
*/
......@@ -41,6 +42,7 @@ Component({
}
},
attached() {
// console.log(wx.$util.isFullSucreen(), 'wx.$util.isFullSucreen()')
this.setData({
isFullSucreen: wx.$util.isFullSucreen()
})
......
<view class="popup" hidden="{{!showPopup}}" catchtouchmove="noScroll">
<view class="popup-bg" bindtap="hidePopup"></view>
<view class="popup-content" style="height:{{height}}">
<block wx:if="{{title}}">
<view class="popup-title text-center">{{title}}</view>
</block>
<view class="popup-slot {{isFullSucreen?title?'isFullSucreen':'isFullSucreen-notitle':''}}">
<slot></slot>
</view>
<view class="popup-footer {{isFullSucreen?'isFullSucreen':''}}">
<view class="cancel btn text-center" bindtap="hidePopup">取消</view>
<view class="confirm btn text-center" bindtap="confirm">确认</view>
</view>
</view>
<view class="popup" hidden="{{ !showPopup }}" catchtouchmove="noScroll">
<view class="popup-bg" bindtap="hidePopup"></view>
<view class="popup-content" style="height:{{ height }}">
<block wx:if="{{ title }}">
<view class="popup-title text-center">{{title}}</view>
</block>
<view class="popup-slot popup-slot-class {{ isFullSucreen?title?'isFullSucreen':'isFullSucreen-notitle':'' }}">
<slot></slot>
</view>
<view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="cancel btn text-center" bindtap="hidePopup">取消</view>
<view class="confirm btn text-center" bindtap="confirm">确认</view>
</view>
</view>
</view>
\ No newline at end of file
......@@ -44,21 +44,26 @@
.popup-slot {
height: calc(100% - 200rpx);
}
.popup-slot.isFullSucreen{
.popup-slot.isFullSucreen {
height: calc(100% - 268rpx);
}
.popup-slot.isFullSucreen-notitle{
.popup-slot.isFullSucreen-notitle {
height: calc(100% - 170rpx);
}
.popup-footer {
display: flex;
align-items: center;
justify-content: space-between;
padding:10rpx 0 ;
padding: 10rpx 0;
}
.popup-footer.isFullSucreen{
.popup-footer.isFullSucreen {
padding-bottom: 68rpx !important;
}
.popup-footer .btn {
width: 330rpx;
height: 80rpx;
......@@ -71,10 +76,12 @@
color: #323233;
border: 2rpx solid #DCDEE0;
}
.popup-footer .confirm{
.popup-footer .confirm {
background: #3582EE;
color: #fff;
}
@keyframes show-popup {
0% {
bottom: -100%;
......
......@@ -2,98 +2,101 @@
Component({
options: {
// 在组件定义时的选项中启用多slot支持
multipleSlots: true
multipleSlots: true,
},
/**
* 组件的属性列表
*/
properties: {
items: {
type: Array,
value: [],
subIndex: {
type: Number,
// value: [],
observer: function (n) {
if (n) {
let userInfo = wx.$util.getUserInfo()
let defaultSelectStoreIndex = n?.findIndex(v => {return v.merchantId == userInfo?.default4SStoreInfo?.merchantId}) > -1 ? n?.findIndex(v => {return v.merchantId == userInfo?.default4SStoreInfo?.merchantId}) : 0
this.setData({defaultSelectStoreIndex: [defaultSelectStoreIndex], selectStoreIndex: defaultSelectStoreIndex})
}
this.setData({
selectStoreIndex: [n]
})
}
},
pickList: {
type: Array,
value: []
},
show: {
type: Boolean,
type: Boolean
}
},
/**
* 组件的初始数据
*/
data: {
searchValue:'',
selectStoreIndex:'',
edit: false,
defaultSelectStoreIndex: []
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:{
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
},
type
} = e
this.setData({
edit: false
})
this.setValue(value)
console.log('123')
this.triggerEvent(type == 'confirm' ? 'search' : 'blur', {value})
},
confirm() {
let {selectStoreIndex, items } = this.data
if (!items.length) {
return wx.$util.showToast('请选择门店')
})
},
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]]
})
}
this.triggerEvent('confirm', selectStoreIndex)
this.setData({
show: false
})
},
changeStore(e) {
this.setData({
selectStoreIndex: e.detail.value[0]
})
}
}
})
<!--packageEquity/components/storePicker/storePicker.wxml-->
<popup class="date-background" show="{{show}}" bindconfirm="confirm" height="800rpx">
<view class='date-container'>
<view class='date-confirm'>
<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="{{defaultSelectStoreIndex}}" immediate-change="true" indicator-class="indicator" bindchange="changeStore">
<picker-view-column>
<block wx:for="{{items}}" wx:key="merchantId">
<view class="view pickViewColumn">{{item.merchantName}}</view>
</block>
</picker-view-column>
</picker-view>
</view>
</view>
</popup>
<popup class="date-background" popup-slot-class="popup-style" show="{{ show }}" bindconfirm="confirm" height="800rpx">
<view class="date-container">
<view class="date-confirm">
<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">{{item.merchantName}}</view>
</block>
</picker-view-column>
</picker-view>
</view>
</view>
</popup>
\ No newline at end of file
......@@ -58,4 +58,8 @@
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.popup-style{
height: calc(100% - 100rpx)!important;
}
\ No newline at end of file
......@@ -28,8 +28,8 @@
padding: 0 32rpx;
}
.merchant-box{
max-height: 300rpx;
overflow: hidden;
/* max-height: 300rpx; */
overflow: auto;
transition: all .25s;
}
.merchantList {
......
......@@ -11,7 +11,7 @@
* 3生产环境
* 4预发布
*/
let index = 1
let index = 2
const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync()
......
......@@ -124,9 +124,9 @@ Page({
changeTabBar(e) {
let { pageShow } = this.data,
tabIndex = e.detail
this.setData({
tabIndex
})
// this.setData({
// tabIndex
// })
console.log(pageShow[tabIndex])
// if (!pageShow[tabIndex]) {
// this.getComponentPage().onLoad && this.getComponentPage().onLoad()
......
......@@ -20,7 +20,7 @@
<quotation-list id="page-0" navBarHeight="{{navBarHeight}}" class="pagedetail {{tabIndex == 0?'':'hide'}}" mode="{{mode}}" />
<equity-list
id="page-1"
tabIndex="{{tabIndex}}"
outTabIndex="{{tabIndex}}"
navBarHeight="{{navBarHeight}}"
class="pagedetail {{tabIndex == 1?'':'hide'}}" />
</block>
......
......@@ -10,7 +10,7 @@ Component({
type: Number,
value: 0
},
tabIndex: {
outTabIndex: {
type: Number,
observer(val) {
console.log(val)
......
......@@ -6,7 +6,12 @@ const equityStatusObj = {
'2': '提单成功',
'3': '提单失败'
}
const equityStatusList = [{
const equityStatusList = [
{
confName: '全部',
confId: ''
},
{
confName: '待补单',
confId: '0'
}, {
......
import constantList from './constantList'
import data from './data'
import Util from '~/utils/util'
const formRule = {
vin: [
{ required: true, message: '车架号不能为空' },
......@@ -165,7 +165,8 @@ const secondObj = {
label: '生效日期',
name: 'effectiveDate',
type: 'pickerTime',
start: new Date(new Date().setDate(new Date(new Date()).getDate() + 1)).toLocaleDateString()
start: Util.tsFormatTime(new Date(new Date().setDate(new Date(new Date()).getDate() + 1)),'Y-M-D')
// .toLocaleDateString().replace('/','-')
},
{
label: '卡号',
......
......@@ -21,7 +21,7 @@ Page({
userInfo: {},
serviceInfo: {
seatesNum: 5,
servicePeriod: '1年'
servicePeriod: '1'
},
// 二次确认车架号
conSecondObj: {
......
......@@ -22,7 +22,14 @@ Component({
n && this.init()
}
},
popInputObj: {
testdata: {
type: Boolean
// observer: function (n) {
// console.log('n', n)
// n && this.init()
// }
},
popinputobj: {
type: Object,
observer: function (n) {
this.init()
......@@ -47,9 +54,9 @@ Component({
*/
methods: {
init() {
let { popInputObj } = this.data
let { typeName, compensation, payPrice, handletype } = popInputObj
// console.log(popInputObj, 'popInputObj')
let { popinputobj } = this.data
let { typeName, compensation, payPrice, handletype } = popinputobj
// console.log(popinputobj, 'popinputobj')
if (handletype == 'add') {
this.setData({
typeName: '',
......@@ -57,7 +64,7 @@ Component({
payPrice: ''
})
} else {
// let { typeName, compensation, payPrice } = popInputObj
// let { typeName, compensation, payPrice } = popinputobj
this.setData({
typeName,
compensation,
......@@ -76,7 +83,7 @@ Component({
})
},
confirm() {
let { compensation, payPrice, typeName, popInputObj } = this.data
let { compensation, payPrice, typeName, popinputobj } = this.data
let otherInsuranceObj = {
compensation,
payPrice,
......@@ -90,14 +97,14 @@ Component({
}
// 新增
console.log(otherInsuranceObj, 'otherInsuranceObj')
if (popInputObj.handletype == 'add') {
if (popinputobj.handletype == 'add') {
let thisPage = wx.$router.getPageInstance()
thisPage.setData({
['orderInfo' + '.' + 'otherInsuranceList']: [...thisPage.data.orderInfo?.otherInsuranceList, otherInsuranceObj]
})
} else {
let thisPage = wx.$router.getPageInstance()
let { index } = popInputObj
let { index } = popinputobj
thisPage.setData({
['orderInfo' + '.' + 'otherInsuranceList' + '[' + index + ']']: otherInsuranceObj
})
......
......@@ -87,7 +87,7 @@ Component({
popObj: {
popValue: ''
},
popInputObj: {
popinputobj: {
type: 'add'
},
showError: false,
......@@ -211,20 +211,19 @@ Component({
this.cancelInsuranceCheck()
},
cancelInsuranceCheck() {
// this.setData({
// // insuranceCheck: false
// })
let thisPage = wx.$router.getPageInstance()
let thisPage = wx.$router.getPageInstance()
thisPage.setData({
['orderInfo.quotedPriceUpdate']: '',
['orderInfo.goodsId']: '',
['orderInfo.goodsName']: '',
['orderInfo.valueAddedVehicleLoss']: {
appreciation:'',
goodsName:'',
appreciation: '',
goodsName: '',
type: 3
}
})
......@@ -278,17 +277,17 @@ Component({
let { disable } = this.data
if (disable) return false //修改权益价时,不可修改
let { handletype, index } = e.target.dataset
console.log(handletype, index, 'type, index')
let { handletype, index } = e.currentTarget.dataset
// console.log(handletype, index, 'type, index')
let thisPage = wx.$router.getPageInstance()
let popValue = ''
if (handletype == 'edit') {
popValue = thisPage.data.orderInfo?.['otherInsuranceList']?.[index] || ''
}
console.log(popValue, 'popValue')
// console.log(popValue, 'popValue')
this.setData({
popupInputShow: true,
popInputObj: {
popinputobj: {
handletype,
index,
...popValue
......
......@@ -81,7 +81,8 @@ module.exports = {
1: '微信支付',
2: '门店收款',
3: 'pos机支付',
4: '支付宝支付'
4: '支付宝支付',
5: '嘀加收款'
},
orderType: [
{
......
// pages/wxLogin/wxLogin.js
import api from '../../api/api.js'
import { setNoSignInUuid,getNoSignInUuid } from '~/utils/cache/storageApi.js'
import { setNoSignInUuid,getNoSignInUuid,rmNoSignInUuid } from '~/utils/cache/storageApi.js'
const app = getApp()
Page({
/**
......@@ -121,7 +121,8 @@ Page({
if (loginUserInfoList.length > 0) {
wx.$util.setSessionId(sessionId)
// wx.$storage.
noSignInUuid && setNoSignInUuid(noSignInUuid)
console.log(setNoSignInUuid,'setNoSignInUuid');
noSignInUuid ? setNoSignInUuid(noSignInUuid):rmNoSignInUuid()
wx.$router.reLaunch('pages.accountItems')
} else {
......@@ -232,7 +233,8 @@ Page({
encryptedData,
loginToken,
iv,
noLoginAgreeChoose
// noLoginAgreeChoose
noSignIn: noLoginAgreeChoose
})
.then(({ code, data, message }) => {
console.log(data)
......@@ -242,7 +244,9 @@ Page({
if (loginUserInfoList.length) {
wx.$util.setSessionId(sessionId)
// wx.$storage.
noSignInUuid && setNoSignInUuid(noSignInUuid)
console.log(setNoSignInUuid,'setNoSignInUuid');
noSignInUuid ? setNoSignInUuid(noSignInUuid):rmNoSignInUuid()
wx.$router.reLaunch('pages.accountItems')
} else {
wx.$router.reLaunch('pages.nothing')
......
/* pages/login/login/login.wxss */
page{
page {
background: #fff;
}
.layout{
.layout {
padding: 0 80rpx;
position: relative;
height: 100vh;
height: 100vh;
}
.layout::before {
content: '';
width: 100%;
......@@ -18,7 +20,8 @@ page{
top: 0;
z-index: -1;
}
.phone_login_layout::after{
.phone_login_layout::after {
content: '';
width: 100%;
height: 100%;
......@@ -28,7 +31,8 @@ page{
top: 0;
z-index: -1;
}
.navigation-header{
.navigation-header {
background-color: transparent;
}
......@@ -57,7 +61,7 @@ page{
}
.login-btn {
margin: 144rpx 0 28rpx;
margin: 130rpx 0 28rpx;
background-image: linear-gradient(125deg, #65B8F8 0%, #3582EE 100%);
border-radius: 12rpx;
text-align: center;
......@@ -71,7 +75,8 @@ page{
transition: all .5s;
position: relative;
}
.login-btn button{
.login-btn button {
opacity: 0;
position: absolute;
top: 0;
......@@ -82,7 +87,7 @@ page{
box-sizing: border-box;
}
.mobile_btn{
.mobile_btn {
width: 594rpx;
height: 100rpx;
background: #E6F0FD;
......@@ -91,29 +96,35 @@ page{
text-align: center;
line-height: 100rpx;
}
.auth-dialog-class{
.auth-dialog-class {
text-align: center;
font-size: 28rpx;
font-weight: 400;
}
.auth-dialog-class .van-dialog__header{
.auth-dialog-class .van-dialog__header {
font-size: 36rpx;
font-weight: 500;
color: #333333;
}
.message-box text {
color: #5092FF;
}
.message-box {
margin: 20rpx 0 30rpx;
color: #666666;
text-align: center;
font-size: 28rpx;
}
.message-box .message{
.message-box .message {
padding: 8px 0;
}
.phone_login .title{
.phone_login .title {
font-weight: 600;
font-size: 48rpx;
color: #333333;
......@@ -128,24 +139,28 @@ page{
background: #F7F8FA;
border-radius: 12rpx;
}
.login-form .input .clear{
.login-form .input .clear {
flex-shrink: 0;
width: 36rpx;
height: 36rpx;
padding: 0 20rpx;
}
.login-form .sms{
.login-form .sms {
flex-shrink: 0;
font-size: 24rpx;
padding: 0;
text-align: right;
transition: all 0.25s;
color: #3582EE;
color: #3582EE;
}
.login-form .code-disabled{
.login-form .code-disabled {
color: #A5A5A7;
}
.login-form .login_btn{
.login-form .login_btn {
width: 100%;
height: 100rpx;
background-image: linear-gradient(125deg, #65B8F8 0%, #3582EE 100%);
......@@ -156,13 +171,13 @@ page{
margin: 94rpx 0 40rpx;
}
.login-form .wx_login{
.login-form .wx_login {
text-align: center;
font-size: 28rpx;
color: #888888;
}
.login-form .wx_login text{
.login-form .wx_login text {
color: #3582EE;
margin-left: 20rpx;
}
}
\ No newline at end of file
......@@ -326,6 +326,34 @@
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "1.1 订单补录",
"pathName": "tabWorkOrder/pages/additionRecordOrder/additionRecordOrder",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "1.1经营数据统计",
"pathName": "tabOperating/pages/operatingShow/operatingShow",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "1.1 首页",
"pathName": "tabIndex/pages/index/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "订单补录",
"pathName": "tabWorkOrder/pages/additionRecordOrder/additionRecordOrder",
"query": "",
"launchMode": "default",
"scene": null
}
]
}
......
......@@ -34,17 +34,19 @@ export const getYQInfo = userInfo => {
// getUserInfo
// 判断是否是多账号用户
let subIndex = 0
console.log(!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2);
console.log(userInfo.merchantId,'userInfo.merchantId');
if (!userInfo.loginRole || userInfo.loginRole ==4 ) {
// console.log(!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2);
// console.log(userInfo.merchantId,'userInfo.merchantId');
if (!userInfo.loginRole || userInfo.loginRole == 4) {
// console.log(userInfo.merchantId,'userInfo.merchantId');
app.globalData.yqdInfo = {
subIndex,
merchantRange: [{
merchantName: userInfo.merchantName,
merchantId: userInfo.merchantId
}]
merchantRange: [
{
merchantName: userInfo.merchantName,
merchantId: userInfo.merchantId
}
]
}
// this.setData({
// merchantRange: [{ merchantName: userInfo.merchantName }]
......@@ -59,10 +61,7 @@ export const getYQInfo = userInfo => {
.getYQList()
.then(res => {
// console.log(res)
let {
code,
data
} = res
let { code, data } = res
if (code == 0) {
let arr = []
if (data.length > 1) {
......@@ -73,10 +72,12 @@ export const getYQInfo = userInfo => {
}
arr = [all, ...data]
} else {
arr = [{
merchantName: userInfo.merchantName,
merchantId: userInfo.merchantId
}]
arr = [
{
merchantName: userInfo.merchantName,
merchantId: userInfo.merchantId
}
]
}
app.globalData.yqdInfo = {
merchantRange: arr,
......@@ -102,10 +103,7 @@ export const getYQorderInfo = () => {
} else {
let userInfo = wx.$util.getUserInfo()
if (!userInfo) this.login(true)
let {
merchantId,
merchantName
} = userInfo.subLoginUser
let { merchantId, merchantName } = userInfo.subLoginUser
api
.getMerchantRecordingSettings({
......@@ -114,10 +112,7 @@ export const getYQorderInfo = () => {
})
.then(res => {
// console.log(res)
let {
code,
data
} = res
let { code, data } = res
if (code == 0) {
// debugger
// console.log(typeof data.yqPhoneConfig, 'data.yqPhoneConfig')
......@@ -144,9 +139,7 @@ export const setConfigInfo = globalData => {
// 如果有 直接返回
// console.log(app.globalData.YQorderSetting, 'app.globalData.YQorderSetting')
// console.log('app.globalData.YQorderSetting', app.globalData.YQorderSetting)
let {
configInfo
} = globalData
let { configInfo } = globalData
if (configInfo) {
return resolve(configInfo)
} else {
......@@ -175,9 +168,7 @@ export const setConfigInfo = globalData => {
export const checkScene = options => {
// let query = options.query
let {
query
} = options
let { query } = options
if (query) {
// 解码
for (const key in query) {
......@@ -259,17 +250,14 @@ export const setWebSocket = () => {
/** 获取园区店下的4S店 */
export const get4SStoreList = options => {
console.log(options,'options');
console.log(options, 'options')
return new Promise((resolve, reject) => {
const app = getApp()
api
.getSceneMerchantRefStoreList(options)
.then(res => {
let {
code,
data
} = res
let { code, data } = res
if (code == 0) {
app.globalData.storeListRange = data
let default4SStoreInfo = wx.$util.getUserInfo()?.default4SStoreInfo ? wx.$util.getUserInfo()?.default4SStoreInfo : data && data[0]
......@@ -282,7 +270,8 @@ export const get4SStoreList = options => {
default4SStoreInfo: default4SStoreInfo
})
if (options.scene == 3 || options.scene == 2)
if (options.isSubcehicle) { // 是否是次新车转化业务场景(商户关联关系与众筹一样)
if (options.isSubcehicle) {
// 是否是次新车转化业务场景(商户关联关系与众筹一样)
wx.$util.setUserInfo({
...wx.$util.getUserInfo(),
default4SStoreInfo_newCarConversion: default4SStoreInfo_newCarConversion
......@@ -308,10 +297,7 @@ export const getStaffListByMerchant = options => {
api
.getStaffListByMerchantAPI(options)
.then(res => {
let {
code,
data
} = res
let { code, data } = res
if (code == 0) {
app.globalData.staffListRange = data
resolve(app.globalData.staffListRange)
......@@ -321,4 +307,4 @@ export const getStaffListByMerchant = options => {
console.log(error)
})
})
}
\ No newline at end of file
}
......@@ -25,12 +25,16 @@ Page({
flag: true,
dateObj: {
beginDateStr: ''
}
},
showPicker: false
// showPicker: true
},
showStorePicker() {
this.setData({
showPicker: true
})
let { merchantRange } = this.data
merchantRange.length > 1 &&
this.setData({
showPicker: true
})
},
tipsEvent() {
......@@ -124,7 +128,24 @@ Page({
moveArrow: !this.data.moveArrow
})
},
getStoreList(e) {
console.log(e)
let { value } = e.detail
getYQInfo(this.data.userInfo)
.then(result => {
// console.log(result)
let { merchantRange } = result
if (value) {
merchantRange = merchantRange.filter(item => item.merchantName.includes(value))
}
this.setData({
merchantRange
})
})
.catch(err => {})
},
changePicker(e) {
console.log(e)
let { value } = e.detail
let { merchantId } = this.data.merchantRange[value]
// 修改对应下标显示
......@@ -151,6 +172,7 @@ Page({
let { userInfo } = this.data
// 判断是不是门店员工
if (userInfo.merchantType && !userInfo.isSuper && type == 2) {
wx.$util.pointRecord(item.recordId)
if (item.type == 'scanCode') {
wx.scanCode({
success(res) {
......@@ -167,6 +189,7 @@ Page({
} else {
// item.url != 'tabWorkOrder.createOrder'
if (!['tabWorkOrder.createOrder', 'tabWorkOrder.createArchives'].includes(item.url)) {
wx.$util.pointRecord(item.recordId)
return wx.$router.go(item.url)
} else {
wx.$util.showNoAccess()
......@@ -397,12 +420,12 @@ Page({
},
getOutputValue(yqdInfo) {
let { dateObj, userInfo } = this.data
console.log(yqdInfo, 'yqdInfo')
// console.log(yqdInfo, 'yqdInfo')
let { subIndex, merchantRange } = yqdInfo
// yqMerchantId 不是全部就必要要带过去
// 1-超管 2-商户管理员 3-区域督导 4-驻店人员
const yqMerchantId = merchantRange[subIndex].merchantId || ''
const loginRole = userInfo.subLoginUser.loginRole
const loginRole = userInfo.subLoginUser?.loginRole
this.setData({
loginRole
})
......@@ -473,7 +496,7 @@ Page({
},
totalListSet() {
let { userInfo } = this.data
if (userInfo.loginRole == 3 || userInfo.isSuper) {
if (userInfo.subLoginUser?.loginRole == 3 || userInfo.isSuper) {
this.setData({
totalList: [
{
......
......@@ -5,6 +5,6 @@
"side-select-popup": "/components/SideSelectPopup/SideSelectPopup",
"CalendarMonthSingle": "/components/CalendarMonthSingle/CalendarMonth",
"van-progress": "@vant/weapp/progress/index",
"store-picker": "../../components/storePicker/storePicker"
"store-picker": "/components/storePicker/storePicker"
}
}
......@@ -27,7 +27,8 @@
</view>
</view>
</view>
<block wx:if="{{!userInfo.isSuper && userInfo.merchantType}}">
<!-- wx:if="{{!userInfo.isSuper && userInfo.merchantType}}" -->
<block >
<view class="set-box " bindtap="showWork">
<view class="label">
<image src="../../images/set.png" />
......
......@@ -17,19 +17,19 @@ Page({
name: '营业概况',
active: true,
componentsName: 'businessCell',
recordId:12
recordId: 12
},
{
name: '员工业绩',
active: false,
componentsName: 'staffCell',
recordId:13
recordId: 13
},
{
name: '今日战果',
active: false,
componentsName: 'conquestCell',
recordId:14
recordId: 14
}
],
dateObj: {
......@@ -43,10 +43,34 @@ Page({
totalOrderMoney: 0,
totalAdd: 0
},
refresh: false
refresh: false,
showPicker: false
},
// 混入跳转方法
...mixins.methods,
showStorePicker() {
let { merchantRange } = this.data
merchantRange.length > 1 &&
this.setData({
showPicker: true
})
},
getStoreList(e) {
console.log(e)
let { value } = e.detail
getYQInfo(this.data.userInfo)
.then(result => {
// console.log(result)
let { merchantRange } = result
if (value) {
merchantRange = merchantRange.filter(item => item.merchantName.includes(value))
}
this.setData({
merchantRange
})
})
.catch(err => {})
},
changePicker(e) {
console.log('changePicker')
let { value } = e.detail
......@@ -192,7 +216,7 @@ Page({
} else {
this.setTimeList(dateObj.nextDay)
}
wx.$util.pointRecord(type == 'before'?16:17)
wx.$util.pointRecord(type == 'before' ? 16 : 17)
this.calendar.resetData(type == 'before' ? dateObj.beforeDay : dateObj.nextDay)
},
// 获取选中天数
......
......@@ -4,6 +4,7 @@
"businessCell": "./components/businessCell/businessCell",
"staffCell": "./components/staffCell/staffCell",
"conquestCell": "./components/conquestCell/conquestCell",
"tipsPopup": "/components/tipsPopup/Popup"
"tipsPopup": "/components/tipsPopup/Popup",
"store-picker": "/components/storePicker/storePicker"
}
}
......@@ -44,9 +44,32 @@ Page({
pages: 1,
dateObj: {
beginDateStr: ''
}
},
showPicker: false
},
showStorePicker() {
let { merchantRange } = this.data
merchantRange.length > 1 &&
this.setData({
showPicker: true
})
},
getStoreList(e) {
console.log(e)
let { value } = e.detail
getYQInfo(this.data.userInfo)
.then(result => {
// console.log(result)
let { merchantRange } = result
if (value) {
merchantRange = merchantRange.filter(item => item.merchantName.includes(value))
}
this.setData({
merchantRange
})
})
.catch(err => {})
},
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
......
{
"navigationStyle": "custom",
"usingComponents": {
"CalendarMonth": "/components/CalendarMonth/CalendarMonth"
"CalendarMonth": "/components/CalendarMonth/CalendarMonth",
"store-picker": "/components/storePicker/storePicker"
}
}
<!-- tabOperating/pages/operatingShow/operatingShow.wxml -->
<!-- src引入filter.wxs, module给模块起名 -->
<wxs src="../index.wxs" module="filter" />
<view class="layout {{flag?'opacity':''}}">
<navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{true}}">
<picker
<view class="layout {{ flag?'opacity':'' }}">
<navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{ true }}">
<!-- <picker
range="{{merchantRange}}"
value="{{subIndex}}"
range-key="merchantName"
bindchange="changePicker"
bindtap="tapPicker"
bindcancel="tapPicker"
disabled="{{merchantRange.length < 2}}">
<view class="navigation-title">
<view class="navigation-title-text text-hide">
{{merchantRange[subIndex].merchantName}}
</view>
<view class="arrow {{moveArrow?'move':''}}" wx:if="{{merchantRange.length > 1}}">
<image src="/images/arrow-bottom.png" />
</view>
disabled="{{merchantRange.length < 2}}"> -->
<view class="navigation-title" bindtap="showStorePicker">
<view class="navigation-title-text text-hide">{{merchantRange[subIndex].merchantName}}</view>
<view class="arrow {{ moveArrow?'move':'' }}" wx:if="{{ merchantRange.length > 1 }}">
<image src="/images/arrow-bottom.png" />
</view>
</picker>
</view>
<!-- </picker> -->
</navigation-bar>
<view class="header" style="margin-top:{{statusBarHeight}}px">
<view class="header" style="margin-top:{{ statusBarHeight }}px">
<view class="date">
<!-- {{dateObj.maxDate}} -->
<CalendarMonth
allowSameDay
shortcut
bindselect='rangeSelect'
bindtapCalendar='tapCalendar'
rangeAll
dateType='range'
calenderColor='#3582EE'
vertical
minDate="2020-10-01"
maxDate="{{dateObj.today}}"
forceFullSucreen="{{bottomLift>0?true:false}}"
isComponents>
allowSameDay
shortcut
bindselect="rangeSelect"
bindtapCalendar="tapCalendar"
rangeAll
dateType="range"
calenderColor="#3582EE"
vertical
minDate="2020-10-01"
maxDate="{{ dateObj.today }}"
forceFullSucreen="{{ bottomLift>0?true:false }}"
isComponents
>
<view class="item dateNum">
<block wx:if="{{dateObj.type=='year'}}">{{dateObj.label}}年</block>
<block wx:if="{{ dateObj.type=='year' }}">{{dateObj.label}}年</block>
<block wx:else>
<!-- {{filter.dateFormatSlash(dateObj.beginDateStr)}}-{{filter.dateFormatSlash(dateObj.endDateStr)}} -->
五月份
......@@ -50,7 +49,7 @@
</block> -->
<!-- wx:if="{{merchantRange.length > 1}}" -->
<!-- 2021年 2-8月 -->
<view class="arrow {{whiteArrow?'move':''}}">
<view class="arrow {{ whiteArrow?'move':'' }}">
<image src="/images/whiteArrowIcon.png" />
</view>
</view>
......@@ -73,60 +72,47 @@
</view>
</view>
<!-- -->
<view class="table {{isFullSucreen?'isFullSucreen':''}}">
<view class="table {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="tableContainer">
<view class="table-header">
<block wx:for="{{tableHeaderList}}" wx:key="index">
<block wx:for="{{ tableHeaderList }}" wx:key="index">
<view class="tableHeader-td">{{item.name}}</view>
</block>
</view>
<block wx:if="{{tableList.length}}">
<block wx:if="{{ tableList.length }}">
<view class="table-body">
<!-- show-scrollbar="{{false}}" scroll-x bindscrolltoupper="getAccumulateList" -->
<!-- bindrefresherrefresh="search" -->
<!-- bindscrolltolower="scrollonReachBottom" -->
<scroll-view
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="restPageNum"
bindscrolltolower="scrollonReachBottom"
refresher-threshold="104"
style="height:100%;"
class="list"
refresher-triggered="{{triggered}}">
<block wx:for="{{tableList}}" wx:for-item="tableItem" wx:key="index">
scroll-y
enable-back-to-top
refresher-enabled="{{ true }}"
bindrefresherrefresh="restPageNum"
bindscrolltolower="scrollonReachBottom"
refresher-threshold="104"
style="height:100%;"
class="list"
refresher-triggered="{{ triggered }}"
>
<block wx:for="{{ tableList }}" wx:for-item="tableItem" wx:key="index">
<view class="table-th">
<block
wx:for="{{tableHeaderList}}"
wx:for-item="item"
wx:for-index="tdIndex"
wx:key="tdIndex">
<block wx:for="{{ tableHeaderList }}" wx:for-item="item" wx:for-index="tdIndex" wx:key="tdIndex">
<!-- <view class="table-td">{{tableHeaderList[tdIndex]}}</view> -->
<view class="table-td" wx:if="{{tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type =='day'}}">
{{filter.dateFormatSlash(tableItem[tableHeaderList[tdIndex]['propName']])}}
</view>
<view class="table-td" wx:elif="{{tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type=='year'}}">
{{filter.dateFormatYear(tableItem[tableHeaderList[tdIndex]['propName']])}}
</view>
<view class="table-td" wx:elif="{{tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type=='month'}}">
{{filter.dateFormatMonth(tableItem[tableHeaderList[tdIndex]['propName']])}}
</view>
<view class="table-td" wx:elif="{{tableHeaderList[tdIndex]['propName']=='upgradeRate'}}">
{{filter.rateFormat(tableItem[tableHeaderList[tdIndex]['propName']])}}
</view>
<view class="table-td" wx:else>
{{tableItem[tableHeaderList[tdIndex]['propName']]}}
</view>
<view class="table-td" wx:if="{{ tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type =='day' }}">{{filter.dateFormatSlash(tableItem[tableHeaderList[tdIndex]['propName']])}}</view>
<view class="table-td" wx:elif="{{ tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type=='year' }}">{{filter.dateFormatYear(tableItem[tableHeaderList[tdIndex]['propName']])}}</view>
<view class="table-td" wx:elif="{{ tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type=='month' }}">{{filter.dateFormatMonth(tableItem[tableHeaderList[tdIndex]['propName']])}}</view>
<view class="table-td" wx:elif="{{ tableHeaderList[tdIndex]['propName']=='upgradeRate' }}">{{filter.rateFormat(tableItem[tableHeaderList[tdIndex]['propName']])}}</view>
<view class="table-td" wx:else>{{tableItem[tableHeaderList[tdIndex]['propName']]}}</view>
<!-- <view class="table-td">{{tableItem[]}}</view> -->
</block>
</view>
</block>
<view class="tips" wx:if="{{currentPage == pages&&tableList.length>13}}">到底了~</view>
<view class="tips" wx:if="{{ currentPage == pages&&tableList.length>13 }}">到底了~</view>
</scroll-view>
</view>
</block>
<block wx:if="{{!tableList.length}}">
<block wx:if="{{ !tableList.length }}">
<!-- <view class="tips-nothing">暂无数据</view> -->
<!-- <view class=" noListText">
<image
......@@ -141,4 +127,10 @@
</view>
</view>
</view>
<store-picker
subIndex="{{ subIndex }}"
pickList="{{ merchantRange }}"
show="{{ showPicker }}"
bindsearch="getStoreList"
bindconfirm="changePicker"
/>
\ No newline at end of file
......@@ -58,7 +58,7 @@ Page({
},
selectPayType: 2,
remark: '',
customerCouponId:'',
customerCouponId: ''
},
goodsList: [],
goodsData: [],
......@@ -148,7 +148,7 @@ Page({
orderObj,
goodsList
})
this.setGoodsTotal(goodsList)
// this.setGoodsTotal(goodsList)
}
}
this.setData({
......@@ -217,7 +217,7 @@ Page({
this.showToast('单价不可低于商品最低价')
}
let { goodsList } = this.data
this.setGoodsTotal(goodsList)
// this.setGoodsTotal(goodsList)
},
priceBlur(e) {
let { index, item } = e.currentTarget.dataset
......@@ -227,16 +227,16 @@ Page({
})
let { goodsList } = this.data
this.setGoodsTotal(goodsList)
// this.setGoodsTotal(goodsList)
},
setGoodsTotal(goodsList) {
let { totalFee } = this.data
let total = 0
// goodsList.map(i => (total += i.count * i.price))
goodsList.map(i =>{
const totalPrice = NP.times(i.count,i.price)
total = NP.plus(total,totalPrice)
} )
goodsList.map(i => {
const totalPrice = NP.times(i.count, i.price)
total = NP.plus(total, totalPrice)
})
// 用来解决小数相减导致精度问题
// total = this.accMul(total, 100)
total = NP.times(total, 100)
......@@ -249,7 +249,7 @@ Page({
// console.log(this.accMul(total, 100))
// 解决数据精度丢失问题
// let priceSpread = goodsList.length ? parseFloat((total - totalFee).toFixed(2)) : 0
let priceSpread = goodsList.length ? NP.minus(total,totalFee): 0
let priceSpread = goodsList.length ? NP.minus(total, totalFee) : 0
// console.log(priceSpread)
this.setData({
priceSpread: priceSpread,
......@@ -302,7 +302,7 @@ Page({
this.setData({
goodsList
})
this.setGoodsTotal(goodsList)
// this.setGoodsTotal(goodsList)
},
submit(i) {
// 判断手机号是否用配置的默认值
......@@ -406,14 +406,45 @@ Page({
this.setData({
disabled: true
})
// console.log(object);
// const orderObj = {
// couponName: "流程测试新建001",
// customer: {customerName: "张立顺",
// customerPhone: "15817639334",
// customerSex: "2",
// experienceFlag: "Y",
// plateNumber: "",
// standNo: ""},
// customerCouponCode: "GH151S",
// employeeName: "刘伟",
// merchantCouponId: 11385,
// merchantId: 44211116,
// merchantName: "流程测试4s店",
// outTradeNo: "0120230630676252458305200128",
// remark: "",
// selectPayType: 2,
// sellerMerchantId: 44211025,
// sellerMerchantName: "流程测试园区门店",
// sellerName: "zhangls",
// sellerUserId: "bfe4919ab01143e5844846ef92aa3db3",
// subOrderList: [
// {baseGoodsId: null, totalPrice: 0.1, number: 1, merchantGoodsId: 7213},
// {baseGoodsId: null, totalPrice: 0.1, number: 1, merchantGoodsId: 5897}
// ],
// subShopMerchantId: 44211746,
// subShopMerchantName: "test_xjq03",
// // userId: "cbe5621e7afa4ccaac1b279c2a2ee98d",
// }
console.log(orderObj);
// return
api
.supplementOrder(orderObj)
.then(res => {
wx.hideLoading()
// console.log(orderObj, res)
let { code, data, message } = res
let { code, data, message,subErrors } = res
if (code == 0) {
if (save) {
wx.showModal({
......@@ -439,6 +470,8 @@ Page({
}
} else {
this.showToast(message)
// console.log(subErrors);
throw subErrors
}
})
.finally(() => {
......@@ -687,7 +720,7 @@ Page({
goodsList: chooseList,
first: false
})
this.setGoodsTotal(chooseList)
// this.setGoodsTotal(chooseList)
},
getSetting() {
......
......@@ -81,7 +81,8 @@ module.exports = {
1: '微信支付',
2: '门店收款',
3: 'pos机支付',
4: '支付宝支付'
4: '支付宝支付',
5: '嘀加收款'
},
orderType: [
{
......
......@@ -12,8 +12,12 @@ export function setSessionId(sessionId) {
export function getNoSignInUuid() {
return $Storage.get('noSignInUuid')
}
export function rmNoSignInUuid() {
return $Storage.rm('noSignInUuid')
}
export function setNoSignInUuid(noSignInUuid) {
$Storage.set('noSignInUuid', noSignInUuid)
console.log($Storage.get('noSignInUuid'),'St(noSignInUuid)');
}
export function getUserInfo() {
return $Storage.get('userInfo')
......
......@@ -4,6 +4,10 @@ import qs from '~/utils/lib/qs'
const path = '/rop-dj-car-boutique/router'
const sign = (params, secret, noSignAttr = []) => {
delete params.sign
// if (params.sessionId&&params.method!='dj.api.smartcarlife.workWechat.listSelectAccount') {
// delete params.sessionId
// }
var objStr = qs.stringify(params, {
arrayFormat: 'indices',
allowDots: true,
......
......@@ -21,6 +21,11 @@ class Request {
}
: {}
data = _this.getData(data, method, noSignAttr)
// console.log('reqData',data?.sessionId);
// delete
// if (data?.sessionId) {
// delete data?.sessionId
// }
wx.request({
url: `${domain[domainName]}${requestPath || path}?method=${method}`,
data,
......@@ -31,7 +36,7 @@ class Request {
success(response) {
/**业务代码 */
let {
data: { code, message },
data: { code, message, subErrors},
data
} = response
......@@ -42,7 +47,13 @@ class Request {
if (thisPage.route != 'pages/wxLogin/wxLogin') {
getApp().login(true)
}
} else if (code == -1) {
}
// else if (code == 32){
// resolve(data)
// // console.log(subErrors);
// throw subErrors
// }
else if (code == -1) {
wx.showToast({
title: message || '网络请求失败',
icon: 'none'
......
......@@ -191,15 +191,23 @@ const isFullSucreen = isComponents => {
success(res) {
// console.log(res)
let { statusBarHeight, screenHeight, windowHeight, safeArea } = res
// console.log(statusBarHeight, screenHeight, windowHeight, safeArea)
// const { screenHeight, safeArea } = res
const { bottom } = safeArea
// console.log(bottom)
// console.log(router.isTab, 'router.isTab')
// windowHeight 属性会在自定义导航栏时跟screenHeight 一样导致无法区分是否是iphoneX的机型
// 用safeArea可以处理
val = router.isTab ? screenHeight - windowHeight - statusBarHeight - 32 > 72 : screenHeight - bottom > 0
// val = router.isTab ? screenHeight - windowHeight - statusBarHeight - 32 > 72 : screenHeight - windowHeight > 72
// if (isComponents) val = screenHeight - windowHeight > 72
if (isComponents) val = screenHeight - bottom > 0
// console.log(router, 'route')
// if (router.url.includes('tabIndex/pages/index/index')) {
// // console.log('当前页面为 TabBar 页面');
// val = true
// }
},
fail(err) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!