|
@@ -29,7 +29,8 @@
|
|
|
<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">
|
|
|
+ <view v-for="(item,index) in bindList"
|
|
|
+ :class="{ 'vehicleNo': true, 'uni-row': true, 'blueBorder': handleConfirmCarrier(item) }">
|
|
|
<text>{{item.carrierCode}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -75,6 +76,7 @@
|
|
|
const emit = defineEmits(['reset'])
|
|
|
const showCarrierList = ref(false) // 工序是否完成显示载具列表
|
|
|
const bindList = ref([])
|
|
|
+ const confirmCarrierList = ref([])
|
|
|
|
|
|
onLoad(() => {
|
|
|
init();
|
|
@@ -98,6 +100,7 @@
|
|
|
console.log(res)
|
|
|
if (res.code == 200) {
|
|
|
bindList.value = res.rows;
|
|
|
+ console.log(bindList.value)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -135,7 +138,7 @@
|
|
|
wasteInfo.value[i].rejectNum = wasteInfo.value[i].rejectNum.replace(/^0+|^-|[^\d]/g, '');
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
function handleScanCode() {
|
|
|
uni.scanCode({
|
|
|
scanType: ['qrCode'], // 条形码扫描
|
|
@@ -143,10 +146,18 @@
|
|
|
autoZoom: false,
|
|
|
success: function(res) {
|
|
|
let vehicleObj = JSON.parse(res.result);
|
|
|
+ confirmCarrierList.value.push(vehicleObj.carrierCode)
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ function handleConfirmCarrier(item) {
|
|
|
+ let flag = false;
|
|
|
+ console.log(confirmCarrierList.value.indexOf(item.carrierCode) !== -1)
|
|
|
+ flag = confirmCarrierList.value.indexOf(item.carrierCode) !== -1
|
|
|
+ return flag
|
|
|
+ }
|
|
|
+
|
|
|
function handleFinishReporting() {
|
|
|
if (!workInfo.value.qualifiedNum) {
|
|
|
uni.showToast({
|
|
@@ -257,6 +268,7 @@
|
|
|
padding-top: 20rpx;
|
|
|
font-size: 32rpx;
|
|
|
}
|
|
|
+
|
|
|
.vehicleList {
|
|
|
justify-content: baseline;
|
|
|
align-content: flex-start;
|
|
@@ -272,18 +284,23 @@
|
|
|
align-items: center;
|
|
|
width: auto;
|
|
|
height: 60rpx;
|
|
|
- border: 1px solid rgba(213, 213, 213, 1);
|
|
|
+ border: 1rpx solid rgba(213, 213, 213, 1);
|
|
|
border-radius: 6rpx;
|
|
|
}
|
|
|
+ .blueBorder {
|
|
|
+ border: 2rpx solid #1684fc;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
}
|
|
|
|
|
|
.add-btn-container {
|
|
|
margin-top: 32rpx;
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
.btn {
|
|
|
flex: 1;
|
|
|
background-color: rgba(255, 85, 85, 1);
|
|
@@ -291,7 +308,7 @@
|
|
|
margin-left: 5rpx;
|
|
|
padding: 0;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.btnScan {
|
|
|
flex: 1;
|
|
|
color: #FFFFFF;
|