|
@@ -12,7 +12,8 @@
|
|
@click="handleAddWasteInfo">+添加</text></view>
|
|
@click="handleAddWasteInfo">+添加</text></view>
|
|
</view>
|
|
</view>
|
|
<view class="list-title uni-row" v-for="(item, index) in wasteInfo">
|
|
<view class="list-title uni-row" v-for="(item, index) in wasteInfo">
|
|
- <input class="input" @input="handleInputRejectNum" style="width: 20%;" v-model="item.rejectNum" placeholder="废品量" />
|
|
|
|
|
|
+ <input class="input" @input="handleInputRejectNum" style="width: 20%;" v-model="item.rejectNum"
|
|
|
|
+ placeholder="废品量" />
|
|
<uni-data-select style="margin-left: 40rpx;width: 70%;" v-model="item.reason" :localdata="reasonList"
|
|
<uni-data-select style="margin-left: 40rpx;width: 70%;" v-model="item.reason" :localdata="reasonList"
|
|
@change="handleTenantChange"></uni-data-select>
|
|
@change="handleTenantChange"></uni-data-select>
|
|
|
|
|
|
@@ -20,13 +21,22 @@
|
|
@click="handleDeleteWasteInfo(index)"></uni-icons>
|
|
@click="handleDeleteWasteInfo(index)"></uni-icons>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <view class="list-title uni-row" style="margin-top: 48rpx;">
|
|
|
|
|
|
+ <view class="list-title uni-row">
|
|
<text class="label">当前序是否完成</text><text>否</text>
|
|
<text class="label">当前序是否完成</text><text>否</text>
|
|
<switch class="switch" @change="switchChange" color="rgba(255,85,85,1)" />
|
|
<switch class="switch" @change="switchChange" color="rgba(255,85,85,1)" />
|
|
<text>是</text>
|
|
<text>是</text>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view v-if="showCarrierList" class="confirmCarrier">
|
|
|
|
+ <text class="label">确认载具</text>
|
|
|
|
+ <view class="vehicleList uni-row">
|
|
|
|
+ <view class="vehicleNo uni-row" v-for="(item,index) in bindList">
|
|
|
|
+ <text>{{item.carrierCode}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
<view class="add-btn-container uni-row">
|
|
<view class="add-btn-container uni-row">
|
|
|
|
+ <button v-if="showCarrierList" type="primary" class="btnScan" @click="handleFinishReporting">扫码确认载具</button>
|
|
<button type="default" class="btn" @click="handleFinishReporting">结束报工</button>
|
|
<button type="default" class="btn" @click="handleFinishReporting">结束报工</button>
|
|
</view>
|
|
</view>
|
|
</dialog-base>
|
|
</dialog-base>
|
|
@@ -45,6 +55,12 @@
|
|
updateDayWorkItem,
|
|
updateDayWorkItem,
|
|
saveDayWorkItem
|
|
saveDayWorkItem
|
|
} from "@/api/business/dayWorkItem.js"
|
|
} from "@/api/business/dayWorkItem.js"
|
|
|
|
+ import {
|
|
|
|
+ getDayworkCarrierList
|
|
|
|
+ } from '@/api/business/dayworkCarrier.js'
|
|
|
|
+ import {
|
|
|
|
+ store
|
|
|
|
+ } from '@/store/index.js'
|
|
import {
|
|
import {
|
|
timestampToTime,
|
|
timestampToTime,
|
|
toHHmmss
|
|
toHHmmss
|
|
@@ -57,6 +73,8 @@
|
|
const wasteInfo = ref([])
|
|
const wasteInfo = ref([])
|
|
const reasonList = ref([])
|
|
const reasonList = ref([])
|
|
const emit = defineEmits(['reset'])
|
|
const emit = defineEmits(['reset'])
|
|
|
|
+ const showCarrierList = ref(false) // 工序是否完成显示载具列表
|
|
|
|
+ const bindList = ref([])
|
|
|
|
|
|
onLoad(() => {
|
|
onLoad(() => {
|
|
init();
|
|
init();
|
|
@@ -73,6 +91,15 @@
|
|
console.log(res);
|
|
console.log(res);
|
|
console.log(reasonList.value);
|
|
console.log(reasonList.value);
|
|
})
|
|
})
|
|
|
|
+ getDayworkCarrierList({
|
|
|
|
+ dayworkId: store.dayworkInfo.id,
|
|
|
|
+ isChanged: 0
|
|
|
|
+ }).then(res => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ bindList.value = res.rows;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
|
|
function open(data) {
|
|
function open(data) {
|
|
@@ -92,9 +119,11 @@
|
|
function switchChange(event) {
|
|
function switchChange(event) {
|
|
if (event.detail.value) {
|
|
if (event.detail.value) {
|
|
workInfo.value.status = "3"
|
|
workInfo.value.status = "3"
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
workInfo.value.status = "2"
|
|
workInfo.value.status = "2"
|
|
}
|
|
}
|
|
|
|
+ showCarrierList.value = event.detail.value;
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
function handleInputQualifiedNum() {
|
|
function handleInputQualifiedNum() {
|
|
@@ -108,7 +137,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
function handleFinishReporting() {
|
|
function handleFinishReporting() {
|
|
- if(!workInfo.value.qualifiedNum){
|
|
|
|
|
|
+ if (!workInfo.value.qualifiedNum) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
icon: "error",
|
|
icon: "error",
|
|
title: "请输入合格数",
|
|
title: "请输入合格数",
|
|
@@ -117,8 +146,8 @@
|
|
}
|
|
}
|
|
for (let i = 0; i < wasteInfo.value.length; i++) {
|
|
for (let i = 0; i < wasteInfo.value.length; i++) {
|
|
if ((!wasteInfo.value[i].rejectNum && wasteInfo.value[i].reason) ||
|
|
if ((!wasteInfo.value[i].rejectNum && wasteInfo.value[i].reason) ||
|
|
- (wasteInfo.value[i].rejectNum && !wasteInfo.value[i].reason) ||
|
|
|
|
- (!wasteInfo.value[i].rejectNum && !wasteInfo.value[i].reason)) {
|
|
|
|
|
|
+ (wasteInfo.value[i].rejectNum && !wasteInfo.value[i].reason) ||
|
|
|
|
+ (!wasteInfo.value[i].rejectNum && !wasteInfo.value[i].reason)) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
icon: "error",
|
|
icon: "error",
|
|
title: "请输入废弃数或废弃原因",
|
|
title: "请输入废弃数或废弃原因",
|
|
@@ -211,36 +240,48 @@
|
|
transform: scale(0.7);
|
|
transform: scale(0.7);
|
|
}
|
|
}
|
|
|
|
|
|
- .equipment-container {
|
|
|
|
- width: 100%;
|
|
|
|
- height: 120rpx;
|
|
|
|
- flex-wrap: wrap;
|
|
|
|
- justify-content: flex-start;
|
|
|
|
- overflow: auto;
|
|
|
|
-
|
|
|
|
- .checkbox {
|
|
|
|
- padding: 12rpx 0;
|
|
|
|
- justify-content: center;
|
|
|
|
- align-items: center;
|
|
|
|
|
|
+ .confirmCarrier {
|
|
|
|
+
|
|
|
|
+ .vehicleList {
|
|
|
|
+ justify-content: baseline;
|
|
|
|
+ align-content: flex-start;
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 120rpx;
|
|
|
|
+ overflow: auto;
|
|
|
|
+
|
|
|
|
+ .vehicleNo {
|
|
|
|
+ padding: 0 10rpx;
|
|
|
|
+ margin: 10rpx 20rpx 0 0;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ align-items: center;
|
|
|
|
+ width: auto;
|
|
|
|
+ height: 60rpx;
|
|
|
|
+ border: 1px solid rgba(213, 213, 213, 1);
|
|
|
|
+ border-radius: 6rpx;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- .table-item {
|
|
|
|
- margin-top: 24rpx;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
.add-btn-container {
|
|
.add-btn-container {
|
|
margin-top: 32rpx;
|
|
margin-top: 32rpx;
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
.btn {
|
|
.btn {
|
|
flex: 1;
|
|
flex: 1;
|
|
background-color: rgba(255, 85, 85, 1);
|
|
background-color: rgba(255, 85, 85, 1);
|
|
color: #FFFFFF;
|
|
color: #FFFFFF;
|
|
-
|
|
|
|
|
|
+ margin-left: 5rpx;
|
|
|
|
+ padding: 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .btnScan {
|
|
|
|
+ flex: 1;
|
|
|
|
+ color: #FFFFFF;
|
|
|
|
+ margin-right: 5rpx;
|
|
|
|
+ padding: 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|