forked from integrated_whb/integrated_whb_vue
BUG 优化
parent
f96eb0701c
commit
3de96ec2c2
|
@ -69,15 +69,18 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>-->
|
</el-col>-->
|
||||||
<el-col :span="10">
|
<el-col :span="12">
|
||||||
<el-form-item label-width="10px">
|
<el-form-item label-width="10px">
|
||||||
<el-button type="primary" native-type="submit">搜索</el-button>
|
<el-button type="primary" native-type="submit">搜索</el-button>
|
||||||
<el-button native-type="reset" @click="fnResetPaginationTransfer">重置</el-button>
|
<el-button native-type="reset" @click="fnResetPaginationTransfer">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="30">
|
<el-col :span="6">
|
||||||
<el-form-item label-width="10px" class="end">
|
<el-form-item label-width="10px" class="end">
|
||||||
<el-button @click="fnExport">导出</el-button>
|
<el-button type="primary" @click="fnImportDialogChangeShow">
|
||||||
|
导入
|
||||||
|
</el-button>
|
||||||
|
<el-button type="primary" @click="fnExport">导出</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -168,6 +171,11 @@
|
||||||
</template>
|
</template>
|
||||||
</layout-table>
|
</layout-table>
|
||||||
</layout-card>
|
</layout-card>
|
||||||
|
<layout-import-file
|
||||||
|
v-model:visible="data.importDialogVisible"
|
||||||
|
template-url="/template/truckExcelTemplate.xls"
|
||||||
|
@submit="fnSubmitImport"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -186,8 +194,14 @@ import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
|
||||||
import { debounce } from "throttle-debounce";
|
import { debounce } from "throttle-debounce";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import { NETWORK_STATE } from "@/assets/js/constant.js";
|
import { NETWORK_STATE } from "@/assets/js/constant.js";
|
||||||
|
import { reactive } from "vue";
|
||||||
|
import { setFreightTrailerImport } from "@/request/enterprise_management.js";
|
||||||
|
import LayoutImportFile from "@/components/import_file/index.vue";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const data = reactive({
|
||||||
|
importDialogVisible: false,
|
||||||
|
});
|
||||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef} =
|
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef} =
|
||||||
useListData(getOperationVehicleList, {});
|
useListData(getOperationVehicleList, {});
|
||||||
const troubleshootingCycleList = await layoutFnGetVehicleColor();
|
const troubleshootingCycleList = await layoutFnGetVehicleColor();
|
||||||
|
@ -213,6 +227,23 @@ const fnDelete = debounce(
|
||||||
{ atBegin: true }
|
{ atBegin: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const fnImportDialogChangeShow = () => {
|
||||||
|
data.importDialogVisible = !data.importDialogVisible;
|
||||||
|
};
|
||||||
|
|
||||||
|
const fnSubmitImport = async (formData) => {
|
||||||
|
const resData = await setFreightTrailerImport(formData);
|
||||||
|
if (resData.resultStr) {
|
||||||
|
ElMessage({
|
||||||
|
dangerouslyUseHTMLString: true,
|
||||||
|
message: resData.resultStr,
|
||||||
|
type: resData.resultType,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
fnImportDialogChangeShow();
|
||||||
|
fnResetPaginationTransfer();
|
||||||
|
};
|
||||||
|
|
||||||
const fnExport = async () => {
|
const fnExport = async () => {
|
||||||
const selectionData = tableRef.value.getSelectionRows();
|
const selectionData = tableRef.value.getSelectionRows();
|
||||||
if (selectionData.length === 0) {
|
if (selectionData.length === 0) {
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="4">
|
||||||
<el-form-item label="提醒状态" prop="REMINDER_STATUS">
|
<el-form-item label="提醒状态" prop="REMINDER_STATUS">
|
||||||
<el-select v-model="searchForm.REMINDER_STATUS">
|
<el-select v-model="searchForm.REMINDER_STATUS">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -76,9 +76,10 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2">
|
<el-col :span="4">
|
||||||
<el-form-item label-width="10px" class="end">
|
<el-form-item label-width="10px" class="end">
|
||||||
<el-button @click="fnExport">导出</el-button>
|
<el-button type="primary" @click="fnImportDialogChangeShow">导入</el-button>
|
||||||
|
<el-button type="primary" @click="fnExport">导出</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -206,10 +207,10 @@
|
||||||
</template>
|
</template>
|
||||||
</layout-table>
|
</layout-table>
|
||||||
</layout-card>
|
</layout-card>
|
||||||
<export-excel
|
<layout-import-file
|
||||||
v-model:visible="data.exportExcelDialog.visible"
|
v-model:visible="data.importDialogVisible"
|
||||||
:search-form="searchForm"
|
template-url="/template/truckExcelTemplate.xls"
|
||||||
:ids="data.exportExcelDialog.ids"
|
@submit="fnSubmitImport"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -224,7 +225,6 @@ import {
|
||||||
setInspectAnnuallyDelete,
|
setInspectAnnuallyDelete,
|
||||||
setInspectAnnuallyEdit2,
|
setInspectAnnuallyEdit2,
|
||||||
} from "@/request/mechanical_files.js";
|
} from "@/request/mechanical_files.js";
|
||||||
import ExportExcel from "./components/export_excel.vue";
|
|
||||||
import { reactive } from "vue";
|
import { reactive } from "vue";
|
||||||
import { debounce } from "throttle-debounce";
|
import { debounce } from "throttle-debounce";
|
||||||
import { ElMessageBox, ElMessage } from "element-plus";
|
import { ElMessageBox, ElMessage } from "element-plus";
|
||||||
|
@ -233,12 +233,15 @@ import {
|
||||||
DUE_STATUS_LIST,
|
DUE_STATUS_LIST,
|
||||||
REMINDER_STATUS_LIST,
|
REMINDER_STATUS_LIST,
|
||||||
} from "@/assets/js/constant.js";
|
} from "@/assets/js/constant.js";
|
||||||
|
import { setFreightTrailerImport } from "@/request/enterprise_management.js";
|
||||||
|
import LayoutImportFile from "@/components/import_file/index.vue";
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
exportExcelDialog: {
|
exportExcelDialog: {
|
||||||
visible: false,
|
visible: false,
|
||||||
ids: [],
|
ids: [],
|
||||||
},
|
},
|
||||||
|
importDialogVisible: false,
|
||||||
});
|
});
|
||||||
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
|
||||||
useListData(getInspectAnnuallyList);
|
useListData(getInspectAnnuallyList);
|
||||||
|
@ -301,6 +304,22 @@ const fnStatusChange = debounce(
|
||||||
);
|
);
|
||||||
const buttonJurisdiction = await useButtonJurisdiction("hidden");
|
const buttonJurisdiction = await useButtonJurisdiction("hidden");
|
||||||
|
|
||||||
|
const fnImportDialogChangeShow = () => {
|
||||||
|
data.importDialogVisible = !data.importDialogVisible;
|
||||||
|
};
|
||||||
|
|
||||||
|
const fnSubmitImport = async (formData) => {
|
||||||
|
const resData = await setFreightTrailerImport(formData);
|
||||||
|
if (resData.resultStr) {
|
||||||
|
ElMessage({
|
||||||
|
dangerouslyUseHTMLString: true,
|
||||||
|
message: resData.resultStr,
|
||||||
|
type: resData.resultType,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
fnImportDialogChangeShow();
|
||||||
|
fnResetPaginationTransfer();
|
||||||
|
};
|
||||||
|
|
||||||
const fnExport = async () => {
|
const fnExport = async () => {
|
||||||
const selectionData = tableRef.value.getSelectionRows();
|
const selectionData = tableRef.value.getSelectionRows();
|
||||||
|
@ -315,7 +334,7 @@ const fnExport = async () => {
|
||||||
.join(",");
|
.join(",");
|
||||||
window.location.href =
|
window.location.href =
|
||||||
import.meta.env[import.meta.env.DEV ? "VITE_PROXY" : "VITE_BASE_URL"] +
|
import.meta.env[import.meta.env.DEV ? "VITE_PROXY" : "VITE_BASE_URL"] +
|
||||||
"/operatingvehicles/excel?" +
|
"/inspectAnnually/excel?" +
|
||||||
"&KEYWORDS=" +
|
"&KEYWORDS=" +
|
||||||
(searchForm.value.KEYWORDS || "") +
|
(searchForm.value.KEYWORDS || "") +
|
||||||
"&DATA_IDS=" +
|
"&DATA_IDS=" +
|
||||||
|
|
|
@ -393,7 +393,6 @@ const fnSubmit = debounce(
|
||||||
1000,
|
1000,
|
||||||
async () => {
|
async () => {
|
||||||
await useFormValidate(formRef);
|
await useFormValidate(formRef);
|
||||||
console.log("form.value",form.value);
|
|
||||||
await setScrapManageAdd({ ...form.value });
|
await setScrapManageAdd({ ...form.value });
|
||||||
ElMessage.success("提交成功");
|
ElMessage.success("提交成功");
|
||||||
router.back();
|
router.back();
|
||||||
|
|
Loading…
Reference in New Issue