1
This commit is contained in:
@@ -26,7 +26,16 @@ export function refreshTencentDocToken(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 根据单号填充物流链接
|
||||
// 填充单个订单的物流链接(直接传单号和物流链接)
|
||||
export function fillSingleLogistics(thirdPartyOrderNo, logisticsLink) {
|
||||
return request({
|
||||
url: '/jarvis/tendoc/fillSingleLogistics',
|
||||
method: 'post',
|
||||
data: { thirdPartyOrderNo, logisticsLink }
|
||||
})
|
||||
}
|
||||
|
||||
// 批量同步物流链接(从数据库读取订单物流信息并填充到表格)
|
||||
export function fillLogisticsByOrderNo(data) {
|
||||
return request({
|
||||
url: '/jarvis/tendoc/fillLogisticsByOrderNo',
|
||||
|
||||
@@ -100,16 +100,29 @@
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="起始行号:" prop="startRow">
|
||||
<el-form-item label="表头行号:" prop="headerRow">
|
||||
<el-input-number
|
||||
v-model="form.startRow"
|
||||
v-model="form.headerRow"
|
||||
:min="1"
|
||||
placeholder="从第几行开始搜索匹配单号"
|
||||
placeholder="表头所在的行号"
|
||||
style="width: 100%;"
|
||||
/>
|
||||
<div style="font-size: 12px; color: #909399; margin-top: 5px;">
|
||||
<i class="el-icon-info"></i>
|
||||
从第几行开始搜索匹配单号(默认为3,即第1行标题、第2行表头、第3行开始为数据)
|
||||
表头所在的行(包含"单号"、"物流单号"等列名),默认为2
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="数据起始行:" prop="startRow">
|
||||
<el-input-number
|
||||
v-model="form.startRow"
|
||||
:min="1"
|
||||
placeholder="数据从第几行开始"
|
||||
style="width: 100%;"
|
||||
/>
|
||||
<div style="font-size: 12px; color: #909399; margin-top: 5px;">
|
||||
<i class="el-icon-info"></i>
|
||||
数据从第几行开始(默认为3,表示第3行是第一条数据)
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -205,6 +218,7 @@ export default {
|
||||
form: {
|
||||
fileId: '',
|
||||
sheetId: '',
|
||||
headerRow: 2,
|
||||
startRow: 3
|
||||
},
|
||||
rules: {
|
||||
@@ -214,9 +228,13 @@ export default {
|
||||
sheetId: [
|
||||
{ required: true, message: '请输入工作表ID', trigger: 'blur' }
|
||||
],
|
||||
headerRow: [
|
||||
{ required: true, message: '请输入表头行号', trigger: 'blur' },
|
||||
{ type: 'number', min: 1, message: '表头行号必须大于0', trigger: 'blur' }
|
||||
],
|
||||
startRow: [
|
||||
{ required: true, message: '请输入起始行号', trigger: 'blur' },
|
||||
{ type: 'number', min: 1, message: '起始行号必须大于0', trigger: 'blur' }
|
||||
{ required: true, message: '请输入数据起始行', trigger: 'blur' },
|
||||
{ type: 'number', min: 1, message: '数据起始行必须大于0', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
sheetList: [],
|
||||
@@ -245,9 +263,10 @@ export default {
|
||||
this.config = res.data
|
||||
this.form.fileId = res.data.fileId || ''
|
||||
this.form.sheetId = res.data.sheetId || ''
|
||||
// 确保 startRow 是数字类型
|
||||
// 确保 headerRow 和 startRow 是数字类型
|
||||
this.form.headerRow = parseInt(res.data.headerRow) || 2
|
||||
this.form.startRow = parseInt(res.data.startRow) || 3
|
||||
console.log('配置加载成功 - startRow:', this.form.startRow, 'type:', typeof this.form.startRow)
|
||||
console.log('配置加载成功 - headerRow:', this.form.headerRow, 'startRow:', this.form.startRow)
|
||||
}
|
||||
} catch (e) {
|
||||
this.$message.error('加载配置失败:' + (e.message || '未知错误'))
|
||||
@@ -320,14 +339,16 @@ export default {
|
||||
const res = await updateAutoWriteConfig({
|
||||
fileId: this.form.fileId,
|
||||
sheetId: this.form.sheetId,
|
||||
headerRow: this.form.headerRow,
|
||||
startRow: this.form.startRow
|
||||
})
|
||||
|
||||
if (res.code === 200) {
|
||||
this.$message.success(`配置保存成功!从第${this.form.startRow}行开始匹配单号`)
|
||||
this.$message.success(`配置保存成功!表头第${this.form.headerRow}行,数据从第${this.form.startRow}行开始`)
|
||||
console.log('配置保存成功 - 保存的值:', {
|
||||
fileId: this.form.fileId,
|
||||
sheetId: this.form.sheetId,
|
||||
headerRow: this.form.headerRow,
|
||||
startRow: this.form.startRow
|
||||
})
|
||||
// 延迟重新加载配置,确保后端已保存
|
||||
|
||||
Reference in New Issue
Block a user