huminmin
4 天以前 7d57f73dbd1fb5ffa5f4303e06d42a9a68b5323b
src/views/productionManagement/productionOrder/index.vue
@@ -10,6 +10,7 @@
               @change="handleQuery"
               clearable
               prefix-icon="Search"
          class="mb10"
            />
            <span class="search_title ml10">合同号:</span>
            <el-input
@@ -19,20 +20,40 @@
               @change="handleQuery"
               clearable
               prefix-icon="Search"
          class="mb10"
            />
<!--            <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>
            <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"
            <span class="search_title ml10">项目名称:</span>
            <el-input
               v-model="searchForm.projectName"
               style="width: 240px"
               placeholder="请输入"
               @change="handleQuery"
               clearable
               prefix-icon="Search"
          class="mb10"
            />
        <span class="search_title ml10">产品名称:</span>
        <el-input
            v-model="searchForm.productCategory"
            style="width: 240px"
            placeholder="请输入"
            @change="handleQuery"
            clearable
            prefix-icon="Search"
            class="mb10"
        />
        <span class="search_title ml10">规格:</span>
        <el-input
            v-model="searchForm.specificationModel"
            style="width: 240px"
            placeholder="请输入"
            @change="handleQuery"
            clearable
            prefix-icon="Search"
            class="mb10"
        />
            <el-button type="primary" @click="handleQuery" style="margin-left: 10px" class="mb10"
            >搜索</el-button
            >
         </div>
@@ -50,6 +71,13 @@
            @pagination="pagination"
         ></PIMTable>
      </div>
    <process-route-item-form
      v-if="isShowItemModal"
      v-model:visible="isShowItemModal"
      :record="record"
      @completed="getList"
    />
   </div>
</template>
@@ -57,13 +85,14 @@
import {onMounted, ref} from "vue";
import { ElMessageBox } from "element-plus";
import dayjs from "dayjs";
import {schedulingListPage} from "@/api/productionManagement/productionOrder.js";
import {productOrderListPage} from "@/api/productionManagement/productionOrder.js";
const { proxy } = getCurrentInstance();
import ProcessRouteItemForm from "@/views/productionManagement/productionOrder/ProcessRouteItemForm.vue";
const tableColumn = ref([
   {
      label: "录入日期",
      prop: "entryDate",
      label: "生产订单号",
      prop: "npsNo",
      width: 120,
   },
   {
@@ -71,64 +100,42 @@
      prop: "salesContractNo",
      width: 220,
   },
   // {
   //    label: "客户合同号",
   //    prop: "customerContractNo",
   //    width: 250,
   // },
  {
    label: "项目名称",
    prop: "projectName",
    width:300
  },
   {
      label: "客户名称",
      prop: "customerName",
      width: 250,
   },
   // {
   //    label: "项目名称",
   //    prop: "projectName",
   //    width:300
   // },
   {
      label: "付款状态",
      prop: "status",
      dataType: "tag",
      formatType: (params) => {
         if (params == '未完成') {
            return "danger";
         } else if (params == '已完成') {
            return "success";
         } else {
            return null;
         }
      },
   },
   {
      label: "产品大类",
      prop: "productCategory",
      width: 160,
   },
   {
      label: "规格型号",
      prop: "specificationModel",
      width: 220,
   },
   {
      label: "单位",
      prop: "unit",
      width:90
   },
   {
      label: "数量",
      prop: "quantity",
   },
   {
      label: "排产数量",
      prop: "schedulingNum",
      width: 100,
   },
   {
      label: "完工数量",
      prop: "successNum",
      width: 100,
   },
  {
    label: "产品名称",
    prop: "productCategory",
    width: 250,
  },
  {
    label: "规格",
    prop: "specificationModel",
    width: 250,
  },
  {
    dataType: "action",
    label: "操作",
    align: "center",
    fixed: "right",
    width: 200,
    operation: [
      {
        name: "工艺路线",
        type: "text",
        clickFun: (row) => {
          showRouteItemModal(row);
        }
      }
    ]
  }
]);
const tableData = ref([]);
const tableLoading = ref(false);
@@ -177,13 +184,20 @@
   // 构造一个新的对象,不包含entryDate字段
   const params = { ...searchForm.value, ...page };
   params.entryDate = undefined
   schedulingListPage(params).then((res) => {
   productOrderListPage(params).then((res) => {
      tableLoading.value = false;
      tableData.value = res.data.records;
      page.total = res.data.total;
   }).catch(() => {
      tableLoading.value = false;
   })
};
const isShowItemModal = ref(false);
const record = ref({});
const showRouteItemModal = (row) => {
  isShowItemModal.value = true
  record.value = row
};
// 导出
@@ -201,6 +215,9 @@
      });
};
const handleConfirmRoute = () => {
}
onMounted(() => {
   getList();
});