1
This commit is contained in:
@@ -206,7 +206,9 @@ export default {
|
|||||||
this.config = res.data
|
this.config = res.data
|
||||||
this.form.fileId = res.data.fileId || ''
|
this.form.fileId = res.data.fileId || ''
|
||||||
this.form.sheetId = res.data.sheetId || ''
|
this.form.sheetId = res.data.sheetId || ''
|
||||||
this.form.startRow = res.data.startRow || 3
|
// 确保 startRow 是数字类型
|
||||||
|
this.form.startRow = parseInt(res.data.startRow) || 3
|
||||||
|
console.log('配置加载成功 - startRow:', this.form.startRow, 'type:', typeof this.form.startRow)
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.$message.error('加载配置失败:' + (e.message || '未知错误'))
|
this.$message.error('加载配置失败:' + (e.message || '未知错误'))
|
||||||
@@ -283,8 +285,16 @@ export default {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$message.success('配置保存成功')
|
this.$message.success(`配置保存成功!从第${this.form.startRow}行开始匹配单号`)
|
||||||
this.loadConfig() // 重新加载配置
|
console.log('配置保存成功 - 保存的值:', {
|
||||||
|
fileId: this.form.fileId,
|
||||||
|
sheetId: this.form.sheetId,
|
||||||
|
startRow: this.form.startRow
|
||||||
|
})
|
||||||
|
// 延迟重新加载配置,确保后端已保存
|
||||||
|
setTimeout(() => {
|
||||||
|
this.loadConfig()
|
||||||
|
}, 500)
|
||||||
this.$emit('config-updated')
|
this.$emit('config-updated')
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('保存失败:' + (res.msg || '未知错误'))
|
this.$message.error('保存失败:' + (res.msg || '未知错误'))
|
||||||
|
|||||||
Reference in New Issue
Block a user