1
This commit is contained in:
parent
2194cd9cca
commit
33a47dad2c
@ -128,8 +128,8 @@ export function getComputer() {
|
||||
})
|
||||
}
|
||||
|
||||
export function getComputerPrinter(id: string | number) {
|
||||
const numId = Number(id)
|
||||
export function getComputerPrinter(computerId: string | number) {
|
||||
const numId = Number(computerId)
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
@ -138,7 +138,7 @@ export function getComputerPrinter(id: string | number) {
|
||||
v,
|
||||
timestamp: stamp()
|
||||
},
|
||||
data: Number.isFinite(numId) ? { id: numId } : { id }
|
||||
data: Number.isFinite(numId) ? { id: numId } : { id: computerId }
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
<el-option v-for="item in businessTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
<el-select v-model="printSettings.station" placeholder="请选择打印台" size="small" @change="handleStationChange">
|
||||
<el-option v-for="item in stationOptions" :key="item.id" :label="item.name" :value="item.id" />
|
||||
<el-option v-for="item in stationOptions" :key="item.id" :label="item.name" :value="item.computer_id" />
|
||||
</el-select>
|
||||
<el-select v-model="printSettings.printer" placeholder="请选择打印机" size="small" :loading="printerLoading">
|
||||
<el-option v-for="item in printerOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
@ -434,8 +434,9 @@ async function loadPrintOptions() {
|
||||
if (stations && (stations.code === 200 || stations.code === 0)) {
|
||||
const rawList: any[] = stations.data?.list || stations.data || []
|
||||
stationOptions.value = rawList.map((item: any) => ({
|
||||
id: item.id,
|
||||
name: item.name || item.label || String(item.id)
|
||||
id: item.id ?? item.computer_id,
|
||||
computer_id: item.computer_id ?? item.computerId ?? item.id,
|
||||
name: item.name || item.label || String(item.computer_id ?? item.computerId ?? item.id)
|
||||
}))
|
||||
} else {
|
||||
console.warn('获取打印台列表失败:', stations)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user