|
|
@@ -104,7 +104,9 @@
|
|
|
<tbody>
|
|
|
<tr v-if="binList.length>0" v-for="(item,index) in binList" :key="index">
|
|
|
<td>{{ item.latticeCode }}</td>
|
|
|
- <td>{{ item.barcode }}</td>
|
|
|
+ <td :style="item.commodityName==null?'background:#dcdee0':''">
|
|
|
+ {{ item.barcode }}
|
|
|
+ </td>
|
|
|
<td>{{ item.qty }}</td>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
@@ -122,7 +124,9 @@
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
<tr v-for="(item, index) in localData" :key="index" :class="{'odd-row': index % 2 !== 0}">
|
|
|
- <td>{{ item.barcode }}</td>
|
|
|
+ <td :style="item.dataType?'background:#dcdee0':''">
|
|
|
+ {{ item.barcode }}
|
|
|
+ </td>
|
|
|
<td>{{item.latticeCode}}</td>
|
|
|
<td>{{ item.qty }}</td>
|
|
|
<td>
|
|
|
@@ -130,7 +134,9 @@
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr v-for="(item, index) in route.query.typeCode==='1'?binList:dataList" :key="index" :class="{'odd-row': Number(index+localData.length) % 2 !== 0}">
|
|
|
- <td>{{ item.barcode }}</td>
|
|
|
+ <td :style="item.commodityName==null?'background:#dcdee0':''">
|
|
|
+ {{ item.barcode }}
|
|
|
+ </td>
|
|
|
<td>{{ modeType === 0 ? item.cartonCode : item.latticeCode }}</td>
|
|
|
<td>{{ item.qty }}</td>
|
|
|
<td>
|
|
|
@@ -288,18 +294,29 @@ const _checkBarcode = () => {
|
|
|
barcode:inputBarcode.value
|
|
|
};
|
|
|
checkBlindBarcode(params).then(res=>{
|
|
|
- if(res.data){
|
|
|
+ if(res.code===305){
|
|
|
+ showConfirmDialog({
|
|
|
+ title: '温馨提示',
|
|
|
+ message:`<div style="font-size: 16px">条码《<span style="color: orangered;font-weight: 500">${inputBarcode.value}</span>》未在系统中维护</div><div>是否确认录入?</div>`,
|
|
|
+ allowHtml:true,
|
|
|
+ keyboardEnabled:false
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ setBarcode(inputBarcode.value,'new')
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ }else {
|
|
|
setBarcode(res.data.barCode)
|
|
|
}
|
|
|
}).catch((err)=>{
|
|
|
- inputBarcode.value=''
|
|
|
scanError();
|
|
|
+ inputBarcode.value=''
|
|
|
})
|
|
|
}
|
|
|
|
|
|
};
|
|
|
// 设置条码的处理
|
|
|
-const setBarcode = (curBarcode) => {
|
|
|
+const setBarcode = (curBarcode,dataType) => {
|
|
|
inputBarcode.value=''
|
|
|
const { code } = taskInfo.value;
|
|
|
switch (modeType) {
|
|
|
@@ -314,7 +331,7 @@ const setBarcode = (curBarcode) => {
|
|
|
_setBoxCacheData(code, data); // 添加缓存数据
|
|
|
break;
|
|
|
case 0:
|
|
|
- setLocalData(curBarcode, modeType); // 设置本地数据
|
|
|
+ setLocalData(curBarcode, modeType,dataType); // 设置本地数据
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
|
@@ -328,10 +345,11 @@ const loadLocalData = (taskCode) => {
|
|
|
const savedData = localStorage.getItem(`task_${taskCode}`);
|
|
|
return savedData ? JSON.parse(savedData) : []; // 如果缓存有数据,解析并返回,如果没有,则返回空数组
|
|
|
};
|
|
|
-const setLocalData=(barCode,type)=>{
|
|
|
+const setLocalData=(barCode,type,dataType)=>{
|
|
|
scanSuccess();
|
|
|
const data = {
|
|
|
barcode:barCode,
|
|
|
+ dataType,
|
|
|
cartonCode: null,
|
|
|
index:localData.value.length,
|
|
|
qty:1
|