Commit a7d545bf authored by 沈翠玲's avatar 沈翠玲

修改bug

parent 30cda62f
...@@ -373,8 +373,8 @@ ...@@ -373,8 +373,8 @@
<u-col span="6"> <u-col span="6">
<u-form-item class="column-type" label-width="100px" label="合格数量(副):" prop="feedbackQuantityFu"> <u-form-item class="column-type" label-width="100px" label="合格数量(副):" prop="feedbackQuantityFu">
<view class="button-type2"> <view class="button-type2">
<u-number-box :min="0" :max="99999999999999999999999999999999999999999" :input-width="190" <u-number-box :min="0" key="numberBox1" :max="99999999999999999999999999999999999999999" :input-width="190"
@change="quantityChangedV2(feedback, feedbackQuantityFu, feedbackUnQuantityFu)" @change="()=>quantityChangedV2(feedback, feedbackQuantityFu, feedbackUnQuantityFu)"
v-model="feedbackQuantityFu"></u-number-box> v-model="feedbackQuantityFu"></u-number-box>
</view> </view>
...@@ -382,8 +382,8 @@ ...@@ -382,8 +382,8 @@
</u-col> </u-col>
<u-col span="6"> <u-col span="6">
<u-form-item class="column-type" label-width="100px" label="不良品数量(副):" prop="feedbackUnQuantityFu"> <u-form-item class="column-type" label-width="100px" label="不良品数量(副):" prop="feedbackUnQuantityFu">
<u-number-box :min="0" align="right" :max="99999999999999999999999999999999999999999" :input-width="190" <u-number-box :min="0" align="right" key="numberBox2" :max="99999999999999999999999999999999999999999" :input-width="190"
@change="quantityChangedV2(feedback, feedbackQuantityFu, feedbackUnQuantityFu)" @change="()=>quantityChangedV3(feedback, feedbackQuantityFu, feedbackUnQuantityFu)"
v-model="feedbackUnQuantityFu"></u-number-box> v-model="feedbackUnQuantityFu"></u-number-box>
</u-form-item> </u-form-item>
</u-col> </u-col>
...@@ -537,7 +537,7 @@ ...@@ -537,7 +537,7 @@
</view> </view>
<view class="list-bar" style="width: calc(100% - 510px);"> <view class="list-bar" style="width: calc(100% - 510px);">
<scroll-view scroll-y="true" scroll-x="true" class="scroll-list" show-scrollbar <scroll-view scroll-y="true" scroll-x="true" class="scroll-list" show-scrollbar
:style="{ height: this.screenHeight - 280 + 'px'}" @touchmove.stop> :style="{ height: this.screenHeight - 200 + 'px'}" @touchmove.stop>
<uni-table border stripe :loading="loading" emptyText="未查询到数据" class="mynotable"> <uni-table border stripe :loading="loading" emptyText="未查询到数据" class="mynotable">
<uni-tr> <uni-tr>
<uni-th width="100px" align="center">操作</uni-th> <uni-th width="100px" align="center">操作</uni-th>
...@@ -562,6 +562,7 @@ ...@@ -562,6 +562,7 @@
</uni-tr> </uni-tr>
</uni-table> </uni-table>
</scroll-view> </scroll-view>
<view class="sum">共{{feedingInspectionList.length}}条</view>
</view> </view>
</view> </view>
</u-modal> </u-modal>
...@@ -583,7 +584,7 @@ ...@@ -583,7 +584,7 @@
background: 'black'}"></view> background: 'black'}"></view>
</view> </view>
<view class="list-bar" style="width: calc(100% - 510px);"> <view class="list-bar" style="width: calc(100% - 510px);">
<scroll-view scroll-y="true" scroll-x="true" class="scroll-list" :style="{ height: this.screenHeight - 280 + 'px'}" @touchmove.stop> <scroll-view scroll-y="true" scroll-x="true" class="scroll-list" :style="{ height: this.screenHeight - 200 + 'px'}" @touchmove.stop>
<uni-table ref="qcTable" border stripe :loading="loading" emptyText="未查询到数据" class="mynotable"> <uni-table ref="qcTable" border stripe :loading="loading" emptyText="未查询到数据" class="mynotable">
<uni-tr> <uni-tr>
<!-- <uni-th width="200px" align="center">操作</uni-th> --> <!-- <uni-th width="200px" align="center">操作</uni-th> -->
...@@ -1439,6 +1440,7 @@ export default { ...@@ -1439,6 +1440,7 @@ export default {
uni.getSystemInfo({ uni.getSystemInfo({
success(res) { success(res) {
this.screenHeight = res.windowHeight; this.screenHeight = res.windowHeight;
console.log('11111', res.windowHeight, res.windowWidth)
} }
}); });
//监听工作中心切换事件 //监听工作中心切换事件
...@@ -1916,6 +1918,7 @@ export default { ...@@ -1916,6 +1918,7 @@ export default {
this.form = {}; this.form = {};
const t = this; const t = this;
this.tableData = []; this.tableData = [];
this.tableSelectData = []
this.$u.api this.$u.api
.getTaskList({ .getTaskList({
workunitId: t.vuex_workunit.workunitId, workunitId: t.vuex_workunit.workunitId,
...@@ -2061,30 +2064,42 @@ export default { ...@@ -2061,30 +2064,42 @@ export default {
}, },
quantityChangedV2(feedback, val1, val2) { quantityChangedV2(feedback, val1, val2) {
console.log('asasa', feedback, val1, val2)
let qq = (val1 === 0 || val1 === null) ? 0 : val1; let qq = (val1 === 0 || val1 === null) ? 0 : val1;
let quq = (val2 === 0 || val2 === null) ? 0 : val2; let quq = (val2 === 0 || val2 === null) ? 0 : val2;
if (qq > 0) { if (qq > 0) {
feedback.quantityQualify = qq / feedback.unitOfConvert; feedback.quantityQualify = qq / (feedback.unitOfConvert || 1);
} }
console.log(qq / feedback.unitOfConvert, qq, feedback.unitOfConvert)
if (quq > 0) { if (quq > 0) {
feedback.quantityUnqualify = quq / feedback.unitOfConvert; feedback.quantityUnqualify = quq / (feedback.unitOfConvert || 1);
} }
feedback.quantityUnqualify = feedback.quantityUnqualify === null ? 0 : feedback.quantityUnqualify; feedback.quantityUnqualify = isNaN(feedback.quantityUnqualify) || feedback.quantityUnqualify === null ? 0 : feedback.quantityUnqualify;
feedback.quantityQualify = feedback.quantityQualify === null ? 0 : feedback.quantityQualify; feedback.quantityQualify = isNaN(feedback.quantityQualify) || feedback.quantityQualify === null ? 0 : feedback.quantityQualify;
feedback.quantity = feedback.quantityUnqualify + feedback.quantityQualify; feedback.quantity = feedback.quantityUnqualify + feedback.quantityQualify;
},
quantityChangedV3(feedback, val1, val2) {
console.log('asasa', feedback, val1, val2)
let qq = (val1 === 0 || val1 === null) ? 0 : val1;
let quq = (val2 === 0 || val2 === null) ? 0 : val2;
if (qq > 0) {
feedback.quantityQualify = qq / (feedback.unitOfConvert || 1);
}
console.log(qq / feedback.unitOfConvert, qq, feedback.unitOfConvert)
if (quq > 0) {
feedback.quantityUnqualify = quq / (feedback.unitOfConvert || 1);
}
feedback.quantityUnqualify = isNaN(feedback.quantityUnqualify) || feedback.quantityUnqualify === null ? 0 : feedback.quantityUnqualify;
feedback.quantityQualify = isNaN(feedback.quantityQualify) || feedback.quantityQualify === null ? 0 : feedback.quantityQualify;
// console.log(this.feedbackQuantityFu); feedback.quantity = feedback.quantityUnqualify + feedback.quantityQualify;
// console.log(this.feedbackUnQuantityFu);
// console.log(feedback.quantityUnqualify);
// console.log(feedback.quantityqualify);
// console.log(feedback.unitOfConvert);
}, },
getPrintTemplate(row) { getPrintTemplate(row) {
this.printTemplateData = row; this.printTemplateData = row;
...@@ -2415,6 +2430,7 @@ export default { ...@@ -2415,6 +2430,7 @@ export default {
this.feedbackQuantityFu = 0; this.feedbackQuantityFu = 0;
this.proVisible = false; this.proVisible = false;
this.timeTest.isshow = false; this.timeTest.isshow = false;
console.log('this.feedbackForms', this.feedbackForms)
this.feedbackForms.forEach((item) => { this.feedbackForms.forEach((item) => {
if (item.quantity === 0 || item.quantity === null) { if (item.quantity === 0 || item.quantity === null) {
this.$u.toast('请填写合格/不合格产品数量!'); this.$u.toast('请填写合格/不合格产品数量!');
...@@ -2479,6 +2495,7 @@ export default { ...@@ -2479,6 +2495,7 @@ export default {
}); });
}); });
} }
console.log('item', item)
if (item.whether == '1') { if (item.whether == '1') {
this.printPdfSocket({ this.printPdfSocket({
reportName: 'mysql:qrcode-50*50-2', reportName: 'mysql:qrcode-50*50-2',
...@@ -2497,6 +2514,7 @@ export default { ...@@ -2497,6 +2514,7 @@ export default {
} else { } else {
this.$u.toast(res.msg); this.$u.toast(res.msg);
} }
console.log('准备刷新')
this.getTaskList(); this.getTaskList();
} }
}); });
...@@ -2563,7 +2581,7 @@ export default { ...@@ -2563,7 +2581,7 @@ export default {
const taskInfo = this.tableSelectData[0]; const taskInfo = this.tableSelectData[0];
this.$u.api.recoilMaterialList({ taskId: taskInfo.taskId, processId: taskInfo.processId }).then((res) => { this.$u.api.recoilMaterialList({ taskId: taskInfo.taskId, processId: taskInfo.processId }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
t.recoilMaterialDetailList = res.data; t.recoilMaterialDetailList = [...res.data, ...res.data,...res.data,...res.data,...res.data,...res.data,...res.data,...res.data,...res.data,...res.data,...res.data,...res.data];
if (bool) { if (bool) {
t.$u.toast('保存成功'); t.$u.toast('保存成功');
} }
...@@ -2975,6 +2993,16 @@ export default { ...@@ -2975,6 +2993,16 @@ export default {
height: 360rpx; height: 360rpx;
} }
} }
.list-bar {
position: relative;
.sum {
position: absolute;
bottom: -30px;
right: 5px;
color: black;
font-size: 14px;
}
}
</style> </style>
<style lang="scss"> <style lang="scss">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment