Browse Source

修改直接上架

hella_online_20240829
niexiting 3 months ago
parent
commit
428c493a25
  1. 41
      src/pages/fg/receiptNoPlan.vue
  2. 11
      src/pages/productPutaway/record/productPutawayRecord.vue
  3. 31
      src/pages/productPutaway/record/semiDirectPutaway.vue

41
src/pages/fg/receiptNoPlan.vue

@ -233,27 +233,21 @@
if (e.content.text == "移除") { if (e.content.text == "移除") {
this.$refs.comMessage.showQuestionMessage("是否要移除", res => { this.$refs.comMessage.showQuestionMessage("是否要移除", res => {
if (res) { if (res) {
this.allList.splice(index, 1); this.showList.splice(index, 1);
this.initList() this.calcFgQty();
//this.initList()
} }
}) })
} }
}, },
submit() { submit() {
this.scanedQty = this.scanedQty + this.showList.length; if (this.showList.length == 0) {
this.showList = [];
this.dataContent.handleQty = 0;
return;
if (this.allList.length == 0) {
this.showErrorMessage("请先扫描唯一码") this.showErrorMessage("请先扫描唯一码")
return; return;
} }
if (this.allList.length < this.dataContent.packQty) { if (this.showList.length < this.dataContent.packQty) {
this.$refs.comMessage.showQuestionMessage("扫描数量小于包装规格数量,是否提交?", res => { this.$refs.comMessage.showQuestionMessage("扫描数量小于包装规格数量,是否提交?", res => {
if (res) { if (res) {
this.commit() this.commit()
@ -325,12 +319,12 @@
}, },
setParams() { setParams() {
this.allList.forEach(res => { this.showList.forEach(res => {
res.outsideItemCode = res.itemCode res.outsideItemCode = res.itemCode
res.outsideProduceDate = null res.outsideProduceDate = null
res.outsideSerialNumber = res.order res.outsideSerialNumber = res.order
}) })
this.dataContent.subList = this.allList this.dataContent.subList = this.showList
return this.dataContent return this.dataContent
}, },
@ -363,7 +357,7 @@
isCheckMesCode(result.content).then(res => { isCheckMesCode(result.content).then(res => {
if (res.data) { if (res.data) {
if (that.dataContent) { if (that.dataContent) {
var itemIndex = this.allList.findIndex(r => var itemIndex = this.showList.findIndex(r =>
r.content == result.content); r.content == result.content);
// //
if (itemIndex == -1) { if (itemIndex == -1) {
@ -372,9 +366,9 @@
// return; // return;
// } // }
result.countTime = new Date(); result.countTime = new Date();
this.allList.push(result); this.showList.push(result);
this.allList.sort(compare('countTime')); // this.showList.sort(compare('countTime')); //
this.initList() //this.initList()
this.scanPopupGetFocus(); this.scanPopupGetFocus();
this.calcFgQty(); this.calcFgQty();
} else { } else {
@ -382,9 +376,9 @@
'】已经扫描,是否移除', '】已经扫描,是否移除',
res => { res => {
if (res) { if (res) {
this.allList.splice(itemIndex, 1) this.showList.splice(itemIndex, 1)
this.allList.sort(compare('countTime')); // this.showList.sort(compare('countTime')); //
this.initList() //this.initList()
that.calcFgQty(); that.calcFgQty();
} }
}) })
@ -421,11 +415,16 @@
showCommitSuccessMessage(hint, pointData) { showCommitSuccessMessage(hint, pointData) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
if (pointData.length > 0) { if (pointData.length > 0) {
if (this.scanedQty + this.showList.length == this.dataContent.planQty) {
uni.redirectTo({
url: `/pages/point/index?points=${JSON.stringify(pointData)}`
});
} else {
uni.navigateTo({ uni.navigateTo({
url: `/pages/point/index?points=${JSON.stringify(pointData)}` url: `/pages/point/index?points=${JSON.stringify(pointData)}`
}); });
} }
}
}) })
}, },

11
src/pages/productPutaway/record/productPutawayRecord.vue

@ -25,7 +25,7 @@
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_reject" style="margin-right:5px ;" hover-class="btn_commit_after" <button class="btn_single_reject" style="margin-right:5px ;" hover-class="btn_commit_after"
@click="commit">取消</button> @click="cancel">取消</button>
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view> </view>
</view> </view>
@ -159,6 +159,7 @@
this.getRecommendLocation(balance, res => { this.getRecommendLocation(balance, res => {
itemp.toLocationCode = res.code; itemp.toLocationCode = res.code;
itemp.expectinNumber = res.expectinNumber; itemp.expectinNumber = res.expectinNumber;
this.$forceUpdate();
}) })
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
newDetail.fromInventoryStatus = balance.inventoryStatus; newDetail.fromInventoryStatus = balance.inventoryStatus;
@ -398,8 +399,6 @@
return that.dataContent; return that.dataContent;
}, },
showMessage(message) { showMessage(message) {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) {} if (res) {}
@ -450,6 +449,12 @@
this.detailSource.splice(i, 1) this.detailSource.splice(i, 1)
} }
} }
},
cancel()
{
this.clearData();
this.openScanPopup();
} }
} }
} }

31
src/pages/productPutaway/record/semiDirectPutaway.vue

@ -2,9 +2,9 @@
<view class=""> <view class="">
<product-putaway-record :title="title" ref="productPutawayRecord" putawayType='predict'></product-putaway-record> <product-putaway-record :title="title" ref="productPutawayRecord" putawayType='predict'></product-putaway-record>
</view> </view>
</template> </template>
<script> <script>
import productPutawayRecord from '@/pages/productPutaway/record/productPutawayRecord.vue' import productPutawayRecord from '@/pages/productPutaway/record/productPutawayRecord.vue'
export default { export default {
@ -16,34 +16,33 @@
title:'' title:''
}; };
}, },
onLoad(option){ onLoad(option){
//this.title = option.title this.title = option.title
}, },
onShow() { onShow() {
// if(this.$refs.productPutawayRecord!=undefined){ if(this.$refs.productPutawayRecord!=undefined){
// this.$refs.productPutawayRecord.refresh(); this.$refs.productPutawayRecord.refresh();
// } }
}, },
onPullDownRefresh() { onPullDownRefresh() {
// this.$refs.productPutawayRecord.refresh(); this.$refs.productPutawayRecord.refresh();
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
// if (e.index === 0) { if (e.index === 0) {
// this.$refs.productPutawayRecord.toHome(); this.$refs.productPutawayRecord.toHome();
// } else if (e.index == 1) { } else if (e.index == 1) {
// this.$refs.productPutawayRecord.openFilter(); this.$refs.productPutawayRecord.openFilter();
// } }
}, },
methods: { methods: {
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
</style> </style>
Loading…
Cancel
Save