Commit ca59f685 by zhuzhequan

添加ordernumber字段

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