|
@@ -697,7 +697,11 @@
|
|
|
<a @click="delAttrTable(scope.$index)" align="center">删除</a>
|
|
<a @click="delAttrTable(scope.$index)" align="center">删除</a>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-else align="center">
|
|
<div v-else align="center">
|
|
|
- <el-input v-model="scope.row[scope.column.property]" align="center" />
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="scope.row[scope.column.property]"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ :placeholder="scope.column.property === 'barCode' ? '必填' : ''"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -744,7 +748,7 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="barCode" label="商品编号" width="130px" align="center">
|
|
<el-table-column prop="barCode" label="商品编号" width="130px" align="center">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="text" v-model="scope.row.barCode"/>
|
|
|
|
|
|
|
+ <el-input type="text" v-model="scope.row.barCode" placeholder="必填" required/>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="barCode" label="组合编号" width="130px" align="center">
|
|
<el-table-column prop="barCode" label="组合编号" width="130px" align="center">
|
|
@@ -1751,12 +1755,27 @@ export default {
|
|
|
if(this.form.specType ===0 ){
|
|
if(this.form.specType ===0 ){
|
|
|
this.form.items = [];
|
|
this.form.items = [];
|
|
|
this.form.values = this.oneFormValidate;
|
|
this.form.values = this.oneFormValidate;
|
|
|
|
|
+ // 验证单规格商品编码必填
|
|
|
|
|
+ if (!this.oneFormValidate || this.oneFormValidate.length === 0) {
|
|
|
|
|
+ return this.$message.warning('请填写商品规格信息!');
|
|
|
|
|
+ }
|
|
|
|
|
+ for (let i = 0; i < this.oneFormValidate.length; i++) {
|
|
|
|
|
+ if (!this.oneFormValidate[i].barCode || this.oneFormValidate[i].barCode.trim() === '') {
|
|
|
|
|
+ return this.$message.warning('商品规格中的商品编号不能为空!');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}else{
|
|
}else{
|
|
|
this.form.items = this.attrs;
|
|
this.form.items = this.attrs;
|
|
|
this.form.values = this.manyFormValidate;
|
|
this.form.values = this.manyFormValidate;
|
|
|
- }
|
|
|
|
|
- if(this.form.specType === 1 && this.manyFormValidate.length===0){
|
|
|
|
|
- return this.$message.warning('请点击生成规格!');
|
|
|
|
|
|
|
+ // 验证多规格商品编码必填
|
|
|
|
|
+ if(this.manyFormValidate.length===0){
|
|
|
|
|
+ return this.$message.warning('请点击生成规格!');
|
|
|
|
|
+ }
|
|
|
|
|
+ for (let i = 0; i < this.manyFormValidate.length; i++) {
|
|
|
|
|
+ if (!this.manyFormValidate[i].barCode || this.manyFormValidate[i].barCode.trim() === '') {
|
|
|
|
|
+ return this.$message.warning('商品规格中的商品编号不能为空!');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
// 组装companyIds
|
|
// 组装companyIds
|
|
|
if (this.form.companyIds != null && this.form.companyIds != undefined) {
|
|
if (this.form.companyIds != null && this.form.companyIds != undefined) {
|