Browse Source

【nev-pc】kitting申请+kitting任务按钮操作开发

ag_report_nev
安虹睿 12 months ago
parent
commit
8c2425ca04
  1. 8
      fe/PC/src/api/wms-job.js
  2. 5
      fe/PC/src/filters/status.js
  3. 394
      fe/PC/src/mixins/drawerMixins.js
  4. 30
      fe/PC/src/views/kittingManage/KittingIssueJob.vue
  5. 42
      fe/PC/src/views/kittingManage/KittingIssueRequest.vue
  6. 337
      fe/PC/src/views/padManage/padKittingPack.vue

8
fe/PC/src/api/wms-job.js

@ -75,6 +75,14 @@ export function open(url, data) {
})
}
//任务流程——完成
export function CompleteAsyncJob(url,data) {
return request({
url: baseURL + url + '/CompleteAsync/' + data.id,
method: 'post',
})
}
//获取详情
export function getDetailed(id, url) {

5
fe/PC/src/filters/status.js

@ -131,6 +131,11 @@ import store from '@/store/index'
value: 9,
background:"#EC5B28",
},
30: {
label: "等待",
value: 30,
background:"#EC5B28",
},
}
return Enum(status, index, prop)
}

394
fe/PC/src/mixins/drawerMixins.js

@ -11,7 +11,8 @@ import {
close,
cancel,
cancelAccept,
open
open,
CompleteAsyncJob
} from '@/api/wms-job'
export const drawerMixins = {
data() {
@ -57,186 +58,317 @@ export const drawerMixins = {
// 申请业务 流程按钮实现
// 【提交】操作
if (val == requestDataNames.submit) {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/submit/').then(res => {
that.$successMsg('已提交')
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
this.$confirm('是否确定提交?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/submit/').then(res => {
that.$successMsg('已提交')
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
})
that.paging()
that.Loading.appMainLoading = false
}).catch(err => {
console.log(err)
that.Loading.appMainLoading = false
})
that.paging()
that.Loading.appMainLoading = false
}).catch(err => {
console.log(err)
that.Loading.appMainLoading = false
})
.catch(() => {
});
}
// 【审批】操作
else if (val == requestDataNames.agree) {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/agree/').then(res => {
that.$successMsg('已同意')
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
this.$confirm('是否确定审批?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/agree/').then(res => {
that.$successMsg('已同意')
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
})
that.paging()
that.Loading.appMainLoading = false
}).catch(err => {
console.log(err)
that.Loading.appMainLoading = false
})
that.paging()
that.Loading.appMainLoading = false
}).catch(err => {
console.log(err)
that.Loading.appMainLoading = false
})
.catch(() => {
});
}
// 【处理】操作
else if (val == requestDataNames.handle) {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/handle/').then(res => {
that.$successMsg('处理完成')
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
this.$confirm('是否确定处理?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/handle/').then(res => {
that.$successMsg('处理完成')
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
})
that.paging()
that.Loading.appMainLoading = false
}).catch(err => {
console.log(err)
that.Loading.appMainLoading = false
})
that.paging()
that.Loading.appMainLoading = false
}).catch(err => {
console.log(err)
that.Loading.appMainLoading = false
})
.catch(() => {
});
}
// 【执行】操作
else if (val == requestDataNames.againHandle) { // 针对部分完成情况下,再次执行任务操作
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/handle/').then(res => {
that.$successMsg('执行成功')
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
this.$confirm('是否确定执行?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/handle/').then(res => {
that.$successMsg('执行成功')
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
})
that.paging()
that.Loading.appMainLoading = false
}).catch(err => {
console.log(err)
that.Loading.appMainLoading = false
})
that.paging()
that.Loading.appMainLoading = false
}).catch(err => {
console.log(err)
that.Loading.appMainLoading = false
})
.catch(() => {
});
}
// 【中止】操作
else if (val == requestDataNames.abort) {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/abort/').then(res => {
that.$successMsg('已中止')
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
this.$confirm('是否确定中止?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/abort/').then(res => {
that.$successMsg('已中止')
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
})
that.paging()
that.Loading.appMainLoading = false
}).catch(err => {
console.log(err)
that.Loading.appMainLoading = false
})
that.paging()
that.Loading.appMainLoading = false
}).catch(err => {
console.log(err)
that.Loading.appMainLoading = false
})
.catch(() => {
});
}
// 【执行完成】操作
else if (val == 'completeRequest') {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/complete/').then(res => {
that.$successMsg('执行完成')
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
this.$confirm('是否确定完成?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/complete/').then(res => {
that.$successMsg('执行完成')
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
})
that.paging()
that.Loading.appMainLoading = false
}).catch(err => {
console.log(err)
that.Loading.appMainLoading = false
})
that.paging()
that.Loading.appMainLoading = false
}).catch(err => {
console.log(err)
that.Loading.appMainLoading = false
})
.catch(() => {
});
}
// 【取消】操作
else if (val == requestDataNames.cancel) {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/cancel/').then(res => {
that.$successMsg('已取消')
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
this.$confirm('是否确定取消?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/cancel/').then(res => {
that.$successMsg('已取消')
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
})
that.paging()
that.Loading.appMainLoading = false
}).catch(err => {
console.log(err)
that.Loading.appMainLoading = false
})
that.paging()
that.Loading.appMainLoading = false
}).catch(err => {
console.log(err)
that.Loading.appMainLoading = false
})
.catch(() => {
});
}
// 【驳回】操作
else if (val == requestDataNames.refuse) {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/refuse/').then(res => {
that.$successMsg('已驳回')
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
this.$confirm('是否确定驳回?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/refuse/').then(res => {
that.$successMsg('已驳回')
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
})
that.paging()
that.Loading.appMainLoading = false
}).catch(err => {
console.log(err)
that.Loading.appMainLoading = false
})
that.paging()
that.Loading.appMainLoading = false
}).catch(err => {
console.log(err)
that.Loading.appMainLoading = false
})
.catch(() => {
});
}
// 任务 流程按钮实现
if (val == 'acceptJob') {
that.Loading.appMainLoading = true
accept(that.URL, {id: that.propsData.id}).then(res => {
that.$successMsg('已接任务')
that.Loading.appMainLoading = false
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
this.$confirm('是否确定接受任务?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.Loading.appMainLoading = true
accept(that.URL, {id: that.propsData.id}).then(res => {
that.$successMsg('已接任务')
that.Loading.appMainLoading = false
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
})
that.paging();
}).catch(err => {
that.Loading.appMainLoading = false
})
that.paging();
}).catch(err => {
that.Loading.appMainLoading = false
})
} else if(val == 'closeJob'){
that.Loading.appMainLoading = true
close(that.URL, {id: that.propsData.id}).then(res => {
that.$successMsg('已关闭任务')
that.Loading.appMainLoading = false
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
.catch(() => {
});
}
else if(val == 'closeJob'){
this.$confirm('是否确定关闭任务?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.Loading.appMainLoading = true
close(that.URL, {id: that.propsData.id}).then(res => {
that.$successMsg('已关闭任务')
that.Loading.appMainLoading = false
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
})
that.paging();
}).catch(err => {
that.Loading.appMainLoading = false
})
})
.catch(() => {
});
}
else if(val == 'invalidJob'){
this.$confirm('是否确定作废任务?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.Loading.appMainLoading = true
cancel(that.URL, {id: that.propsData.id}).then(res => {
that.$successMsg('已作废任务')
that.Loading.appMainLoading = false
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
})
that.paging();
}).catch(err => {
that.Loading.appMainLoading = false
})
that.paging();
}).catch(err => {
that.Loading.appMainLoading = false
})
} else if(val == 'invalidJob'){
that.Loading.appMainLoading = true
cancel(that.URL, {id: that.propsData.id}).then(res => {
that.$successMsg('已作废任务')
that.Loading.appMainLoading = false
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
.catch(() => {
});
}
// 新版独立操作
else if(val == 'CompleteAsyncJob'){
this.$confirm('是否确定完成任务?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.Loading.appMainLoading = true
CompleteAsyncJob(that.URL, {id: that.propsData.id}).then(res => {
that.$successMsg('任务已完成')
that.Loading.appMainLoading = false
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
})
that.paging();
}).catch(err => {
that.Loading.appMainLoading = false
})
that.paging();
}).catch(err => {
that.Loading.appMainLoading = false
})
} else if(val == 'cancelAcceptJob'){
that.Loading.appMainLoading = true
cancelAccept(that.URL, {id: that.propsData.id}).then(res => {
that.$successMsg('已取消接受任务')
that.Loading.appMainLoading = false
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
.catch(() => {
});
}
else if(val == 'cancelAcceptJob'){
this.$confirm('是否确定取消接受任务?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.Loading.appMainLoading = true
cancelAccept(that.URL, {id: that.propsData.id}).then(res => {
that.$successMsg('已取消接受任务')
that.Loading.appMainLoading = false
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
})
that.paging();
}).catch(err => {
that.Loading.appMainLoading = false
})
that.paging();
}).catch(err => {
that.Loading.appMainLoading = false
})
} else if(val == 'openJob'){
that.Loading.appMainLoading = true
open(that.URL, {id: that.propsData.id}).then(res => {
that.$successMsg('已打开任务')
that.Loading.appMainLoading = false
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
.catch(() => {
});
}
else if(val == 'openJob'){
this.$confirm('是否确定打开任务?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.Loading.appMainLoading = true
open(that.URL, {id: that.propsData.id}).then(res => {
that.$successMsg('已打开任务')
that.Loading.appMainLoading = false
getDetailed(that.propsData.id, that.URL).then(res => {
that.propsData = res
})
that.paging();
}).catch(err => {
that.Loading.appMainLoading = false
})
that.paging();
}).catch(err => {
that.Loading.appMainLoading = false
})
} else if(val == 'handleJob'){
.catch(() => {
});
}
else if(val == 'handleJob'){
// 请在主页写相关执行任务操作代码
console.log('请在主页写相关执行任务操作代码')
}

30
fe/PC/src/views/kittingManage/KittingIssueJob.vue

@ -43,8 +43,9 @@
:drawer="displayDialog.detailsDialog"
:propsData="propsData"
:tabsDesTions="tabsDesTions"
:Butttondata="[]"
:Butttondata="DrawerButtonData"
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
@drawerbutton="drawerbutton"
@handleCommand="drawerHandle"
@close-value="closeValue"
:tableColumns="detailsTableColumns"
@ -61,6 +62,8 @@
import { drawerMixins } from "@/mixins/drawerMixins";
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins";
import { mixins } from "@/mixins/mixins";
import { complete } from "@/api/wms-job";
export default {
name: "KittingIssueJob",
mixins: [
@ -70,6 +73,19 @@
TableHeaderMixins,
mixins,
],
computed: {
hideButton: function () {
return function (val) {
let data = true
val.forEach(key => {
if (this.propsData.jobStatus == key) {
data = false
}
})
return data
}
},
},
data() {
return {
URL: "wms/store/kitting-issue-job",
@ -80,11 +96,21 @@
this.defaultFreshBtn(),//
this.defaultFilterBtn(),//
],
DrawerButtonData: [
{
type: 'success',
label: '完成',
hide: false,
name: "CompleteAsyncJob",
hide: () => { return this.hideButton([1,2,4]) },
size: 'mini'
},
],
};
},
mounted() {
this.paging();
},
}
};
</script>
<style lang="scss" scoped>

