You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
263 lines
8.3 KiB
263 lines
8.3 KiB
<template>
|
|
<div class="app-container">
|
|
<div v-show="viewState == 1">
|
|
<button-bar ref="btnbar" view-title="库位商品盘点明细" :btndisabled="btndisabled" @btnhandle="btnHandle" />
|
|
<div class="main-content">
|
|
<div class="searchcon">
|
|
<el-button size="small" class="searchbtn" @click="clicksearchShow">
|
|
{{ searchxianshitit }}
|
|
</el-button>
|
|
<div v-show="isSearchShow" class="search">
|
|
<el-form :inline="true" class="tab-header">
|
|
<el-form-item label="商品ID">
|
|
<el-input v-model="queryParams.params.goodsId" placeholder="" clearable />
|
|
</el-form-item>
|
|
<el-form-item label="商品名称">
|
|
<el-input v-model="queryParams.params.goodsName" placeholder="" clearable />
|
|
</el-form-item>
|
|
<el-form-item label="商品图号">
|
|
<el-input v-model="queryParams.params.goodsCode" placeholder="" clearable />
|
|
</el-form-item>
|
|
</el-form>
|
|
<div class="btn" style="text-align: center;">
|
|
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
|
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Start 项目列表头部 -->
|
|
<div class="listtop">
|
|
<div class="tit">商品盘点记录</div>
|
|
</div>
|
|
<!-- End 项目列表头部 -->
|
|
<!-- Start 项目列表 -->
|
|
<div class="">
|
|
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
|
|
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
|
<el-table-column prop="goodsID" label="商品ID" width="120" align="center" />
|
|
<el-table-column prop="goodsName" label="商品名称" width="120" align="center" />
|
|
<el-table-column prop="goodsCode" label="图号" width="120" align="center" />
|
|
<el-table-column prop="warehouseName" label="仓库" width="120" align="center" />
|
|
<el-table-column prop="warehouseAreaeName" label="库区" width="120" align="center" />
|
|
<el-table-column prop="warehouseRackName" label="库位" width="120" align="center" />
|
|
<el-table-column prop="unit" label="单位" width="120" align="center" />
|
|
<el-table-column prop="price" label="单价" width="120" align="center" />
|
|
<el-table-column prop="inventoryNum" label="库存数量" width="120" align="center" />
|
|
<el-table-column prop="inventoryMoeny" label="库存金额" width="120" align="center" />
|
|
<el-table-column prop="spNum" label="实盘数量" width="120" align="center" />
|
|
<el-table-column prop="spMoney" label="实盘金额" width="120" align="center" />
|
|
<el-table-column prop="state" label="状态" width="120" align="center" />
|
|
<el-table-column prop="ykNum" label="亏盈数" width="120" align="center" />
|
|
<el-table-column prop="psNum" label="盘损数量" width="120" align="center" />
|
|
<el-table-column prop="psMoney" label="盘损金额" width="120" align="center" />
|
|
<el-table-column prop="remarks" label="备注" align="center" width="200" />
|
|
<el-table-column label="附件" align="center">
|
|
<template slot-scope="scope">
|
|
<div style="color: #1890FF; text-decoration: underline ;" @click="showImage(scope.row.fillPaths)">
|
|
查看
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<!-- End 项目列表 -->
|
|
<div class="pages">
|
|
<div class="tit" />
|
|
<!-- 翻页 -->
|
|
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
|
|
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<el-dialog title="附件" :visible.sync="dialogVisible" :before-close="handleClose">
|
|
|
|
<el-form ref="dataForm1" class="formadd" style="margin-top: -30px;">
|
|
|
|
<el-row class="first_row">
|
|
<el-col :span="24" class="trightb">
|
|
<el-image style="width: 120px;height: 120px; margin: 10px; background: #f0f;"
|
|
v-for="(item,index) in fileList" :src="item.url" :preview-src-list="[item]">
|
|
</el-image>
|
|
</el-col>
|
|
</el-row>
|
|
|
|
</el-form>
|
|
</el-dialog>
|
|
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import req from '@/api/storage/stocktaking.js'
|
|
import ButtonBar from '@/components/ButtonBar'
|
|
import Pagination from '@/components/pagination'
|
|
import pageye from '@/components/pagination/pageye'
|
|
export default {
|
|
components: {
|
|
ButtonBar,
|
|
Pagination,
|
|
pageye,
|
|
},
|
|
data() {
|
|
return {
|
|
dialogVisible: false,
|
|
btndisabled: false,
|
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
|
isSearchShow: false,
|
|
searchxianshitit: '显示查询条件',
|
|
tableLoading: false,
|
|
dataList: [],
|
|
btnList: [{
|
|
type: 'info',
|
|
size: 'small',
|
|
icon: 'cross',
|
|
btnKey: 'doClose',
|
|
btnLabel: '关闭'
|
|
}],
|
|
queryParams: {
|
|
current: 1,
|
|
size: 10,
|
|
total: 0,
|
|
params: {
|
|
"sid": "",
|
|
"goodsId": "",
|
|
"goodsName": "",
|
|
"goodsCode": ""
|
|
}
|
|
},
|
|
billSid: "",
|
|
fileList: []
|
|
}
|
|
},
|
|
mounted() {
|
|
this.$refs['btnbar'].setButtonList(this.btnList)
|
|
},
|
|
created() {
|
|
|
|
},
|
|
methods: {
|
|
showImage(paths) {
|
|
this.fileList = paths
|
|
this.dialogVisible = true
|
|
},
|
|
handleClose() {
|
|
this.dialogVisible = false
|
|
},
|
|
// 搜索条件效果
|
|
clicksearchShow() {
|
|
this.isSearchShow = !this.isSearchShow
|
|
if (this.isSearchShow) {
|
|
this.searchxianshitit = '隐藏查询条件'
|
|
} else {
|
|
this.searchxianshitit = '显示查询条件'
|
|
}
|
|
},
|
|
btnHandle(btnKey) {
|
|
switch (btnKey) {
|
|
case 'doClose':
|
|
this.close()
|
|
break
|
|
default:
|
|
break
|
|
}
|
|
},
|
|
|
|
loadList(sid) {
|
|
|
|
this.tableLoading = true
|
|
this.billSid = sid
|
|
this.queryParams.params.sid = sid
|
|
|
|
req.billRackCodeDetail(this.queryParams).then((resp) => {
|
|
this.tableLoading = false
|
|
if (resp.success) {
|
|
const data = resp.data
|
|
this.queryParams.total = data.total
|
|
this.dataList = data.records
|
|
} else {
|
|
// 根据resp.code进行异常情况处理
|
|
this.dataList = []
|
|
this.queryParams.total = 0
|
|
}
|
|
}).catch(() => {
|
|
this.tableLoading = false
|
|
})
|
|
},
|
|
|
|
// 序号
|
|
indexMethod(index) {
|
|
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
|
var pageindex = index + 1 + pagestart
|
|
return pageindex
|
|
},
|
|
dosearch() {
|
|
this.queryParams.current = 1
|
|
this.loadList()
|
|
},
|
|
resetQuery() {
|
|
this.queryParams = {
|
|
current: 1,
|
|
size: 10,
|
|
total: 0,
|
|
params: {
|
|
"sid": this.billSid,
|
|
"goodsId": "",
|
|
"goodsName": "",
|
|
"goodsCode": ""
|
|
}
|
|
}
|
|
this.loadList()
|
|
},
|
|
|
|
close() {
|
|
this.$emit('doback')
|
|
},
|
|
|
|
}
|
|
}
|
|
</script>
|
|
<style scoped>
|
|
/deep/ .el-form-item__error {
|
|
margin-left: 120px !important;
|
|
}
|
|
|
|
.must {
|
|
color: #f00;
|
|
}
|
|
|
|
.span-sty {
|
|
width: 90px !important;
|
|
}
|
|
|
|
.addinputInfo {
|
|
margin-left: 80px !important;
|
|
}
|
|
|
|
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
|
|
margin-left: 80px !important;
|
|
width: calc(100% - 70px);
|
|
}
|
|
|
|
.first_row {
|
|
border-top: 1px solid #E0E3EB;
|
|
}
|
|
|
|
.titleOne {
|
|
padding: 7px;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
/deep/ .el-form-item__error {
|
|
margin-left: 180px !important;
|
|
}
|
|
|
|
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group {
|
|
display: inline;
|
|
line-height: 1px;
|
|
vertical-align: middle;
|
|
}
|
|
</style>
|
|
|