Browse Source

【前端平板】kitting组包功能开发

ag_report_nev
安虹睿 1 year ago
parent
commit
d39f688911
  1. 18
      fe/PC/src/api/wms-pad.js
  2. 111
      fe/PC/src/views/padManage/padKittingPack.vue
  3. 3
      fe/PC/src/views/padManage/padMenuPage.vue

18
fe/PC/src/api/wms-pad.js

@ -9,3 +9,21 @@ export function ChassisGetListWithNextCount(params) {
params: params,
})
}
// 【pad】 Kitting组包 - 锁定账号
export function pageLockToLogin(params) {
return request({
url: baseURL + 'auth/auth/page-lock/lock-login',
method: 'get',
params: params,
})
}
// 【pad】 Kitting组包 - 退出账号
export function pageLockToLogout(params) {
return request({
url: baseURL + 'auth/auth/page-lock/lock-logout',
method: 'get',
params: params,
})
}

111
fe/PC/src/views/padManage/padKittingPack.vue

@ -21,7 +21,7 @@
<div class="lockShadow" v-if="isLock">{{lockTip}}</div>
<!-- 中间底盘号 -->
<div class="centerChassisContain">
<div class="title">底盘号</div>
<div class="title" @click="LogoutUserHandle">底盘号</div>
<ul class="chassisList" v-if="centerChassisList.length > 0">
<li
v-for="(item,index) of centerChassisList"
@ -39,6 +39,7 @@
</div>
<!-- 右侧底盘组 -->
<div class="rightChassisGroup">
<div class="rightTopBigBox">
<!-- 右上组 -->
<div class="rightTopTable">
<el-table
@ -67,6 +68,7 @@
:border="true"
:data="rightBottomBomData"
:header-cell-style="{ background: '#e3f0ff',color:'#333'}"
:height="'100%'"
style="width: 100%">
<el-table-column
prop="itemCode"
@ -83,6 +85,7 @@
></el-table-column>
</el-table>
</div>
</div>
<div class="footer-button">
<el-button :disabled="isLock" type="success" @click="finishChassisHandle">完成该组底盘</el-button>
<el-button class="flesh-btn" type="warning" @click="initData">刷新数据</el-button>
@ -142,11 +145,30 @@ export default {
}
return formatTimeStrToStr(time)
},
// -
getPageLockList(selectItem){
resetData(){
this.centerChassisList=[]
this.rightTopChassisGroup=[]
this.rightBottomBomData=[]
this.isLock=false
},
//
async getPageLockListHttp(filters){
let _data = {
condition: {
filters: [
filters: filters
},
Sorting: "",
SkipCount: 0,
MaxResultCount: 9999,
}
this.loading = true
console.log(111)
return getPageList(_data, 'auth/auth/page-lock')
console.log(222)
},
// -
async getPageLockList(selectItem){
let _filter= [
{
logic: "And",
column: "menuCode",
@ -160,16 +182,10 @@ export default {
value: store.getters.name.name,
}
]
},
Sorting: "",
SkipCount: 0,
MaxResultCount: 9999,
}
this.loading = true
getPageList(_data, 'auth/auth/page-lock').then(res => {
let _lockList = await this.getPageLockListHttp(_filter)
this.currentKittingInfo = selectItem;
//
if(res.items.length <= 0){
if(_lockList.items.length <= 0){
this.isLock = false
this.lockUserHandle()
}
@ -178,9 +194,6 @@ export default {
this.isLock = true
this.initKittingData()
}
}).catch(err => {
this.loading = false
})
},
//
lockUserHandle(){
@ -194,10 +207,34 @@ export default {
})
.catch(err=>{})
},
// 退todo:
async LogoutUserHandle(e){
// 退:
async LogoutUserHandle(){
let _filter = [{
logic: "And",
column: "userAccount",
action: "==",
value: store.getters.name.name,
}]
let _currentUserLockList = await this.getPageLockListHttp(_filter)
let _https = 0
if(_currentUserLockList && _currentUserLockList.items){
_currentUserLockList.items.forEach(item=>{
this.LogoutUserHttp(item.menuCode)
_https++
})
}
if(_https == _currentUserLockList.items.length){
this.loading = false;
this.currentKittingInfo = null;
this.$nextTick(()=>{
this.initData()
})
}
},
// 退http
LogoutUserHttp(menuCode){
let _data = {
menuCode:this.$route.name + '_' + this.currentKittingInfo.code,
menuCode:menuCode,
userAccount:store.getters.name.name,
}
pageLockToLogout(_data)
@ -221,6 +258,7 @@ export default {
if(this.currentKittingInfo){
this.getPageLockList(this.currentKittingInfo)
}else{
this.resetData()
this.loading = false
}
}).catch(err => {
@ -332,9 +370,9 @@ export default {
this.rightTopChassisGroup.forEach(item=>{
let _item = {
itemCode: item.itemCode,
itemName: item.itemName,
itemDesc1: item.itemDesc1,
itemDesc2: item.itemDesc2,
itemName: item.itemName || "",
itemDesc1: item.itemDesc1 || "",
itemDesc2: item.itemDesc2 || "",
chassisNumber: item.chassisNumber,//
kittingCode: this.currentKittingInfo.code,//code
chassisSortNumber: item.sortNumber,//sortNumber
@ -345,9 +383,9 @@ export default {
this.rightBottomBomData.forEach(item=>{
let _item = {
itemCode: item.itemCode,
itemName: item.itemName,
itemDesc1: item.itemDesc1,
itemDesc2: item.itemDesc2,
itemName: item.itemName || "",
itemDesc1: item.itemDesc1 || "",
itemDesc2: item.itemDesc2 || "",
qty: item.qty,
kittingCode: this.currentKittingInfo.code
}
@ -358,9 +396,8 @@ export default {
});
},
// http
finishHandleHttp(_data){
console.log(286,_data)
return
this.loading = true
postCreate(_data, 'wms/store/KittingPackagingNote').then(res => {
this.initData()
@ -507,26 +544,30 @@ $footerBtn_height:60px;
border:$boxBorder;
padding:$boxPadding;
height:100%;
overflow:auto;
background:#fff;
.rightTopTable{
.rightTopBigBox{
position:absolute;
top:0;
left:0;
right:0;
height:40%;
bottom:$footerBtn_height;
display:flex;
flex-direction:column;
overflow:auto;
align-items: stretch;
}
.rightTopTable{
flex: 1;
margin-bottom:10px;
overflow:auto;
}
.rightBottomBomData{
position:absolute;
top:calc(40% + 10px);
left:0;
right:0;
bottom:$footerBtn_height;
flex: 1.2;
margin-top:10px;
overflow:auto;
border-top:$boxBorder;
}
}
.footer-button{

3
fe/PC/src/views/padManage/padMenuPage.vue

@ -2,9 +2,6 @@
<div class="padMenuPage">
<div class="item"><el-button type="primary"><a href="/#/padTransferLibJob">业务库移</a></el-button></div>
<div class="item"><el-button type="warning"><a href="/#/padKittingPack">Kitting组包</a></el-button></div>
<div class="item"><el-button type="info"><a href="/#/padKittingPackNote">kitting打包记录</a></el-button></div>
<div class="item"><el-button type="success"><a href="/#/padChassis">底盘</a></el-button></div>
<div class="item"><el-button type="danger"><a href="/#/padChassisOperationSequence">底盘序列</a></el-button></div>
</div>
</template>

Loading…
Cancel
Save