|
|
@@ -5,7 +5,7 @@
|
|
|
<el-form :inline="true" :model="searchForm" class="search-form">
|
|
|
<el-form-item label="客户订单号">
|
|
|
<el-input
|
|
|
- v-model="searchForm.OrdNbr"
|
|
|
+ v-model="searchForm.ordNbr"
|
|
|
placeholder="请输入客户订单号"
|
|
|
clearable
|
|
|
@keyup.enter="handleSearch"
|
|
|
@@ -13,21 +13,21 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="订单编号">
|
|
|
<el-input
|
|
|
- v-model="searchForm.bill_no"
|
|
|
+ v-model="searchForm.billNo"
|
|
|
placeholder="请输入订单编号"
|
|
|
clearable
|
|
|
@keyup.enter="handleSearch"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="国家">
|
|
|
- <el-select v-model="searchForm.Country" placeholder="请选择国家" clearable>
|
|
|
+ <el-select v-model="searchForm.country" placeholder="请选择国家" clearable>
|
|
|
<el-option label="中国" value="中国" />
|
|
|
<el-option label="英国" value="英国" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="出货日期">
|
|
|
<el-date-picker
|
|
|
- v-model="searchForm.ShippingDate"
|
|
|
+ v-model="searchForm.shippingDate"
|
|
|
type="date"
|
|
|
placeholder="请选择日期"
|
|
|
value-format="YYYY-MM-DD"
|
|
|
@@ -36,7 +36,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="客户编码">
|
|
|
<el-input
|
|
|
- v-model="searchForm.CustomNo"
|
|
|
+ v-model="searchForm.customNo"
|
|
|
placeholder="请输入客户编码"
|
|
|
clearable
|
|
|
@keyup.enter="handleSearch"
|
|
|
@@ -44,7 +44,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="物料编号">
|
|
|
<el-input
|
|
|
- v-model="searchForm.ItemNum"
|
|
|
+ v-model="searchForm.itemNum"
|
|
|
placeholder="请输入物料编号"
|
|
|
clearable
|
|
|
@keyup.enter="handleSearch"
|
|
|
@@ -82,32 +82,32 @@
|
|
|
>
|
|
|
<el-table-column type="selection" width="55" fixed="left" />
|
|
|
<el-table-column prop="lotserial" label="出货编号" width="180" fixed="left" />
|
|
|
- <el-table-column prop="OrdNbr" label="客户订单号" width="150" />
|
|
|
- <el-table-column prop="bill_no" label="订单编号" width="180" />
|
|
|
- <el-table-column prop="OrdDate" label="下单日期" width="120">
|
|
|
+ <el-table-column prop="ordNbr" label="客户订单号" width="150" />
|
|
|
+ <el-table-column prop="billNo" label="订单编号" width="180" />
|
|
|
+ <el-table-column prop="ordDate" label="下单日期" width="120">
|
|
|
<template #default="{ row }">
|
|
|
- {{ row.OrdDate ? row.OrdDate.substring(0, 10) : '' }}
|
|
|
+ {{ row.ordDate ? String(row.ordDate).substring(0, 10) : '' }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="Country" label="国家" width="100" />
|
|
|
- <el-table-column prop="CustomNo" label="客户编码" width="120" />
|
|
|
- <el-table-column prop="CustomName" label="客户名称" width="200" show-overflow-tooltip />
|
|
|
- <el-table-column prop="ItemNum" label="物料编号" width="150" />
|
|
|
- <el-table-column prop="ItemName" label="物料名称" width="200" show-overflow-tooltip />
|
|
|
- <el-table-column prop="Specification" label="规格型号" width="150" />
|
|
|
- <el-table-column prop="Qty" label="数量" width="100" align="right" />
|
|
|
- <el-table-column prop="Weight" label="重量(KG)" width="120" align="right" />
|
|
|
- <el-table-column prop="Volume" label="体积(M3)" width="120" align="right" />
|
|
|
- <el-table-column prop="Packaging" label="包装要求" width="150" />
|
|
|
- <el-table-column prop="ShippingSite" label="出货地点" width="150" />
|
|
|
- <el-table-column prop="ShippingDate" label="出货日期" width="120">
|
|
|
+ <el-table-column prop="country" label="国家" width="100" />
|
|
|
+ <el-table-column prop="customNo" label="客户编码" width="120" />
|
|
|
+ <el-table-column prop="customName" label="客户名称" width="200" show-overflow-tooltip />
|
|
|
+ <el-table-column prop="itemNum" label="物料编号" width="150" />
|
|
|
+ <el-table-column prop="itemName" label="物料名称" width="200" show-overflow-tooltip />
|
|
|
+ <el-table-column prop="specification" label="规格型号" width="150" />
|
|
|
+ <el-table-column prop="qty" label="数量" width="100" align="right" />
|
|
|
+ <el-table-column prop="weight" label="重量(KG)" width="120" align="right" />
|
|
|
+ <el-table-column prop="volume" label="体积(M3)" width="120" align="right" />
|
|
|
+ <el-table-column prop="packaging" label="包装要求" width="150" />
|
|
|
+ <el-table-column prop="shippingSite" label="出货地点" width="150" />
|
|
|
+ <el-table-column prop="shippingDate" label="出货日期" width="120">
|
|
|
<template #default="{ row }">
|
|
|
- {{ row.ShippingDate ? row.ShippingDate.substring(0, 10) : '' }}
|
|
|
+ {{ row.shippingDate ? String(row.shippingDate).substring(0, 10) : '' }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="ShippingAddress" label="收货地址" width="200" show-overflow-tooltip />
|
|
|
- <el-table-column prop="Consignee" label="收货人" width="100" />
|
|
|
- <el-table-column prop="Telephone" label="联系方式" width="120" />
|
|
|
+ <el-table-column prop="shippingAddress" label="收货地址" width="200" show-overflow-tooltip />
|
|
|
+ <el-table-column prop="consignee" label="收货人" width="100" />
|
|
|
+ <el-table-column prop="telephone" label="联系方式" width="120" />
|
|
|
<el-table-column label="操作" width="150" fixed="right">
|
|
|
<template #default="{ row }">
|
|
|
<el-button type="primary" link :icon="Edit" @click="handleEdit(row)">编辑</el-button>
|
|
|
@@ -146,12 +146,12 @@ const tableData = ref([])
|
|
|
const selectedRows = ref([])
|
|
|
|
|
|
const searchForm = reactive({
|
|
|
- OrdNbr: '',
|
|
|
- bill_no: '',
|
|
|
- Country: '',
|
|
|
- ShippingDate: '',
|
|
|
- CustomNo: '',
|
|
|
- ItemNum: ''
|
|
|
+ ordNbr: '',
|
|
|
+ billNo: '',
|
|
|
+ country: '',
|
|
|
+ shippingDate: '',
|
|
|
+ customNo: '',
|
|
|
+ itemNum: ''
|
|
|
})
|
|
|
|
|
|
const pagination = reactive({
|
|
|
@@ -161,7 +161,7 @@ const pagination = reactive({
|
|
|
})
|
|
|
|
|
|
const hasValidSelection = computed(() => {
|
|
|
- return selectedRows.value.length > 0 && selectedRows.value.every(row => !row.RecID)
|
|
|
+ return selectedRows.value.length > 0 && selectedRows.value.every(row => !row.recID)
|
|
|
})
|
|
|
|
|
|
const planFormRef = ref(null)
|
|
|
@@ -171,13 +171,18 @@ const handleSearch = async () => {
|
|
|
loading.value = true
|
|
|
try {
|
|
|
const params = {
|
|
|
- ...searchForm,
|
|
|
- page: pagination.page,
|
|
|
+ ordNbr: searchForm.ordNbr,
|
|
|
+ billNo: searchForm.billNo,
|
|
|
+ country: searchForm.country,
|
|
|
+ shippingDate: searchForm.shippingDate,
|
|
|
+ customNo: searchForm.customNo,
|
|
|
+ itemNum: searchForm.itemNum,
|
|
|
+ pageNo: pagination.page,
|
|
|
pageSize: pagination.pageSize
|
|
|
}
|
|
|
- const { data } = await getShippingPlanList(params)
|
|
|
- tableData.value = data.list || []
|
|
|
- pagination.total = data.total || 0
|
|
|
+ const res = await getShippingPlanList(params)
|
|
|
+ tableData.value = res.list || []
|
|
|
+ pagination.total = res.total || 0
|
|
|
} catch (error) {
|
|
|
console.error('查询失败:', error)
|
|
|
if (error.code === 'ERR_NETWORK' || error.response?.status === 404) {
|
|
|
@@ -222,13 +227,14 @@ const handleView = (row) => {
|
|
|
}
|
|
|
|
|
|
// 销售出库
|
|
|
+// 销售出库
|
|
|
const handleSalesOutbound = async () => {
|
|
|
if (!selectedRows.value.length) {
|
|
|
ElMessage.warning('请先选择出货计划')
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- const invalidRows = selectedRows.value.filter(row => row.RecID)
|
|
|
+ const invalidRows = selectedRows.value.filter(row => row.recID)
|
|
|
if (invalidRows.length > 0) {
|
|
|
ElMessage.warning('选中的记录中包含已出库的记录')
|
|
|
return
|
|
|
@@ -258,8 +264,8 @@ const handleSalesOutbound = async () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// 初始化 - 注释掉自动查询,等后端API准备好后再启用
|
|
|
-// handleSearch()
|
|
|
+// 初始化 - 页面加载时自动查询
|
|
|
+handleSearch()
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|