|
@@ -1657,9 +1657,12 @@ export default {
|
|
|
manufacturerAddress: [
|
|
manufacturerAddress: [
|
|
|
{required: true, message: "生产企业地址不能为空", trigger: "blur"}
|
|
{required: true, message: "生产企业地址不能为空", trigger: "blur"}
|
|
|
],
|
|
],
|
|
|
- reviewAudit: [
|
|
|
|
|
- {required: true, message: "审核资质不能为空!", trigger: "blur"}
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ // reviewAudit: [
|
|
|
|
|
+ // {required: true, message: "审核资质不能为空!", trigger: "blur"}
|
|
|
|
|
+ // ],
|
|
|
|
|
+ // businessLink: [
|
|
|
|
|
+ // { required: true, message: "非首营链接不能为空!", trigger: "change" }
|
|
|
|
|
+ // ],
|
|
|
business: [
|
|
business: [
|
|
|
{ required: true, message: "营业执照不能为空!", trigger: "blur" }
|
|
{ required: true, message: "营业执照不能为空!", trigger: "blur" }
|
|
|
],
|
|
],
|
|
@@ -1690,9 +1693,6 @@ export default {
|
|
|
gmpAuthExpire: [
|
|
gmpAuthExpire: [
|
|
|
{ required: true, message: "GMP认证有效期不能为空!", trigger: "change" }
|
|
{ required: true, message: "GMP认证有效期不能为空!", trigger: "change" }
|
|
|
],
|
|
],
|
|
|
- businessLink: [
|
|
|
|
|
- { required: true, message: "非首营链接不能为空!", trigger: "change" }
|
|
|
|
|
- ],
|
|
|
|
|
indications: [
|
|
indications: [
|
|
|
{ required: true, message: "功能主治不能为空", trigger: "blur" }
|
|
{ required: true, message: "功能主治不能为空", trigger: "blur" }
|
|
|
],
|
|
],
|
|
@@ -2396,6 +2396,7 @@ export default {
|
|
|
this.$refs["form"].validate(valid => {
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
let checkBoolean = false
|
|
let checkBoolean = false
|
|
|
|
|
+ let itemErrMsg = ''
|
|
|
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;
|
|
@@ -2403,17 +2404,28 @@ export default {
|
|
|
this.form.items = this.attrs;
|
|
this.form.items = this.attrs;
|
|
|
this.form.values = this.manyFormValidate;
|
|
this.form.values = this.manyFormValidate;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
//验证是否填写商品编码
|
|
//验证是否填写商品编码
|
|
|
this.form.values.forEach(item => {
|
|
this.form.values.forEach(item => {
|
|
|
if (item.barCode == null || item.barCode === '') {
|
|
if (item.barCode == null || item.barCode === '') {
|
|
|
|
|
+ itemErrMsg = "规格/型号,商品条码不能为空!";
|
|
|
|
|
+ return checkBoolean = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(item.price == null || item.price === '' || item.price === 0){
|
|
|
|
|
+ itemErrMsg = "规格/型号,商品售价不能为空且不能为0!";
|
|
|
|
|
+ return checkBoolean = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(item.cost == null || item.cost === ''){
|
|
|
|
|
+ itemErrMsg = "规格/型号,商品成本价不能为空!";
|
|
|
|
|
+ return checkBoolean = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(item.otPrice == null || item.otPrice === ''){
|
|
|
|
|
+ itemErrMsg = "规格/型号,商品原价不能为空!";
|
|
|
return checkBoolean = true;
|
|
return checkBoolean = true;
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
if (checkBoolean) {
|
|
if (checkBoolean) {
|
|
|
- return this.$message.warning("规格/型号,商品条码不能为空!");
|
|
|
|
|
|
|
+ return this.$message.warning(itemErrMsg);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
if (this.form.specType === 1 && this.manyFormValidate.length === 0) {
|
|
if (this.form.specType === 1 && this.manyFormValidate.length === 0) {
|
|
|
return this.$message.warning('请点击生成规格!');
|
|
return this.$message.warning('请点击生成规格!');
|
|
|
}
|
|
}
|