|
@@ -125,8 +125,10 @@ export default {
|
|
|
],
|
|
|
loadData: [],
|
|
|
form: {
|
|
|
+ type: 'offline',
|
|
|
offlineReasonType: undefined,
|
|
|
- offlineRemark: ''
|
|
|
+ offlineRemark: '',
|
|
|
+ offlineProductList: []
|
|
|
},
|
|
|
nowUnColumns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: '3%', align: 'center' },
|
|
@@ -190,16 +192,14 @@ export default {
|
|
|
},
|
|
|
isHandleOk () {
|
|
|
const _this = this
|
|
|
- if (_this.form.offlineReasonType == '通用') {
|
|
|
+ if (_this.form.offlineReasonType === '通用') {
|
|
|
const flag = _this.loadData.some(item => !item.commonSn)
|
|
|
if (flag) {
|
|
|
_this.$message.warning('通用编码不能为空!')
|
|
|
- return
|
|
|
}
|
|
|
}
|
|
|
- _this.form.type = 'offline'
|
|
|
- _this.form.offlineProductList = _this.loadData
|
|
|
- _this.$emit('ok', _this.form)
|
|
|
+ _this.$set(_this.form, 'offlineProductList', _this.loadData)
|
|
|
+ _this.$emit('ok', JSON.parse(JSON.stringify(_this.form)))
|
|
|
_this.isShow = false
|
|
|
},
|
|
|
// 导出
|
|
@@ -227,8 +227,10 @@ export default {
|
|
|
this.loadData = []
|
|
|
this.unLoadData = []
|
|
|
this.form = {
|
|
|
- offlineReasonType: '',
|
|
|
- offlineRemark: ''
|
|
|
+ type: 'offline',
|
|
|
+ offlineReasonType: undefined,
|
|
|
+ offlineRemark: '',
|
|
|
+ offlineProductList: []
|
|
|
}
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
} else {
|