Commit 52f9ae33 by 张立顺

Merge branch 'SAAS+V4.53.2' into SAAS+V4.53.1-0610

2 parents 8eb59da8 af173262
......@@ -85,62 +85,62 @@ Component({
strTemp
} = this.data;
let result = goodsList[index].multipleSpecificationsGoods.specificationList.every(item => item.value)
console.log(result, goodsList[index],1)
if (result) {
if (!cancel) {
console.log(result, goodsList[index], 1)
if (result) {
if (!cancel) {
let arr = []
goodsList[index].multipleSpecificationsGoods.specificationList.forEach(spec => {
arr.push(spec.value)
})
let str = arr.join(';~;')
// strTemp用来存储上一次选中的值,判断规格是否重新选择 ,避免页面交互闪烁
// if (type && str != strTemp) {
//获取该规格的商品是否存在
console.log(str)
if( goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str]){
goodsList[index].active = true
console.log(goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str],'str')
//获取该规格的商品是否存在
console.log(str)
if (goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str]) {
goodsList[index].active = true
console.log(goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str], 'str')
goodsList[index].multipleSpecificationsGoods.goods = goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str]
goodsList[index].multipleSpecificationsGoods.goods.goodsId = goodsList[index].multipleSpecificationsGoods.goods.merchantGoodsId
goodsList[index].multipleSpecificationsGoods.goods.specificationStr = goodsList[index].multipleSpecificationsGoods.goods.specificationData.replace(/;~;/g, '/')
}else{
console.log(88888)
wx.$util.showToast('暂无该规格商品')
goodsList[index].active=false
goodsList[index].multipleSpecificationsGoods.goods = ''
goodsList[index].multipleSpecificationsGoods.specificationList.forEach(item => {
item.value = ''
})
} else {
console.log(88888)
wx.$util.showToast('暂无该规格商品')
goodsList[index].active = false
goodsList[index].multipleSpecificationsGoods.goods = ''
goodsList[index].multipleSpecificationsGoods.specificationList.forEach(item => {
item.value = ''
})
}
}
this.setData({
goodsList,
strTemp: str
}, () => {
//同步更新
this.synchronousChange(goodsList[index])
})
} else {
if (goodsList[index].active) {
goodsList[index].active = false
goodsList[index].multipleSpecificationsGoods.goods = ''
goodsList[index].multipleSpecificationsGoods.specificationList.forEach(item => {
item.value = ''
})
console.log(33333, goodsList)
this.setData({
goodsList,
strTemp: str
goodsList
}, () => {
//同步更新
this.synchronousChange(goodsList[index])
})
}else{
if(goodsList[index].active){
goodsList[index].active=false
goodsList[index].multipleSpecificationsGoods.goods = ''
goodsList[index].multipleSpecificationsGoods.specificationList.forEach(item => {
item.value = ''
})
console.log(33333, goodsList)
this.setData({
goodsList
},()=>{
this.synchronousChange(goodsList[index])
})
}
}
}
}
return result
return result
},
setGoodsActive(isFlag) {
if (this.data.show) {
......@@ -150,7 +150,7 @@ Component({
goodsData
// recordList
} = this.data
console.log(chooseGoodsList, goodsList,goodsData, 'goodsList')
console.log(chooseGoodsList, goodsList, goodsData, 'goodsList')
let chooseList = [];
goodsData.map((e) => {
if (e.active) {
......@@ -359,7 +359,7 @@ Component({
} = this.data;
//单独处理多规格商品点击事件
if (item.goodsFlag == 2) {
if (!this.watchAllChose(ind,true)) {
if (!this.watchAllChose(ind, true)) {
wx.$util.showToast('请先选择该商品规格')
return
}
......@@ -386,22 +386,22 @@ Component({
if (i.goodsFlag == 1 && item.goods) {
if (i.goods.goodsId == item.goods.goodsId) {
i.active = item.active
i.count = item.count
i.count = item.count || 1
i.goods.sellPrice = item.goods.sellPrice
}
} else if (i.goodsFlag == 2 &&item.goodsFlag==2) {
if(i.multipleSpecificationsGoods.id==item.multipleSpecificationsGoods.id){
i.active = item.active
i.count = item.count
i.multipleSpecificationsGoods=item.multipleSpecificationsGoods
if(!item.active){
i.multipleSpecificationsGoods.goods=''
i.multipleSpecificationsGoods.specificationList.forEach(m=>{
m.value=''
})
}
}
} else if (i.goodsFlag == 2 && item.goodsFlag == 2) {
if (i.multipleSpecificationsGoods.id == item.multipleSpecificationsGoods.id) {
i.active = item.active
i.count = item.count || 1
i.multipleSpecificationsGoods = item.multipleSpecificationsGoods
if (!item.active) {
i.multipleSpecificationsGoods.goods = ''
i.multipleSpecificationsGoods.specificationList.forEach(m => {
m.value = ''
})
}
}
}
})
this.setData({
......@@ -423,10 +423,10 @@ Component({
console.log(target)
this.setData({
[target]: item.count,
},()=>{
}, () => {
this.synchronousChange(this.data.goodsList[ind])
});
},
input(e) {
let {
......@@ -443,7 +443,7 @@ Component({
this.setData({
[target]: Number(value),
},
()=>{
() => {
this.synchronousChange(this.data.goodsList[ind])
}
);
......
......@@ -29,6 +29,10 @@
&+.modalbox {
margin-top: 16rpx;
}
.txt {
font-size: 24rpx;
}
}
.act {
......
......@@ -4,11 +4,11 @@
<view class="modatcontent">
<view class="modalbox {{ selectType == 82?'act': '' }} com" bindtap="selectType" data-type="82">
<gl-image class="icon" src="/miniProgram/icon-invoice.png"></gl-image>
普通发票
普通发票<text class="txt">(税率6%)</text>
</view>
<view class="modalbox cancle {{ selectType == 81?'act': '' }}" bindtap="selectType" data-type="81">
<gl-image class="icon" src="/miniProgram/icon-invoice-add.png"></gl-image>
增值税专用发票
增值税专用发票<text class="txt">(税率6%)</text>
</view>
</view>
</modal>
\ No newline at end of file
......@@ -45,10 +45,10 @@ Component({
*/
let _this = this
// 获取屏幕宽度和高度
const { windowWidth, windowHeight } = wx.getSystemInfoSync();
const { windowWidth, windowHeight } = wx.getSystemInfoSync()
// 判断屏幕方向
const isLandscape = windowWidth > windowHeight; // '横屏' : '竖屏'
const isLandscape = windowWidth > windowHeight // '横屏' : '竖屏'
wx.getSystemInfo({
success(res) {
let {
......@@ -56,35 +56,36 @@ Component({
statusBarHeight,
screenWidth,
pixelRatio,
safeArea
safeArea,
platform
} = res
console.log(safeArea, 'safeArea');
const {
height,
right,
width,
top
} = wx.getMenuButtonBoundingClientRect()
console.log(safeArea, 'safeArea')
const { height, right, width, top } =
wx.getMenuButtonBoundingClientRect()
// 判断是否是华为平板设备
// && pixelRatio >= 2
let isPad = screenWidth >= 600
statusBarHeight = safeArea.top || statusBarHeight
statusBarHeight = platform == 'ios' ? safeArea.top : statusBarHeight
if (isLandscape) statusBarHeight = 0
// console.log(isPad, screenWidth, 'screenWidth');
// let navigationBarHeight = height + (top - statusBarHeight) * 2 + 5
let navigationBarHeight = `var(--fontSize${(height + (top - statusBarHeight) * 2) * (isPad ? 1 : 2)})`
let navigationBarHeight = `var(--fontSize${
(height + (top - statusBarHeight) * 2) * (isPad ? 1 : 2)
})`
let navigationBarPadding = screenWidth - right
let navigationBarWidth = screenWidth - (navigationBarPadding * 2 + width) - width
let navigationBarWidth =
screenWidth - (navigationBarPadding * 2 + width) - width
// if(deviceOrientation == 'landscape') statusBarHeight = 0
_this.setData({
statusBarHeight: `var(--fontSize${statusBarHeight * (isPad ? 1 : 2)})`,
statusBarHeight: `var(--fontSize${
statusBarHeight * (isPad ? 1 : 2)
})`,
navigationBarHeight,
// navigationBarStyle: `font-size:${fontSizeSetting}px;`,
navigationBarStyle: 'font-size: var(--fontSize34)',
navigationBarTextWidth: `width:${navigationBarWidth}px;padding:0 ${navigationBarPadding}px; 0 ${navigationBarPadding}px;`
})
},
complete() {
// console.log('#navigation-bar');
......@@ -103,7 +104,6 @@ Component({
// }, 0)
}
})
}
},
pageLifetimes: {
......@@ -112,11 +112,11 @@ Component({
// this.setData({
// statusBarHeight: 0
// })
// else
// else
this.init()
}
},
ready() {
this.init()
}
})
\ No newline at end of file
})
<view class='navigation-bar' id='navigation-bar' style='padding-top:{{navigationBarHeight}};height:{{navigationBarHeight}};{{navStyle}}'>
<!-- hidden="{{!showNavBar}}" wx:if="{{showNavBar}}" -->
<!-- <view class="navigation-bar-box" style="{{navigationBarStyle}}"> -->
<view class="navigation-bar-box">
<view class="navigation-bar-titleText" style="{{navigationBarTextWidth}}">
<slot />
</view>
<block wx:if="{{showBack}}">
<view class="back-box" bindtap="back">
<view class="back">
<image src="../../images/back.png" />
</view>
</view>
</block>
<block wx:if="{{showMenu}}">
<view class="menu-box" bindtap="showMenuPopup">
<view class="menu-class">
<image wx:if="{{showWhiteMenu}}" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/nav-bar-menu.png" />
<image wx:else src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/navgation-bar-menu.png" />
</view>
</view>
</block>
</view>
<view
class="navigation-bar"
id="navigation-bar"
style="padding-top:{{ statusBarHeight}};height:{{navigationBarHeight}};{{navStyle }}"
>
<!-- hidden="{{!showNavBar}}" wx:if="{{showNavBar}}" -->
<!-- <view class="navigation-bar-box" style="{{navigationBarStyle}}"> -->
<view class="navigation-bar-box">
<view class="navigation-bar-titleText" style="{{ navigationBarTextWidth }}">
<slot />
</view>
<block wx:if="{{ showBack }}">
<view class="back-box" bindtap="back">
<view class="back">
<image src="../../images/back.png" />
</view>
</view>
</block>
<block wx:if="{{ showMenu }}">
<view class="menu-box" bindtap="showMenuPopup">
<view class="menu-class">
<image wx:if="{{ showWhiteMenu }}" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/nav-bar-menu.png" />
<image wx:else src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/navgation-bar-menu.png" />
</view>
</view>
</block>
</view>
</view>
\ No newline at end of file
......@@ -7,9 +7,9 @@
z-index: 99;
box-shadow: 0 var(--fontSize1) 0 0 #E9E9E9;
background-color: #fff;
/* padding-top: 40px; */
/* padding-top: env(safe-area-inset-top); */
/* padding-top: constant(safe-area-inset-top); */
/* padding-top: env(safe-area-inset-top); */
/* padding-top: 40px; */
}
......
......@@ -276,6 +276,18 @@
position: relative;
color: #222222;
}
.goods-box .goods{
display: flex;
align-items: center;
justify-content: space-between;
min-height: var(--fontSize118);
border-bottom: var(--fontSize2) solid rgba(195, 195, 195, .3);
padding: 20rpx var(--fontSize28) 20rpx var(--fontSize90);
font-size: var(--fontSize28);
background: #F5F5F7;
position: relative;
color: #222222;
}
.goods .package {
background: #fff;
......@@ -548,4 +560,17 @@
.alias{
font-size: 12px;
color: #222222!important;
}
.bottom_box{
display: flex;
align-items: center;
justify-content: space-between;
}
.bottom_box .position {
color: #888888;
}
.bottom_box .right{
display: flex;
align-items: center;
justify-content: space-between;
}
\ No newline at end of file
......@@ -24,7 +24,7 @@
</view>
<view class="name ">
<!-- -->
{{item.goods.goodsAlias || item.goods.goodsNameAlias|| filter.replaceItemText(item.goods.upgradeGoodsName ,( item.goods.specificationData? '/'+item.goods.specificationData:'')) || filter.replaceItemText(item.goods.goodsName, (item.goods.specificationData? '/'+item.goods.specificationData:''))}}
{{item.goods.goodsAlias || item.goods.goodsNameAlias|| filter.replaceItemText(item.goods.upgradeGoodsName ,( item.goods.specificationData? '/'+item.goods.specificationData:'')) || filter.replaceItemText(item.goods.goodsName, (item.goods.specificationData? '/'+item.goods.specificationData:''))}}
<!-- {{filter.replaceItemText(item.goods.goodsAlias) ||filter.replaceItemText(item.goods.upgradeGoodsName) || filter.replaceItemText(item.goods.goodsName)}} -->
</view>
<view class="price-box">
......@@ -47,7 +47,7 @@
</view>
<view class="packageBox">
<view class="itemSty" wx:for="{{ item.packageGoods.goodsList }}" wx:key="childind" wx:for-index="childind" wx:for-item="child">
<view class="name ">{{child.goodsAlias || child.goodsNameAlias || filter.replaceItemText(child.upgradeGoodsName , (item.specificationData? '/'+child.specificationData: '') ) ||filter.replaceItemText(child.goodsName ,( item.specificationData? '/'+child.specificationData: '') ) }}</view>
<view class="name ">{{child.goodsAlias || child.goodsNameAlias || filter.replaceItemText(child.upgradeGoodsName , (item.specificationData? '/'+child.specificationData: '') ) ||filter.replaceItemText(child.goodsName ,( item.specificationData? '/'+child.specificationData: '') ) }}</view>
<view class="price-box">
<text>¥</text>
<view class="price">
......@@ -59,29 +59,33 @@
</view>
</view>
<!-- 多规格 -->
<view class="goods" wx:if="{{ item.multipleSpecificationsGoods }}">
<view class="goods" wx:if="{{ item.multipleSpecificationsGoods }}">
<view class="icon" bindtap="delGoodsList" data-index="{{ index }}">
<image src="./images/del.png" />
</view>
<view class="name ">
<!-- -->
<view class="alias" wx:if="{{item.multipleSpecificationsGoods.goods.goodsAlias}}">
<view class="goods-content" >
<view class="alias" wx:if="{{item.multipleSpecificationsGoods.goods.goodsAlias}}" >
商品别名:{{item.multipleSpecificationsGoods.goods.goodsAlias}}
</view>
<view class="bottom_box">
<view class="name left">
<view class="name">{{item.multipleSpecificationsGoods.baseGoodsName}}</view>
<view class="position" wx:if="{{ item.multipleSpecificationsGoods.goods.specificationStr }}">{{item.multipleSpecificationsGoods.goods.specificationStr}}</view>
</view>
<view class="right">
<view class="price-box">
<text>¥</text>
<view class="price">
<input type="digit" value="{{item.multipleSpecificationsGoods.goods.price}}" bindinput="changeSpecific" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.multipleSpecificationsGoods.goods.checkError ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view>
</view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox">x{{item.count||1}}</view>
</view>
<view>{{item.multipleSpecificationsGoods.baseGoodsName}}</view>
<view class="position" wx:if="{{ item.multipleSpecificationsGoods.goods.specificationStr }}">{{item.multipleSpecificationsGoods.goods.specificationStr}}</view>
</view>
<view class="price-box">
<text>¥</text>
<view class="price">
<input type="digit" value="{{item.multipleSpecificationsGoods.goods.price}}" bindinput="changeSpecific" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.multipleSpecificationsGoods.goods.checkError ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view>
</view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox">x{{item.count||1}}</view>
</view>
</block>
<view class="goods total-box">
<view>总价</view>
......
......@@ -155,7 +155,7 @@
<block wx:if="{{ !userInfo.isSuper && userInfo.userType == 2||staffUuid }}">
<block wx:if="{{ item.zyPayStatus == 1 && (item.orderStatus == 3 || item.orderStatus == 4 || item.orderStatus == 7) }}">
<view class="btn_class">
<block wx:if="{{item.showInvoiceEntrance}}">
<block wx:if="{{item.showInvoiceEntrance || item.invoicing == 2}}">
<view class="order-btn default-btn padding_20" bindtap="handleMoreBtn" data-target="{{ item }}">更多</view>
</block>
<block wx:if="{{ item.orderStatus != '0' }}">
......
......@@ -24,6 +24,7 @@ Page({
onLoad(options) {
this.getTabHeight()
this.getSceneMarketMaterialMenu()
this.getAIUrl()
},
/**
......
......@@ -2,6 +2,7 @@ import {
getSceneMarketMaterialMenu,
getSceneMarketMaterialList,
enterPageTrack,
getAiagent
} from '../request'
import dayjs from 'dayjs'
export default {
......@@ -148,8 +149,35 @@ export default {
})
},
jumpAI() {
wx.navigateToMiniProgram({
appId: 'wx4cc95d0fd0729c32'
if (this.aiUrl) wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(this.aiUrl)}`
})
else {
wx.$util.showToast('暂无权限')
this.getAIUrl()
}
},
async getAIUrl() {
const {
phone,
uuid
} = this.data.userInfo, {
code,
data
} = await getAiagent({
accountPhone: phone,
ownerShipType: 0,
agentCode: 'AI6'
})
if (code == 0 && data && data.length) {
let [item] = data, {
ownerPost,
agentUrl,
domainName,
presuppositionProblem,
accountPhone
} = item
this.aiUrl = `${agentUrl}?one_id=${uuid}&platformType=0&phone=${accountPhone}&position=${ownerPost}&domain=${domainName}&presuppositionProblem=`
}
}
}
\ No newline at end of file
......@@ -43,7 +43,14 @@ module.exports = {
leavePageTrack(data = {}) {
return api.post('dj.api.customer.dynamic.record.leave', data)
},
getSceneMarketConfig(){
getSceneMarketConfig() {
return api.getMock('scene-market-config')
}
},
getAiagent(data = {}) {
return api.post('dj.pad.api.aiagent.get.special.agent',
data,
[],
"/rop-dj-pad/router",
"dj")
},
}
\ No newline at end of file
......@@ -38,14 +38,14 @@
<view class="title">商品</view>
<view class="meal-box" wx:for="{{orderInfo.packageGoodsList}}">
<view class="meal-hd">
<view>{{item.packageName}}</view>
<view>{{item.packageAlias||item.packageName}}</view>
<view class="price">¥{{item.totalPrice}}</view>
</view>
<view class="meal-bd">
<view class="meal-bd-box" wx:for="{{item.packageGoodsOrderList}}" wx:for-item="g">
<view class="meal-bd-head">
<view class="dot"></view>
<view class="name">{{g.upgradeGoodsName||g.upgradeGoodsAlias}}</view>
<view class="name">{{g.upgradeGoodsAlias||g.upgradeGoodsName}}</view>
<view class="price">¥{{g.price}}</view>
</view>
<view class="meal-bd-bottom">{{g.upgradeGoodsType===1?g.positionStr: g.upgradeGoodsTypeName}}
......
......@@ -105,7 +105,7 @@
<view class="box">
<view class="title infoTitle">
<view class="flex">工单信息
<view wx:if="{{orderInfo.showInvoiceEntrance}}" class="invoice-btn" bindtap="handleBtnInvoice">
<view wx:if="{{orderInfo.showInvoiceEntrance || orderInfo.invoiceStatus == 2}}" class="invoice-btn" bindtap="handleBtnInvoice">
<gl-image class="icon" src="/icon-invoice.png"></gl-image>
{{invoiceName}}
</view>
......
......@@ -830,7 +830,7 @@ Page({
}
let obj = {
baseGoodsId: e.goods.baseGoodsId,
totalPrice: Number(e.goods.price),
totalPrice: Number(e.goods.sellPrice),
number: e.count,
merchantGoodsId: e.goods.id || e.goods.merchantGoodsId,
};
......@@ -862,7 +862,7 @@ Page({
}
let obj = {
baseGoodsId: e.multipleSpecificationsGoods.goods.baseGoodsId,
totalPrice: Number(e.multipleSpecificationsGoods.goods.price),
totalPrice: Number(e.multipleSpecificationsGoods.goods.sellPrice),
number: e.count,
merchantGoodsId: e.multipleSpecificationsGoods.goods.id || e.multipleSpecificationsGoods.goods.merchantGoodsId,
};
......@@ -1447,9 +1447,10 @@ Page({
} = orderObj;
let chooseList = [];
subOrderList = subOrderList.concat(packageGoodsList)
if (subOrderList && subOrderList.length) {
subOrderList = subOrderList.concat(packageGoodsList)
subOrderList.map((e) => {
// 是普通商品
if (e && !e.packageName) {
......@@ -1532,6 +1533,7 @@ Page({
this.setGoodsTotal(chooseList);
},
handleSpecificationsEcho(item) {
console.log(item)
let {
otherProduct
} = this.data,
......@@ -1555,6 +1557,7 @@ Page({
goods: {
...tempData,
price: item.price,
sellPrice: item.price,
goodsId: item.goodsId,
specificationStr: item.specificationData.replace(/;~;/g, '/')
}
......
......@@ -95,7 +95,7 @@
<view class="box">
<view class="title invoice">
工单信息
<view wx:if="{{orderInfo.showInvoiceEntrance}}" class="invoice-btn" bindtap="handleBtnInvoice">
<view wx:if="{{orderInfo.showInvoiceEntrance || orderInfo.invoiceStatus == 2}}" class="invoice-btn" bindtap="handleBtnInvoice">
<gl-image class="icon" src="/icon-invoice.png"></gl-image>
{{invoiceName}}
</view>
......
......@@ -7,7 +7,7 @@
</view>
<view class="box">
<view class="title invoice">信息确认
<view wx:if="{{orderInfo.showInvoiceEntrance}}" class="invoice-btn" bindtap="handleBtnInvoice">
<view wx:if="{{orderInfo.showInvoiceEntrance || orderInfo.invoiceStatus == 2}}" class="invoice-btn" bindtap="handleBtnInvoice">
<gl-image class="icon" src="/icon-invoice.png"></gl-image>
{{invoiceName}}
</view>
......
......@@ -8,7 +8,9 @@ import {
} from './constant'
import api from '../../api'
import apiCon from '~/api/api'
import { getYQInfo } from '~/store/index'
import {
setConfigInfo
} from "~/store/index";
import comApi from '~/api/api'
let toastList = {
deliveryCount: '新车交付数不能为空',
......@@ -840,7 +842,7 @@ Page({
value = number
}
if (decimal == '') {
console.log(value)
// console.log(value)
this.setData({
[`carBandList[${index}].${name}`]: value
})
......@@ -893,9 +895,9 @@ Page({
var timeBean = this.data.timeBean
// console.log(timeBean.weekDayList[6].date, 'timeBean.weekDayList[6].date');
// timeBean = util.getWeekDayList(selectWeek, timeBean.weekDayList[6].date)
console.log(selectWeek)
// console.log(selectWeek)
timeBean = util.getWeekDayList(selectWeek)
console.log(timeBean, 'nextWeek')
// console.log(timeBean, 'nextWeek')
if (selectWeek != 0) {
timeBean.selectDay = 0
}
......@@ -952,14 +954,22 @@ Page({
merchantId: orderObj.merchantId,
sceneType: 0
})
console.log(result, 'result')
const {
carBandId
} = await setConfigInfo({});
console.log(result, carBandId, 'result')
let { code, data } = result
// let reportType = 0
let carBandList = []
let isHmStore = false
if (code && data.length) {
// reportType = 1
// 判断车型是否包含鸿蒙智享,包含不给切换模板列表
carBandList = data.map(item => {
let el = { ...item }
if (item.firstBrandId == carBandId) {
isHmStore = true
}
if (item.brandType == 0) {
hwObjArray.forEach(e => {
el[e.key] = null
......@@ -975,8 +985,11 @@ Page({
} else {
carBandList = []
}
this.setData({
// reportType,
isHmStore,
carBandList
})
this.getStaffReport()
......@@ -1022,7 +1035,8 @@ Page({
carBandList,
hwObjArray,
hwOhterObjArray,
otherObjArray
otherObjArray,
isHmStore
} = this.data
this.setData({
currentWordNumber: 0, // 清空备注字数
......@@ -1123,7 +1137,7 @@ Page({
['orderObj.glWorryFreeCount']: data.glWorryFreeCount,
['orderObj.cancelOrderCount']: data.cancelOrderCount,
['orderObj.cancelOrderMoney']: data.cancelOrderMoney,
['orderObj.templateType']: data.templateType || 1,
['orderObj.templateType']: isHmStore ? 1 : data.templateType || 1, // 是鸿蒙那就默认只能单店延保
['orderObj.staffCount']: data.staffCount,
['orderObj.onBreak']: data.onBreak || 'N',
['orderObj.pickerValue']: data.onBreak == 'Y' ? 1 : 0,
......@@ -1323,11 +1337,11 @@ Page({
reportDate,
new Date().format('yyyy-MM-dd')
)
console.log(new Date().getDay(), 'dateisSunday.getDay()')
// console.log(new Date().getDay(), 'dateisSunday.getDay()')
if (new Date().getDay() === 0) {
countSundays = countSundays - 1
}
console.log(countSundays, 'countSundays')
// console.log(countSundays, 'countSundays')
this.setData({
timeBean: util.getWeekDayList(0 - countSundays),
selectWeek: 0 - countSundays,
......@@ -1390,13 +1404,13 @@ Page({
// 4s店-员工-员工数据 的请求逻辑
this.getListShop4s({}, true)
}
console.log(this.data, 'roleOther')
// console.log(this.data, 'roleOther')
},
countSundays(startDate, endDate) {
let start = new Date(startDate)
console.log('start', start)
// console.log('start', start)
let end = new Date(endDate)
console.log('end', end)
// console.log('end', end)
let sundays = 0
// 遍历日期范围
for (
......
......@@ -17,12 +17,12 @@
<view class="mainheader">
<view class="title">日报切换</view>
<view class="navigation-title templateNameTitle" bindtap="showStaffPicker">
<picker bindchange="handleTemplagePickerChange" value="{{ orderObj.templateType-1 }}" range-key="name" range="{{ pickerTemplateList }}">
<picker bindchange="handleTemplagePickerChange" value="{{ orderObj.templateType-1 }}" range-key="name" range="{{ pickerTemplateList }}" disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) || isHmStore}}">
<view class="picker">
<view class="text-hide templateName">{{pickerTemplateList[orderObj.templateType-1]['name']}}</view>
</view>
</picker>
<view class="arrow">
<view class="arrow" wx:if="{{!isHmStore}}">
<image src="/images/arrow_bottom.png" />
</view>
</view>
......@@ -44,7 +44,7 @@
<text class="required_text"> *</text>
</view>
</view>
<picker bindchange="handlePickerChange" bindcancel="showShortcutPicker" value="{{ orderObj.pickerValue }}" range-key="name" range="{{ pickerdateList }}">
<picker bindchange="handlePickerChange" bindcancel="showShortcutPicker" value="{{ orderObj.pickerValue }}" range-key="name" range="{{ pickerdateList }}" disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) }}">
<view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide">{{pickerdateList[orderObj.pickerValue]['name']}}</view>
......
......@@ -114,6 +114,7 @@ class Request {
if (!apiName) {
throw new Error('apiName is null')
}
if(apiName.split('.').length > 1) apiName = apiName.split('.')[0]
if (merchant) apiName = 'merchants'
const appKey = secretKey[apiName].appKey
const secret = secretKey[apiName].secret
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!