1
This commit is contained in:
@@ -99,6 +99,20 @@
|
|||||||
例如:BB08J2
|
例如:BB08J2
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="起始行号:" prop="startRow">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.startRow"
|
||||||
|
:min="1"
|
||||||
|
:max="1000"
|
||||||
|
placeholder="从第几行开始搜索匹配单号"
|
||||||
|
style="width: 100%;"
|
||||||
|
/>
|
||||||
|
<div style="font-size: 12px; color: #909399; margin-top: 5px;">
|
||||||
|
<i class="el-icon-info"></i>
|
||||||
|
从第几行开始搜索匹配单号(默认为3,即第1行标题、第2行表头、第3行开始为数据)
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
@@ -151,7 +165,8 @@ export default {
|
|||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
fileId: '',
|
fileId: '',
|
||||||
sheetId: ''
|
sheetId: '',
|
||||||
|
startRow: 3
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
fileId: [
|
fileId: [
|
||||||
@@ -159,6 +174,10 @@ export default {
|
|||||||
],
|
],
|
||||||
sheetId: [
|
sheetId: [
|
||||||
{ required: true, message: '请输入工作表ID', trigger: 'blur' }
|
{ required: true, message: '请输入工作表ID', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
startRow: [
|
||||||
|
{ required: true, message: '请输入起始行号', trigger: 'blur' },
|
||||||
|
{ type: 'number', min: 1, message: '起始行号必须大于0', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
sheetList: [],
|
sheetList: [],
|
||||||
@@ -187,6 +206,7 @@ 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
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.$message.error('加载配置失败:' + (e.message || '未知错误'))
|
this.$message.error('加载配置失败:' + (e.message || '未知错误'))
|
||||||
@@ -258,7 +278,8 @@ export default {
|
|||||||
try {
|
try {
|
||||||
const res = await updateAutoWriteConfig({
|
const res = await updateAutoWriteConfig({
|
||||||
fileId: this.form.fileId,
|
fileId: this.form.fileId,
|
||||||
sheetId: this.form.sheetId
|
sheetId: this.form.sheetId,
|
||||||
|
startRow: this.form.startRow
|
||||||
})
|
})
|
||||||
|
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
@@ -318,6 +339,7 @@ export default {
|
|||||||
this.$message.success('配置已清除')
|
this.$message.success('配置已清除')
|
||||||
this.form.fileId = ''
|
this.form.fileId = ''
|
||||||
this.form.sheetId = ''
|
this.form.sheetId = ''
|
||||||
|
this.form.startRow = 3
|
||||||
this.sheetList = []
|
this.sheetList = []
|
||||||
this.loadConfig()
|
this.loadConfig()
|
||||||
this.$emit('config-updated')
|
this.$emit('config-updated')
|
||||||
|
|||||||
Reference in New Issue
Block a user