Browse Source

修改按计划完工

hella_online_20240829
niexiting 2 months ago
parent
commit
fea084033a
  1. 9
      src/pages/fg/coms/comNoReceiptPopup.vue
  2. 10
      src/pages/fg/receiptByPlan.vue
  3. 27
      src/pages/fg/receiptNoPlan.vue

9
src/pages/fg/coms/comNoReceiptPopup.vue

@ -27,7 +27,7 @@
</image> </image>
</view> </view>
</view> </view>
<view class='split_line'></view> <!-- <view class='split_line'></view>
<view class="title " style="display: flex; align-items: center;padding: 10rpx;"> <view class="title " style="display: flex; align-items: center;padding: 10rpx;">
<text style=" flex-shrink: 0;width: 25%;">计划日期</text> <text style=" flex-shrink: 0;width: 25%;">计划日期</text>
<view class="customerBorder" @click="showSelectDate"> <view class="customerBorder" @click="showSelectDate">
@ -42,6 +42,7 @@
</image> </image>
</view> </view>
</view> </view>
-->
<view class='split_line'></view> <view class='split_line'></view>
<view class="title " style="display: flex;align-items: center;padding: 10rpx;"> <view class="title " style="display: flex;align-items: center;padding: 10rpx;">
<text style=" flex-shrink: 0; width: 25%;">物料代码</text> <text style=" flex-shrink: 0; width: 25%;">物料代码</text>
@ -194,7 +195,7 @@
openRequestPopup() { openRequestPopup() {
this.initData(); this.initData();
this.planDate = getCurrDate() this.planDate = getCurrDate()
this.batch = this.planDate.replace('-', '') this.batch = this.planDate.replace('-', '').replace('-', '')
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
}, },
initData() { initData() {
@ -321,11 +322,12 @@
this.planQty = 0; this.planQty = 0;
this.goodQty = 0 this.goodQty = 0
this.planNumber = "" this.planNumber = ""
this.bomVersion = ""
}, },
confirmSelectDate(data) { confirmSelectDate(data) {
this.planDate = data[0].label this.planDate = data[0].label
this.batch = this.planDate.replace('-', ''); this.batch = this.planDate.replace('-', '').replace('-', '');
}, },
showSelectDate() { showSelectDate() {
@ -462,6 +464,7 @@
let pack = this.packUnitList.filter(r => r.packUnit == this.packUnit); let pack = this.packUnitList.filter(r => r.packUnit == this.packUnit);
this.packQtyHint = pack[0].packQty + "(" + this this.packQtyHint = pack[0].packQty + "(" + this
.getUomInfo(pack[0].uom) + ")"; .getUomInfo(pack[0].uom) + ")";
this.uom = this.getUomInfo(pack[0].uom);
this.packQty = pack[0].packQty this.packQty = pack[0].packQty
}, },
getUomInfo(uom) { getUomInfo(uom) {

10
src/pages/fg/receiptByPlan.vue

@ -56,7 +56,7 @@
</view> </view>
<view style="margin-top: 425rpx; padding-bottom: 160rpx;" v-if="dataContent"> <view style="margin-top: 450rpx; padding-bottom: 160rpx;" v-if="dataContent">
<scroll-view scroll-y="true" class=""> <scroll-view scroll-y="true" class="">
<view class="scan_view" v-for="(item, index) in showList" :key="index"> <view class="scan_view" v-for="(item, index) in showList" :key="index">
<uni-swipe-action> <uni-swipe-action>
@ -339,7 +339,8 @@
} }
uni.hideLoading() uni.hideLoading()
this.showCommitSuccessMessage("提交成功<br>生成装配收货记录<br>" + list[0].requestNumber, list) this.showCommitSuccessMessage("提交成功<br>生成装配收货记录<br>" + list[0].requestNumber, list)
this.showList = [];
this.dataContent.handleQty = 0;
} catch (error) { } catch (error) {
uni.hideLoading() uni.hideLoading()
var hint = error.message ? error.message : error var hint = error.message ? error.message : error
@ -422,7 +423,8 @@
}, },
calcFgQty() { calcFgQty() {
this.dataContent.handleQty = this.allList.length; this.dataContent.handleQty = this.showList.length;
// this.dataContent.handleQty = this.allList.length;
if (this.dataContent.handleQty == this.dataContent.packQty) { if (this.dataContent.handleQty == this.dataContent.packQty) {
if (this.$refs.scanPopup) { if (this.$refs.scanPopup) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
@ -445,7 +447,7 @@
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) {
uni.redirectTo({ uni.navigateTo({
url: `/pages/point/index?points=${JSON.stringify(pointData)}` url: `/pages/point/index?points=${JSON.stringify(pointData)}`
}); });
} }

27
src/pages/fg/receiptNoPlan.vue

@ -16,9 +16,15 @@
</view> </view>
<view class="cell_info"> <view class="cell_info">
<view class="text_lightblue">计划数</view> <view class="text_lightblue">报工数量</view>
<view>{{dataContent.planQty}}{{dataContent.uom}}</view> <view>{{dataContent.planQty}}{{dataContent.uom}}</view>
</view> </view>
<view class="cell_info">
<view class="text_lightblue">已报工数量</view>
<view>{{scanedQty}}{{dataContent.uom}}</view>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -140,7 +146,8 @@
allList: [], allList: [],
index: 1, index: 1,
loadingType: "", loadingType: "",
pageSize: 20 pageSize: 20,
scanedQty: 0
}; };
}, },
@ -259,6 +266,7 @@
title: "提交中...", title: "提交中...",
mask: true mask: true
}) })
let params = this.setParams() let params = this.setParams()
console.log(JSON.stringify(params)) console.log(JSON.stringify(params))
@ -284,7 +292,8 @@
requestNumber: item.requestNumber requestNumber: item.requestNumber
}) })
}) })
} else { }
else {
throw new Error("提交失败") throw new Error("提交失败")
} }
@ -295,10 +304,12 @@
createInspectRequestByPlan(list[0].requestNumber) createInspectRequestByPlan(list[0].requestNumber)
}) })
} }
uni.hideLoading()
this.showCommitSuccessMessage("提交成功<br>生成装配收货记录<br>" + list[0].requestNumber, list) this.showCommitSuccessMessage("提交成功<br>生成装配收货记录<br>" + list[0].requestNumber, list)
this.scanedQty = this.scanedQty + this.showList.length;
this.showList = [];
this.dataContent.handleQty = 0;
this.$forceUpdate();
uni.hideLoading()
} catch (error) { } catch (error) {
uni.hideLoading() uni.hideLoading()
var hint = error.message ? error.message : error var hint = error.message ? error.message : error
@ -380,7 +391,7 @@
}, },
calcFgQty() { calcFgQty() {
this.dataContent.handleQty = this.allList.length; this.dataContent.handleQty = this.showList.length;
if (this.dataContent.handleQty == this.dataContent.packQty) { if (this.dataContent.handleQty == this.dataContent.packQty) {
if (this.$refs.scanPopup) { if (this.$refs.scanPopup) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
@ -403,7 +414,7 @@
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) {
uni.redirectTo({ uni.navigateTo({
url: `/pages/point/index?points=${JSON.stringify(pointData)}` url: `/pages/point/index?points=${JSON.stringify(pointData)}`
}); });
} }

Loading…
Cancel
Save