Commit 69ab632a by wangyalan-git

表格样式调整

parent f77cea0e
...@@ -26,7 +26,9 @@ ...@@ -26,7 +26,9 @@
</van-grid> </van-grid>
<!-- 筛选/--> <!-- 筛选/-->
<van-row type="flex" align="center" class="menu"> <van-row type="flex" align="center" class="menu">
<van-col span="8" :class="(!params.goodsCategoryId) && (!params.stockWarning)?'checked': ''" @click="queryAll">全部库存</van-col> <van-col span="8" :class="(!params.goodsCategoryId) && (!params.stockWarning)?'checked': ''" @click="queryAll">
全部库存
</van-col>
<van-col span="8" class="menu-dropdown"> <van-col span="8" class="menu-dropdown">
<van-dropdown-menu> <van-dropdown-menu>
<van-dropdown-item :title="categoryTitle" v-model="params.goodsCategoryId" :options="categoryOptions" <van-dropdown-item :title="categoryTitle" v-model="params.goodsCategoryId" :options="categoryOptions"
...@@ -35,7 +37,7 @@ ...@@ -35,7 +37,7 @@
</van-col> </van-col>
<van-col span="8" :class="params.stockWarning?'checked': ''" @click="changeStock">库存预警</van-col> <van-col span="8" :class="params.stockWarning?'checked': ''" @click="changeStock">库存预警</van-col>
</van-row> </van-row>
<!-- 表头--> <!-- 表头-->
<div class="title"> <div class="title">
<div>物品名称</div> <div>物品名称</div>
<div>型号</div> <div>型号</div>
...@@ -240,6 +242,9 @@ export default { ...@@ -240,6 +242,9 @@ export default {
.tr div, .title div { .tr div, .title div {
width: 25%; width: 25%;
text-align: center; text-align: center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
} }
</style> </style>
<template> <template>
<div class="page"> <div class="page">
<navbar title="详情" ></navbar> <navbar title="详情"></navbar>
<div class="container"> <div class="container">
<div class="info"> <div class="info">
<p>申领人: <span>{{detail.memberName}}</span></p> <p>申领人: <span>{{detail.memberName}}</span></p>
<p>所属部门:<span>{{detail.departmentName}}</span></p> <p>所属部门:<span>{{detail.departmentName}}</span></p>
<p>员工编号:<span>{{detail.jobNo || '--'}}</span></p> <p>员工编号:<span>{{detail.jobNo || '--'}}</span></p>
</div> </div>
<table> <div style="width: 100%;">
<tr> <div class="title">
<th>物品名称</th> <div>物品名称</div>
<th>型号</th> <div>型号</div>
<th>物品类别</th> <div>物品类别</div>
<th>数量</th> <div>数量</div>
</tr> </div>
<tr v-for="(vor,v_index) in detail.vorList" :key="v_index"> <div v-for="(vor,v_index) in detail.vorList" :key="v_index" class="tr">
<td>{{vor.goodsName}}</td> <div>{{vor.goodsName}}</div>
<td>{{vor.goodsNo}}</td> <div>{{vor.goodsNo}}</div>
<td>{{vor.categoryName}}</td> <div>{{vor.categoryName}}</div>
<td> <div>
{{vor.outboundNum}} {{vor.outboundNum}}
</td> </div>
</tr> </div>
</table> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { getOutBountDetail } from '@/api/code' import { getOutBountDetail } from '@/api/code'
export default { export default {
name: 'receiveDetail', name: 'receiveDetail',
components: { components: {},
},
data () { data () {
return { return {
detail: {} detail: {}
...@@ -71,30 +71,37 @@ export default { ...@@ -71,30 +71,37 @@ export default {
.info span { .info span {
color: #020202; color: #020202;
} }
.title {
table {
width: 100%; width: 100%;
background: #ffffff;
margin-top: 10px;
border-collapse: collapse;
}
table tr:first-child {
background: #f6f7f9; background: #f6f7f9;
height: 34px; height: 34px;
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10px;
font-size: 13px;
color: #666666;
} }
table tr { .tr {
width: 100%;
font-size: 14px;
display: flex;
justify-content: space-between;
align-items: center;
height: 42px; height: 42px;
background: #ffffff;
} }
table th { .tr + .tr {
color: #666666; border-top: 1px solid #E8E8E8;
font-size: 14px;
} }
table td { .tr div, .title div {
font-size: 14px; width: 25%;
text-align: center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
} }
</style> </style>
...@@ -7,27 +7,27 @@ ...@@ -7,27 +7,27 @@
<p>所属部门:<span>{{userInfo.departName}}</span></p> <p>所属部门:<span>{{userInfo.departName}}</span></p>
<p>员工编号:<span>{{userInfo.jobNo}}</span></p> <p>员工编号:<span>{{userInfo.jobNo}}</span></p>
</div> </div>
<table v-if="list && list.length"> <div v-if="list && list.length" style="width: 100%;">
<tr> <div class="title">
<th>物品名称</th> <div>物品名称</div>
<th>型号</th> <div>型号</div>
<th>物品类别</th> <div>物品类别</div>
<th>数量</th> <div>数量</div>
</tr> </div>
<tr v-for="(item, index) in list" :key="index"> <div v-for="(item, index) in list" :key="index" class="tr">
<td>{{item.name}}</td> <div >{{item.name}}</div>
<td>{{item.goodsNo}}</td> <div>{{item.goodsNo}}</div>
<td>{{item.goodsCategoryName}}</td> <div>{{item.goodsCategoryName}}</div>
<td style="width: 30%;"> <div>
<stepper <stepper style="width: 100%;"
:id=item.id :id=item.id
:maxNum="item.maxNum" :maxNum="item.maxNum"
:inputNum="item.goodsNum" :inputNum="item.goodsNum"
@changeNum="changeNum" @changeNum="changeNum"
></stepper> ></stepper>
</td> </div>
</tr> </div>
</table> </div>
</div> </div>
<div class="bottom-fixed"> <div class="bottom-fixed">
<van-button type="primary" @click="scanQrCode">扫描员工二维码</van-button> <van-button type="primary" @click="scanQrCode">扫描员工二维码</van-button>
...@@ -123,12 +123,12 @@ export default { ...@@ -123,12 +123,12 @@ export default {
} }
}) })
// getGoodsInfo({ barCode: '11111111111111111111' }).then(res => { // getGoodsInfo({ barCode: 'WMYfwBwH_5ouDO' }).then(res => {
// if(!res.data){ // if (!res.data) {
// this.$toast('该物品暂未入库') // this.$toast('该物品暂未入库')
// return // return
// } // }
// console.log('data',res) // console.log('data', res)
// let data = res.data // let data = res.data
// let params = { // let params = {
// id: data.id, // id: data.id,
...@@ -205,29 +205,38 @@ export default { ...@@ -205,29 +205,38 @@ export default {
color: #020202; color: #020202;
} }
table { .title {
width: 100%; width: 100%;
background: #ffffff;
margin-top: 10px;
border-collapse: collapse;
}
table tr:first-child {
background: #f6f7f9; background: #f6f7f9;
height: 34px; height: 34px;
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10px;
font-size: 13px;
color: #666666;
} }
table tr { .tr {
width: 100%;
font-size: 14px;
display: flex;
justify-content: space-between;
align-items: center;
height: 42px; height: 42px;
background: #ffffff;
} }
table th { .tr + .tr {
color: #666666; border-top: 1px solid #E8E8E8;
font-size: 14px;
} }
table td { .tr div, .title div {
font-size: 14px; width: 25%;
text-align: center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
} }
.bottom-fixed { .bottom-fixed {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<span>{{item.createtime | formatTime}}</span> <span>{{item.createtime | formatTime}}</span>
</p> </p>
<div class="info" v-for="(vor,v_index) in item.vorList" :key="v_index"> <div class="info" v-for="(vor,v_index) in item.vorList" :key="v_index">
<p>{{vor.goodsName}}</p> <p style="text-align:left;width: 240px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{vor.goodsName}}</p>
<p> <p>
<span class="num">数量:</span> <span class="num">数量:</span>
<span>{{vor.outboundNum}}</span> <span>{{vor.outboundNum}}</span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment