|
|
@@ -93,6 +93,7 @@ export default {
|
|
|
},
|
|
|
// 表单验证
|
|
|
async formSubmit(e) {
|
|
|
+ console.log(this.selectList)
|
|
|
try {
|
|
|
// 表单规则
|
|
|
let rules = [];
|
|
|
@@ -114,10 +115,13 @@ export default {
|
|
|
];
|
|
|
rules = rules.concat(temp);
|
|
|
}
|
|
|
- const product = this.selectList.map(ele => {
|
|
|
- return { productId: ele.id, bigNum: ele.bigCount, smallNum: ele.smallCount };
|
|
|
- });
|
|
|
- formData.product = JSON.stringify(product);
|
|
|
+ if(!this.$util.isEmpty(this.selectList)){
|
|
|
+ const product = this.selectList.map(ele => {
|
|
|
+ return { productId: ele.id, bigNum: ele.bigCount, smallNum: ele.smallCount };
|
|
|
+ });
|
|
|
+ formData.product = JSON.stringify(product);
|
|
|
+ }
|
|
|
+
|
|
|
if (!this.getMerchantInfo) {
|
|
|
await this.initMerchantInfo();
|
|
|
}
|
|
|
@@ -125,8 +129,9 @@ export default {
|
|
|
if (this.waySele == 1) {
|
|
|
formData.sendCost = "免运费";
|
|
|
}
|
|
|
- console.log(9999, formData);
|
|
|
let checkRes = formUtil.validation(formData, rules);
|
|
|
+ console.log(checkRes);
|
|
|
+
|
|
|
// 验证通过!
|
|
|
if (!checkRes) {
|
|
|
this.confirmFn(formData);
|
|
|
@@ -134,7 +139,7 @@ export default {
|
|
|
this.$msg(checkRes);
|
|
|
}
|
|
|
} catch (error) {
|
|
|
- console.log(999999, error);
|
|
|
+ console.log(999999888, error);
|
|
|
}
|
|
|
},
|
|
|
gobackEvent() {
|