|
@@ -180,27 +180,27 @@ export default {
|
|
const _this = this
|
|
const _this = this
|
|
this.$refs.ruleForm.validate(valid => {
|
|
this.$refs.ruleForm.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- _this.form.type = 'offline'
|
|
|
|
// 通用必填时判断
|
|
// 通用必填时判断
|
|
- _this.isHandleOk();
|
|
|
|
- _this.form.offlineProductList = _this.loadData
|
|
|
|
- _this.$emit('ok', _this.form)
|
|
|
|
- _this.isShow = false
|
|
|
|
|
|
+ _this.isHandleOk()
|
|
} else {
|
|
} else {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- isHandleOk(){
|
|
|
|
- let _this=this
|
|
|
|
- let flag=_this.loadData.includes()
|
|
|
|
- _this.loadData.forEach(item=>{
|
|
|
|
- if(!item.commonSn){
|
|
|
|
|
|
+ isHandleOk () {
|
|
|
|
+ const _this = this
|
|
|
|
+ if (_this.form.offlineReasonType == '通用') {
|
|
|
|
+ const flag = _this.loadData.some(item => !item.commonSn)
|
|
|
|
+ if (flag) {
|
|
_this.$message.warning('通用编码不能为空!')
|
|
_this.$message.warning('通用编码不能为空!')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+ }
|
|
|
|
+ _this.form.type = 'offline'
|
|
|
|
+ _this.form.offlineProductList = _this.loadData
|
|
|
|
+ _this.$emit('ok', _this.form)
|
|
|
|
+ _this.isShow = false
|
|
},
|
|
},
|
|
// 导出
|
|
// 导出
|
|
handleError () {
|
|
handleError () {
|