|
|
|
@ -25,7 +25,7 @@
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="name" label="条形码" align="center" width="180">
|
|
|
|
<el-table-column prop="name" label="条形码" align="center" width="180">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<img :src="scope.row.barcode" />
|
|
|
|
<img :src="scope.row.barcode" style="width: 120px;height: 90px;" />
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="remark" label="备注">
|
|
|
|
<el-table-column prop="remark" label="备注">
|
|
|
|
@ -38,6 +38,7 @@
|
|
|
|
<el-table-column prop="opt" label="操作">
|
|
|
|
<el-table-column prop="opt" label="操作">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-button @click="toPrint(scope.row)">打印</el-button>
|
|
|
|
<el-button @click="toPrint(scope.row)">打印</el-button>
|
|
|
|
|
|
|
|
<el-button @click="toDelete(scope.row)" type='danger' style='margin-left: 10px;'>删除</el-button>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
@ -51,7 +52,9 @@
|
|
|
|
show
|
|
|
|
show
|
|
|
|
} from "@/api/bookStore/bookIndex";
|
|
|
|
} from "@/api/bookStore/bookIndex";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
|
|
|
del as delStore
|
|
|
|
|
|
|
|
} from "@/api/bookStore/storeList";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
|
|
|
|
|
|
|
|
@ -91,20 +94,31 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
toDelete(row) {
|
|
|
|
|
|
|
|
delStore({
|
|
|
|
|
|
|
|
id: row.id
|
|
|
|
|
|
|
|
}).then(res => {
|
|
|
|
|
|
|
|
this.getDetail();
|
|
|
|
|
|
|
|
this.$Message.success("操作成功");
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
toPrint(row) {
|
|
|
|
toPrint(row) {
|
|
|
|
this.window.width = screen.availWidth * 0.95
|
|
|
|
// this.window.width = screen.availWidth * 0.95
|
|
|
|
this.window.height = screen.availHeight * 0.95
|
|
|
|
// this.window.height = screen.availHeight * 0.95
|
|
|
|
this.window.top = (window.screen.height - 30 - this.window.height) / 2
|
|
|
|
// this.window.top = (window.screen.height - 30 - this.window.height) / 2
|
|
|
|
this.window.left = (window.screen.width - 10 - this.window.width) / 2
|
|
|
|
// this.window.left = (window.screen.width - 10 - this.window.width) / 2
|
|
|
|
|
|
|
|
|
|
|
|
let obj = {
|
|
|
|
// let obj = {
|
|
|
|
id: row.id,
|
|
|
|
// id: row.id,
|
|
|
|
barcode: row.barcode
|
|
|
|
// barcode: row.barcode
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
let url = `${process.env.VUE_APP_PUBLIC}print.html?json=${JSON.stringify(obj)}`
|
|
|
|
// let url = `${process.env.VUE_APP_PUBLIC}print.html?json=${JSON.stringify(obj)}`
|
|
|
|
window.open(url, 'toPrint',
|
|
|
|
// window.open(url, 'toPrint',
|
|
|
|
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
|
|
|
|
// `top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
|
|
|
|
)
|
|
|
|
// )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let baseUrl = process.env.VUE_APP_BASE_API + "/print?id=" + row.id;
|
|
|
|
|
|
|
|
window.open(baseUrl)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async getDetail() {
|
|
|
|
async getDetail() {
|
|
|
|
let res = await show({
|
|
|
|
let res = await show({
|
|
|
|
|