|
@@ -3,7 +3,14 @@
|
|
|
<SearchForm :fields="fields" :params="params"></SearchForm>
|
|
|
<div class="flex-1 page-wrap">
|
|
|
<div class="btn-group">
|
|
|
- <t-button theme="success" @click="handleAdd">新增</t-button>
|
|
|
+ <t-button
|
|
|
+ theme="success"
|
|
|
+ @click="
|
|
|
+ curRow = null;
|
|
|
+ showAddDispatchDialog = true;
|
|
|
+ "
|
|
|
+ >新增</t-button
|
|
|
+ >
|
|
|
<t-button theme="success" :disabled="!selectedRowKeys.length"
|
|
|
>作废</t-button
|
|
|
>
|
|
@@ -35,16 +42,9 @@
|
|
|
|
|
|
<AddDispatchDialog
|
|
|
v-model:visible="showAddDispatchDialog"
|
|
|
- :title="title"
|
|
|
- :type="type"
|
|
|
- :handleSave="handleSave"
|
|
|
- :formData="formData"
|
|
|
- ref="formDialogRef"
|
|
|
+ :curRow="curRow"
|
|
|
></AddDispatchDialog>
|
|
|
- <DelineationDialog
|
|
|
- v-model:visible="showDelineationDialog"
|
|
|
- :rowData="rowData"
|
|
|
- >
|
|
|
+ <DelineationDialog v-model:visible="showDelineationDialog" :curRow="curRow">
|
|
|
</DelineationDialog>
|
|
|
<MultDelineationDialog
|
|
|
v-model:visible="showMultDelineationDialog"
|
|
@@ -66,7 +66,8 @@ import MultDelineationDialog from './mult-delineation-dialog.vue';
|
|
|
|
|
|
const showDelineationDialog = ref(false);
|
|
|
const showMultDelineationDialog = ref(false);
|
|
|
-const formDialogRef = ref(null);
|
|
|
+const curRow = ref(null);
|
|
|
+const showAddDispatchDialog = ref(false);
|
|
|
const selectedRowKeys = ref([]);
|
|
|
const selectChange = (value, { selectedRowData }) => {
|
|
|
selectedRowKeys.value = value;
|
|
@@ -74,9 +75,8 @@ const selectChange = (value, { selectedRowData }) => {
|
|
|
const multDelineationHandle = () => {
|
|
|
showMultDelineationDialog.value = true;
|
|
|
};
|
|
|
-const rowData = ref({});
|
|
|
const handleDelineation = (row) => {
|
|
|
- rowData.value = row;
|
|
|
+ curRow.value = row;
|
|
|
showDelineationDialog.value = true;
|
|
|
};
|
|
|
const columns = [
|
|
@@ -122,7 +122,8 @@ const columns = [
|
|
|
hover="color"
|
|
|
onClick={(e) => {
|
|
|
e.stopPropagation();
|
|
|
- handleEdit(row);
|
|
|
+ curRow.value = row;
|
|
|
+ showAddDispatchDialog.value = true;
|
|
|
}}
|
|
|
>
|
|
|
修改
|
|
@@ -220,45 +221,7 @@ const {
|
|
|
onChange,
|
|
|
} = useFetchTable(getTableData);
|
|
|
|
|
|
-const add = async () => {
|
|
|
- await 1;
|
|
|
- alert(1);
|
|
|
-};
|
|
|
-const update = async () => {};
|
|
|
const refresh = async () => {};
|
|
|
-
|
|
|
-const {
|
|
|
- visible: showAddDispatchDialog,
|
|
|
- type,
|
|
|
- title,
|
|
|
- loading: dialogLoading,
|
|
|
- handleAdd,
|
|
|
- handleEdit,
|
|
|
- handleSave,
|
|
|
- formData,
|
|
|
- formRef,
|
|
|
-} = useTableCrud(
|
|
|
- {
|
|
|
- name: '派单',
|
|
|
- doCreate: add,
|
|
|
- doUpdate: update,
|
|
|
- refresh: refresh,
|
|
|
- initForm: {
|
|
|
- a: '',
|
|
|
- b: '',
|
|
|
- c: '',
|
|
|
- d: '',
|
|
|
- e: '',
|
|
|
- f: '',
|
|
|
- g: '',
|
|
|
- h: '',
|
|
|
- i: '',
|
|
|
- j: '',
|
|
|
- k: '',
|
|
|
- },
|
|
|
- },
|
|
|
- formDialogRef
|
|
|
-);
|
|
|
</script>
|
|
|
|
|
|
<style></style>
|