|
|
@@ -12,7 +12,7 @@
|
|
|
<text class="item-name">{{ item.itemName }}</text>
|
|
|
<text class="item-price">
|
|
|
<text class="price">
|
|
|
- ¥{{ getSelectItemPrice(item) }}
|
|
|
+ ¥{{ item.userPrice ? parseFloat(item.userPrice) : 0 }}
|
|
|
</text>
|
|
|
</text>
|
|
|
</view>
|
|
|
@@ -207,12 +207,25 @@ export default {
|
|
|
this.clientInfo = info;
|
|
|
},
|
|
|
affirmFormSubmit(){
|
|
|
- const product = this.selectList.map(ele => {
|
|
|
- return { productId: ele.id, bigNum: ele.bigCount, smallNum: ele.smallCount,classId:ele.classId,itemId:ele.itemId };
|
|
|
- });
|
|
|
+
|
|
|
+ if(this.$util.isEmpty(this.selectList)){
|
|
|
+ this.$msg('请选择花材')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ let product = []
|
|
|
+ this.selectList.forEach((item,idx,arr) => {
|
|
|
+ let unitType = Number(item.bigCount)>0 ? 0 : 1
|
|
|
+ let num = Number(item.bigCount)>0 ? Number(item.bigCount) : Number(item.smallCount)
|
|
|
+ let unitPrice = item.userPrice ? item.userPrice : 0
|
|
|
+ let current = {productId:item.id,bigNum:item.bigCount,smallNum:item.smallCount,classId:item.classId,num:num,
|
|
|
+ itemId:item.itemId,property:item.property,unitType:unitType,unitPrice:unitPrice}
|
|
|
+ product.push(current)
|
|
|
+ })
|
|
|
+ let packingFee = Number(this.packingMoney) > 0 ? Number(this.packingMoney) : 0
|
|
|
let options = {
|
|
|
orderType:2,// 开单类型,1商品开单 2花材开单
|
|
|
- packingFee:this.packingMoney,// 包装费
|
|
|
+ packingFee:packingFee,// 包装费
|
|
|
sendCost:this.freight,// 运费
|
|
|
customId:this.clientInfo.id,// 客户
|
|
|
payWay:this.payType,//付款方式
|
|
|
@@ -220,14 +233,16 @@ export default {
|
|
|
modifyPrice: this.modifyPrice,
|
|
|
product:JSON.stringify(product),//下单商品
|
|
|
};
|
|
|
- let self = this;
|
|
|
+ let that = this;
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
content: '确认开单?',
|
|
|
success: function (res) {
|
|
|
if (res.confirm) {
|
|
|
createOrder(options).then(res => {
|
|
|
- self.resetSelectInfoByType(self.pageType);
|
|
|
+
|
|
|
+ that.removeFromSaveDirect()
|
|
|
+
|
|
|
const { data: { orderId, orderSn } } = res
|
|
|
let url = `/admin/billing/result?orderId=${orderId}&orderSn=${orderSn}&type=zuhe`;
|
|
|
uni.redirectTo({url: url})
|