|
@@ -942,6 +942,17 @@ export default {
|
|
|
if(this.oldList.length < 1) return this.$errorMsg('以旧换新需要添加旧机信息');
|
|
|
}
|
|
|
|
|
|
+ for(let i = 0; i < this.goodsList.length; i++) {
|
|
|
+ if(this.goodsList[i].flag == 1) {
|
|
|
+ if(!this.goodsList[i].goodsId) return this.$errorMsg('请完善商品信息-商品名称');
|
|
|
+ if(!this.goodsList[i].goodsSpecId) return this.$errorMsg('请完善商品信息-规格型号');
|
|
|
+ } else {
|
|
|
+ if(!this.goodsList[i].goodsMaterialId) return this.$errorMsg('请完善商品信息-商品名称/规格型号');
|
|
|
+ }
|
|
|
+ if(!this.goodsList[i].num) return this.$errorMsg('请完善商品信息-订单数量');
|
|
|
+ if(!this.goodsList[i].price) return this.$errorMsg('请完善商品信息-单价');
|
|
|
+ }
|
|
|
+
|
|
|
let orderSmallTypeText = this.orderTypeList.find(o => o.id == this.formData.orderSmallType).orderSmallTypeText;
|
|
|
let oldList = this.oldList.map(item => {
|
|
|
return {
|