|
|
@ -6,8 +6,8 @@ |
|
|
|
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :scanCount="scanCount"> |
|
|
|
</com-job-scan-detail> |
|
|
|
</view> |
|
|
|
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" |
|
|
|
@scroll="scroll" class="scroll-detail"> |
|
|
|
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll" |
|
|
|
class="scroll-detail"> |
|
|
|
|
|
|
|
<view class="detail-list margin_top" v-for="(item, index) in details" :key="item.id"> |
|
|
|
<view class="detail-content"> |
|
|
@ -76,7 +76,7 @@ |
|
|
|
<view v-if="item.scaned" class="choose_marked_count" |
|
|
|
style="background-color: #5FCB94; opacity: 0.65"> |
|
|
|
<view class="" style="background-color: #5FCB94; width: 200rpx;height: 300rpx;"> |
|
|
|
; |
|
|
|
; |
|
|
|
</view> |
|
|
|
<!-- <image src="@/static/image_marked.svg"></image> --> |
|
|
|
</view> |
|
|
@ -89,11 +89,16 @@ |
|
|
|
</view> |
|
|
|
<com-balance ref='issueitems' @selectedItem='selectedBalanceItem'></com-balance> |
|
|
|
<win-scan-button @goScan='openScanPopup' title="单件码"></win-scan-button> |
|
|
|
<winScanButtonTop @goScan='openItemScanPopup' title="ERP料号"></winScanButtonTop> |
|
|
|
<winScanButtonBottom @goScan='queryItemCode' title="ERP查询"></winScanButtonBottom> |
|
|
|
<winScanByProductCode ref="scanPackPopup" title="单件码" @getScanResult='getScanResult'></winScanByProductCode> |
|
|
|
<winScanLocationCode ref="location" title="库位" @getLocation="getToLocation"></winScanLocationCode> |
|
|
|
<win-scan-by-code ref="scanPopupItem" title='ERP料号' @getScanCode='getScanCode'> |
|
|
|
</win-scan-by-code> |
|
|
|
<com-balance ref="balanceItems" @selectedItem='selectedBalanceItem'></com-balance> |
|
|
|
<wz-select-popup ref="wzSelectPopup" @select="selectCheckbox" /> |
|
|
|
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()' |
|
|
|
@afterCloseScanMessage='closeScanMessage'></com-message> |
|
|
|
@afterCloseScanMessage='closeScanMessage' @afterClose="closeScanMessage"></com-message> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
@ -103,6 +108,8 @@ |
|
|
|
takeIssueJob, |
|
|
|
cancelTakeIssueJob, |
|
|
|
finshUnProducePickJob, |
|
|
|
getitems, |
|
|
|
getItemCodeByLike |
|
|
|
} from '@/api/index.js'; |
|
|
|
import { |
|
|
|
getJobStatuStyle, |
|
|
@ -116,6 +123,8 @@ |
|
|
|
} from '@/common/basic.js'; |
|
|
|
import comMessage from '@/mycomponents/common/comMessage.vue' |
|
|
|
import winScanButton from '@/mycomponents/wincom/winScanButton.vue' |
|
|
|
import winScanButtonTop from '@/mycomponents/wincom/winScanButtonTop.vue' |
|
|
|
import winScanButtonBottom from '@/mycomponents/wincom/winScanButtonBottom.vue' |
|
|
|
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue' |
|
|
|
import comBalance from '@/mycomponents/common/comBalance.vue' |
|
|
|
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue' |
|
|
@ -123,18 +132,22 @@ |
|
|
|
import comNumberBox from '@/mycomponents/common/comNumberBox.vue'; |
|
|
|
import winScanByProductCode from '@/mycomponents/wincom/winScanByProductCode.vue' |
|
|
|
import winScanLocationCode from '@/mycomponents/wincom/winScanLocationCode.vue'; |
|
|
|
import winScanByCode from '@/mycomponents/wincom/winScanByCode.vue' |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
comMessage, |
|
|
|
winScanButton, |
|
|
|
winScanButtonTop, |
|
|
|
winScanButtonBottom, |
|
|
|
winMulitScan, |
|
|
|
comBalance, |
|
|
|
comJobScanDetail, |
|
|
|
winScanByPack, |
|
|
|
comNumberBox, |
|
|
|
winScanByProductCode, |
|
|
|
winScanLocationCode |
|
|
|
winScanLocationCode, |
|
|
|
winScanByCode |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
@ -149,6 +162,11 @@ |
|
|
|
scanCount: 0, |
|
|
|
isPack: true, |
|
|
|
titleArray: ['箱标签'], |
|
|
|
userForm: { |
|
|
|
names: [], |
|
|
|
values: [], |
|
|
|
origin: [] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
filters: { |
|
|
@ -204,8 +222,9 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
getToLocation(locationInfo) { |
|
|
|
if(this.currentItem.recommendFromLocationCode!=locationInfo.code){ |
|
|
|
this.showMessage("扫描库位["+locationInfo.code+"]与推荐来源库位["+this.currentItem.recommendFromLocationCode+"]不一致") |
|
|
|
if (this.currentItem.recommendFromLocationCode != locationInfo.code) { |
|
|
|
this.showMessage("扫描库位[" + locationInfo.code + "]与推荐来源库位[" + this.currentItem |
|
|
|
.recommendFromLocationCode + "]不一致") |
|
|
|
return; |
|
|
|
} |
|
|
|
this.currentItem.handledFromLocationCode = locationInfo.code; |
|
|
@ -222,6 +241,43 @@ |
|
|
|
// } |
|
|
|
this.$refs.scanPackPopup.openScanPopup(); |
|
|
|
}, |
|
|
|
openItemScanPopup() { |
|
|
|
this.$refs.scanPopupItem.openScanPopup(); |
|
|
|
}, |
|
|
|
queryItemCode(){ |
|
|
|
this.$refs.wzSelectPopup.open({ |
|
|
|
mode: 'radio', //radio checkbox 单选、多选 |
|
|
|
// dataList:[], //如果dataList传入了数组则直接使用传入的数组渲染,无需再配置proxyConfig |
|
|
|
selected: this.userForm.values, //已选中的数据 |
|
|
|
proxyConfig: { //组件内部代理请求数据配置 |
|
|
|
reqFun: this.reqGetList, //请求方法,在方法中请返回Promise.resolve([]) |
|
|
|
localPaging: false //前端本地分页 |
|
|
|
}, |
|
|
|
search: { |
|
|
|
type: 'remote', //local本地数据搜索 | remote请求接口 |
|
|
|
}, |
|
|
|
fields: { |
|
|
|
label: 'name', |
|
|
|
value: 'code' |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
reqGetList(data) { |
|
|
|
|
|
|
|
let params = { |
|
|
|
pageSize: data.pageSize, |
|
|
|
pageIndex: data.pageIndex, |
|
|
|
itemCode: data.searchValue, |
|
|
|
}; |
|
|
|
return getItemCodeByLike(data.searchValue,data.pageIndex,data.pageSize); |
|
|
|
}, |
|
|
|
|
|
|
|
selectCheckbox(mode, result){ |
|
|
|
this.getScanResult(result,false) |
|
|
|
}, |
|
|
|
|
|
|
|
//加载零件信息 |
|
|
|
getDetail() { |
|
|
|
let that = this; |
|
|
@ -262,19 +318,51 @@ |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
getScanResult(result) { |
|
|
|
getScanCode(code) { |
|
|
|
if (code == "") { |
|
|
|
this.showMessage('ERP料号不能为空') |
|
|
|
return; |
|
|
|
} |
|
|
|
getitems(code).then((res) => { |
|
|
|
uni.hideLoading(); |
|
|
|
if (res) { |
|
|
|
var result ={ |
|
|
|
itemCode:res.code |
|
|
|
} |
|
|
|
this.getScanResult(result,false) |
|
|
|
} else { |
|
|
|
this.showMessage('未查找到ERP料号【' + code + '】'); |
|
|
|
} |
|
|
|
}).catch((err) => { |
|
|
|
this.showMessage(err.message); |
|
|
|
uni.hideLoading(); |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getScanResult(result,isMesCode=true) { |
|
|
|
// AH240321AM0153 AH240321AM0198 AH240321AM0199 |
|
|
|
let item = this.details.find(r => { |
|
|
|
return r.itemCode == result.itemCode |
|
|
|
}); |
|
|
|
|
|
|
|
if (item == undefined) { |
|
|
|
this.showMessage('在任务详情中,单件码【' + result.scanCode + '】所对应的ERP料号与任务中的ERP料号不一致,请重新扫描'); |
|
|
|
if(isMesCode){ |
|
|
|
this.showMessage('在任务详情中,单件码【' + result.scanCode + '】所对应的ERP料号与任务中的ERP料号不一致,请重新扫描'); |
|
|
|
}else { |
|
|
|
this.showMessage('在任务详情中,没有找到ERP料号[' + result.itemCode+"]的信息,请重新扫描"); |
|
|
|
} |
|
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
if(item.scaned){ |
|
|
|
this.showMessage('单件码['+result.scanCode+"]已经扫描") |
|
|
|
}else { |
|
|
|
if (item.scaned) { |
|
|
|
if(isMesCode){ |
|
|
|
this.showMessage('单件码[' + result.scanCode + "]已经扫描") |
|
|
|
}else { |
|
|
|
this.showMessage('ERP料号[' + result.itemCode + "]已经扫描") |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
item.scaned = true; |
|
|
|
item.scanDate = new Date() |
|
|
|
this.details.sort(compareDesc('scanDate')); |
|
|
@ -326,7 +414,7 @@ |
|
|
|
if (items.length == this.details.length) { |
|
|
|
this.finsh(); |
|
|
|
} else { |
|
|
|
this.showMessage("还有未扫描的单件码或库位") |
|
|
|
this.showMessage("还有未扫描的ERP物料或库位") |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
@ -363,17 +451,17 @@ |
|
|
|
that.datacontent.details = that.details; |
|
|
|
let params = JSON.stringify(that.datacontent); |
|
|
|
console.log("提交", params); |
|
|
|
finshUnProducePickJob(that.id, params) |
|
|
|
.then(res => { |
|
|
|
uni.hideLoading(); |
|
|
|
if (res != null) { |
|
|
|
that.showCommitSuccessMessage(); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
that.showMessage(err.message); |
|
|
|
uni.hideLoading(); |
|
|
|
}); |
|
|
|
// finshUnProducePickJob(that.id, params) |
|
|
|
// .then(res => { |
|
|
|
// uni.hideLoading(); |
|
|
|
// if (res != null) { |
|
|
|
// that.showCommitSuccessMessage(); |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// .catch(err => { |
|
|
|
// that.showMessage(err.message); |
|
|
|
// uni.hideLoading(); |
|
|
|
// }); |
|
|
|
}, |
|
|
|
|
|
|
|
//返回任务列表页 |
|
|
@ -392,14 +480,19 @@ |
|
|
|
this.getDetail(); |
|
|
|
}, |
|
|
|
showMessage(message) { |
|
|
|
this.$refs.scanPackPopup.losefocus(); |
|
|
|
this.$refs.scanPopupItem.losefocus(); |
|
|
|
this.$refs.comMessage.showMessage(message); |
|
|
|
}, |
|
|
|
showScanMessage(message) { |
|
|
|
this.$refs.scanPackPopup.losefocus(); |
|
|
|
this.$refs.scanPopupItem.losefocus(); |
|
|
|
this.$refs.comMessage.showScanMessage(message); |
|
|
|
}, |
|
|
|
|
|
|
|
closeScanMessage() { |
|
|
|
this.$refs.scanPackPopup.getfocus(); |
|
|
|
this.$refs.scanPopupItem.getfocus(); |
|
|
|
}, |
|
|
|
|
|
|
|
calcScanCount() { |
|
|
@ -419,11 +512,9 @@ |
|
|
|
closeScanPopup() { |
|
|
|
if (this.allCount == this.scanCount) { |
|
|
|
this.$refs.scanPackPopup.closeScanPopup(); |
|
|
|
this.$refs.scanPopupItem.closeScanPopup(); |
|
|
|
} |
|
|
|
}, |
|
|
|
scanPopupGetFocus() { |
|
|
|
this.$refs.scanPackPopup.getfocus(); |
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|