其他入库单-->选择商品-->弹窗
1:JSelectMaterialModal.vue
选择商品,回调JSelectList的@ok方法
handleSubmit() {
let that = this;
this.getSelectMaterialRows();
that.$emit('ok', that.selectMaterialRows, that.selectMaterialIds);
that.searchReset(0)
that.close();
},
2:JSelectList.vue
回调JEditableTable的@change方法
selectOK(rows, idstr) {
console.log("选中id", idstr)
if (!rows) {
this.ids = ''
} else {
this.names = idstr
this.ids = idstr
}
this.$emit("change", this.ids)
}
3:JEditableTable.vue(动态渲染OtherInModal中配置的materialTable.columns表单列)
回调OtherInModal的@valueChange方法
handleChangePopupJshCommon(value, id, row, column,index) {
this.popupJshValues = this.bindValuesChange(value, id, 'popupJshValues')
// 做单个表单验证
this.validateOneInput(value, row, column, this.notPassedIds, true, 'change')
// 触发valueChange 事件
this.elemValueChange(FormTypes.popupJsh, row, column, value)
},
/** value 触发valueChange事件 */
elemValueChange(type, rowSource, columnSource, value) {
let column = Object.assign({}, columnSource)
// 将caseId去除
let row = Object.assign({}, rowSource)
row.id = this.getCleanId(row.id)
// 获取整行的数据
let { values } = this.getValuesSync({ validate: false, rowIds: [row.id] })
if (values.length > 0) {
Object.assign(row, values[0])
}
this.$emit('valueChange', { type, row, column, value, target: this })
},
4:OtherInModal.vue
调用BillModalMixin.js的onValueChange方法
//单元值改变一个字符就触发一次
onValueChange(event) {
let that = this
const { type