Commit c2c3d49e by wangzhihui

fixed

1 parent 52f9ae33
...@@ -79,14 +79,12 @@ Component({ ...@@ -79,14 +79,12 @@ Component({
cancel:点击选择按钮的操作;只有选中后,取消才可以触发 cancel:点击选择按钮的操作;只有选中后,取消才可以触发
*/ */
watchAllChose(index, cancel) { async watchAllChose(index, cancel) {
let { let {
goodsList, goodsList,
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)
if (result) { if (result) {
if (!cancel) { if (!cancel) {
let arr = [] let arr = []
...@@ -95,16 +93,40 @@ Component({ ...@@ -95,16 +93,40 @@ Component({
}) })
let str = arr.join(';~;') let str = arr.join(';~;')
// strTemp用来存储上一次选中的值,判断规格是否重新选择 ,避免页面交互闪烁
// if (type && str != strTemp) {
//获取该规格的商品是否存在 //获取该规格的商品是否存在
console.log(str) goodsList[index].multipleSpecificationsGoods.skuGoodsList=[]
if (goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str]) { if (goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str]) {
goodsList[index].active = true goodsList[index].active = false
console.log(goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str], 'str') let goodsArr = goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str]
goodsList[index].multipleSpecificationsGoods.goods = goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str] goodsArr.forEach(item => {
goodsList[index].multipleSpecificationsGoods.goods.goodsId = goodsList[index].multipleSpecificationsGoods.goods.merchantGoodsId item.count = 1
goodsList[index].multipleSpecificationsGoods.goods.specificationStr = goodsList[index].multipleSpecificationsGoods.goods.specificationData.replace(/;~;/g, '/') item.active = false
item.goodsId = item.merchantGoodsId
item.specificationStr = item.specificationData.replace(/;~;/g, '/')
})
goodsList[index].multipleSpecificationsGoods.skuGoodsList = goodsArr
let chooseList = await this.getChooseList(false);
this.setData({
show: false,
goodsList
},()=>{
let thisPage = wx.$router.getPageInstance();
thisPage.setData({
skuGoodsData: goodsList[index],
skuGoodsBox: true,
goodsList: chooseList
})
thisPage?.setGoodsTotal && thisPage.setGoodsTotal(chooseList);
});
// let thisPage = wx.$router.getPageInstance();
// thisPage.setData({
// skuGoodsData: goodsList[index],
// skuGoodsBox: true
// })
// 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 { } else {
console.log(88888) console.log(88888)
wx.$util.showToast('暂无该规格商品') wx.$util.showToast('暂无该规格商品')
...@@ -182,10 +204,10 @@ Component({ ...@@ -182,10 +204,10 @@ Component({
} }
} }
//初始化进来不显示标识 //初始化进来不显示标识
if (!s.isFlag) { // if (!s.isFlag) {
if (s.multipleSpecificationsGoods && e.multipleSpecificationsGoods) { if (s.multipleSpecificationsGoods && e.multipleSpecificationsGoods) {
if (s.multipleSpecificationsGoods.id == e.multipleSpecificationsGoods.id) { if (s.multipleSpecificationsGoods.id == e.multipleSpecificationsGoods.id) {
e.active = true // e.active = true
e.count = s.count e.count = s.count
// e.multipleSpecificationsGoods.goods = JSON.parse(JSON.stringify(s.multipleSpecificationsGoods.goods)) // e.multipleSpecificationsGoods.goods = JSON.parse(JSON.stringify(s.multipleSpecificationsGoods.goods))
// e.multipleSpecificationsGoods.goods.goodsId = JSON.parse(JSON.stringify(s.multipleSpecificationsGoods.goods.merchantGoodsId)) // e.multipleSpecificationsGoods.goods.goodsId = JSON.parse(JSON.stringify(s.multipleSpecificationsGoods.goods.merchantGoodsId))
...@@ -195,14 +217,14 @@ Component({ ...@@ -195,14 +217,14 @@ Component({
// } // }
} }
} }
} // }
//多规格初始化不需要回显逻辑
}) })
}) })
} }
console.log(goodsList,'goodsList999')
this.setData({ this.setData({
goodsList, goodsList,
// recordList // recordList
...@@ -268,7 +290,7 @@ Component({ ...@@ -268,7 +290,7 @@ Component({
return acc; return acc;
}, []); }, []);
}, },
async getChooseList() { async getChooseList(isValid) {
let { let {
goodsList, goodsList,
chooseGoodsList, chooseGoodsList,
...@@ -281,12 +303,14 @@ Component({ ...@@ -281,12 +303,14 @@ Component({
chooseList.push(e) chooseList.push(e)
} }
}); });
if (!chooseList?.length) return wx.$util.showToast("请勾选商品"); if(isValid){
//处理多规格选择重复商品时,数量相加逻辑 if (!chooseList?.length) return wx.$util.showToast("请勾选商品");
console.log(chooseGoodsList.length, 'chooseGoodsList.length')
if (chooseGoodsList.length > 0) {
await this.addMMultipleSpecificationsGoods(chooseList, chooseGoodsList)
} }
//处理多规格选择重复商品时,数量相加逻辑
// if (chooseGoodsList.length > 0) {
// await this.addMMultipleSpecificationsGoods(chooseList, chooseGoodsList)
// }
// debugger // debugger
let arr = this.removeDuplicates( let arr = this.removeDuplicates(
...@@ -441,8 +465,8 @@ Component({ ...@@ -441,8 +465,8 @@ Component({
if (value < 1) value = 1; if (value < 1) value = 1;
if (value > 999) value = 999; if (value > 999) value = 999;
this.setData({ this.setData({
[target]: Number(value), [target]: Number(value),
}, },
() => { () => {
this.synchronousChange(this.data.goodsList[ind]) this.synchronousChange(this.data.goodsList[ind])
} }
...@@ -497,7 +521,7 @@ Component({ ...@@ -497,7 +521,7 @@ Component({
}); });
}, },
async confirm() { async confirm() {
let chooseList = await this.getChooseList(); let chooseList = await this.getChooseList(true);
console.log(chooseList, '99999') console.log(chooseList, '99999')
let { let {
goodsList goodsList
......
// packageEquity/pages/carQuotation/components/skuGoods/Goods.js
Component({
/**
* 组件的属性列表
*/
properties: {
//1:精品升级 0 会员权益
sceneType: {
type: String,
},
show: {
type: Boolean,
observer: function () {
}
},
goodsData: {
type: Object,
observer: function (n) {
console.log(n, '999', this.data.chooseGoodsList)
this.setGoodsActive();
}
},
chooseGoodsList: {
type: Array,
observer: function (n) {
// this.setGoodsActive();
},
},
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
setGoodsActive() {
//同步数量
let {
chooseGoodsList,
goodsData
} = this.data;
goodsData.multipleSpecificationsGoods.skuGoodsList.forEach(c => {
if (chooseGoodsList.length > 0) {
chooseGoodsList.map(x => {
if (x.goodsFlag == 2) {
if (x.multipleSpecificationsGoods.goods && x.multipleSpecificationsGoods.goods.goodsId == c.goodsId) {
c.count = x.count || 0
}
}
})
}
})
this.setData({
goodsData
})
},
hidePopup() {
this.setData({
show: false
})
this.triggerEvent('cancel')
},
choose(e) {
let {
item,
index
} = e.currentTarget.dataset
let {
goodsData
} = this.data
let {
active
} = item
//全部取消选择
goodsData.multipleSpecificationsGoods.skuGoodsList.forEach(item => item.active = false)
goodsData.multipleSpecificationsGoods.skuGoodsList[index].active = !active
this.setData({
goodsData
})
},
input(e) {
let {
index
} = e.currentTarget.dataset
let {
goodsData
} = this.data
console.log(e)
let {
value
} = e.detail
if (value < 1) value = 1
if (value > 999) value = 999
goodsData.multipleSpecificationsGoods.skuGoodsList[index].count = value
this.setData({
goodsData
})
},
getChooseList() {
let {
chooseGoodsList,
goodsData
} = this.data;
console.log(chooseGoodsList, goodsData)
let chooseList = [],
selectList = []
goodsData.multipleSpecificationsGoods.skuGoodsList.forEach(c => {
if (c.active) {
//构建多规格需要的数据格式
selectList.push({
active: true,
count: c.count,
goods: null,
goodsFlag: 2,
isFlag: true,
multipleSpecificationsGoods: {
baseGoodsName: goodsData.multipleSpecificationsGoods.baseGoodsName,
id: goodsData.multipleSpecificationsGoods.id,
specificationGoodsMap: goodsData.multipleSpecificationsGoods.specificationGoodsMap,
specificationList: goodsData.multipleSpecificationsGoods.specificationList,
goods: c
}
})
}
})
console.log(selectList, 'selectList')
//精品升级需要处理数量,会员权益不需要
if (selectList.length) {
selectList.forEach(c => {
if (!c.count) c.count = 1
c.multipleSpecificationsGoods.goods.price = c.multipleSpecificationsGoods.goods.sellPrice || 0
if (chooseGoodsList.length > 0) {
chooseGoodsList.map(x => {
if (x.goodsFlag == 2&&x.multipleSpecificationsGoods) {
console.log(x.multipleSpecificationsGoods.goods && x.multipleSpecificationsGoods.goods.goodsId == c.multipleSpecificationsGoods.goods.goodsId, 'x.multipleSpecificationsGoods.goods && x.multipleSpecificationsGoods.goods.goodsId == c.multipleSpecificationsGoods.goods.goodsId')
if (x.multipleSpecificationsGoods.goods && x.multipleSpecificationsGoods.goods.goodsId == c.multipleSpecificationsGoods.goods.goodsId) {
console.log(c)
//精品升级需要处理数量,会员权益不需要
x.count = c.multipleSpecificationsGoods.goods.count || 0
}
}
})
let arr = chooseGoodsList.filter(item => item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods)
console.log(arr)
selectList.forEach(oldval => {
if (oldval.multipleSpecificationsGoods) {
if (!arr.some(newVal => newVal.multipleSpecificationsGoods.goods.goodsId == oldval.multipleSpecificationsGoods.goods.goodsId)) {
chooseList.push(oldval)
}
}
})
} else {
chooseList = selectList
}
})
}
console.log(chooseList, 'chooseList')
chooseList = chooseList.concat(chooseGoodsList)
console.log(chooseList, 'chooseList')
return [selectList, chooseList]
},
confirm() {
let [selectList, chooseList] = this.getChooseList()
console.log(selectList, chooseList)
if (!selectList.length) return wx.$util.showToast('请勾选商品')
this.triggerEvent('confirm', chooseList)
let thisPage = wx.$router.getPageInstance()
if (this.data.sceneType == 1) {
thisPage.setData({
goodsList: chooseList,
});
thisPage?.setGoodsTotal && thisPage.setGoodsTotal(chooseList);
} else {
thisPage.setData({
['orderInfo.vdQuotationGoodsList']: chooseList
}, () => {
//会员权益
thisPage.totalFee()
})
}
this.setData({
show: false
})
},
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/carQuotation/components/skuGoods/Goods.wxss */
.title {
width: 100%;
font-weight: 500;
font-size: 32rpx;
color: #222222;
text-align: center;
line-height: 48rpx;
padding: 32rpx 0;
border-bottom: 1rpx solid #EBEDF0;
}
.tips {
font-weight: 400;
font-size: 24rpx;
color: #999999;
line-height: 36rpx;
text-align: center;
padding: 20rpx 0;
}
.goods {
margin: 0 24rpx;
max-height:700rpx;
overflow-Y:scroll;
}
.goods .active {
background: #347bff14!important;
border: 2rpx solid #347BFF;
}
.goods .item-wrap {
background: #F7F8FA;
border-radius: 12rpx;
display: flex;
align-items: center;
padding: 24rpx;
box-sizing: border-box;
min-height: 184rpx;
margin-bottom:16rpx;
}
.item-wrap .icon {
display: block;
width: var(--fontSize32);
height: var(--fontSize32);
margin-right: 20rpx;
}
.item-wrap.active {
color: #347BFF;
}
.item-wrap .icon .arc {
width: var(--fontSize32);
height: var(--fontSize32);
border: var(--fontSize2) solid #979797;
border-radius: 100%;
box-sizing: border-box;
}
.value {
width: calc(100% - 56rpx);
}
.value .alias {
font-weight: 400;
font-size: 24rpx;
color: #222222;
line-height: 36rpx;
margin-bottom: 16rpx;
}
.bottom_box {
display: flex;
align-items: center;
justify-content: space-between;
}
.bottom_box .left {
margin-right:8rpx;
}
.bottom_box .left .name {
font-weight: 400;
font-size: 28rpx;
color: #EA6612;
margin-bottom: 8rpx;
}
.bottom_box .left .position {
font-weight: 400;
font-size: 24rpx;
color: #9B9B9E;
line-height: 36rpx;
}
.right {
display: flex;
align-items: center;
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
.right .price-box {
display: flex;
align-items: center;
margin-right: 16rpx;
}
.input {
width: 84rpx;
height: 72rpx;
background: #FFFFFF;
border: 2rpx solid #EFF0F2;
border-radius: 12rpx;
}
.popup-footer {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--fontSize20) var(--fontSize32) ;
}
.popup-footer.isFullSucreen {
padding-bottom: var(--fontSize68) !important;
}
.popup-footer .btn {
width: var(--fontSize330);
height: var(--fontSize80);
box-sizing: border-box;
border-radius: var(--fontSize12);
font-size: var(--fontSize32);
}
.popup-footer .cancel {
/* color: #323233;
border: var(--fontSize2) solid #DCDEE0; */
color: #292D33;
background: #F7F8FA;
}
.popup-footer .confirm {
background: #347BFF;
color: #fff;
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
\ No newline at end of file \ No newline at end of file
<van-popup custom-style="min-height: 280px;width:var(--fontSize686);" round z-index="999999" custom-class="popclass" bind:click-overlay="closeMenu" bind:before-enter="hideTabBar" bind:after-leave="showTabBar" show="{{ show }}">
<view class="title">确认需购买的商品</view>
<view class="tips">温馨提示:请根据实际需求选择正确的价格方案</view>
<view class="goods">
<view class="item-wrap {{i.active?'active':''}}" wx:for="{{goodsData.multipleSpecificationsGoods.skuGoodsList}}" wx:key="ind" wx:for-index="index" wx:for-item="i">
<view class="icon" catchtap="choose" data-index="{{index}}" data-item="{{i}}">
<block wx:if="{{i.active}}">
<image src="./images/radio.png" />
</block>
<block wx:else>
<view class="arc" />
</block>
</view>
<view class="value">
<view class="alias" wx:if="{{i.goodsAlias}}">
商品别名:{{i.goodsAlias}}
</view>
<view class="bottom_box">
<view class="left">
<view class="name">{{goodsData.multipleSpecificationsGoods.baseGoodsName}}</view>
<view class="position" wx:if="{{ i.specificationStr }}">{{i.specificationStr}}</view>
</view>
<view class="right">
<view class="price-box">
<text>¥</text>
<view class="price">
<!-- {{i}} -->
{{i.sellPrice}}
</view>
</view>
<view style="display:flex;align-items: center;" wx:if="{{i.active&&sceneType==1}}" >x <input type="number" catchtap="noScroll"class="input" value="{{i.count || 1}}" catchinput="input" data-index="{{index}}" data-item="{{i}}" /></view>
<view class="count" catchtap="showPopup" wx:else data-show-name="goodsBox">x{{i.count||1}}</view>
</view>
</view>
</view>
</view>
</view>
<view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="cancel btn text-center" bind:tap="hidePopup">取消</view>
<view class="confirm btn text-center" bind:tap="confirm">确认</view>
</view>
</van-popup>
\ No newline at end of file \ No newline at end of file
...@@ -79,7 +79,7 @@ Component({ ...@@ -79,7 +79,7 @@ Component({
this.watchAllChose(index, true) this.watchAllChose(index, true)
}) })
}, },
watchAllChose(index, type) { async watchAllChose(index, type) {
let { let {
goodsList, goodsList,
recordList, recordList,
...@@ -100,19 +100,37 @@ Component({ ...@@ -100,19 +100,37 @@ Component({
goodsList[index].active = true goodsList[index].active = true
// strTemp用来存储上一次选中的值,判断规格是否重新选择 ,避免页面交互闪烁 // strTemp用来存储上一次选中的值,判断规格是否重新选择 ,避免页面交互闪烁
// if (type && str != strTemp) { // if (type && str != strTemp) {
if( goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str]){ console.log(str)
goodsList[index].multipleSpecificationsGoods.goods = goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str] console.log(goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str])
goodsList[index].multipleSpecificationsGoods.goods.goodsId = goodsList[index].multipleSpecificationsGoods.goods.merchantGoodsId goodsList[index].multipleSpecificationsGoods.skuGoodsList=[]
goodsList[index].multipleSpecificationsGoods.goods.specificationStr = goodsList[index].multipleSpecificationsGoods.goods.specificationData.replace(/;~;/g, '/') if (goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str]) {
recordList.forEach(record => { goodsList[index].active = false
if (record.goodsFlag == 2) { console.log(goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str], 'str')
if (goodsList[index].multipleSpecificationsGoods.id ==record.multipleSpecificationsGoods.id) { let goodsArr = goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str]
record.active=true goodsArr.forEach(item => {
record.multipleSpecificationsGoods = goodsList[index].multipleSpecificationsGoods item.count = 1
} item.active = false
} item.goodsId = item.merchantGoodsId
item.specificationStr = item.specificationData.replace(/;~;/g, '/')
}) })
goodsList[index].multipleSpecificationsGoods.skuGoodsList = goodsArr
let chooseList = await this.getChooseList(false);
this.setData({
show: false,
goodsList
},()=>{
let thisPage = wx.$router.getPageInstance();
let secondPage = thisPage.selectComponent(`#SecondStep`)
thisPage.setData({
['orderInfo.vdQuotationGoodsList']: chooseList
}, () => {
thisPage.totalFee()
})
secondPage.setData({
skuGoodsData: goodsList[index],
skuGoodsBox: true
})
});
}else{ }else{
wx.$util.showToast('暂无该规格商品') wx.$util.showToast('暂无该规格商品')
goodsList[index].active=false goodsList[index].active=false
...@@ -324,7 +342,6 @@ Component({ ...@@ -324,7 +342,6 @@ Component({
chooseGoodsList chooseGoodsList
} = this.data } = this.data
let chooseList = [] let chooseList = []
console.log(recordList,chooseGoodsList,'999999')
recordList.map(c => { recordList.map(c => {
if (c.active) { if (c.active) {
if (c.goods) { if (c.goods) {
...@@ -392,12 +409,10 @@ Component({ ...@@ -392,12 +409,10 @@ Component({
let arr = chooseList.filter(item => item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods) let arr = chooseList.filter(item => item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods)
chooseGoodsList.forEach(oldval => { chooseGoodsList.forEach(oldval => {
if (oldval.multipleSpecificationsGoods) { if (oldval.multipleSpecificationsGoods) {
if (!arr.some(newVal => newVal.multipleSpecificationsGoods.goods.goodsId == oldval.multipleSpecificationsGoods.goods.goodsId)) if (!arr.some(newVal => newVal.multipleSpecificationsGoods.goods.goodsId == oldval.multipleSpecificationsGoods.goods.goodsId))
chooseList.push(oldval) chooseList.push(oldval)
} }
}) })
console.log(chooseList, 'chooseList')
return chooseList return chooseList
}, },
choose(e) { choose(e) {
...@@ -522,7 +537,6 @@ Component({ ...@@ -522,7 +537,6 @@ Component({
}, },
confirm() { confirm() {
let chooseList = this.getChooseList() let chooseList = this.getChooseList()
// console.log(chooseList, 'chooseList');
let { let {
goodsList goodsList
} = this.data } = this.data
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
"van-checkbox": "@vant/weapp/checkbox/index", "van-checkbox": "@vant/weapp/checkbox/index",
"popup-input": "../PopupInput/PopupInput", "popup-input": "../PopupInput/PopupInput",
"goods": "../GoodsPackage/Goods", "goods": "../GoodsPackage/Goods",
"sku-goods": "/components/SkuGoods/Goods",
"date-select":"/components/DateSelect/dateSelect" "date-select":"/components/DateSelect/dateSelect"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<view class="price-box"> <view class="price-box">
<text>¥</text> <text>¥</text>
<view class="price"> <view class="price">
<input type="digit" value="{{ item.goods.price }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.goods.checkError ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed /> <input type="digit" value="{{ item.goods.price }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0||item.goods.goodsPriceModify }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.goods.checkError ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view> </view>
</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>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<view class="price-box"> <view class="price-box">
<text>¥</text> <text>¥</text>
<view class="price"> <view class="price">
<input type="digit" value="{{ child.price }}" bindinput="changePricePackage" disabled="{{ orderObj.selectPayType ==0 }}" data-childind="{{ childind }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ child.checkError ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed /> <input type="digit" value="{{ child.price }}" bindinput="changePricePackage" disabled="{{ orderObj.selectPayType ==0 ||child.goodsPriceModify}}" data-childind="{{ childind }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ child.checkError ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view> </view>
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox">x{{child.count||1}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox">x{{child.count||1}}</view>
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<view class="price-box"> <view class="price-box">
<text>¥</text> <text>¥</text>
<view class="price"> <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 /> <input type="digit" value="{{item.multipleSpecificationsGoods.goods.price}}" bindinput="changeSpecific" disabled="{{ orderObj.selectPayType ==0||item.multipleSpecificationsGoods.goods.goodsPriceModify }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.multipleSpecificationsGoods.goods.checkError ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view> </view>
</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>
...@@ -151,4 +151,5 @@ ...@@ -151,4 +151,5 @@
<Gl-Button-Group bindbtnTap="btnTap" textNameObj="{{ textNameObj }}" /> <Gl-Button-Group bindbtnTap="btnTap" textNameObj="{{ textNameObj }}" />
</view> </view>
<goods show="{{ goodsBox }}" wx:if="{{goodsBox}}" bindconfirm="chooseGoods" goodsData="{{ quotationGoodsList }}" chooseGoodsList="{{ orderInfo.vdQuotationGoodsList }}" /> <goods show="{{ goodsBox }}" wx:if="{{goodsBox}}" bindconfirm="chooseGoods" goodsData="{{ quotationGoodsList }}" chooseGoodsList="{{ orderInfo.vdQuotationGoodsList }}" />
<sku-goods show="{{ skuGoodsBox }}" wx:if="{{skuGoodsBox}}" sceneType="0" goodsData="{{ skuGoodsData }}" chooseGoodsList="{{ orderInfo.vdQuotationGoodsList }}"></sku-goods>
<date-select show="{{ showDateSelect }}" bind:close="closeDateModal" selectPay="{{orderInfo.payType}}" bind:confirm="onChanteSuccessDate"></date-select> <date-select show="{{ showDateSelect }}" bind:close="closeDateModal" selectPay="{{orderInfo.payType}}" bind:confirm="onChanteSuccessDate"></date-select>
\ No newline at end of file \ No newline at end of file
...@@ -280,7 +280,10 @@ Page({ ...@@ -280,7 +280,10 @@ Page({
supplementaryFlag: true supplementaryFlag: true
}) // 补录订单标识 }) // 补录订单标识
// 获取保险信息 // 获取保险信息
let { outTradeNo, userInfo } = this.data let {
outTradeNo,
userInfo
} = this.data
let orderInfo = this.getInsurance() let orderInfo = this.getInsurance()
let owner = this.getOwnerInfo() let owner = this.getOwnerInfo()
owner.salesType = owner.salesType == '售后' ? 1 : 0 owner.salesType = owner.salesType == '售后' ? 1 : 0
...@@ -697,7 +700,7 @@ Page({ ...@@ -697,7 +700,7 @@ Page({
item = item.multipleSpecificationsGoods.goods item = item.multipleSpecificationsGoods.goods
const obj = { const obj = {
goodsId: item.merchantGoodsId, goodsId: item.merchantGoodsId,
goodsName: item.upgradeGoodsName||item.goodsName, goodsName: item.upgradeGoodsName || item.goodsName,
goodsNameAlias: item.goodsAlias || item.goodsNameAlias, goodsNameAlias: item.goodsAlias || item.goodsNameAlias,
specificationsName: item.specificationNameSequence, specificationsName: item.specificationNameSequence,
specificationsValue: item.specificationData ? specificationsValue: item.specificationData ?
...@@ -733,7 +736,9 @@ Page({ ...@@ -733,7 +736,9 @@ Page({
// 获取保险信息 // 获取保险信息
let orderInfo = this.getInsurance() let orderInfo = this.getInsurance()
let owner = this.getOwnerInfo() let owner = this.getOwnerInfo()
let { userInfo } = this.data let {
userInfo
} = this.data
owner.salesType = owner.salesType == '售后' ? 1 : 0 owner.salesType = owner.salesType == '售后' ? 1 : 0
orderInfo.owner = owner orderInfo.owner = owner
orderInfo.check = check orderInfo.check = check
...@@ -868,7 +873,7 @@ Page({ ...@@ -868,7 +873,7 @@ Page({
) )
wx.hideLoading() wx.hideLoading()
if (code == 0) { if (code == 0) {
tableInfo.vdQuotationGoodsList = tableInfo.vdQuotationGoodsList =
tableInfo.vdQuotationGoodsList.reduce((pre, item) => { tableInfo.vdQuotationGoodsList.reduce((pre, item) => {
// 是普通商品 // 是普通商品
...@@ -886,7 +891,7 @@ Page({ ...@@ -886,7 +891,7 @@ Page({
)?.goods?.validMinSellPrice // 按商品数据对比补充详情商品校验最低价字段 )?.goods?.validMinSellPrice // 按商品数据对比补充详情商品校验最低价字段
} }
pre.push({ pre.push({
goodsFlag:1, goodsFlag: 1,
goods: obj, goods: obj,
packageGoods: null packageGoods: null
}) })
...@@ -929,7 +934,7 @@ Page({ ...@@ -929,7 +934,7 @@ Page({
} else { } else {
pre.push({ pre.push({
goods: null, goods: null,
goodsFlag:3, goodsFlag: 3,
price: item.price, price: item.price,
packageGoods: { packageGoods: {
...item, ...item,
...@@ -942,10 +947,9 @@ Page({ ...@@ -942,10 +947,9 @@ Page({
} }
} }
//多规格商品 //多规格商品
if (!item.packageName&&item.specificationsValue) { if (!item.packageName && item.specificationsValue) {
console.log(item)
let specificdata = this.handleSpecificationsEcho(item) let specificdata = this.handleSpecificationsEcho(item)
pre.push(specificdata) pre= pre.concat(specificdata)
} }
// item.price = // item.price =
...@@ -981,38 +985,43 @@ Page({ ...@@ -981,38 +985,43 @@ Page({
.catch(err => {}) .catch(err => {})
}, },
handleSpecificationsEcho(item) { handleSpecificationsEcho(item) {
let {quotationGoodsList} = this.data,
let {
quotationGoodsList
} = this.data, skuArr = [],
arr = item.specificationsValue.split('/'), arr = item.specificationsValue.split('/'),
str = arr.join(';~;'), str = arr.join(';~;'),
obj = { obj = {
goodsFlag:2, goodsFlag: 2,
goods: null, goods: null,
}; };
quotationGoodsList.forEach(data => { quotationGoodsList.forEach(data => {
if (data.goodsFlag == 2) { if (data.goodsFlag == 2) {
let tempData = data.multipleSpecificationsGoods.specificationGoodsMap[str] let tempData = data.multipleSpecificationsGoods.specificationGoodsMap[str]
if (tempData) { if (tempData) {
if (tempData.merchantGoodsId == item.goodsId) { tempData.forEach(temp => {
tempData.price = this.divideByHundred(item.goodsPrice) if (temp.merchantGoodsId == item.goodsId) {
tempData.goodsId= item.goodsId temp.price = this.divideByHundred(item.goodsPrice)
tempData.specificationStr=item.specificationsValue temp.goodsId = item.goodsId
data.multipleSpecificationsGoods.goods = tempData temp.specificationStr = item.specificationsValue
data.multipleSpecificationsGoods.baseGoodsName = item.goodsName data.multipleSpecificationsGoods.goods = temp
data.multipleSpecificationsGoods.specificationList.forEach((value, index) => { data.multipleSpecificationsGoods.baseGoodsName = item.goodsName
value.value = arr[index] data.multipleSpecificationsGoods.specificationList.forEach((value, index) => {
}) value.value = arr[index]
})
obj.multipleSpecificationsGoods = data.multipleSpecificationsGoods obj.multipleSpecificationsGoods = data.multipleSpecificationsGoods
} skuArr.push(obj)
}
})
} }
} }
}) })
console.log(obj) console.log(skuArr)
return obj return skuArr
}, },
totalFee() { totalFee() {
let { let {
......
...@@ -52,22 +52,22 @@ Page({ ...@@ -52,22 +52,22 @@ Page({
phoneShow: false, phoneShow: false,
customerInfoBox: false, customerInfoBox: false,
payTypeList: [{ payTypeList: [{
name: "门店收款", name: "门店收款",
value: 2, value: 2,
}, },
{ {
name: "POS机", name: "POS机",
value: 3, value: 3,
}, },
{ {
name: '嘀加收款', name: '嘀加收款',
value: 5 value: 5
}, },
{ {
name: "微信支付", name: "微信支付",
value: 1, value: 1,
imgurl: "../../images/wxPayIcon.png", imgurl: "../../images/wxPayIcon.png",
}, },
], ],
showPayList: [], showPayList: [],
payeeList: [{ payeeList: [{
...@@ -124,19 +124,117 @@ Page({ ...@@ -124,19 +124,117 @@ Page({
baseConfigData: {}, baseConfigData: {},
showSource: false, showSource: false,
Sourcecolumns: [{ Sourcecolumns: [{
type: 0, type: 0,
name: "售前", name: "售前",
}, },
{ {
type: 1, type: 1,
name: "售后", name: "售后",
}, },
], ],
packageBox: false, packageBox: false,
skuGoodsBox: false,
djPayList: [], // 嘀加收款方对应支付方式 djPayList: [], // 嘀加收款方对应支付方式
merchantPayList: [], // 门店收款方对应支付方式 merchantPayList: [], // 门店收款方对应支付方式
configPayTypeList: [], // 园区店配置支持的支付方式 configPayTypeList: [], // 园区店配置支持的支付方式
recordOrderFlag: true // 补录订单入口标识 recordOrderFlag: true, // 补录订单入口标识
skuGoodsData: {
active: true,
count: 1,
goods: null,
goodsFlag: 2,
isFlag: true,
multipleSpecificationsGoods: {
skuGoodsList: [{
count: 1,
active: true,
errorTarget: false,
goodsAlias: "别名001",
goodsId: 15961,
lastOnShelfTime: 1747903884000,
maxSuitCarPrice: null,
merchantGoodsCode: "MG2025052215304361811",
merchantGoodsId: 15961,
merchantGoodsPosition: null,
minSellPrice: 1,
minSuitCarPrice: null,
position: null,
price: 4,
sellPrice: 4,
specificationData: "111111111;~;红色;~;超大大大;~;烦躁",
specificationNameSequence: "型号;~;颜色;~;规格;~;上班",
specificationStr: "111111111/红色/超大大大/烦躁",
specificationTypeSequence: "0;~;0;~;0;~;0",
upgradeGoodsAlias: null,
upgradeGoodsId: 6119,
upgradeGoodsName: "0522ymt其他精品002",
upgradeGoodsPosition: null,
upgradeGoodsServiceItemsList: null,
upgradeGoodsType: null,
upgradeGoodsTypeName: null,
validMinSellPrice: "N"
}, {
count: 1,
errorTarget: false,
goodsAlias: "别名001",
goodsId: 15969,
lastOnShelfTime: 1747903884000,
maxSuitCarPrice: null,
merchantGoodsCode: "MG2025052215304361811",
merchantGoodsId: 15961,
merchantGoodsPosition: null,
minSellPrice: 1,
minSuitCarPrice: null,
position: null,
price: 4,
sellPrice: 4,
specificationData: "111111111;~;红色;~;超大大大;~;烦躁",
specificationNameSequence: "型号;~;颜色;~;规格;~;上班",
specificationStr: "111111111/红色/超大大大/烦躁",
specificationTypeSequence: "0;~;0;~;0;~;0",
upgradeGoodsAlias: null,
upgradeGoodsId: 6119,
upgradeGoodsName: "0522ymt其他精品002",
upgradeGoodsPosition: null,
upgradeGoodsServiceItemsList: null,
upgradeGoodsType: null,
upgradeGoodsTypeName: null,
validMinSellPrice: "N"
},
{
count: 1,
active: true,
errorTarget: false,
goodsAlias: "别名001",
goodsId: 15960,
lastOnShelfTime: 1747903884000,
maxSuitCarPrice: null,
merchantGoodsCode: "MG2025052215304361811",
merchantGoodsId: 15961,
merchantGoodsPosition: null,
minSellPrice: 1,
minSuitCarPrice: null,
position: null,
price: 4,
sellPrice: 4,
specificationData: "111111111;~;红色;~;超大大大;~;烦躁",
specificationNameSequence: "型号;~;颜色;~;规格;~;上班",
specificationStr: "111111111/红色/超大大大/烦躁",
specificationTypeSequence: "0;~;0;~;0;~;0",
upgradeGoodsAlias: null,
upgradeGoodsId: 6119,
upgradeGoodsName: "0522ymt其他精品002",
upgradeGoodsPosition: null,
upgradeGoodsServiceItemsList: null,
upgradeGoodsType: null,
upgradeGoodsTypeName: null,
validMinSellPrice: "N"
}
],
baseGoodsName: '太阳膜'
},
packageGoods: null
}, //多规格商品数据
}, },
closeTips() { closeTips() {
this.setData({ this.setData({
...@@ -383,7 +481,12 @@ Page({ ...@@ -383,7 +481,12 @@ Page({
value value
}, },
} = e.currentTarget.dataset } = e.currentTarget.dataset
let { isErrorOrder, switchVlaue, merchantPayList, djPayList } = this.data let {
isErrorOrder,
switchVlaue,
merchantPayList,
djPayList
} = this.data
if (isErrorOrder || switchVlaue) return if (isErrorOrder || switchVlaue) return
this.setData({ this.setData({
["orderObj.payeeType"]: value, ["orderObj.payeeType"]: value,
...@@ -472,8 +575,8 @@ Page({ ...@@ -472,8 +575,8 @@ Page({
goodsList[index].totalPrice = wx.$util.decimal(total, 2); goodsList[index].totalPrice = wx.$util.decimal(total, 2);
this.setData({ this.setData({
goodsList, goodsList,
}, },
() => { () => {
this.setGoodsTotal(goodsList); this.setGoodsTotal(goodsList);
} }
...@@ -755,10 +858,10 @@ Page({ ...@@ -755,10 +858,10 @@ Page({
// return // return
let apiName = let apiName =
save && !isErrorOrder ? save && !isErrorOrder ?
"createPrerecordedOrder" : "createPrerecordedOrder" :
isErrorOrder ? isErrorOrder ?
"correctionOrder" : "correctionOrder" :
"createWithPay"; "createWithPay";
apiName = orderCreateType == 'additionRecordOrder' ? 'supplementOrder' : apiName apiName = orderCreateType == 'additionRecordOrder' ? 'supplementOrder' : apiName
// 太阳膜下单入口 // 太阳膜下单入口
submitObj.filmOrder = 0; submitObj.filmOrder = 0;
...@@ -1505,6 +1608,7 @@ Page({ ...@@ -1505,6 +1608,7 @@ Page({
}) })
} }
if (e && !e.packageName) { if (e && !e.packageName) {
console.log(e.specificationData, e, e.specificationData.indexOf(';~;') > -1)
if (e.specificationData.indexOf(';~;') > -1) { if (e.specificationData.indexOf(';~;') > -1) {
// 修复取值字段名字错误问题 // 修复取值字段名字错误问题
if (!e.price) { if (!e.price) {
...@@ -1520,12 +1624,11 @@ Page({ ...@@ -1520,12 +1624,11 @@ Page({
e.count = e.number; e.count = e.number;
e.merchantGoodsId = e.merchantGoodsId || e.id; e.merchantGoodsId = e.merchantGoodsId || e.id;
let specificdata = this.handleSpecificationsEcho(e) let specificdata = this.handleSpecificationsEcho(e)
chooseList.push(specificdata) chooseList= chooseList.concat(specificdata)
} }
} }
}); });
} }
console.log(chooseList, 'chooseList')
this.setData({ this.setData({
goodsList: chooseList, goodsList: chooseList,
first: false, first: false,
...@@ -1533,7 +1636,7 @@ Page({ ...@@ -1533,7 +1636,7 @@ Page({
this.setGoodsTotal(chooseList); this.setGoodsTotal(chooseList);
}, },
handleSpecificationsEcho(item) { handleSpecificationsEcho(item) {
console.log(item) let skuArr = [];
let { let {
otherProduct otherProduct
} = this.data, } = this.data,
...@@ -1550,26 +1653,30 @@ Page({ ...@@ -1550,26 +1653,30 @@ Page({
if (data.goodsFlag == 2) { if (data.goodsFlag == 2) {
let tempData = data.multipleSpecificationsGoods.specificationGoodsMap[str] let tempData = data.multipleSpecificationsGoods.specificationGoodsMap[str]
if (tempData) { if (tempData) {
if (tempData.merchantGoodsId == item.goodsId) { tempData.forEach(temp => {
obj.multipleSpecificationsGoods = { if (temp.merchantGoodsId == item.goodsId) {
...data.multipleSpecificationsGoods, obj.multipleSpecificationsGoods = {
baseGoodsName: item.goodsName || item.upgradeGoodsName, ...data.multipleSpecificationsGoods,
goods: { baseGoodsName: item.goodsName || item.upgradeGoodsName,
...tempData, goods: {
price: item.price, ...temp,
sellPrice: item.price, price: item.price,
goodsId: item.goodsId, sellPrice: item.price,
specificationStr: item.specificationData.replace(/;~;/g, '/') goodsId: item.goodsId,
specificationStr: item.specificationData.replace(/;~;/g, '/')
}
} }
skuArr.push(obj)
} }
} })
} }
} }
}) })
console.log(obj) console.log(skuArr)
return obj return skuArr
}, },
divideByHundred: str => { divideByHundred: str => {
let floatVal = parseFloat(str) let floatVal = parseFloat(str)
...@@ -1639,7 +1746,12 @@ Page({ ...@@ -1639,7 +1746,12 @@ Page({
}); });
}, },
settingPayType(orderObj) { settingPayType(orderObj) {
let { configPayTypeList, isErrorOrder, switchVlaue, outTradeArr } = this.data let {
configPayTypeList,
isErrorOrder,
switchVlaue,
outTradeArr
} = this.data
// 补录或标记错误订单 // 补录或标记错误订单
if (isErrorOrder || switchVlaue) { if (isErrorOrder || switchVlaue) {
this.setData({ this.setData({
...@@ -1742,21 +1854,21 @@ Page({ ...@@ -1742,21 +1854,21 @@ Page({
// isStaff && // isStaff &&
// console.log(isErrorOrder, isAlreadyExistOrder); // console.log(isErrorOrder, isAlreadyExistOrder);
!(isErrorOrder || isAlreadyExistOrder) && !(isErrorOrder || isAlreadyExistOrder) &&
api api
.waitinputorder() .waitinputorder()
.then((result) => { .then((result) => {
let { let {
code, code,
data data
} = result; } = result;
this.setTime(); this.setTime();
if (code == 0) { if (code == 0) {
this.setData({ this.setData({
waitInputCount: data.waitInputCount, waitInputCount: data.waitInputCount,
}); });
} }
}) })
.catch((err) => { }); .catch((err) => {});
}, },
async onRoute(res) { async onRoute(res) {
// debugger // debugger
...@@ -1885,8 +1997,8 @@ Page({ ...@@ -1885,8 +1997,8 @@ Page({
} else { } else {
wx.$util.showLoading("加载中..."); wx.$util.showLoading("加载中...");
this.setData({ this.setData({
flag: true, flag: true,
}, },
() => { () => {
wx.$util.hideLoading(); wx.$util.hideLoading();
} }
...@@ -1944,15 +2056,15 @@ Page({ ...@@ -1944,15 +2056,15 @@ Page({
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { }, onPullDownRefresh: function () {},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () { }, onReachBottom: function () {},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () { }, onShareAppMessage: function () {},
}); });
\ No newline at end of file \ No newline at end of file
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"merchant-seles": "/components/Merchant-Seles/Merchant-Seles", "merchant-seles": "/components/Merchant-Seles/Merchant-Seles",
"coupon": "/components/Coupon/Coupon", "coupon": "/components/Coupon/Coupon",
"goods": "/components/Goods/Goods", "goods": "/components/Goods/Goods",
"sku-goods": "/components/SkuGoods/Goods",
"customerInfo": "/components/CustomerInfo/CustomerInfo", "customerInfo": "/components/CustomerInfo/CustomerInfo",
"sub-shop-merchant": "/components/subShopMerchant/subShopMerchant", "sub-shop-merchant": "/components/subShopMerchant/subShopMerchant",
"van-picker": "@vant/weapp/picker/index", "van-picker": "@vant/weapp/picker/index",
......
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
<text>¥</text> <text>¥</text>
<input type="digit" value="{{ item.goods.sellPrice }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.goods.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed /> <input type="digit" value="{{ item.goods.sellPrice }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 ||item.goods.goodsPriceModify}}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.goods.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="1">x{{item.count}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="1">x{{item.count}}</view>
</view> </view>
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
<text>¥</text> <text>¥</text>
<input type="digit" value="{{ item.goods.sellPrice }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.goods.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed /> <input type="digit" value="{{ item.goods.sellPrice }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0||item.goods.goodsPriceModify }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.goods.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="2">x{{item.count}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="2">x{{item.count}}</view>
</view> </view>
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
<text>¥</text> <text>¥</text>
<input type="digit" value="{{ item.goods.sellPrice }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{item.goods.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed /> <input type="digit" value="{{ item.goods.sellPrice }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 ||item.goods.goodsPriceModify}}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{item.goods.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="2">x{{item.count}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="2">x{{item.count}}</view>
</view> </view>
...@@ -247,7 +247,7 @@ ...@@ -247,7 +247,7 @@
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
<text>¥</text> <text>¥</text>
<input type="digit" value="{{ item.goods.sellPrice }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.goods.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed /> <input type="digit" value="{{ item.goods.sellPrice }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 ||item.goods.goodsPriceModify}}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.goods.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="2">x{{item.count}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="2">x{{item.count}}</view>
</view> </view>
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,7 @@
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
<text>¥</text> <text>¥</text>
<input type="digit" value="{{ item.goods.sellPrice }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.goods.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed /> <input type="digit" value="{{ item.goods.sellPrice }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0||item.goods.goodsPriceModify }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.goods.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="3">x{{item.count}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="3">x{{item.count}}</view>
</view> </view>
...@@ -318,7 +318,7 @@ ...@@ -318,7 +318,7 @@
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
<text>¥</text> <text>¥</text>
<input type="digit" value="{{ g.price }}" class="{{ g.errorTarget? 'error':'' }}" bindinput="changeMealPrice" data-item="{{ g }}" data-gindex="{{ gInx }}" data-index="{{ index }}" always-embed /> <input type="digit" value="{{ g.price }}" disabled="{{g.goodsPriceModify }}" class="{{ g.errorTarget? 'error':'' }}" bindinput="changeMealPrice" data-item="{{ g }}" data-gindex="{{ gInx }}" data-index="{{ index }}" always-embed />
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="3">x{{item.count}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="3">x{{item.count}}</view>
</view> </view>
...@@ -352,7 +352,7 @@ ...@@ -352,7 +352,7 @@
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
<text>¥</text> <text>¥</text>
<input type="digit" value="{{ item.goods.sellPrice }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.goods.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed /> <input type="digit" value="{{ item.goods.sellPrice }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0||item.goods.goodsPriceModify }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.goods.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="4">x{{item.count}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="4">x{{item.count}}</view>
</view> </view>
...@@ -375,10 +375,10 @@ ...@@ -375,10 +375,10 @@
</view> </view>
<view class="bottom_box"> <view class="bottom_box">
<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 class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
<text>¥</text> <text>¥</text>
<input type="digit" value="{{ item.multipleSpecificationsGoods.goods.sellPrice }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.multipleSpecificationsGoods.goods.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed /> <input type="digit" value="{{ item.multipleSpecificationsGoods.goods.sellPrice }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0||item.multipleSpecificationsGoods.goods.goodsPriceModify }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.multipleSpecificationsGoods.goods.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="4">x{{item.count}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="4">x{{item.count}}</view>
</view> </view>
...@@ -472,6 +472,7 @@ ...@@ -472,6 +472,7 @@
<remark-popup wx:if="{{ showRemark }}" show="{{ showRemark }}" bindconfirm="remarkConfirm" placeholder="请填写内容,最多30个字" maxlength="30" value="{{ orderObj.remark }}" /> <remark-popup wx:if="{{ showRemark }}" show="{{ showRemark }}" bindconfirm="remarkConfirm" placeholder="请填写内容,最多30个字" maxlength="30" value="{{ orderObj.remark }}" />
<coupon id="coupon" show="{{ couponBox }}" class="coupon" orderCreateType="{{ orderCreateType }}" bindconfirm="chooseCoupon" merchantId="{{ orderObj.merchantId }}" customerPhone="{{ orderObj.customer.customerPhone }}" yqMerchantId="{{ orderObj.sellerMerchantId }}" selectPayType="{{ orderObj.selectPayType }}" returnFun="{{ scene }}" /> <coupon id="coupon" show="{{ couponBox }}" class="coupon" orderCreateType="{{ orderCreateType }}" bindconfirm="chooseCoupon" merchantId="{{ orderObj.merchantId }}" customerPhone="{{ orderObj.customer.customerPhone }}" yqMerchantId="{{ orderObj.sellerMerchantId }}" selectPayType="{{ orderObj.selectPayType }}" returnFun="{{ scene }}" />
<goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ goodsData }}" chooseGoodsList="{{ goodsList }}" isSolarFilm="{{ true }}" baseConfigData="{{ baseConfigData }}" /> <goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ goodsData }}" chooseGoodsList="{{ goodsList }}" isSolarFilm="{{ true }}" baseConfigData="{{ baseConfigData }}" />
<sku-goods show="{{ skuGoodsBox }}" sceneType="1" goodsData="{{ skuGoodsData }}" chooseGoodsList="{{ goodsList }}"></sku-goods>
<customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" /> <customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" />
<van-popup show="{{ showSource }}" position="bottom" bind:close="onCloseSource"> <van-popup show="{{ showSource }}" position="bottom" bind:close="onCloseSource">
<van-picker show-toolbar title="客户来源" bind:cancel="onCloseSource" columns="{{ Sourcecolumns }}" value-key="name" bind:confirm="onChangeSource" /> <van-picker show-toolbar title="客户来源" bind:cancel="onCloseSource" columns="{{ Sourcecolumns }}" value-key="name" bind:confirm="onChangeSource" />
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!