|
|
@@ -307,33 +307,33 @@ export default {
|
|
|
this.form.city = e.cityName;
|
|
|
},
|
|
|
async confirmFn() {
|
|
|
- try {
|
|
|
- const { orderSn } = this.option;
|
|
|
- let formData = this.form;
|
|
|
- if (orderSn) {
|
|
|
- formData.orderSn = orderSn;
|
|
|
- }
|
|
|
- const itemInfo = this.selectList.map(ele => {
|
|
|
- return {
|
|
|
- classId: ele.classId,
|
|
|
- productId: ele.id,
|
|
|
- bigNum: ele.bigCount,
|
|
|
- smallNum: ele.smallCount,
|
|
|
- itemId:ele.itemId,
|
|
|
- itemPrice: ele.userPrice
|
|
|
- };
|
|
|
- });
|
|
|
- formData.itemInfo = JSON.stringify(itemInfo);
|
|
|
- if (!this.getMerchantInfo) {
|
|
|
- await this.initMerchantInfo();
|
|
|
+
|
|
|
+ const { orderSn } = this.option;
|
|
|
+ let formData = this.form;
|
|
|
+ if (orderSn) {
|
|
|
+ formData.orderSn = orderSn;
|
|
|
+ }
|
|
|
+ const itemInfo = this.selectList.map(ele => {
|
|
|
+ return {
|
|
|
+ classId: ele.classId,
|
|
|
+ productId: ele.id,
|
|
|
+ bigNum: ele.bigCount,
|
|
|
+ smallNum: ele.smallCount,
|
|
|
+ itemId:ele.itemId,
|
|
|
+ itemPrice: ele.userPrice
|
|
|
}
|
|
|
- const res = await createPurchaseOrderApi({...formData,modifyPrice:this.modifyPrice,cgModel:this.getLoginInfo.cgModel});
|
|
|
- uni.setStorageSync('flowersItemInfo', itemInfo);
|
|
|
-
|
|
|
- this.removeMemoryDirect(this.form.ghsId)
|
|
|
+ })
|
|
|
+ formData.itemInfo = JSON.stringify(itemInfo)
|
|
|
+ if (!this.getMerchantInfo) {
|
|
|
+ await this.initMerchantInfo()
|
|
|
+ }
|
|
|
+ const res = await createPurchaseOrderApi({...formData,modifyPrice:this.modifyPrice,cgModel:this.getLoginInfo.cgModel})
|
|
|
+ uni.setStorageSync('flowersItemInfo', itemInfo)
|
|
|
+
|
|
|
+ this.removeMemoryDirect(this.form.ghsId)
|
|
|
+
|
|
|
+ uni.reLaunch({url:'/pagesPurchase/components/pageSuccess?orderSn='+res.data.orderSn})
|
|
|
|
|
|
- uni.reLaunch({url:'/pagesPurchase/components/pageSuccess?orderSn='+res.data.orderSn})
|
|
|
- } catch (error) {}
|
|
|
},
|
|
|
formSubmitFun(){
|
|
|
let that = this;
|