gaoluyang
2 天以前 9d496497c8f4b9fea9609efd20b96b44016c305d
src/views/productionManagement/productionDispatching/index.vue
@@ -13,7 +13,7 @@
            />
            <span class="search_title ml10">项目名称:</span>
            <el-input
               v-model="searchForm.customerName"
               v-model="searchForm.projectName"
               style="width: 240px"
               placeholder="请输入"
               @change="handleQuery"
@@ -27,6 +27,7 @@
         </div>
         <div>
            <el-button type="primary" @click="openForm('add')">生产派工</el-button>
            <el-button @click="handleOut">导出</el-button>
         </div>
      </div>
      <div class="table_list">
@@ -51,25 +52,19 @@
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: {
      staffName: "",
      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"),
      customerName: "",
      projectName: "",
      entryDate: null, // 录入日期
      entryDateStart: undefined,
      entryDateEnd: undefined,
   },
});
const { searchForm } = toRefs(data);
const tableColumn = ref([
   {
      label: "录入日期",
      prop: "entryDate",
      width: 120,
   },
   {
      label: "合同号",
      prop: "salesContractNo",
@@ -104,6 +99,11 @@
      label: "单位",
      prop: "unit",
      width:90
   },
   {
      label: "录入日期",
      prop: "entryDate",
      width: 120,
   },
   {
      label: "数量",
@@ -189,13 +189,22 @@
   })
};
// 导出
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>