zouyu
2026-01-16 30dc46174a37613366081bd1abab8eb71c171f7f
src/views/productionManagement/productionDispatching/index.vue
@@ -2,32 +2,13 @@
   <div class="app-container">
      <div class="search_form">
         <div>
            <span class="search_title">客户名称:</span>
            <el-input
               v-model="searchForm.customerName"
               style="width: 240px"
               placeholder="请输入"
               @change="handleQuery"
               clearable
               prefix-icon="Search"
            />
            <span class="search_title ml10">项目名称:</span>
            <el-input
               v-model="searchForm.projectName"
               style="width: 240px"
               placeholder="请输入"
               @change="handleQuery"
               clearable
               prefix-icon="Search"
            />
            <span class="search_title ml10">录入日期:</span>
        <span class="search_title">录入日期:</span>
            <el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange"
                                    placeholder="请选择" clearable @change="changeDaterange" />
            <el-button type="primary" @click="handleQuery" style="margin-left: 10px">搜索</el-button>
         </div>
         <div>
            <el-button type="primary" @click="openForm('add')">生产派工</el-button>
            <el-button @click="handleOut">导出</el-button>
         </div>
      </div>
      <div class="table_list">
@@ -52,38 +33,23 @@
import FormDia from "@/views/productionManagement/productionDispatching/components/formDia.vue";
import dayjs from "dayjs";
import {schedulingListPage} from "@/api/productionManagement/productionOrder.js";
import { ElMessageBox } from "element-plus";
const data = reactive({
   searchForm: {
      customerName: "",
      projectName: "",
      entryDate: null, // 录入日期
      entryDateStart: undefined,
      entryDateEnd: undefined,
    entryDate: [
      dayjs().format("YYYY-MM-DD"),
      dayjs().add(1, "day").format("YYYY-MM-DD"),
    ], // 录入日期
    entryDateStart: dayjs().format("YYYY-MM-DD"),
    entryDateEnd: dayjs().add(1, "day").format("YYYY-MM-DD"),
   },
});
const { searchForm } = toRefs(data);
const tableColumn = ref([
   {
      label: "合同号",
      prop: "salesContractNo",
      width: 220,
   },
   {
      label: "客户合同号",
      prop: "customerContractNo",
      width: 250,
   },
   {
      label: "客户名称",
      prop: "customerName",
      width: 250,
   },
   {
      label: "项目名称",
      prop: "projectName",
      width:300
    label: "录入日期",
    prop: "registerDate",
    width: 120,
   },
   {
      label: "产品大类",
@@ -99,11 +65,6 @@
      label: "单位",
      prop: "unit",
      width:90
   },
   {
      label: "录入日期",
      prop: "entryDate",
      width: 120,
   },
   {
      label: "数量",
@@ -189,22 +150,13 @@
   })
};
// 导出
const handleOut = () => {
   ElMessageBox.confirm("选中的内容将被导出,是否确认导出?", "导出", {
      confirmButtonText: "确认",
      cancelButtonText: "取消",
      type: "warning",
   })
      .then(() => {
         proxy.download("/salesLedger/scheduling/exportOne", {}, "生产派工.xlsx");
      })
      .catch(() => {
         proxy.$modal.msg("已取消");
      });
};
onMounted(() => {
  searchForm.value.entryDate = [
    dayjs().format("YYYY-MM-DD"),
    dayjs().add(1, "day").format("YYYY-MM-DD"),
  ]
  searchForm.value.entryDateStart = dayjs().format("YYYY-MM-DD")
  searchForm.value.entryDateEnd = dayjs().add(1, "day").format("YYYY-MM-DD")
   getList();
});
</script>