刘翔宇-旅管家 3 years ago
parent 1db595ef45
commit 893dfbe7d5

@ -1,8 +1,7 @@
NODE_ENV = production
# just a flag
ENV = 'staging'
ENV = 'production'
# base api
VUE_APP_BASE_API = '/stage-api'
VUE_APP_BASE_API = http://book.com
VUE_APP_UPLOAD_API =http://book.com/api/admin/upload-file
VUE_APP_PUBLIC='/admin/'

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

@ -21,14 +21,15 @@
</lx-header>
<xy-table :list="list" :table-item="table" :total="total">
<xy-table :list="list" :table-item="table" :total="total" @pageSizeChange="pageSizeChange"
@pageIndexChange="pageChange">
<template v-slot:btns>
<el-table-column fixed="right" header-align="center" align="center" label="操作" width="300">
<template slot-scope="scope">
<div class="slot-btns">
<Button type="primary" @click="edit(scope.row)"></Button>
<Button type="primary" @click="view(scope.row)" style="margin-left: 10px;">查看</Button>
<Button type="primary" @click="put(scope.row)" style="margin-left: 10px;">入库</Button>
<Button type="primary" @click="view(scope.row)" style="margin-left: 10px;">查看</Button>
<Button type="primary" @click="put(scope.row)" style="margin-left: 10px;">入库</Button>
<Button type="error" @click="deleteitem(scope.row)" style="margin-left: 10px;">删除</Button>
</div>
</template>
@ -57,8 +58,8 @@
export default {
components: {
addBook,
viewBook,
addBook,
viewBook,
putIn
},
data() {
@ -77,22 +78,23 @@
width: 280,
fixed: 'left',
},{
}, {
prop: 'small_cover',
label: '图片',
align: 'cneter',
width: 140,
fixed: 'left',
customFn: (row) => {
return ( <div style = {
{
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
}
} > <img src = {
row.small_cover?.url
} style='width:120px;height:120px'> </img></div> )
fixed: 'left',
customFn: (row) => {
return ( < div style = {
{
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
}
} > < img src = {
row.small_cover?.url
}
style = 'width:120px;height:120px' > < /img></div > )
}
}, {
@ -131,14 +133,14 @@
],
}
},
methods: {
put(row){
this.$refs['putIn'].id = "";
this.$refs['putIn'].bookid = row.id;
this.$refs['putIn'].detail.book_id = row.id;
this.$refs['putIn'].isShow = true;
this.$refs['putIn'].type = 'add'
methods: {
put(row) {
this.$refs['putIn'].id = "";
this.$refs['putIn'].bookid = row.id;
this.$refs['putIn'].detail.book_id = row.id;
this.$refs['putIn'].isShow = true;
this.$refs['putIn'].type = 'add'
},
doSearch() {
this.select.page = 1;
@ -147,6 +149,10 @@
add() {
this.$refs['addBook'].isShow = true
},
pageChange(e) {
this.select.page = e
this.load();
},
pageSizeChange(e) {
this.select.page_size = e;
this.select.page = 1;
@ -182,8 +188,7 @@
mounted() {
this.load()
},
created() {
}
created() {}
}
</script>
@ -196,4 +201,4 @@
margin-bottom: 6px;
}
}
</style>
</style>

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

@ -15,15 +15,14 @@
<Button style="margin-left: 10px" type="primary" @click="select={page:1,keyword:''}">
</Button>
<Button style="margin-left: 10px" type="primary" @click="doSearch"></Button>
<Button style="margin-left: 10px" type="primary" @click="doPrint"></Button>
</div>
</slot>
</lx-header>
<xy-table :list="list" :table-item="table" :total="total">
<template v-slot:btns>
</template>
<xy-table :list="list" :table-item="table" :total="total" @pageSizeChange="pageSizeChange"
@pageIndexChange="pageChange" @delete="deleteitem" >
</xy-table>
</div>
@ -127,6 +126,14 @@
doSearch() {
this.select.page = 1;
this.load();
},
doPrint(){
let baseUrl = process.env.VUE_APP_BASE_API+"/print";
window.open(baseUrl)
},
pageChange(e) {
this.select.page = e
this.load();
},
pageSizeChange(e) {
@ -146,12 +153,7 @@
this.load();
this.$Message.success("操作成功");
})
},
pageChange(e) {
this.select.page = e
this.load()
},
}
},
mounted() {
this.load()

@ -56,7 +56,7 @@
class="content_box_body_search_no"></el-input>
</div>
<div class="content_box_body_table">
<el-table :data="tableData" style="width: 100%;" height="300px">
<el-table :data="tableData" style="width: 100%;" height="40vh">
<el-table-column type="index" label="序号" align="center" width="80">
</el-table-column>
<el-table-column prop="name" label="书名" align="center">
@ -305,7 +305,7 @@
}
.content_box_body_table .el-table th.el-table__cell {
font-size: 20px !important;
@ -385,8 +385,8 @@
margin-top: 29px;
background: rgba(250, 167, 1, 0.12);
border-radius: 10px;
max-height: 400px;
min-height: 400px;
max-height: 60vh;
min-height: 60vh;
overflow-y: auto;
overflow-x: hidden;
width: 100%;
@ -442,6 +442,8 @@
margin-left: 6px;
margin-bottom: 10px;
cursor: pointer;
font-weight: 400;
font-size: 1.125rem;
}
.content_box_body_select_box_item_on {
@ -451,7 +453,8 @@
box-shadow: 0px 1px 10px 0px rgba(174, 39, 38, 0.35);
border-radius: 19px;
font-family: PingFang SC;
font-weight: 400;
font-weight: 400;
font-size: 1.125rem;
color: #FFFFFF;
}
}

@ -28,8 +28,7 @@
</div>
</template>
<script>
<script>
export default {
data() {
return {}
@ -62,14 +61,15 @@
.content_box_header {
display: flex;
align-items: center;
flex-direction: column;
.content_box_header_text{
font-size: 36px;
font-family: MicrosoftYaHei;
font-weight: 400;
color: #333333;
line-height: 60px;
align-items: center;
flex-direction: column;
.content_box_header_text {
font-size: 36px;
font-family: MicrosoftYaHei;
font-weight: 400;
color: #333333;
line-height: 60px;
}
}
@ -78,13 +78,14 @@
}
.content_box_body {
display: flex;
display: flex;
flex-direction: row;
align-items: center;
position: relative;
z-index: 99;
justify-content: space-between;
margin-top: 100px;
margin-top: 10%;
padding: 0 5%;
.content_box_body_btn {

@ -20,7 +20,7 @@
class="content_box_body_search_no"></el-input>
</div>
<div class="content_box_body_table">
<el-table :data="tableData" style="width: 100%;" height="300px">
<el-table :data="tableData" style="width: 100%;" height="47vh">
<el-table-column type="index" label="序号" align="center" width="80">
</el-table-column>
<el-table-column prop="name" label="书名" align="center">
@ -141,7 +141,7 @@
</script>
<style lang="scss">
.content_box_body_table .el-table th.el-table__cell {
font-size: 20px !important;

Loading…
Cancel
Save