42
fe/PC/src/views/kittingManage/KittingIssueRequest.vue

@ -43,8 +43,9 @@
:drawer="displayDialog.detailsDialog"
:propsData="propsData"
:tabsDesTions="tabsDesTions"
:Butttondata="[]"
:Butttondata="DrawerButtonData"
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
@drawerbutton="drawerbutton"
@handleCommand="drawerHandle"
@close-value="closeValue"
:tableColumns="detailsTableColumns"
@ -70,6 +71,19 @@
TableHeaderMixins,
mixins,
],
computed: {
hideButton: function () {
return function (val) {
let data = true
val.forEach(key => {
if (this.propsData.requestStatus == key) {
data = false
}
})
return data
}
},
},
data() {
return {
URL: "wms/store/kitting-issue-request",
@ -80,6 +94,32 @@
this.defaultFreshBtn(),//
this.defaultFilterBtn(),//
],
DrawerButtonData: [
{
type: 'warning',
label: '执行',
hide: false,
name: "againHandleRequest",
hide: () => { return this.hideButton([1,5,9]) },
size: 'mini'
},
{
type: 'danger',
label: '取消',
hide: false,
name: "cancelRequest",
hide: () => { return this.hideButton([1,5,9]) },
size: 'mini'
},
{
type: 'success',
label: '完成',
hide: false,
name: "completeRequest",
hide: () => { return this.hideButton([1,5,9]) },
size: 'mini'
},
],
};
},
mounted() {

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

@ -7,88 +7,96 @@
v-for="(item,index) of leftButtons"
:key="index"
class="left-button"
@click="letButtonClick(item)"
@click="getPageLockList(item)"
:style="{
background:(currentKittingInfo && (item.code==currentKittingInfo.code)?'#ff9000':'#409EFF'),
background:(currentKittingInfo && (item.code==currentKittingInfo.code)?'#ff6000':'#409EFF'),
}"
>
<p class="code">{{ item.code }}</p>
<p class="name">{{ item.name }}</p>
</div>
</div>
<!-- 中间底盘号 -->
<div class="centerChassisContain">
<div class="title">底盘号</div>
<ul class="chassisList" v-if="centerChassisList.length > 0">
<li
v-for="(item,index) of centerChassisList"
:style="{
color:(item.canSelect?'#000':'#aaa'),
cursor:(item.canSelect?'pointer':'no-drop'),
background:(item.isSelect?'#bdddfd':'#fff'),
}"
:key="index"
@click="selectCenterChassis(item,index)"
>{{ item.chassisNumber }}</li>
</ul>
<div class="noDataTipper" v-if="centerChassisList.length <= 0">暂无数据</div>
<div class="footer-button"><el-button type="primary" @click="createChassisHandle()">创建底盘组</el-button></div>
</div>
<!-- 右侧底盘组 -->
<div class="rightChassisGroup">
<!-- 右上组 -->
<div class="rightTopTable">
<el-table
:border="true"
:data="rightTopChassisGroup"
:height="'100%'"
:header-cell-style="{ background: '#e3f0ff',color:'#333'}"
style="width: 100%">
<el-table-column
prop="chassisNumber"
label="底盘组"
></el-table-column>
<el-table-column
prop="creationTime"
label="时间"
>
<template slot-scope="scope">
{{ formatDate(scope.row.creationTime) }}
</template>
</el-table-column>
</el-table>
<!-- 整个右侧 -->
<div class="rightBigBox">
<div class="lockShadow" v-if="isLock">{{lockTip}}</div>
<!-- 中间底盘号 -->
<div class="centerChassisContain">
<div class="title">底盘号</div>
<ul class="chassisList" v-if="centerChassisList.length > 0">
<li
v-for="(item,index) of centerChassisList"
:style="{
color:(item.canSelect?'#000':'#aaa'),
cursor:(item.canSelect?'pointer':'no-drop'),
background:(item.isSelect?'#bdddfd':'#fff'),
}"
:key="index"
@click="selectCenterChassis(item,index)"
>{{ item.chassisNumber }}</li>
</ul>
<div class="noDataTipper" v-if="centerChassisList.length <= 0">暂无数据</div>
<div class="footer-button"><el-button :disabled="isLock" type="primary" @click="createChassisHandle()">创建底盘组</el-button></div>
</div>
<!-- 右下bom -->
<div class="rightBottomBomData">
<el-table
:border="true"
:data="rightBottomBomData"
:header-cell-style="{ background: '#e3f0ff',color:'#333'}"
style="width: 100%">
<el-table-column
prop="itemCode"
label="Kitting组别Bom"
></el-table-column>
<el-table-column
prop="qty"
label="底盘组物品数量"
></el-table-column>
<!-- todo: Kiting组数量字段确定-->
<el-table-column
prop="qty1"
label="Kiting组数量"
></el-table-column>
</el-table>
<!-- 右侧底盘组 -->
<div class="rightChassisGroup">
<!-- 右上组 -->
<div class="rightTopTable">
<el-table
:border="true"
:data="rightTopChassisGroup"
:height="'100%'"
:header-cell-style="{ background: '#e3f0ff',color:'#333'}"
style="width: 100%">
<el-table-column
prop="chassisNumber"
label="底盘组"
></el-table-column>
<el-table-column
prop="creationTime"
label="时间"
>
<template slot-scope="scope">
{{ formatDate(scope.row.creationTime) }}
</template>
</el-table-column>
</el-table>
</div>
<!-- 右下bom -->
<div class="rightBottomBomData">
<el-table
:border="true"
:data="rightBottomBomData"
:header-cell-style="{ background: '#e3f0ff',color:'#333'}"
style="width: 100%">
<el-table-column
prop="itemCode"
label="Kitting组别Bom"
></el-table-column>
<el-table-column
prop="qty"
label="底盘组物品数量"
></el-table-column>
<!-- todo: Kiting组数量字段确定-->
<el-table-column
prop="qty1"
label="Kiting组数量"
></el-table-column>
</el-table>
</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>
</div>
</div>
<div class="footer-button"><el-button type="success">完成该组底盘</el-button></div>
</div>
</div>
</div>
</template>
<script>
import { getPageList } from '@/api/wms-api'
import { ChassisGetListWithNextCount } from '@/api/wms-pad'
import { getPageList,postCreate } from '@/api/wms-api'
import { ChassisGetListWithNextCount,pageLockToLogin,pageLockToLogout } from '@/api/wms-pad'
import { formatTimeStrToStr } from "@/utils/formatTime"
import store from '@/store'
export default {
name: "padKittingPack",
data() {
@ -106,6 +114,10 @@ export default {
rightTopChassisGroup:[],
// bom
rightBottomBomData:[],
//
isLock:false,
//
lockTip:'该菜单已有用户锁定',
};
},
mounted(){
@ -117,14 +129,11 @@ export default {
}, localStorage.getItem('padKittingPackUpdate') || 180000)
},
destroyed() {
clearInterval(this.intervalId)
clearInterval(this.intervalId)
},
methods:{
initData(){
this.getKittingList()
if(this.currentKittingInfo){
this.letButtonClick(this.currentKittingInfo)
}
},
//
formatDate (time) {
@ -133,6 +142,68 @@ export default {
}
return formatTimeStrToStr(time)
},
// -
getPageLockList(selectItem){
let _data = {
condition: {
filters: [
{
logic: "And",
column: "menuCode",
action: "==",
value: this.$route.name + '_' + selectItem.code,
},
{
logic: "And",
column: "userAccount",
action: "!=",
value: store.getters.name.name,
}
]
},
Sorting: "",
SkipCount: 0,
MaxResultCount: 9999,
}
this.loading = true
getPageList(_data, 'auth/auth/page-lock').then(res => {
this.currentKittingInfo = selectItem;
//
if(res.items.length <= 0){
this.isLock = false
this.lockUserHandle()
}
//
else{
this.isLock = true
this.initKittingData()
}
}).catch(err => {
this.loading = false
})
},
//
lockUserHandle(){
let _data = {
menuCode:this.$route.name + '_' + this.currentKittingInfo.code,
userAccount:store.getters.name.name,
}
pageLockToLogin(_data)
.then(res=>{
this.initKittingData()
})
.catch(err=>{})
},
// 退todo:
async LogoutUserHandle(e){
let _data = {
menuCode:this.$route.name + '_' + this.currentKittingInfo.code,
userAccount:store.getters.name.name,
}
pageLockToLogout(_data)
.then(res=>{})
.catch(err=>{})
},
// kitting
getKittingList(){
let _data = {
@ -146,17 +217,21 @@ export default {
this.loading = true
getPageList(_data, 'basedata/kitting',true).then(res => {
this.leftButtons = res.items
this.loading = false
// kitting
if(this.currentKittingInfo){
this.getPageLockList(this.currentKittingInfo)
}else{
this.loading = false
}
}).catch(err => {
this.loading = false
})
},
//
letButtonClick(selectItem){
this.currentKittingInfo = selectItem;
//
initKittingData(){
let _data = {
count:30,
kittingCode:selectItem.code
kittingCode:this.currentKittingInfo.code
}
this.loading = true
//
@ -165,13 +240,13 @@ export default {
this.rightTopChassisGroup = []
//
// chassisQty
if(res.items.length<Number(selectItem.chassisQty)){
if(res.items.length<Number(this.currentKittingInfo.chassisQty)){
this.centerChassisList = res.items
}
// chassisQty:
else{
res.items.forEach((item,index)=>{
if(index < Number(selectItem.chassisQty)){
if(index < Number(this.currentKittingInfo.chassisQty)){
this.rightTopChassisGroup.push(item)
}else{
item.isSelect = false
@ -181,7 +256,7 @@ export default {
})
}
this.centerChassisList[0].canSelect = true
this.rightBottomBomData = selectItem.details
this.rightBottomBomData = this.currentKittingInfo.details
this.loading = false
}).catch(err => {
this.loading = false
@ -214,6 +289,7 @@ export default {
},
//
createChassisHandle(){
if(this.isLock)return
let _selectItems = this.centerChassisList.filter(item=>{return item.isSelect})
if(!_selectItems || _selectItems.length <= 0){
this.$warningMsg("请选择至少一项")
@ -235,8 +311,63 @@ export default {
..._selectItems
]
}).catch(() => {
});
},
//
finishChassisHandle(){
if(this.isLock)return
this.$confirm('是否确定完成该组底盘', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let _data = {
extraProperties: {},
worker: store.getters.name.userName,
kittingCode: this.currentKittingInfo.code,
depDetails: [],//
details: [],//
}
// depDetails
this.rightTopChassisGroup.forEach(item=>{
let _item = {
itemCode: item.itemCode,
itemName: item.itemName,
itemDesc1: item.itemDesc1,
itemDesc2: item.itemDesc2,
chassisNumber: item.chassisNumber,//
kittingCode: this.currentKittingInfo.code,//code
chassisSortNumber: item.sortNumber,//sortNumber
}
_data.depDetails.push(_item)
})
// details
this.rightBottomBomData.forEach(item=>{
let _item = {
itemCode: item.itemCode,
itemName: item.itemName,
itemDesc1: item.itemDesc1,
itemDesc2: item.itemDesc2,
qty: item.qty,
kittingCode: this.currentKittingInfo.code
}
_data.details.push(_item)
})
this.finishHandleHttp(_data)
}).catch(() => {
});
},
finishHandleHttp(_data){
console.log(286,_data)
return
this.loading = true
postCreate(_data, 'wms/store/KittingPackagingNote').then(res => {
this.initData()
this.loading = false
}).catch(err => {
this.loading = false
})
}
},
};
@ -286,18 +417,46 @@ $footerBtn_height:60px;
width:100%;
flex-shrink:0;
margin:0;
padding:0;
font-size:14px;
padding:0 10px;
&.code{
font-size:20px
}
&.name{
overflow: hidden;
word-break: break-all;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
font-size:14px;
}
}
}
}
.rightBigBox{
display:flex;
width:100%;
position:relative;
.lockShadow{
position:absolute;
left:0;
right:0;
top:0;
bottom:0;
background:rgba(255,255,255,0.7);
z-index:100;
text-align:center;
line-height:50vh;
cursor:no-drop;
color:#ff6000
}
}
.centerChassisContain{
position:relative;
width:calc(30% - 20px);
width:calc(35% - 20px);
min-width:260px;
border:$boxBorder;
padding:$boxPadding;
@ -343,7 +502,7 @@ $footerBtn_height:60px;
}
.rightChassisGroup{
position:relative;
width:55%;
width:65%;
min-width:600px;
border:$boxBorder;
padding:$boxPadding;
@ -356,13 +515,13 @@ $footerBtn_height:60px;
top:0;
left:0;
right:0;
height:30%;
height:40%;
overflow:auto;
}
.rightBottomBomData{
position:absolute;
top:calc(30% + 30px);
top:calc(40% + 10px);
left:0;
right:0;
bottom:$footerBtn_height;
@ -383,6 +542,12 @@ $footerBtn_height:60px;
width:180px;
margin-top:10px
}
.flesh-btn{
position:absolute;
right:15px;
width:100px
}
}
}
</style>
Loading…
Cancel
Save