Browse Source

2026-11-12

采购标签生成页面下方页签增加标签状态查询
master
fengyuan_yang 2 weeks ago
parent
commit
a61c512b6b
  1. 112
      src/views/modules/print/PoPartPrint.vue

112
src/views/modules/print/PoPartPrint.vue

@ -177,13 +177,22 @@
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;" >
<el-form-item >
<el-button type="primary" @click="printLabels" style="">打印</el-button>
<el-button @click="deleteLabels()" type="primary" style="margin-left: 2px">删除</el-button>
<el-button type="primary" icon="el-icon-upload" @click="openUpload()" style="margin-left: 2px">导入</el-button>
</el-form-item>
</el-form>
<div class="detail-toolbar">
<span class="detail-toolbar-label">标签状态</span>
<el-select
v-model="detailSearch.hardtagInFlag"
clearable
placeholder="全部"
class="detail-status-select"
popper-class="po-part-print-select-dropdown">
<el-option label="未入库" value="未入库"></el-option>
<el-option label="已入库" value="已入库"></el-option>
</el-select>
<el-button type="primary" icon="el-icon-search" @click="getDetailTableList">查询</el-button>
<el-button type="primary" @click="printLabels">打印</el-button>
<el-button type="primary" @click="deleteLabels()">删除</el-button>
<el-button type="primary" icon="el-icon-upload" @click="openUpload()">导入</el-button>
</div>
<el-table
:height="height"
:data="table2List"
@ -507,6 +516,9 @@ export default {
totalPage: 0,
mainDataList:[],
table2List:[],
detailSearch: {
hardtagInFlag: ''
},
dataListLoading: false,
addModelFlag:false,
addModelData:{
@ -1139,28 +1151,29 @@ export default {
});
},
changeData(row){
this.currentRow=JSON.parse(JSON.stringify(row))
// let inData={
// site:this.currentRow.site,
// buNo:this.currentRow.buNo,
// inspectionNo:this.currentRow.orderNo,
// }
// getPoOrderRollNoOutData(inData).then(({data}) => {
// //区分请求成功和失败的状况
// if (data && data.code == 0) {
// this.table2List = data.rows
//
// } else {
// this.table2List = [];
// }
// });
const previousKey = this.buildMainRowKey(this.currentRow)
this.currentRow = row ? JSON.parse(JSON.stringify(row)) : {}
if (previousKey !== this.buildMainRowKey(this.currentRow)) {
this.detailSearch.hardtagInFlag = ''
}
this.getDetailTableList();
},
buildMainRowKey (row) {
if (!row || !row.orderNo) {
return ''
}
return [row.site || '', row.buNo || '', row.orderNo].join('|')
},
getDetailTableList () {
if (!this.currentRow || !this.currentRow.site || !this.currentRow.orderNo) {
this.table2List = []
return
}
let inData={
site:this.currentRow.site,
buNo:this.currentRow.buNo,
inspectionNo:this.currentRow.orderNo,
hardtagInFlag: this.detailSearch.hardtagInFlag || ''
}
getPoOrderRollNoOutData(inData).then(({data}) => {
//区分请求成功和失败的状况
@ -1898,14 +1911,45 @@ export default {
}
}
/* 选项样式优化 */
/deep/ .el-select-dropdown__item {
padding: 10px 20px;
transition: all 0.2s;
.detail-toolbar {
display: flex;
align-items: center;
margin-top: 6px;
margin-bottom: 4px;
}
&:hover {
background-color: #f5f7fa;
}
.detail-toolbar-label {
margin-right: 8px;
color: #606266;
font-size: 12px;
font-weight: 500;
line-height: 24px;
}
.detail-status-select {
width: 140px;
margin-right: 8px;
}
.detail-toolbar /deep/ .el-input__inner {
height: 24px !important;
line-height: 24px !important;
padding-right: 24px !important;
}
.detail-toolbar /deep/ .el-input__suffix {
display: flex;
align-items: center;
height: 24px;
}
.detail-toolbar /deep/ .el-input__icon {
height: 24px;
line-height: 24px;
}
.detail-toolbar .el-button + .el-button {
margin-left: 2px;
}
/* 输入框聚焦效果 */
@ -1917,3 +1961,13 @@ export default {
</style>
<style lang="scss">
.po-part-print-select-dropdown.el-select-dropdown .el-select-dropdown__item {
height: 28px;
line-height: 28px;
padding: 0 12px;
font-size: 12px;
box-sizing: border-box;
}
</style>
Loading…
Cancel
Save