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

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

@ -2,9 +2,6 @@
<div class="padMenuPage"> <div class="padMenuPage">
<div class="item"><el-button type="primary"><a href="/#/padTransferLibJob">业务库移</a></el-button></div> <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="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> </div>
</template> </template>

Loading…
Cancel
Save