|
@@ -2,6 +2,20 @@
|
|
<div>
|
|
<div>
|
|
<!--引用表格-->
|
|
<!--引用表格-->
|
|
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
|
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
|
|
|
+ <template #form-ccmNo="{ field, model }">
|
|
|
|
+ <segmented-select
|
|
|
|
+ v-model:value="model[field]"
|
|
|
|
+ @change="
|
|
|
|
+ () => {
|
|
|
|
+ reload();
|
|
|
|
+ }
|
|
|
|
+ "
|
|
|
|
+ dict="lg_zj"
|
|
|
|
+ />
|
|
|
|
+ </template>
|
|
|
|
+ <template #form-destination="{ model }">
|
|
|
|
+ <a-select v-model:value="model.destination" :options="destinationOptions[model.ccmNo]" />
|
|
|
|
+ </template>
|
|
<!--插槽:table标题-->
|
|
<!--插槽:table标题-->
|
|
<template #tableTitle>
|
|
<template #tableTitle>
|
|
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
|
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
|
@@ -43,6 +57,8 @@
|
|
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, getCurrentShift } from './ShiftConfiguration.api';
|
|
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, getCurrentShift } from './ShiftConfiguration.api';
|
|
import { onMounted, ref } from 'vue';
|
|
import { onMounted, ref } from 'vue';
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
|
|
+ import SegmentedSelect from '/@/components/SegmentedSelect/index.vue';
|
|
|
|
+ import { destinationOptions } from '../hotDelivery/common.data';
|
|
|
|
|
|
const lastData = ref({});
|
|
const lastData = ref({});
|
|
const currentShift = ref<{
|
|
const currentShift = ref<{
|
|
@@ -77,6 +93,7 @@
|
|
afterFetch: (data) => {
|
|
afterFetch: (data) => {
|
|
//重置选中
|
|
//重置选中
|
|
const pagination: any = getPaginationRef();
|
|
const pagination: any = getPaginationRef();
|
|
|
|
+ const values = getForm().getFieldsValue();
|
|
if (pagination && pagination.current === 1 && data.length > 0) {
|
|
if (pagination && pagination.current === 1 && data.length > 0) {
|
|
let newObj = {};
|
|
let newObj = {};
|
|
for (const key in data[0]) {
|
|
for (const key in data[0]) {
|
|
@@ -85,6 +102,10 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
lastData.value = newObj;
|
|
lastData.value = newObj;
|
|
|
|
+ } else {
|
|
|
|
+ lastData.value = {
|
|
|
|
+ ccmNo: values.ccmNo || '5',
|
|
|
|
+ };
|
|
}
|
|
}
|
|
return data;
|
|
return data;
|
|
},
|
|
},
|
|
@@ -99,7 +120,7 @@
|
|
},
|
|
},
|
|
});
|
|
});
|
|
|
|
|
|
- const [registerTable, { reload, getPaginationRef }, { rowSelection, selectedRowKeys }] = tableContext;
|
|
|
|
|
|
+ const [registerTable, { reload, getPaginationRef, getForm }, { rowSelection, selectedRowKeys }] = tableContext;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 新增事件
|
|
* 新增事件
|