|
@@ -7,6 +7,7 @@
|
|
|
:model="formData"
|
|
|
class="data-query-form"
|
|
|
:rules="rules"
|
|
|
+ @submit.native.prevent
|
|
|
>
|
|
|
<div v-if="name !== 'waybill'" class="form-left">
|
|
|
<el-form-item prop="startDate">
|
|
@@ -43,7 +44,7 @@
|
|
|
placeholder="请输入要搜索的内容"
|
|
|
:prefix-icon="Search"
|
|
|
clearable
|
|
|
- @keyup.enter="dataQuery"
|
|
|
+ @keyup.enter.prevent="dataQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -98,8 +99,8 @@ const props = defineProps({
|
|
|
|
|
|
const today = parseTime(new Date(), '{y}-{m}-{d}') as string
|
|
|
const formData = reactive({
|
|
|
- startDate: today,
|
|
|
- endDate: today,
|
|
|
+ startDate: props.name === 'waybill' ? null : today,
|
|
|
+ endDate: props.name === 'waybill' ? null : today,
|
|
|
keyWords: '',
|
|
|
})
|
|
|
watchEffect(() => {
|
|
@@ -242,11 +243,19 @@ const cellClickHandler = (row, column, cell, event) => {
|
|
|
case 'waybill': {
|
|
|
switch (column.property) {
|
|
|
case 'stockCode': {
|
|
|
- if (!row.stockCode || !row.flightDate) {
|
|
|
+ if (
|
|
|
+ !row.stockCode ||
|
|
|
+ !row.flightDate ||
|
|
|
+ !['INT', 'DOM'].includes(row.DIType) ||
|
|
|
+ typeof row.FFID !== 'string' ||
|
|
|
+ !['A', 'D'].includes(row.FFID.at(-1))
|
|
|
+ ) {
|
|
|
ElMessage.error('运单信息缺失!')
|
|
|
return
|
|
|
}
|
|
|
- const viewName = `Waybill`
|
|
|
+ const viewName = `${row.DIType === 'DOM' ? '' : 'International'}${
|
|
|
+ row.FFID.at(-1) === 'D' ? 'Departure' : 'Arrival'
|
|
|
+ }Waybill`
|
|
|
router.push({
|
|
|
path: `/dataQuery/waybillQuery/${viewName}`,
|
|
|
query: {
|