Commit ca59f685 by zhuzhequan

添加ordernumber字段

parent bb74b1fc
......@@ -67,6 +67,7 @@ export interface OrderData {
export interface ProductList {
id: number
customOrderId?: number
orderNumber?: string
subOrderNumber?: string
shopNumber?: string
material?: string
......
......@@ -6,20 +6,20 @@
<div class="shipment-info-item-header--title">
<span class="shipment-info-item-header__label">主单号:</span>
<span class="shipment-info-item-header__value">{{
o.orderNumber || '--'
}}</span>
o.orderNumber || '--'
}}</span>
</div>
<div class="shipment-info-item-header--title">
<span class="shipment-info-item-header__label">订单类型:</span>
<span class="shipment-info-item-header__value">{{
o.sourceType || '--'
}}</span>
o.sourceType || '--'
}}</span>
</div>
<div class="shipment-info-item-header--title">
<span class="shipment-info-item-header__label">收货人:</span>
<span class="shipment-info-item-header__value">{{
o.lanshouName || '--'
}}</span>
o.lanshouName || '--'
}}</span>
</div>
</div>
<div class="shipment-info-item-content">
......@@ -31,7 +31,7 @@
'active-row': item.subOrderNumber === currentRow.subOrderNumber,
}"
class="shipment-info-item-content-item"
@click="onRowClick(item)"
@click="onRowClick(item,o)"
>
<div class="image">
<img :src="item.variantImage" />
......@@ -64,9 +64,9 @@
>
<span class="label">未发数:</span>
<span class="value">{{
(item.num || 0) -
((item.shipmentNum || 0) - (item.notPassNum || 0))
}}</span>
(item.num || 0) -
((item.shipmentNum || 0) - (item.notPassNum || 0))
}}</span>
</div>
<div
class="shipment-info-item-content-item--info"
......@@ -80,7 +80,7 @@
@click.stop="onShipment(item)"
>
<el-icon style="vertical-align: middle"
><CircleCloseFilled
><CircleCloseFilled
/></el-icon>
</span>
</div>
......@@ -112,6 +112,14 @@
{{ currentRow.count }}
</span>
</div>
<div class="order-norm">
<span class="order-norm-label" style="margin-right: 6px">
订单号:
</span>
<span class="order-norm-value" :title="currentRow.orderNumber">
{{ currentRow.orderNumber }}
</span>
</div>
</div>
</div>
</div>
......@@ -124,6 +132,8 @@ import { OrderData, ProductList } from '@/types/api/order'
import { PropType, ref } from 'vue'
import { CircleCloseFilled } from '@element-plus/icons-vue'
import { showConfirm } from '@/utils/ui'
import { a } from 'vite/dist/node/types.d-jgA8ss1A'
const emit = defineEmits<{
(e: 'changeCurrentRow', v: ProductList): void
}>()
......@@ -134,7 +144,8 @@ defineProps({
},
currentRow: {
type: Object as PropType<ProductList>,
default: () => {},
default: () => {
},
},
})
......@@ -150,7 +161,8 @@ defineExpose<ShipmentType>({
},
})
const onRowClick = (item: ProductList) => {
const onRowClick = (item: ProductList, o: OrderData) => {
item.orderNumber = o.orderNumber
emit('changeCurrentRow', item)
}
const onShipment = async (item: ProductList) => {
......@@ -175,6 +187,7 @@ const onShipment = async (item: ProductList) => {
display: flex;
gap: 10px;
}
.shipment-info {
width: 50%;
border: 1px solid #eee;
......@@ -202,11 +215,13 @@ const onShipment = async (item: ProductList) => {
height: 100%;
width: 50px;
border-right: 1px solid #eee;
img {
width: 100%;
height: 100%;
}
}
.shipment-info-item-header {
display: flex;
justify-content: space-between;
......
......@@ -43,9 +43,13 @@ export default function useShipment(callback?: () => void) {
const code1 = code?.split('_')[0]
for (const item of orderList.value) {
rowData = item.productList?.find((jj) => jj.subOrderNumber === code1)
if (rowData) break
if (rowData) {
rowData.orderNumber = item.orderNumber
break
}
}
if (rowData) {
currentRow.value = rowData
const unShipmentNum =
(rowData.num || 0) -
......@@ -107,7 +111,9 @@ export default function useShipment(callback?: () => void) {
},
).catch(() => {})
}
currentRow.value = item
currentRow.value.orderNumber = res.data.orderNumber
}
}
const index = orderList.value.findIndex(
......
......@@ -983,7 +983,7 @@ const confirmProduce = async () => {
try {
const res = await confirmProductionOrder(ids)
search()
loadTabData()
await loadTabData()
ElMessage.success(res.message)
} catch (e) {
showError(e)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment