|
|
|
@ -502,6 +502,7 @@ export default { |
|
|
|
|
methods: { |
|
|
|
|
showEdit(goodsId) { |
|
|
|
|
// 记录商品ID |
|
|
|
|
GoodsModel.formData.goods = {} |
|
|
|
|
this.visible = true |
|
|
|
|
this.goodsId = goodsId |
|
|
|
|
this.initData() |
|
|
|
@ -528,8 +529,10 @@ export default { |
|
|
|
|
// 第二次赋值 (适用于动态渲染的form-item) |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
this.form.setFieldsValue(GoodsModel.getFieldsValue2()) |
|
|
|
|
|
|
|
|
|
this.ruleList = this.formData.goods.rules ? this.formData.goods.rules : [] |
|
|
|
|
this.onForceUpdate() |
|
|
|
|
this.$forceUpdate() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
// this.ruleList = record.rule.map((item, index) => { return { ...item, key: index } }) |
|
|
|
|