|
@@ -76,21 +76,23 @@
|
|
|
<th style="width: 40%">商品条码</th>
|
|
<th style="width: 40%">商品条码</th>
|
|
|
<th>数量</th>
|
|
<th>数量</th>
|
|
|
<th>剩余</th>
|
|
<th>剩余</th>
|
|
|
|
|
+ <th>状态</th>
|
|
|
<th v-if="isUniqueCode">标记</th>
|
|
<th v-if="isUniqueCode">标记</th>
|
|
|
</tr>
|
|
</tr>
|
|
|
</thead>
|
|
</thead>
|
|
|
<tbody>
|
|
<tbody>
|
|
|
- <tr v-for="(item, index) in orderList" :key="index" v-if="orderList.length>0">
|
|
|
|
|
|
|
+ <tr v-for="(item, index) in orderList" :key="index" v-if="orderList.length>0" :style="rowStyle(item)" >
|
|
|
<td>{{ item.barcode }} <van-tag type="success" v-if="item.universalCode">万用</van-tag></td>
|
|
<td>{{ item.barcode }} <van-tag type="success" v-if="item.universalCode">万用</van-tag></td>
|
|
|
<td>{{item.qty}}/{{item.qtyOrdered}}</td>
|
|
<td>{{item.qty}}/{{item.qtyOrdered}}</td>
|
|
|
<td>{{ item.qty }}</td>
|
|
<td>{{ item.qty }}</td>
|
|
|
|
|
+ <td>{{ statusMap[item.status] || '' }}</td>
|
|
|
<td v-if="isUniqueCode">
|
|
<td v-if="isUniqueCode">
|
|
|
<van-tag v-if="item.uniqueRegExp" type="warning" >唯一码</van-tag>
|
|
<van-tag v-if="item.uniqueRegExp" type="warning" >唯一码</van-tag>
|
|
|
<van-tag v-if="item.imeiRegExp" type="primary" >IMEI码</van-tag>
|
|
<van-tag v-if="item.imeiRegExp" type="primary" >IMEI码</van-tag>
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr v-else>
|
|
<tr v-else>
|
|
|
- <td colspan="3">
|
|
|
|
|
|
|
+ <td colspan="4">
|
|
|
<div>暂无数据</div>
|
|
<div>暂无数据</div>
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
@@ -114,7 +116,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { onMounted, onUnmounted, ref } from 'vue'
|
|
|
|
|
|
|
+import { computed, onMounted, onUnmounted, ref } from 'vue'
|
|
|
import { androidFocus, getHeader, goBack, scanError, scanSuccess } from '@/utils/android'
|
|
import { androidFocus, getHeader, goBack, scanError, scanSuccess } from '@/utils/android'
|
|
|
import { useStore } from '@/store/modules/user'
|
|
import { useStore } from '@/store/modules/user'
|
|
|
import { closeListener, openListener, scanInit } from '@/utils/keydownListener'
|
|
import { closeListener, openListener, scanInit } from '@/utils/keydownListener'
|
|
@@ -143,6 +145,7 @@ onMounted(() => {
|
|
|
})
|
|
})
|
|
|
const warehouse = store.warehouse
|
|
const warehouse = store.warehouse
|
|
|
//收货容器号
|
|
//收货容器号
|
|
|
|
|
+// JH-WH99-990
|
|
|
const waveNo = ref('')
|
|
const waveNo = ref('')
|
|
|
const isUniqueCode=ref(false)
|
|
const isUniqueCode=ref(false)
|
|
|
// 错误提示
|
|
// 错误提示
|
|
@@ -163,7 +166,35 @@ const reversePickingContainerNo=containerNoMap[warehouse]
|
|
|
const orderDetail=ref({})
|
|
const orderDetail=ref({})
|
|
|
//订单详情
|
|
//订单详情
|
|
|
const orderMap=ref({})
|
|
const orderMap=ref({})
|
|
|
-const orderList=ref([])
|
|
|
|
|
|
|
+const dataList=ref([])
|
|
|
|
|
+const orderList = computed(() => {
|
|
|
|
|
+ return dataList.value
|
|
|
|
|
+ .sort((a, b) => {
|
|
|
|
|
+ const statusPriority = {
|
|
|
|
|
+ '60': 0,
|
|
|
|
|
+ '600': 1,
|
|
|
|
|
+ '50': 2,
|
|
|
|
|
+ '40': 3,
|
|
|
|
|
+ '30': 4,
|
|
|
|
|
+ '20': 5,
|
|
|
|
|
+ '00': 6,
|
|
|
|
|
+ }
|
|
|
|
|
+ if (statusPriority[a.status] !== statusPriority[b.status]) {
|
|
|
|
|
+ return statusPriority[a.status] - statusPriority[b.status]
|
|
|
|
|
+ }
|
|
|
|
|
+ return 0
|
|
|
|
|
+ })
|
|
|
|
|
+})
|
|
|
|
|
+const statusMap = {
|
|
|
|
|
+ '00': '创建',
|
|
|
|
|
+ '20': '预配',
|
|
|
|
|
+ '30': '部分分配',
|
|
|
|
|
+ '40': '已分配',
|
|
|
|
|
+ '50': '待拣货',
|
|
|
|
|
+ '60': '已拣货',
|
|
|
|
|
+ '61': '分拣完成',
|
|
|
|
|
+ '90': '订单取消',
|
|
|
|
|
+}
|
|
|
//匹配条码
|
|
//匹配条码
|
|
|
const matchBarcodeList=ref([])
|
|
const matchBarcodeList=ref([])
|
|
|
const actions = [
|
|
const actions = [
|
|
@@ -186,12 +217,13 @@ const _handlerScan = (code) => {
|
|
|
}
|
|
}
|
|
|
const barcode = [...new Set(
|
|
const barcode = [...new Set(
|
|
|
orderList.value
|
|
orderList.value
|
|
|
|
|
+ .filter(item => (item.status == '60'))
|
|
|
.flatMap(item => [item.barcode, item.barcode2, item.sku, item.universalCode])
|
|
.flatMap(item => [item.barcode, item.barcode2, item.sku, item.universalCode])
|
|
|
.filter(value => value !== null && value !== '' && value !== undefined),
|
|
.filter(value => value !== null && value !== '' && value !== undefined),
|
|
|
)];
|
|
)];
|
|
|
const checkBarcode = barcodeToUpperCase(code);
|
|
const checkBarcode = barcodeToUpperCase(code);
|
|
|
if (barcode.some(item => barcodeToUpperCase(item) === checkBarcode)) {
|
|
if (barcode.some(item => barcodeToUpperCase(item) === checkBarcode)) {
|
|
|
- matchBarcodeList.value=orderList.value.filter(item=>((item.barcode===checkBarcode || item.sku===checkBarcode || item.barcode2===checkBarcode || item.universalCode==checkBarcode) && item.qty>0) )
|
|
|
|
|
|
|
+ matchBarcodeList.value=orderList.value.filter(item=>((item.barcode===checkBarcode || item.sku===checkBarcode || item.barcode2===checkBarcode || item.universalCode==checkBarcode) && item.status == '60' && item.qty>0) )
|
|
|
if(matchBarcodeList.value.length>0){
|
|
if(matchBarcodeList.value.length>0){
|
|
|
const itemActive = matchBarcodeList.value[0]
|
|
const itemActive = matchBarcodeList.value[0]
|
|
|
scanBarcode.value=code
|
|
scanBarcode.value=code
|
|
@@ -236,7 +268,6 @@ const _handlerScan = (code) => {
|
|
|
showNotify({ type: 'warning', duration: 3000, message: `商品条码${code},不匹配请重新扫描!`})
|
|
showNotify({ type: 'warning', duration: 3000, message: `商品条码${code},不匹配请重新扫描!`})
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -297,7 +328,7 @@ const reset=()=>{
|
|
|
totalWeight.value=''
|
|
totalWeight.value=''
|
|
|
orderDetail.value={}
|
|
orderDetail.value={}
|
|
|
orderMap.value={}
|
|
orderMap.value={}
|
|
|
- orderList.value=[]
|
|
|
|
|
|
|
+ dataList.value=[]
|
|
|
matchBarcodeList.value=[]
|
|
matchBarcodeList.value=[]
|
|
|
tips.value='请扫描商品条码'
|
|
tips.value='请扫描商品条码'
|
|
|
inputBarcodeRef.value?.show('', '请扫描波次/容器号', '')
|
|
inputBarcodeRef.value?.show('', '请扫描波次/容器号', '')
|
|
@@ -362,7 +393,7 @@ const endCheck=()=>{
|
|
|
const dataGroup = orderMap.value.dataGroup
|
|
const dataGroup = orderMap.value.dataGroup
|
|
|
for (const order of Object.values(dataGroup)) {
|
|
for (const order of Object.values(dataGroup)) {
|
|
|
for (const item of order) {
|
|
for (const item of order) {
|
|
|
- if (item.qty !== 0) {
|
|
|
|
|
|
|
+ if (item.qty !== 0 && item.status=='60') {
|
|
|
item.quantity = item.qty
|
|
item.quantity = item.qty
|
|
|
item.qty = 0
|
|
item.qty = 0
|
|
|
}
|
|
}
|
|
@@ -403,6 +434,7 @@ const packingRequests = async (startIndex = 0, lastNumber) => {
|
|
|
code: item.orderNo,
|
|
code: item.orderNo,
|
|
|
totalGrossWeight:Number(totalWeight.value),
|
|
totalGrossWeight:Number(totalWeight.value),
|
|
|
groupDetailList,
|
|
groupDetailList,
|
|
|
|
|
+ activityOrderFlag:true
|
|
|
};
|
|
};
|
|
|
showLoadingToast({
|
|
showLoadingToast({
|
|
|
duration: 0,
|
|
duration: 0,
|
|
@@ -475,10 +507,10 @@ const setBarcode = (code) => {
|
|
|
orderDetail.value = res.data
|
|
orderDetail.value = res.data
|
|
|
orderMap.value=getDataList(res.data.details)
|
|
orderMap.value=getDataList(res.data.details)
|
|
|
if(orderMap.value.dataGroup && Object.keys(orderMap.value.dataGroup).length>0){
|
|
if(orderMap.value.dataGroup && Object.keys(orderMap.value.dataGroup).length>0){
|
|
|
- orderList.value=orderMap.value.dataGroup[Object.keys(orderMap.value.dataGroup)[0]]
|
|
|
|
|
- isUniqueCode.value = orderList.value.some(item => item.uniqueRegExp || item.imeiRegExp );
|
|
|
|
|
|
|
+ dataList.value=orderMap.value.dataGroup[Object.keys(orderMap.value.dataGroup)[0]]
|
|
|
|
|
+ isUniqueCode.value = dataList.value.some(item => item.uniqueRegExp || item.imeiRegExp );
|
|
|
}else {
|
|
}else {
|
|
|
- orderList.value=[]
|
|
|
|
|
|
|
+ dataList.value=[]
|
|
|
}
|
|
}
|
|
|
matchBarcodeList.value=[]
|
|
matchBarcodeList.value=[]
|
|
|
scanBarcode.value=''
|
|
scanBarcode.value=''
|
|
@@ -524,7 +556,12 @@ const getDataList = (data) => {
|
|
|
});
|
|
});
|
|
|
return groupedData
|
|
return groupedData
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
|
|
+const rowStyle=( row )=>{
|
|
|
|
|
+ if(row.status!='60' ){
|
|
|
|
|
+ return { background: '#b3b3b3'}
|
|
|
|
|
+ }
|
|
|
|
|
+ return ''
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
//切换波次
|
|
//切换波次
|
|
|
const _setWaveNo = () => {
|
|
const _setWaveNo = () => {
|