|
@@ -0,0 +1,362 @@
|
|
|
+<template>
|
|
|
+ <div class="tenant">
|
|
|
+ <div class="content">
|
|
|
+ <byTable
|
|
|
+ :source="sourceList.data"
|
|
|
+ :pagination="sourceList.pagination"
|
|
|
+ :config="config"
|
|
|
+ :loading="loading"
|
|
|
+ highlight-current-row
|
|
|
+ :selectConfig="selectConfig"
|
|
|
+ :table-events="{}"
|
|
|
+ :action-list="[]"
|
|
|
+ :onMoreSearch="true"
|
|
|
+ @moreSearch="clickMoreSearch"
|
|
|
+ @get-list="getList"
|
|
|
+ >
|
|
|
+ </byTable>
|
|
|
+ </div>
|
|
|
+ <el-dialog
|
|
|
+ :title="'高级检索'"
|
|
|
+ v-model="dialogVisible"
|
|
|
+ width="700"
|
|
|
+ v-loading="loading"
|
|
|
+ destroy-on-close
|
|
|
+ >
|
|
|
+ <byForm
|
|
|
+ :formConfig="formConfig"
|
|
|
+ :formOption="formOption"
|
|
|
+ v-model="sourceList.pagination"
|
|
|
+ :rules="rules"
|
|
|
+ ref="byform"
|
|
|
+ >
|
|
|
+ </byForm>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="moreSearchReset" size="large">重置</el-button>
|
|
|
+ <el-button @click="moreSearchQuery" type="primary" size="large"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
+import byTable from "@/components/byTable/index";
|
|
|
+import byForm from "@/components/byForm/index";
|
|
|
+const { proxy } = getCurrentInstance();
|
|
|
+const loading = ref(false);
|
|
|
+const submitLoading = ref(false);
|
|
|
+const sourceList = ref({
|
|
|
+ data: [],
|
|
|
+ pagination: {
|
|
|
+ total: 3,
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ keyword: "",
|
|
|
+ contractCode: "",
|
|
|
+ workOrderCode: "",
|
|
|
+ productionPlanCode: "",
|
|
|
+ productionTaskCode: "",
|
|
|
+ productCode: "",
|
|
|
+ productName: "",
|
|
|
+ productSn: "",
|
|
|
+ dueDate: "",
|
|
|
+ productionProcessesName: "",
|
|
|
+ personLiableName: "",
|
|
|
+ getFinishStatus: "",
|
|
|
+ getFinishTime: "",
|
|
|
+ },
|
|
|
+});
|
|
|
+const finishStatusData = ref([
|
|
|
+ {
|
|
|
+ label: "未完成",
|
|
|
+ value: "0",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "完成",
|
|
|
+ value: "1",
|
|
|
+ },
|
|
|
+]);
|
|
|
+const dialogVisible = ref(false);
|
|
|
+const modalType = ref("add");
|
|
|
+const rules = ref({
|
|
|
+ workOrderId: [{ required: true, message: "请选择工单", trigger: "change" }],
|
|
|
+ startDate: [
|
|
|
+ { required: true, message: "请选择计划开始时间", trigger: "change" },
|
|
|
+ ],
|
|
|
+ stopDate: [
|
|
|
+ { required: true, message: "请选择计划结束时间", trigger: "change" },
|
|
|
+ ],
|
|
|
+ quantity: [{ required: true, message: "请输入计划数量", trigger: "blur" }],
|
|
|
+});
|
|
|
+const workOrderData = ref([]);
|
|
|
+const workOrderDataOne = ref([]);
|
|
|
+
|
|
|
+const statusData = ref([
|
|
|
+ {
|
|
|
+ label: "未开始",
|
|
|
+ value: "0",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "进行中",
|
|
|
+ value: "1",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "完成",
|
|
|
+ value: "2",
|
|
|
+ },
|
|
|
+]);
|
|
|
+
|
|
|
+const selectConfig = reactive([]);
|
|
|
+const config = computed(() => {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "合同编号",
|
|
|
+ prop: "contractCode",
|
|
|
+ width: 110,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "工单编号",
|
|
|
+ prop: "workOrderCode",
|
|
|
+ width: 110,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "计划编号",
|
|
|
+ prop: "productionPlanCode",
|
|
|
+ width: 110,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "任务编号",
|
|
|
+ prop: "productionTaskCode",
|
|
|
+ width: 110,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "产品编号",
|
|
|
+ prop: "productCode",
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "产品名称",
|
|
|
+ prop: "productName",
|
|
|
+ "min-width": 150,
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "任务完成期限",
|
|
|
+ prop: "dueDate",
|
|
|
+ width: 155,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "工序名称列表",
|
|
|
+ prop: "productionProcessesNames",
|
|
|
+ "min-width": 220,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "当前工序名称",
|
|
|
+ prop: "productionProcessesName",
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "当前工序负责人",
|
|
|
+ prop: "previousProcessesName",
|
|
|
+ width: 130,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "完成状态",
|
|
|
+ prop: "finishStatus",
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ render(finishStatus) {
|
|
|
+ return proxy.dictValueLabel(finishStatus, finishStatusData.value);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "完成时间",
|
|
|
+ prop: "finishTime",
|
|
|
+ width: 155,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ];
|
|
|
+});
|
|
|
+
|
|
|
+const formOption = reactive({
|
|
|
+ inline: true,
|
|
|
+ labelWidth: 100,
|
|
|
+ itemWidth: 100,
|
|
|
+ rules: [],
|
|
|
+});
|
|
|
+const byform = ref(null);
|
|
|
+const formConfig = computed(() => {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ itemType: "text",
|
|
|
+ prop: "contractCode",
|
|
|
+ label: "合同编号",
|
|
|
+ itemWidth: 50,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ itemType: "text",
|
|
|
+ prop: "workOrderCode",
|
|
|
+ label: "工单编号",
|
|
|
+ itemWidth: 50,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ itemType: "text",
|
|
|
+ prop: "productionPlanCode",
|
|
|
+ label: "计划编号",
|
|
|
+ itemWidth: 50,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ itemType: "text",
|
|
|
+ prop: "productionTaskCode",
|
|
|
+ label: "任务编号",
|
|
|
+ itemWidth: 50,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ itemType: "text",
|
|
|
+ prop: "productCode",
|
|
|
+ label: "产品编号",
|
|
|
+ itemWidth: 50,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ itemType: "text",
|
|
|
+ prop: "productName",
|
|
|
+ label: "产品名称",
|
|
|
+ itemWidth: 50,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ itemType: "text",
|
|
|
+ prop: "productSn",
|
|
|
+ label: "产品Sn",
|
|
|
+ itemWidth: 50,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "date",
|
|
|
+ itemType: "date",
|
|
|
+ prop: "dueDate",
|
|
|
+ label: "任务完成期限",
|
|
|
+ itemWidth: 50,
|
|
|
+ style: {
|
|
|
+ width: "100%",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ itemType: "text",
|
|
|
+ prop: "productionProcessesName",
|
|
|
+ label: "当前工序名称",
|
|
|
+ itemWidth: 50,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ itemType: "text",
|
|
|
+ prop: "personLiableName",
|
|
|
+ label: "当前工序负责人",
|
|
|
+ itemWidth: 50,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ prop: "getFinishStatus",
|
|
|
+ label: "任务完成状态",
|
|
|
+ itemWidth: 50,
|
|
|
+ style: {
|
|
|
+ width: "100%",
|
|
|
+ },
|
|
|
+ data: finishStatusData.value,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "date",
|
|
|
+ itemType: "datetime",
|
|
|
+ prop: "getFinishTime",
|
|
|
+ label: "任务完成时间",
|
|
|
+ itemWidth: 50,
|
|
|
+ style: {
|
|
|
+ width: "100%",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ];
|
|
|
+});
|
|
|
+const getList = async (req) => {
|
|
|
+ sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
+ loading.value = true;
|
|
|
+ proxy
|
|
|
+ .post("/productionTaskDetail/taskProgressPage", sourceList.value.pagination)
|
|
|
+ .then((message) => {
|
|
|
+ sourceList.value.data = message.rows;
|
|
|
+ sourceList.value.pagination.total = message.total;
|
|
|
+ setTimeout(() => {
|
|
|
+ loading.value = false;
|
|
|
+ }, 200);
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+getList();
|
|
|
+const clickMoreSearch = () => {
|
|
|
+ dialogVisible.value = true;
|
|
|
+};
|
|
|
+const moreSearchQuery = () => {
|
|
|
+ dialogVisible.value = false;
|
|
|
+ getList();
|
|
|
+};
|
|
|
+const moreSearchReset = () => {
|
|
|
+ sourceList.value.pagination = {
|
|
|
+ total: 0,
|
|
|
+ pageNum: sourceList.value.pagination.pageNum,
|
|
|
+ pageSize: sourceList.value.pagination.pageSize,
|
|
|
+ keyword: "",
|
|
|
+ contractCode: "",
|
|
|
+ workOrderCode: "",
|
|
|
+ productionPlanCode: "",
|
|
|
+ productionTaskCode: "",
|
|
|
+ productCode: "",
|
|
|
+ productName: "",
|
|
|
+ productSn: "",
|
|
|
+ dueDate: "",
|
|
|
+ productionProcessesName: "",
|
|
|
+ personLiableName: "",
|
|
|
+ getFinishStatus: "",
|
|
|
+ getFinishTime: "",
|
|
|
+ };
|
|
|
+ moreSearchQuery();
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.tenant {
|
|
|
+ padding: 20px;
|
|
|
+}
|
|
|
+::v-deep(.el-input-number .el-input__inner) {
|
|
|
+ text-align: left;
|
|
|
+}
|
|
|
+</style>
|