11 changed files with 778 additions and 110 deletions
@ -0,0 +1,107 @@ |
|||
<!-- 收货任务详情 --> |
|||
<template> |
|||
<view class="device-detail" style="padding-bottom: 0 !important;"> |
|||
<comRequestTopInfo :requestContent="dataContent"></comRequestTopInfo> |
|||
<view class="margin_xs_bottom"> |
|||
<!-- <view class="label_order"> |
|||
<image class="icon_normal" src="@/static/icons_ui/icon_apply_num.svg"></image> |
|||
<text>{{dataContent.injectionIssueRequestNumber}}</text> |
|||
<text>申请单:{{dataContent.deliverRequestNumber}}</text> |
|||
</view> --> |
|||
<view class="label_order" v-if="dataContent.details.length>0"> |
|||
<text>物料号 :{{dataContent.details[0].itemCode}}</text> |
|||
</view> |
|||
<view class="label_order" v-if="dataContent.details.length>0"> |
|||
<text>物料描述 :{{dataContent.details[0].itemDesc1}}</text> |
|||
</view> |
|||
<view class="label_order" v-if="dataContent.details.length>0"> |
|||
<text>位置码 :{{dataContent.details[0].positionCode}}</text> |
|||
</view> |
|||
|
|||
<view class="label_order" v-if="dataContent.details.length>0"> |
|||
<text>目标库位 :{{dataContent.details[0].toLocationCode}}</text> |
|||
</view> |
|||
<view class="label_order" v-if="dataContent.details.length>0"> |
|||
<text>叫料数量 :{{dataContent.details[0].issuedQty}}</text> |
|||
</view> |
|||
<view class="label_order" v-if="dataContent.details.length>0"> |
|||
<text>单位 :{{dataContent.details[0].uom}}</text> |
|||
</view> |
|||
<view class="label_order" v-if="dataContent.details.length>0"> |
|||
<text>标包数 :{{dataContent.details[0].stdPackQty}}</text> |
|||
</view> |
|||
<view class="label_order"> |
|||
<!-- <image class="icon_normal" src="@/static/icons_ui/icon_customer.svg"></image> |
|||
<text>{{dataContent.worker}}</text> --> |
|||
<text>操作人 :{{dataContent.worker}}</text> |
|||
</view> |
|||
|
|||
|
|||
</view> |
|||
<view class="uni-flex uni-row receipt_bot"> |
|||
<view class="label_order"> |
|||
<image class="icon_normal" src="@/static/icons_ui/icon_date.svg"> |
|||
</image> |
|||
<text |
|||
class="text_darkblue">{{dataContent.creationTime===null?'无':dataContent.creationTime| formatDate}}</text> |
|||
</view> |
|||
</view> |
|||
<view class="" style="display: flex; justify-content: space-between; margin-bottom: 15rpx;"> |
|||
<view class=""> |
|||
|
|||
</view> |
|||
<view class=""> |
|||
<button type="primary" style="width: 140rpx; font-size: 32rpx; float: right;" |
|||
@click.stop="complete()">执行</button> |
|||
</view> |
|||
|
|||
</view> |
|||
|
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
dateFormat, |
|||
showConfirmMsg |
|||
} from '@/common/basic.js'; |
|||
import comRequestTopInfo from '@/mycomponents/comRequest/comRequestTopInfo.vue' |
|||
|
|||
export default { |
|||
components: { |
|||
comRequestTopInfo |
|||
}, |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}, |
|||
filters: { |
|||
formatDate: function(val) { |
|||
return dateFormat(val) |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
|
|||
}; |
|||
}, |
|||
|
|||
mounted() { |
|||
|
|||
}, |
|||
methods: { |
|||
complete(){ |
|||
showConfirmMsg("是否确认执行?", callback => { |
|||
if (callback) { |
|||
this.$emit("handle",this.dataContent) |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
</style> |
@ -0,0 +1,80 @@ |
|||
<!--发料任务卡片--> |
|||
<template> |
|||
<view class="device-detail"> |
|||
<view class="card_task nopad"> |
|||
<com-job-top-info :jobContent="dataContent"></com-job-top-info> |
|||
</view> |
|||
<view class="margin_xs_bottom"> |
|||
<!-- <view class="label_order"> |
|||
<image class="icon_normal" src="@/static/icons_ui/icon_apply_num.svg"></image> |
|||
<text>{{dataContent.injectionIssueRequestNumber}}</text> |
|||
<text>申请单:{{dataContent.deliverRequestNumber}}</text> |
|||
</view> --> |
|||
<view class="label_order" v-if="dataContent.details.length>0"> |
|||
<text>物料号 :{{dataContent.details[0].itemCode}}</text> |
|||
</view> |
|||
<view class="label_order" v-if="dataContent.details.length>0"> |
|||
<text>物料描述 :{{dataContent.details[0].itemDesc1}}</text> |
|||
</view> |
|||
<view class="label_order" v-if="dataContent.details.length>0"> |
|||
<text>收容数 :{{dataContent.details[0].requestQty}} ({{dataContent.details[0].uom}})</text> |
|||
</view> |
|||
<view class="label_order" v-if="dataContent.details.length>0"> |
|||
<text>目标库位 :{{dataContent.details[0].recommendToLocationCode}}</text> |
|||
</view> |
|||
<view class="label_order"> |
|||
<!-- <image class="icon_normal" src="@/static/icons_ui/icon_customer.svg"></image> |
|||
<text>{{dataContent.worker}}</text> --> |
|||
<text>操作人 :{{dataContent.worker}}</text> |
|||
</view> |
|||
</view> |
|||
<view class="uni-flex uni-row receipt_bot"> |
|||
<view class="label_order"> |
|||
<image class="icon_normal" src="@/static/icons_ui/icon_date.svg"> |
|||
</image> |
|||
<text |
|||
class="text_darkblue">{{dataContent.creationTime===null?'无':dataContent.creationTime| formatDate}}</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getJobStatuStyle, |
|||
getJobStatuDesc, |
|||
dateFormat |
|||
} from '@/common/basic.js'; |
|||
import comJobTopInfo from '@/mycomponents/comjob/comJobTopInfo.vue' |
|||
export default { |
|||
name: "comDeliver", |
|||
components: { |
|||
comJobTopInfo |
|||
}, |
|||
data() { |
|||
return {}; |
|||
}, |
|||
// 此处定义传入的数据 |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
value: null |
|||
} |
|||
}, |
|||
filters: { |
|||
statusStyle: function(val) { |
|||
return getJobStatuStyle(val); |
|||
}, |
|||
statusColor: function(val) { |
|||
return getJobStatuDesc(val); |
|||
}, |
|||
formatDate: function(val) { |
|||
return dateFormat(val) |
|||
} |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
|
|||
</style> |
@ -0,0 +1,195 @@ |
|||
<template> |
|||
<page-meta root-font-size="18px"></page-meta> |
|||
<view class=""> |
|||
<win-empty-view v-if="deliverList.length==0"></win-empty-view> |
|||
<view hover-class="uni-list-cell-hover" v-for="(item, index) in deliverList" :key="item.id" |
|||
@click="openDetail(item)"> |
|||
<comKittingRequestItem :dataContent="item" @handle="handle"> |
|||
</comKittingRequestItem> |
|||
<!-- <comInjectIssue :dataContent="item"></comInjectIssue> --> |
|||
</view> |
|||
<uni-load-more :status="loadingType" v-if="deliverList.length>0" /> |
|||
<!-- <win-scan-button @goScan='openScanPopup'></win-scan-button> |
|||
<win-mulit-scan ref="scanPopup" :titleArray="titleArray" @getScanResult='getScanResult'> |
|||
</win-mulit-scan> --> |
|||
<comMessage ref="comMessage"></comMessage> |
|||
</view> |
|||
|
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getKittingRequestList, |
|||
kittingRequestHandle, |
|||
getkittingRequestJobByRequest, |
|||
iskittingHasNewJob |
|||
} from '@/api/index.js'; |
|||
|
|||
import { |
|||
goHome |
|||
} from '@/common/basic.js'; |
|||
|
|||
import winEmptyView from '@/mycomponents/wincom/winEmptyView.vue' |
|||
import comInjectIssue from '@/mycomponents/coms/task/comInjectIssue.vue'; |
|||
import comKittingRequestItem from '@/mycomponents/comRequest/comKittingRequestItem.vue'; |
|||
|
|||
import winScanButton from '@/mycomponents/wincom/winScanButton.vue' |
|||
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue' |
|||
import comMessage from '@/mycomponents/common/comMessage.vue' |
|||
|
|||
export default { |
|||
name: 'deliver', |
|||
components: { |
|||
winEmptyView, |
|||
winScanButton, |
|||
winMulitScan, |
|||
comInjectIssue, |
|||
comKittingRequestItem, |
|||
comMessage |
|||
}, |
|||
data() { |
|||
return { |
|||
deliverList: [], |
|||
reload: false, |
|||
status: '', |
|||
contentText: { |
|||
contentdown: '上拉加载更多', |
|||
contentrefresh: '加载中', |
|||
contentnomore: '没有更多' |
|||
}, |
|||
pageSize: this.modelConfig, |
|||
pageIndex: 1, |
|||
isTimeWindowSorting: false, |
|||
isToday: true, |
|||
titleArray: ['任务编号'], |
|||
loadingType: "nomore" |
|||
|
|||
}; |
|||
}, |
|||
props: { |
|||
datacontent: { |
|||
type: Object, |
|||
value: null |
|||
} |
|||
}, |
|||
onShow: function() { |
|||
this.getList('refresh'); |
|||
}, |
|||
onReachBottom() { |
|||
//避免多次触发 |
|||
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { |
|||
return; |
|||
} |
|||
this.getList("more"); |
|||
}, |
|||
onPullDownRefresh() { |
|||
this.getList('refresh'); |
|||
}, |
|||
//后退按钮 |
|||
onBackPress(options) { |
|||
if (options.from === 'navigateBack') { |
|||
return false; |
|||
} |
|||
goHome(); |
|||
return true; |
|||
}, |
|||
//返回首页 |
|||
onNavigationBarButtonTap(e) { |
|||
if (e.index === 0) { |
|||
goHome(); |
|||
}else if(e.index === 1){ |
|||
window.location.reload(); |
|||
} |
|||
}, |
|||
methods: { |
|||
async handle(item){ |
|||
uni.showLoading({ |
|||
title:"提交中", |
|||
mask:true |
|||
}) |
|||
try{ |
|||
var jobList = await getkittingRequestJobByRequest(item.number) |
|||
var handleResult = await kittingRequestHandle(item.id) |
|||
|
|||
var isHaveNewJobList=[]; |
|||
jobList.forEach(res=>{ |
|||
isHaveNewJobList.push(res.kittingRequestNumber); |
|||
}) |
|||
var isHaveNewJob = await iskittingHasNewJob(isHaveNewJobList) |
|||
uni.hideLoading() |
|||
this.showMessage(isHaveNewJob) |
|||
}catch(error){ |
|||
uni.hideLoading() |
|||
this.showMessage(error) |
|||
} |
|||
|
|||
|
|||
}, |
|||
openScanPopup() { |
|||
this.$refs.scanPopup.openScanPopup(); |
|||
}, |
|||
//按时间窗口排序 |
|||
timeSortingChange: function(e) { |
|||
this.isTimeWindowSorting = e.detail.value |
|||
this.getList() |
|||
}, |
|||
|
|||
//只看当天到货 |
|||
isTodayChange: function(e) { |
|||
this.isToday = e.detail.value |
|||
this.getList() |
|||
}, |
|||
|
|||
//查询发货任务 |
|||
getList(type) { |
|||
let that = this; |
|||
uni.showLoading({ |
|||
title: "加载中....", |
|||
mask: true |
|||
}); |
|||
this.loadingType = "loading"; |
|||
if (type === "refresh") { |
|||
this.pageIndex = 1; |
|||
this.deliverList = []; |
|||
} |
|||
getKittingRequestList(that.pageIndex,that.pageSize,false) |
|||
.then(res => { |
|||
uni.hideLoading(); |
|||
if (type === "refresh") { |
|||
uni.stopPullDownRefresh(); |
|||
} |
|||
var list = res.items; |
|||
this.loadingType = "loadmore"; |
|||
if (list == null || list.length == 0) { |
|||
//没数据了 |
|||
this.loadingType = "nomore"; |
|||
return; |
|||
} |
|||
// that.deliverList = [...that.deliverList, ...list]; |
|||
that.deliverList = type === "refresh" ? list : this.deliverList.concat(list); |
|||
that.pageIndex++; |
|||
}) |
|||
.catch(err => { |
|||
this.loadingType = ""; |
|||
this.showMessage(err.message); |
|||
uni.hideLoading(); |
|||
if (type === "refresh") { |
|||
uni.stopPullDownRefresh(); |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
openDetail(item) { |
|||
uni.navigateTo({ |
|||
url: './kittingIssueRequestListDetail?id=' + item.id + '&jobStatus=' + item.jobStatus |
|||
}); |
|||
}, |
|||
showMessage(message) { |
|||
this.$refs.comMessage.showMessage(message); |
|||
}, |
|||
} |
|||
}; |
|||
</script> |
|||
<style scoped lang="scss"> |
|||
</style> |
@ -0,0 +1,216 @@ |
|||
<template> |
|||
<page-meta root-font-size="18px"></page-meta> |
|||
<view class=""> |
|||
<view class="top_card"> |
|||
<view class="top_wrap" v-if="details.length>0"> |
|||
<view class="top_card"> |
|||
|
|||
<view class="device-detail"> |
|||
<view class="list-style nopad"> |
|||
<view class="ljh_box nopad"> |
|||
<view class="tit_ljh uni-flex"> |
|||
<text class="font_xl text_black text_bold">位置码 : {{details[0].positionCode}}</text> |
|||
</view> |
|||
|
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
<scroll-view scroll-y="true" @scroll="scroll" class="scroll-detail"> |
|||
|
|||
<view class="detail-list margin_top" v-for="(item, index) in details" :key="item.id"> |
|||
|
|||
|
|||
<view class="detail-content"> |
|||
<view class="choose_main"> |
|||
<view class="ljh_box"> |
|||
<view class="tit_ljh">{{ item.itemCode }}</view> |
|||
<view class="ljh_left desc_ljh"> |
|||
<view class="font_xs text_lightblue">{{ item.itemName }}</view> |
|||
<view class="font_xs text_lightblue">{{ item.itemDesc1 }}</view> |
|||
</view> |
|||
</view> |
|||
|
|||
<view class="list_form"> |
|||
<view class="uni-container"> |
|||
<uni-table style="overflow-x: hidden;"> |
|||
<uni-tr> |
|||
<uni-th width="70">库位</uni-th> |
|||
<uni-th width="240" align="center"> |
|||
<view class="text_packingCode"> |
|||
{{ item.toLocationCode }} |
|||
</view> |
|||
</uni-th> |
|||
</uni-tr> |
|||
<uni-tr> |
|||
<uni-th width="70">叫料数量</text></uni-th> |
|||
<uni-th width="240" align="center"> |
|||
<view class="text_packingCode" |
|||
style="display: flex;flex-direction: row;justify-content:center;align-items: center;"> |
|||
{{item.issuedQty}} |
|||
</view> |
|||
</uni-th> |
|||
</uni-tr> |
|||
<uni-tr> |
|||
<uni-th width="70">单位</uni-th> |
|||
<uni-th width="240" align="center"> |
|||
<view class="text_packingCode"> |
|||
{{ item.uom }} |
|||
</view> |
|||
</uni-th> |
|||
</uni-tr> |
|||
<uni-tr> |
|||
<uni-th width="70">标包数</uni-th> |
|||
<uni-th width="240" align="center"> |
|||
<view class="text_black">{{item.stdPackQty }}</view> |
|||
</uni-th> |
|||
</uni-tr> |
|||
</uni-table> |
|||
|
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</scroll-view> |
|||
|
|||
<div class="new_bot_box"> |
|||
<view class="new_btn_bot bot_pos uni-flex"> |
|||
<button class="new_save_btn " style="width: 100%;" @click="submit()">执行</button> |
|||
</view> |
|||
</div> |
|||
<comMessage ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></comMessage> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getKittingRequestDetail, |
|||
kittingRequestHandle, |
|||
getkittingRequestJobByRequest, |
|||
iskittingHasNewJob |
|||
} from '@/api/index.js'; |
|||
import { |
|||
showConfirmMsg, |
|||
goHome, |
|||
navigateBack |
|||
} from '@/common/basic.js'; |
|||
import comMessage from '@/mycomponents/common/comMessage.vue' |
|||
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue' |
|||
|
|||
export default { |
|||
components: { |
|||
comMessage, |
|||
comJobScanDetail, |
|||
}, |
|||
data() { |
|||
return { |
|||
id: "", |
|||
datacontent: {}, |
|||
details: [], |
|||
jobStatus: "", |
|||
} |
|||
}, |
|||
onLoad(param) { |
|||
this.id = param.id; |
|||
this.getDetail(); |
|||
}, |
|||
//返回首页 |
|||
onNavigationBarButtonTap(e) { |
|||
if (e.index === 0) { |
|||
goHome(); |
|||
} else if (e.index === 1) { |
|||
window.location.reload(); |
|||
} |
|||
}, |
|||
mounted() { |
|||
uni.setNavigationBarColor({ |
|||
frontColor: '#ffffff', |
|||
backgroundColor: "#5A7CF3 !important" |
|||
}) |
|||
}, |
|||
methods: { |
|||
|
|||
//加载零件信息 |
|||
getDetail() { |
|||
let that = this; |
|||
getKittingRequestDetail(that.id) |
|||
.then(item => { |
|||
console.log('item', item); |
|||
that.datacontent = item; |
|||
that.jobStatus = item.jobStatus |
|||
that.details = item.details; |
|||
}) |
|||
.catch(err => { |
|||
this.showMessage('未查找到详细信息') |
|||
}); |
|||
}, |
|||
|
|||
|
|||
getScanCount() { |
|||
this.scanCount = this.datacontent.details.filter(r => r.scaned).length; |
|||
}, |
|||
|
|||
closeScanPopup() { |
|||
if (this.allCount == this.scanCount) { |
|||
this.$refs.scanPopup.closeScanPopup(); |
|||
} |
|||
}, |
|||
|
|||
|
|||
submit() { |
|||
showConfirmMsg("是否确认执行?", callback => { |
|||
if (callback) { |
|||
this.finsh(); |
|||
} |
|||
}) |
|||
|
|||
}, |
|||
|
|||
async finsh() { |
|||
uni.showLoading({ |
|||
title:"提交中", |
|||
mask:true |
|||
}) |
|||
try{ |
|||
var jobList = await getkittingRequestJobByRequest(this.datacontent.number) |
|||
var handleResult = await kittingRequestHandle(this.datacontent.id) |
|||
|
|||
var isHaveNewJobList=[]; |
|||
jobList.forEach(res=>{ |
|||
isHaveNewJobList.push(res.kittingRequestNumber); |
|||
}) |
|||
var isHaveNewJob = await iskittingHasNewJob(isHaveNewJobList) |
|||
uni.hideLoading() |
|||
this.showMessage(isHaveNewJob) |
|||
}catch(error){ |
|||
uni.hideLoading() |
|||
this.showMessage(error) |
|||
} |
|||
}, |
|||
|
|||
showCommitSuccessMessage() { |
|||
this.$refs.comMessage.showCommitSuccess(); |
|||
}, |
|||
|
|||
closeCommitMessage() { |
|||
navigateBack(1); //点关闭直接返回列表 |
|||
uni.hideLoading(); |
|||
}, |
|||
|
|||
|
|||
showMessage(message) { |
|||
this.$refs.comMessage.showMessage(message); |
|||
}, |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
</style> |
Loading…
Reference in new issue