|
|
@@ -135,7 +135,7 @@
|
|
|
<van-button plain size="mini" type="primary" @click="_setBarcodeCount(item)">修改数量</van-button>
|
|
|
</td>
|
|
|
</tr>
|
|
|
- <tr v-for="(item, index) in dataList" :key="index" :class="{'odd-row': index+localData.length % 2 !== 0}">
|
|
|
+ <tr v-for="(item, index) in dataList" :key="index" :class="{'odd-row': Number(index+localData.length) % 2 !== 0}">
|
|
|
<td>{{ item.barcode }}</td>
|
|
|
<td>{{ modeType === 0 ? item.cartonCode : item.latticeCode }}</td>
|
|
|
<td>{{ item.qty }}</td>
|
|
|
@@ -165,7 +165,7 @@ import { computed, onMounted, ref } from 'vue'
|
|
|
import { playVoiceBin, scanError, scanSuccess } from '@/utils/android'
|
|
|
import BarcodeCount from '@/views/inbound/blindCollection/components/BarcodeCount.vue'
|
|
|
import ResetData from '@/views/inbound/blindCollection/components/ResetData.vue'
|
|
|
-import { showConfirmDialog, showToast } from 'vant'
|
|
|
+import { showConfirmDialog, showDialog, showToast } from 'vant'
|
|
|
import { barcodeIsData } from '@/views/inbound/blindCollection/task/hooks/barcodeIsData'
|
|
|
import { closeLoading, showLoading } from '@/utils/loading'
|
|
|
import { binData } from '@/views/inbound/blindCollection/task/hooks/binData'
|
|
|
@@ -277,7 +277,6 @@ const _checkBarcode = () => {
|
|
|
const setBarcode = (curBarcode) => {
|
|
|
barcode.value = '';
|
|
|
const { code } = taskInfo.value;
|
|
|
- console.log(modeType,"modeType")
|
|
|
switch (modeType) {
|
|
|
case 5:
|
|
|
case 1:
|
|
|
@@ -287,7 +286,6 @@ const setBarcode = (curBarcode) => {
|
|
|
barcode: curBarcode,
|
|
|
qty: 1,
|
|
|
}];
|
|
|
- console.log(data)
|
|
|
_setBoxCacheData(code, data); // 添加缓存数据
|
|
|
break;
|
|
|
case 0:
|
|
|
@@ -341,11 +339,21 @@ const _setBoxBarcode=()=>{
|
|
|
const _setBoxCacheData = (code,data) => {
|
|
|
showLoading()
|
|
|
setBoxCacheData(code,taskInfo.value.typeCode,data).then(res=>{
|
|
|
+ const oldData=JSON.parse(JSON.stringify(binList.value))
|
|
|
dataList.value = res.data
|
|
|
localData.value=[]
|
|
|
localStorage.removeItem(`task_${taskInfo.value.code}`);
|
|
|
if(res.data && modeType!==0){
|
|
|
playVoiceBin(Number(res.data[0].latticeCode))
|
|
|
+ const found = oldData.find(item => item.barcode === res.data[0].barcode);
|
|
|
+ if(found === undefined && oldData.length>1 ){
|
|
|
+ showDialog({
|
|
|
+ title: '温馨提示',
|
|
|
+ message: `扫到全新商品,请放入格口:${res.data[0].latticeCode}`,
|
|
|
+ }).then(() => {
|
|
|
+ barcodeRef.value?.focus()
|
|
|
+ });
|
|
|
+ }
|
|
|
}else {
|
|
|
scanSuccess()
|
|
|
}
|
|
|
@@ -434,6 +442,10 @@ const showConfirmation = (message) => {
|
|
|
});
|
|
|
};
|
|
|
const resetNewBin = () => {
|
|
|
+ if(localData.value.length===0 && dataList.value.length===0){
|
|
|
+ showToast('暂无数据,不支持清除!')
|
|
|
+ return
|
|
|
+ }
|
|
|
const { barcode, index, latticeCode, cartonCode } = newOneData.value;
|
|
|
const confirmMessage = index >= 0
|
|
|
? `您正在清除条码:${barcode}数据,是否继续?`
|
|
|
@@ -528,7 +540,7 @@ const onClickRight = () => {
|
|
|
background-color: #3f8dff
|
|
|
position: sticky
|
|
|
top: 0
|
|
|
- z-index: 1
|
|
|
+ //z-index: 1
|
|
|
color: white
|
|
|
font-size: 15px
|
|
|
.task-table-bin thead
|