|
|
|
@ -89,12 +89,12 @@ |
|
|
|
|
> |
|
|
|
|
<a-date-picker |
|
|
|
|
format="YYYY-MM-DD" |
|
|
|
|
v-decorator="[`historysTime${index}`, { rules: [{ required: true, message: '请指定日期' }] }]" |
|
|
|
|
v-decorator="[`historysTime${k.id}`, { rules: [{ required: true, message: '请指定日期' }] }]" |
|
|
|
|
style="width: 30%; margin-right: 8px" |
|
|
|
|
/> |
|
|
|
|
<a-input |
|
|
|
|
placeholder="请输入门店历史" |
|
|
|
|
v-decorator="[`historysContenmt${index}`, { rules: [{ required: true }] }]" |
|
|
|
|
v-decorator="[`historysContenmt${k.id}`, { rules: [{ required: true }] }]" |
|
|
|
|
style="width: 30%; margin-right: 8px" |
|
|
|
|
/> |
|
|
|
|
<a-icon |
|
|
|
@ -265,14 +265,14 @@ export default { |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
record.historys.forEach((x, i) => { |
|
|
|
|
x.time && (record[`historysTime${i}`] = moment(new Date(x.time))) |
|
|
|
|
record[`historysContenmt${i}`] = x.contenmt |
|
|
|
|
x.time && (record[`historysTime${x.id}`] = moment(new Date(x.time))) |
|
|
|
|
record[`historysContenmt${x.id}`] = x.contenmt |
|
|
|
|
|
|
|
|
|
timeAry.push(`historysTime${i}`) |
|
|
|
|
contenmtAry.push(`historysContenmt${i}`) |
|
|
|
|
timeAry.push(`historysTime${x.id}`) |
|
|
|
|
contenmtAry.push(`historysContenmt${x.id}`) |
|
|
|
|
|
|
|
|
|
this.form.getFieldDecorator(`historysTime${i}`, { initialValue: '', preserve: true }) |
|
|
|
|
this.form.getFieldDecorator(`historysContenmt${i}`, { initialValue: '', preserve: true }) |
|
|
|
|
this.form.getFieldDecorator(`historysTime${x.id}`, { initialValue: '', preserve: true }) |
|
|
|
|
this.form.getFieldDecorator(`historysContenmt${x.id}`, { initialValue: '', preserve: true }) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -323,7 +323,6 @@ export default { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
keys.splice(index, 1) |
|
|
|
|
console.log(keys) |
|
|
|
|
|
|
|
|
|
form.setFieldsValue({ |
|
|
|
|
historys: keys, |
|
|
|
@ -365,8 +364,8 @@ export default { |
|
|
|
|
const form = { ...values, remark: this.tags, shop_image_id: values.shop_image_id.join(',') } |
|
|
|
|
form.history = form.historys.map((x, i) => { |
|
|
|
|
return { |
|
|
|
|
time: form[`historysTime${i}`] && form[`historysTime${i}`].format('YYYY-MM-DD'), |
|
|
|
|
contenmt: form[`historysContenmt${i}`], |
|
|
|
|
time: form[`historysTime${x.id}`] && form[`historysTime${x.id}`].format('YYYY-MM-DD'), |
|
|
|
|
contenmt: form[`historysContenmt${x.id}`], |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|