gongchunyi
11 小时以前 df7b96871d485eb1e0146eabe0e61277be8c7853
src/views/productionManagement/productionOrder/index.vue
@@ -3,22 +3,6 @@
    <div class="search_form">
      <el-form :model="searchForm"
               :inline="true">
        <el-form-item label="客户名称:">
          <el-input v-model="searchForm.customerName"
                    placeholder="请输入"
                    clearable
                    prefix-icon="Search"
                    style="width: 160px;"
                    @change="handleQuery" />
        </el-form-item>
        <el-form-item label="合同号:">
          <el-input v-model="searchForm.salesContractNo"
                    placeholder="请输入"
                    clearable
                    prefix-icon="Search"
                    style="width: 160px;"
                    @change="handleQuery" />
        </el-form-item>
        <el-form-item label="产品名称:">
          <el-input v-model="searchForm.productCategory"
                    placeholder="请输入"
@@ -52,7 +36,6 @@
                :tableData="tableData"
                :page="page"
                :tableLoading="tableLoading"
                :row-class-name="tableRowClassName"
                :isSelection="true"
                @selection-change="handleSelectionChange"
                @pagination="pagination">
@@ -119,21 +102,21 @@
  const isShowNewModal = ref(false);
  const tableColumn = ref([
    {
      label: "生产订单号",
      prop: "npsNo",
      width: '120px',
    },
    {
      label: "销售合同号",
      prop: "salesContractNo",
      width: '150px',
    },
    {
      label: "客户名称",
      prop: "customerName",
      width: '200px',
    },
    // {
    //   label: "生产订单号",
    //   prop: "npsNo",
    //   width: '120px',
    // },
    // {
    //   label: "销售合同号",
    //   prop: "salesContractNo",
    //   width: '150px',
    // },
    // {
    //   label: "客户名称",
    //   prop: "customerName",
    //   width: '200px',
    // },
    {
      label: "产品名称",
      prop: "productCategory",
@@ -165,23 +148,23 @@
      width: 180,
    },
    {
      label: "开始日期",
      prop: "startTime",
      label: "生产日期",
      prop: "productionDate",
      formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""),
      width: 120,
    },
    {
      label: "结束日期",
      prop: "endTime",
      formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""),
      width: 120,
    },
    {
      label: "交付日期",
      prop: "deliveryDate",
      formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""),
      width: 120,
    },
    // {
    //   label: "结束日期",
    //   prop: "endTime",
    //   formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""),
    //   width: 120,
    // },
    // {
    //   label: "交付日期",
    //   prop: "deliveryDate",
    //   formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""),
    //   width: 120,
    // },
    {
      dataType: "action",
      label: "操作",
@@ -225,7 +208,6 @@
  const data = reactive({
    searchForm: {
      customerName: "",
      salesContractNo: "",
      projectName: "",
      productCategory: "",
@@ -249,23 +231,6 @@
    if (p < 50) return "#e6a23c";
    if (p < 80) return "#409eff";
    return "#67c23a";
  };
  // 添加表行类名方法
  const tableRowClassName = ({ row }) => {
    if (!row.deliveryDate) return '';
    if (row.isFh) return '';
    const diff = row.deliveryDaysDiff;
    if (diff === 15) {
      return 'yellow';
    } else if (diff === 10) {
      return 'pink';
    } else if (diff === 2) {
      return 'purple';
    } else if (diff < 2) {
      return 'red';
    }
  };
  // 绑定工艺路线弹框
@@ -453,21 +418,5 @@
<style scoped lang="scss">
.search_form{
  align-items: start;
}
::v-deep .yellow {
  background-color: #FAF0DE;
}
::v-deep .pink {
  background-color: #FAE1DE;
}
::v-deep .red {
  background-color: #f80202;
}
::v-deep .purple{
  background-color: #F4DEFA;
}
</style>