Commit 52f9ae33 by 张立顺

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

2 parents 8eb59da8 af173262
...@@ -85,7 +85,7 @@ Component({ ...@@ -85,7 +85,7 @@ Component({
strTemp strTemp
} = this.data; } = this.data;
let result = goodsList[index].multipleSpecificationsGoods.specificationList.every(item => item.value) let result = goodsList[index].multipleSpecificationsGoods.specificationList.every(item => item.value)
console.log(result, goodsList[index],1) console.log(result, goodsList[index], 1)
if (result) { if (result) {
if (!cancel) { if (!cancel) {
...@@ -99,16 +99,16 @@ Component({ ...@@ -99,16 +99,16 @@ Component({
// if (type && str != strTemp) { // if (type && str != strTemp) {
//获取该规格的商品是否存在 //获取该规格的商品是否存在
console.log(str) console.log(str)
if( goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str]){ if (goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str]) {
goodsList[index].active = true goodsList[index].active = true
console.log(goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str],'str') console.log(goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str], 'str')
goodsList[index].multipleSpecificationsGoods.goods = goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str] goodsList[index].multipleSpecificationsGoods.goods = goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str]
goodsList[index].multipleSpecificationsGoods.goods.goodsId = goodsList[index].multipleSpecificationsGoods.goods.merchantGoodsId goodsList[index].multipleSpecificationsGoods.goods.goodsId = goodsList[index].multipleSpecificationsGoods.goods.merchantGoodsId
goodsList[index].multipleSpecificationsGoods.goods.specificationStr = goodsList[index].multipleSpecificationsGoods.goods.specificationData.replace(/;~;/g, '/') goodsList[index].multipleSpecificationsGoods.goods.specificationStr = goodsList[index].multipleSpecificationsGoods.goods.specificationData.replace(/;~;/g, '/')
}else{ } else {
console.log(88888) console.log(88888)
wx.$util.showToast('暂无该规格商品') wx.$util.showToast('暂无该规格商品')
goodsList[index].active=false goodsList[index].active = false
goodsList[index].multipleSpecificationsGoods.goods = '' goodsList[index].multipleSpecificationsGoods.goods = ''
goodsList[index].multipleSpecificationsGoods.specificationList.forEach(item => { goodsList[index].multipleSpecificationsGoods.specificationList.forEach(item => {
item.value = '' item.value = ''
...@@ -122,9 +122,9 @@ Component({ ...@@ -122,9 +122,9 @@ Component({
//同步更新 //同步更新
this.synchronousChange(goodsList[index]) this.synchronousChange(goodsList[index])
}) })
}else{ } else {
if(goodsList[index].active){ if (goodsList[index].active) {
goodsList[index].active=false goodsList[index].active = false
goodsList[index].multipleSpecificationsGoods.goods = '' goodsList[index].multipleSpecificationsGoods.goods = ''
goodsList[index].multipleSpecificationsGoods.specificationList.forEach(item => { goodsList[index].multipleSpecificationsGoods.specificationList.forEach(item => {
item.value = '' item.value = ''
...@@ -132,7 +132,7 @@ Component({ ...@@ -132,7 +132,7 @@ Component({
console.log(33333, goodsList) console.log(33333, goodsList)
this.setData({ this.setData({
goodsList goodsList
},()=>{ }, () => {
this.synchronousChange(goodsList[index]) this.synchronousChange(goodsList[index])
}) })
} }
...@@ -150,7 +150,7 @@ Component({ ...@@ -150,7 +150,7 @@ Component({
goodsData goodsData
// recordList // recordList
} = this.data } = this.data
console.log(chooseGoodsList, goodsList,goodsData, 'goodsList') console.log(chooseGoodsList, goodsList, goodsData, 'goodsList')
let chooseList = []; let chooseList = [];
goodsData.map((e) => { goodsData.map((e) => {
if (e.active) { if (e.active) {
...@@ -359,7 +359,7 @@ Component({ ...@@ -359,7 +359,7 @@ Component({
} = this.data; } = this.data;
//单独处理多规格商品点击事件 //单独处理多规格商品点击事件
if (item.goodsFlag == 2) { if (item.goodsFlag == 2) {
if (!this.watchAllChose(ind,true)) { if (!this.watchAllChose(ind, true)) {
wx.$util.showToast('请先选择该商品规格') wx.$util.showToast('请先选择该商品规格')
return return
} }
...@@ -386,18 +386,18 @@ Component({ ...@@ -386,18 +386,18 @@ Component({
if (i.goodsFlag == 1 && item.goods) { if (i.goodsFlag == 1 && item.goods) {
if (i.goods.goodsId == item.goods.goodsId) { if (i.goods.goodsId == item.goods.goodsId) {
i.active = item.active i.active = item.active
i.count = item.count i.count = item.count || 1
i.goods.sellPrice = item.goods.sellPrice i.goods.sellPrice = item.goods.sellPrice
} }
} else if (i.goodsFlag == 2 &&item.goodsFlag==2) { } else if (i.goodsFlag == 2 && item.goodsFlag == 2) {
if(i.multipleSpecificationsGoods.id==item.multipleSpecificationsGoods.id){ if (i.multipleSpecificationsGoods.id == item.multipleSpecificationsGoods.id) {
i.active = item.active i.active = item.active
i.count = item.count i.count = item.count || 1
i.multipleSpecificationsGoods=item.multipleSpecificationsGoods i.multipleSpecificationsGoods = item.multipleSpecificationsGoods
if(!item.active){ if (!item.active) {
i.multipleSpecificationsGoods.goods='' i.multipleSpecificationsGoods.goods = ''
i.multipleSpecificationsGoods.specificationList.forEach(m=>{ i.multipleSpecificationsGoods.specificationList.forEach(m => {
m.value='' m.value = ''
}) })
} }
...@@ -423,7 +423,7 @@ Component({ ...@@ -423,7 +423,7 @@ Component({
console.log(target) console.log(target)
this.setData({ this.setData({
[target]: item.count, [target]: item.count,
},()=>{ }, () => {
this.synchronousChange(this.data.goodsList[ind]) this.synchronousChange(this.data.goodsList[ind])
}); });
...@@ -443,7 +443,7 @@ Component({ ...@@ -443,7 +443,7 @@ Component({
this.setData({ this.setData({
[target]: Number(value), [target]: Number(value),
}, },
()=>{ () => {
this.synchronousChange(this.data.goodsList[ind]) this.synchronousChange(this.data.goodsList[ind])
} }
); );
......
...@@ -29,6 +29,10 @@ ...@@ -29,6 +29,10 @@
&+.modalbox { &+.modalbox {
margin-top: 16rpx; margin-top: 16rpx;
} }
.txt {
font-size: 24rpx;
}
} }
.act { .act {
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
<view class="modatcontent"> <view class="modatcontent">
<view class="modalbox {{ selectType == 82?'act': '' }} com" bindtap="selectType" data-type="82"> <view class="modalbox {{ selectType == 82?'act': '' }} com" bindtap="selectType" data-type="82">
<gl-image class="icon" src="/miniProgram/icon-invoice.png"></gl-image> <gl-image class="icon" src="/miniProgram/icon-invoice.png"></gl-image>
普通发票 普通发票<text class="txt">(税率6%)</text>
</view> </view>
<view class="modalbox cancle {{ selectType == 81?'act': '' }}" bindtap="selectType" data-type="81"> <view class="modalbox cancle {{ selectType == 81?'act': '' }}" bindtap="selectType" data-type="81">
<gl-image class="icon" src="/miniProgram/icon-invoice-add.png"></gl-image> <gl-image class="icon" src="/miniProgram/icon-invoice-add.png"></gl-image>
增值税专用发票 增值税专用发票<text class="txt">(税率6%)</text>
</view> </view>
</view> </view>
</modal> </modal>
\ No newline at end of file \ No newline at end of file
...@@ -45,10 +45,10 @@ Component({ ...@@ -45,10 +45,10 @@ Component({
*/ */
let _this = this let _this = this
// 获取屏幕宽度和高度 // 获取屏幕宽度和高度
const { windowWidth, windowHeight } = wx.getSystemInfoSync(); const { windowWidth, windowHeight } = wx.getSystemInfoSync()
// 判断屏幕方向 // 判断屏幕方向
const isLandscape = windowWidth > windowHeight; // '横屏' : '竖屏' const isLandscape = windowWidth > windowHeight // '横屏' : '竖屏'
wx.getSystemInfo({ wx.getSystemInfo({
success(res) { success(res) {
let { let {
...@@ -56,35 +56,36 @@ Component({ ...@@ -56,35 +56,36 @@ Component({
statusBarHeight, statusBarHeight,
screenWidth, screenWidth,
pixelRatio, pixelRatio,
safeArea safeArea,
platform
} = res } = res
console.log(safeArea, 'safeArea'); console.log(safeArea, 'safeArea')
const { const { height, right, width, top } =
height, wx.getMenuButtonBoundingClientRect()
right,
width,
top
} = wx.getMenuButtonBoundingClientRect()
// 判断是否是华为平板设备 // 判断是否是华为平板设备
// && pixelRatio >= 2 // && pixelRatio >= 2
let isPad = screenWidth >= 600 let isPad = screenWidth >= 600
statusBarHeight = safeArea.top || statusBarHeight statusBarHeight = platform == 'ios' ? safeArea.top : statusBarHeight
if (isLandscape) statusBarHeight = 0 if (isLandscape) statusBarHeight = 0
// console.log(isPad, screenWidth, 'screenWidth'); // console.log(isPad, screenWidth, 'screenWidth');
// let navigationBarHeight = height + (top - statusBarHeight) * 2 + 5 // 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 navigationBarPadding = screenWidth - right
let navigationBarWidth = screenWidth - (navigationBarPadding * 2 + width) - width let navigationBarWidth =
screenWidth - (navigationBarPadding * 2 + width) - width
// if(deviceOrientation == 'landscape') statusBarHeight = 0 // if(deviceOrientation == 'landscape') statusBarHeight = 0
_this.setData({ _this.setData({
statusBarHeight: `var(--fontSize${statusBarHeight * (isPad ? 1 : 2)})`, statusBarHeight: `var(--fontSize${
statusBarHeight * (isPad ? 1 : 2)
})`,
navigationBarHeight, navigationBarHeight,
// navigationBarStyle: `font-size:${fontSizeSetting}px;`, // navigationBarStyle: `font-size:${fontSizeSetting}px;`,
navigationBarStyle: 'font-size: var(--fontSize34)', navigationBarStyle: 'font-size: var(--fontSize34)',
navigationBarTextWidth: `width:${navigationBarWidth}px;padding:0 ${navigationBarPadding}px; 0 ${navigationBarPadding}px;` navigationBarTextWidth: `width:${navigationBarWidth}px;padding:0 ${navigationBarPadding}px; 0 ${navigationBarPadding}px;`
}) })
}, },
complete() { complete() {
// console.log('#navigation-bar'); // console.log('#navigation-bar');
...@@ -103,7 +104,6 @@ Component({ ...@@ -103,7 +104,6 @@ Component({
// }, 0) // }, 0)
} }
}) })
} }
}, },
pageLifetimes: { pageLifetimes: {
......
<view class='navigation-bar' id='navigation-bar' style='padding-top:{{navigationBarHeight}};height:{{navigationBarHeight}};{{navStyle}}'> <view
class="navigation-bar"
id="navigation-bar"
style="padding-top:{{ statusBarHeight}};height:{{navigationBarHeight}};{{navStyle }}"
>
<!-- hidden="{{!showNavBar}}" wx:if="{{showNavBar}}" --> <!-- hidden="{{!showNavBar}}" wx:if="{{showNavBar}}" -->
<!-- <view class="navigation-bar-box" style="{{navigationBarStyle}}"> --> <!-- <view class="navigation-bar-box" style="{{navigationBarStyle}}"> -->
<view class="navigation-bar-box"> <view class="navigation-bar-box">
<view class="navigation-bar-titleText" style="{{navigationBarTextWidth}}"> <view class="navigation-bar-titleText" style="{{ navigationBarTextWidth }}">
<slot /> <slot />
</view> </view>
<block wx:if="{{showBack}}"> <block wx:if="{{ showBack }}">
<view class="back-box" bindtap="back"> <view class="back-box" bindtap="back">
<view class="back"> <view class="back">
<image src="../../images/back.png" /> <image src="../../images/back.png" />
</view> </view>
</view> </view>
</block> </block>
<block wx:if="{{showMenu}}"> <block wx:if="{{ showMenu }}">
<view class="menu-box" bindtap="showMenuPopup"> <view class="menu-box" bindtap="showMenuPopup">
<view class="menu-class"> <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: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" /> <image wx:else src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/navgation-bar-menu.png" />
</view> </view>
</view> </view>
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
z-index: 99; z-index: 99;
box-shadow: 0 var(--fontSize1) 0 0 #E9E9E9; box-shadow: 0 var(--fontSize1) 0 0 #E9E9E9;
background-color: #fff; background-color: #fff;
/* padding-top: 40px; */
/* padding-top: env(safe-area-inset-top); */
/* padding-top: constant(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 @@ ...@@ -276,6 +276,18 @@
position: relative; position: relative;
color: #222222; 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 { .goods .package {
background: #fff; background: #fff;
...@@ -549,3 +561,16 @@ ...@@ -549,3 +561,16 @@
font-size: 12px; font-size: 12px;
color: #222222!important; 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 \ No newline at end of file
...@@ -59,21 +59,21 @@ ...@@ -59,21 +59,21 @@
</view> </view>
</view> </view>
<!-- 多规格 --> <!-- 多规格 -->
<view class="goods" wx:if="{{ item.multipleSpecificationsGoods }}"> <view class="goods" wx:if="{{ item.multipleSpecificationsGoods }}">
<view class="icon" bindtap="delGoodsList" data-index="{{ index }}"> <view class="icon" bindtap="delGoodsList" data-index="{{ index }}">
<image src="./images/del.png" /> <image src="./images/del.png" />
</view> </view>
<view class="name ">
<!-- --> <view class="goods-content" >
<view class="alias" wx:if="{{item.multipleSpecificationsGoods.goods.goodsAlias}}"> <view class="alias" wx:if="{{item.multipleSpecificationsGoods.goods.goodsAlias}}" >
商品别名:{{item.multipleSpecificationsGoods.goods.goodsAlias}} 商品别名:{{item.multipleSpecificationsGoods.goods.goodsAlias}}
</view> </view>
<view>{{item.multipleSpecificationsGoods.baseGoodsName}}</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 class="position" wx:if="{{ item.multipleSpecificationsGoods.goods.specificationStr }}">{{item.multipleSpecificationsGoods.goods.specificationStr}}</view>
</view> </view>
<view class="right">
<view class="price-box"> <view class="price-box">
<text>¥</text> <text>¥</text>
<view class="price"> <view class="price">
...@@ -82,6 +82,10 @@ ...@@ -82,6 +82,10 @@
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox">x{{item.count||1}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox">x{{item.count||1}}</view>
</view> </view>
</view>
</view>
</view>
</block> </block>
<view class="goods total-box"> <view class="goods total-box">
<view>总价</view> <view>总价</view>
......
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
<block wx:if="{{ !userInfo.isSuper && userInfo.userType == 2||staffUuid }}"> <block wx:if="{{ !userInfo.isSuper && userInfo.userType == 2||staffUuid }}">
<block wx:if="{{ item.zyPayStatus == 1 && (item.orderStatus == 3 || item.orderStatus == 4 || item.orderStatus == 7) }}"> <block wx:if="{{ item.zyPayStatus == 1 && (item.orderStatus == 3 || item.orderStatus == 4 || item.orderStatus == 7) }}">
<view class="btn_class"> <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> <view class="order-btn default-btn padding_20" bindtap="handleMoreBtn" data-target="{{ item }}">更多</view>
</block> </block>
<block wx:if="{{ item.orderStatus != '0' }}"> <block wx:if="{{ item.orderStatus != '0' }}">
......
...@@ -24,6 +24,7 @@ Page({ ...@@ -24,6 +24,7 @@ Page({
onLoad(options) { onLoad(options) {
this.getTabHeight() this.getTabHeight()
this.getSceneMarketMaterialMenu() this.getSceneMarketMaterialMenu()
this.getAIUrl()
}, },
/** /**
......
...@@ -2,6 +2,7 @@ import { ...@@ -2,6 +2,7 @@ import {
getSceneMarketMaterialMenu, getSceneMarketMaterialMenu,
getSceneMarketMaterialList, getSceneMarketMaterialList,
enterPageTrack, enterPageTrack,
getAiagent
} from '../request' } from '../request'
import dayjs from 'dayjs' import dayjs from 'dayjs'
export default { export default {
...@@ -148,8 +149,35 @@ export default { ...@@ -148,8 +149,35 @@ export default {
}) })
}, },
jumpAI() { jumpAI() {
wx.navigateToMiniProgram({ if (this.aiUrl) wx.navigateTo({
appId: 'wx4cc95d0fd0729c32' 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 \ No newline at end of file
...@@ -43,7 +43,14 @@ module.exports = { ...@@ -43,7 +43,14 @@ module.exports = {
leavePageTrack(data = {}) { leavePageTrack(data = {}) {
return api.post('dj.api.customer.dynamic.record.leave', data) return api.post('dj.api.customer.dynamic.record.leave', data)
}, },
getSceneMarketConfig(){ getSceneMarketConfig() {
return api.getMock('scene-market-config') 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 \ No newline at end of file
...@@ -38,14 +38,14 @@ ...@@ -38,14 +38,14 @@
<view class="title">商品</view> <view class="title">商品</view>
<view class="meal-box" wx:for="{{orderInfo.packageGoodsList}}"> <view class="meal-box" wx:for="{{orderInfo.packageGoodsList}}">
<view class="meal-hd"> <view class="meal-hd">
<view>{{item.packageName}}</view> <view>{{item.packageAlias||item.packageName}}</view>
<view class="price">¥{{item.totalPrice}}</view> <view class="price">¥{{item.totalPrice}}</view>
</view> </view>
<view class="meal-bd"> <view class="meal-bd">
<view class="meal-bd-box" wx:for="{{item.packageGoodsOrderList}}" wx:for-item="g"> <view class="meal-bd-box" wx:for="{{item.packageGoodsOrderList}}" wx:for-item="g">
<view class="meal-bd-head"> <view class="meal-bd-head">
<view class="dot"></view> <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 class="price">¥{{g.price}}</view>
</view> </view>
<view class="meal-bd-bottom">{{g.upgradeGoodsType===1?g.positionStr: g.upgradeGoodsTypeName}} <view class="meal-bd-bottom">{{g.upgradeGoodsType===1?g.positionStr: g.upgradeGoodsTypeName}}
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
<view class="box"> <view class="box">
<view class="title infoTitle"> <view class="title infoTitle">
<view class="flex">工单信息 <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> <gl-image class="icon" src="/icon-invoice.png"></gl-image>
{{invoiceName}} {{invoiceName}}
</view> </view>
......
...@@ -830,7 +830,7 @@ Page({ ...@@ -830,7 +830,7 @@ Page({
} }
let obj = { let obj = {
baseGoodsId: e.goods.baseGoodsId, baseGoodsId: e.goods.baseGoodsId,
totalPrice: Number(e.goods.price), totalPrice: Number(e.goods.sellPrice),
number: e.count, number: e.count,
merchantGoodsId: e.goods.id || e.goods.merchantGoodsId, merchantGoodsId: e.goods.id || e.goods.merchantGoodsId,
}; };
...@@ -862,7 +862,7 @@ Page({ ...@@ -862,7 +862,7 @@ Page({
} }
let obj = { let obj = {
baseGoodsId: e.multipleSpecificationsGoods.goods.baseGoodsId, baseGoodsId: e.multipleSpecificationsGoods.goods.baseGoodsId,
totalPrice: Number(e.multipleSpecificationsGoods.goods.price), totalPrice: Number(e.multipleSpecificationsGoods.goods.sellPrice),
number: e.count, number: e.count,
merchantGoodsId: e.multipleSpecificationsGoods.goods.id || e.multipleSpecificationsGoods.goods.merchantGoodsId, merchantGoodsId: e.multipleSpecificationsGoods.goods.id || e.multipleSpecificationsGoods.goods.merchantGoodsId,
}; };
...@@ -1447,9 +1447,10 @@ Page({ ...@@ -1447,9 +1447,10 @@ Page({
} = orderObj; } = orderObj;
let chooseList = []; let chooseList = [];
subOrderList = subOrderList.concat(packageGoodsList)
if (subOrderList && subOrderList.length) { if (subOrderList && subOrderList.length) {
subOrderList = subOrderList.concat(packageGoodsList)
subOrderList.map((e) => { subOrderList.map((e) => {
// 是普通商品 // 是普通商品
if (e && !e.packageName) { if (e && !e.packageName) {
...@@ -1532,6 +1533,7 @@ Page({ ...@@ -1532,6 +1533,7 @@ Page({
this.setGoodsTotal(chooseList); this.setGoodsTotal(chooseList);
}, },
handleSpecificationsEcho(item) { handleSpecificationsEcho(item) {
console.log(item)
let { let {
otherProduct otherProduct
} = this.data, } = this.data,
...@@ -1555,6 +1557,7 @@ Page({ ...@@ -1555,6 +1557,7 @@ Page({
goods: { goods: {
...tempData, ...tempData,
price: item.price, price: item.price,
sellPrice: item.price,
goodsId: item.goodsId, goodsId: item.goodsId,
specificationStr: item.specificationData.replace(/;~;/g, '/') specificationStr: item.specificationData.replace(/;~;/g, '/')
} }
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
<view class="box"> <view class="box">
<view class="title invoice"> <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> <gl-image class="icon" src="/icon-invoice.png"></gl-image>
{{invoiceName}} {{invoiceName}}
</view> </view>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</view> </view>
<view class="box"> <view class="box">
<view class="title invoice">信息确认 <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> <gl-image class="icon" src="/icon-invoice.png"></gl-image>
{{invoiceName}} {{invoiceName}}
</view> </view>
......
...@@ -8,7 +8,9 @@ import { ...@@ -8,7 +8,9 @@ import {
} from './constant' } from './constant'
import api from '../../api' import api from '../../api'
import apiCon from '~/api/api' import apiCon from '~/api/api'
import { getYQInfo } from '~/store/index' import {
setConfigInfo
} from "~/store/index";
import comApi from '~/api/api' import comApi from '~/api/api'
let toastList = { let toastList = {
deliveryCount: '新车交付数不能为空', deliveryCount: '新车交付数不能为空',
...@@ -840,7 +842,7 @@ Page({ ...@@ -840,7 +842,7 @@ Page({
value = number value = number
} }
if (decimal == '') { if (decimal == '') {
console.log(value) // console.log(value)
this.setData({ this.setData({
[`carBandList[${index}].${name}`]: value [`carBandList[${index}].${name}`]: value
}) })
...@@ -893,9 +895,9 @@ Page({ ...@@ -893,9 +895,9 @@ Page({
var timeBean = this.data.timeBean var timeBean = this.data.timeBean
// console.log(timeBean.weekDayList[6].date, 'timeBean.weekDayList[6].date'); // console.log(timeBean.weekDayList[6].date, 'timeBean.weekDayList[6].date');
// timeBean = util.getWeekDayList(selectWeek, timeBean.weekDayList[6].date) // timeBean = util.getWeekDayList(selectWeek, timeBean.weekDayList[6].date)
console.log(selectWeek) // console.log(selectWeek)
timeBean = util.getWeekDayList(selectWeek) timeBean = util.getWeekDayList(selectWeek)
console.log(timeBean, 'nextWeek') // console.log(timeBean, 'nextWeek')
if (selectWeek != 0) { if (selectWeek != 0) {
timeBean.selectDay = 0 timeBean.selectDay = 0
} }
...@@ -952,14 +954,22 @@ Page({ ...@@ -952,14 +954,22 @@ Page({
merchantId: orderObj.merchantId, merchantId: orderObj.merchantId,
sceneType: 0 sceneType: 0
}) })
console.log(result, 'result') const {
carBandId
} = await setConfigInfo({});
console.log(result, carBandId, 'result')
let { code, data } = result let { code, data } = result
// let reportType = 0 // let reportType = 0
let carBandList = [] let carBandList = []
let isHmStore = false
if (code && data.length) { if (code && data.length) {
// reportType = 1 // reportType = 1
// 判断车型是否包含鸿蒙智享,包含不给切换模板列表
carBandList = data.map(item => { carBandList = data.map(item => {
let el = { ...item } let el = { ...item }
if (item.firstBrandId == carBandId) {
isHmStore = true
}
if (item.brandType == 0) { if (item.brandType == 0) {
hwObjArray.forEach(e => { hwObjArray.forEach(e => {
el[e.key] = null el[e.key] = null
...@@ -975,8 +985,11 @@ Page({ ...@@ -975,8 +985,11 @@ Page({
} else { } else {
carBandList = [] carBandList = []
} }
this.setData({ this.setData({
// reportType, // reportType,
isHmStore,
carBandList carBandList
}) })
this.getStaffReport() this.getStaffReport()
...@@ -1022,7 +1035,8 @@ Page({ ...@@ -1022,7 +1035,8 @@ Page({
carBandList, carBandList,
hwObjArray, hwObjArray,
hwOhterObjArray, hwOhterObjArray,
otherObjArray otherObjArray,
isHmStore
} = this.data } = this.data
this.setData({ this.setData({
currentWordNumber: 0, // 清空备注字数 currentWordNumber: 0, // 清空备注字数
...@@ -1123,7 +1137,7 @@ Page({ ...@@ -1123,7 +1137,7 @@ Page({
['orderObj.glWorryFreeCount']: data.glWorryFreeCount, ['orderObj.glWorryFreeCount']: data.glWorryFreeCount,
['orderObj.cancelOrderCount']: data.cancelOrderCount, ['orderObj.cancelOrderCount']: data.cancelOrderCount,
['orderObj.cancelOrderMoney']: data.cancelOrderMoney, ['orderObj.cancelOrderMoney']: data.cancelOrderMoney,
['orderObj.templateType']: data.templateType || 1, ['orderObj.templateType']: isHmStore ? 1 : data.templateType || 1, // 是鸿蒙那就默认只能单店延保
['orderObj.staffCount']: data.staffCount, ['orderObj.staffCount']: data.staffCount,
['orderObj.onBreak']: data.onBreak || 'N', ['orderObj.onBreak']: data.onBreak || 'N',
['orderObj.pickerValue']: data.onBreak == 'Y' ? 1 : 0, ['orderObj.pickerValue']: data.onBreak == 'Y' ? 1 : 0,
...@@ -1323,11 +1337,11 @@ Page({ ...@@ -1323,11 +1337,11 @@ Page({
reportDate, reportDate,
new Date().format('yyyy-MM-dd') 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) { if (new Date().getDay() === 0) {
countSundays = countSundays - 1 countSundays = countSundays - 1
} }
console.log(countSundays, 'countSundays') // console.log(countSundays, 'countSundays')
this.setData({ this.setData({
timeBean: util.getWeekDayList(0 - countSundays), timeBean: util.getWeekDayList(0 - countSundays),
selectWeek: 0 - countSundays, selectWeek: 0 - countSundays,
...@@ -1390,13 +1404,13 @@ Page({ ...@@ -1390,13 +1404,13 @@ Page({
// 4s店-员工-员工数据 的请求逻辑 // 4s店-员工-员工数据 的请求逻辑
this.getListShop4s({}, true) this.getListShop4s({}, true)
} }
console.log(this.data, 'roleOther') // console.log(this.data, 'roleOther')
}, },
countSundays(startDate, endDate) { countSundays(startDate, endDate) {
let start = new Date(startDate) let start = new Date(startDate)
console.log('start', start) // console.log('start', start)
let end = new Date(endDate) let end = new Date(endDate)
console.log('end', end) // console.log('end', end)
let sundays = 0 let sundays = 0
// 遍历日期范围 // 遍历日期范围
for ( for (
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
<view class="mainheader"> <view class="mainheader">
<view class="title">日报切换</view> <view class="title">日报切换</view>
<view class="navigation-title templateNameTitle" bindtap="showStaffPicker"> <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="picker">
<view class="text-hide templateName">{{pickerTemplateList[orderObj.templateType-1]['name']}}</view> <view class="text-hide templateName">{{pickerTemplateList[orderObj.templateType-1]['name']}}</view>
</view> </view>
</picker> </picker>
<view class="arrow"> <view class="arrow" wx:if="{{!isHmStore}}">
<image src="/images/arrow_bottom.png" /> <image src="/images/arrow_bottom.png" />
</view> </view>
</view> </view>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<text class="required_text"> *</text> <text class="required_text"> *</text>
</view> </view>
</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"> <view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" /> <image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide">{{pickerdateList[orderObj.pickerValue]['name']}}</view> <view class="text-hide">{{pickerdateList[orderObj.pickerValue]['name']}}</view>
......
...@@ -114,6 +114,7 @@ class Request { ...@@ -114,6 +114,7 @@ class Request {
if (!apiName) { if (!apiName) {
throw new Error('apiName is null') throw new Error('apiName is null')
} }
if(apiName.split('.').length > 1) apiName = apiName.split('.')[0]
if (merchant) apiName = 'merchants' if (merchant) apiName = 'merchants'
const appKey = secretKey[apiName].appKey const appKey = secretKey[apiName].appKey
const secret = secretKey[apiName].secret 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!