huminmin
3 天以前 dada35abe48b4c59210fda4a8e7f1373d302dd2a
生产报工列表
已添加1个文件
已修改1个文件
211 ■■■■■ 文件已修改
src/api/productionManagement/production_product_main.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionReporting/index.vue 200 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/productionManagement/production_product_main.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,11 @@
// ç”Ÿäº§æŠ¥å·¥é¡µé¢æŽ¥å£
import request from "@/utils/request";
// åˆ†é¡µæŸ¥è¯¢
export function productionProductMainListPage(query) {
    return request({
        url: "/productionProductMain/listPage",
        method: "get",
        params: query,
    });
}
src/views/productionManagement/productionReporting/index.vue
@@ -2,30 +2,22 @@
    <div class="app-container">
        <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"
                <el-form-item label="报工人员名称:">
                    <el-input v-model="searchForm.nickName" placeholder="请输入" clearable prefix-icon="Search"
                                        style="width: 200px;"
                                        @change="handleQuery" />
                </el-form-item>
                <el-form-item label="合同号:">
                    <el-input v-model="searchForm.salesContractNo" placeholder="请输入" clearable prefix-icon="Search"
                <el-form-item label="工单号:">
                    <el-input v-model="searchForm.workOrderNo" placeholder="请输入" clearable prefix-icon="Search"
                                        style="width: 200px;"
                                        @change="handleQuery" />
                </el-form-item>
<!--                <el-form-item label="项目名称:">-->
<!--                    <el-input v-model="searchForm.projectName" placeholder="请输入" clearable prefix-icon="Search"-->
<!--                                        style="width: 200px;"-->
<!--                                        @change="handleQuery" />-->
<!--                </el-form-item>-->
                <el-form-item label="排产日期:">
                    <el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange"
                                                    placeholder="请选择" clearable @change="changeDaterange" />
                </el-form-item>
                <el-form-item label="状态:">
                    <el-select v-model="searchForm.status" placeholder="请选择状态" style="width: 140px" clearable>
                        <el-option label="待生产" :value="1"></el-option>
                        <el-option label="已报工" :value="3"></el-option>
                        <el-option label="生产中" :value="2"></el-option>
                <el-form-item label="工单状态:">
                    <el-select v-model="searchForm.workOrderStatus" placeholder="请选择工单状态" style="width: 140px" clearable>
                        <el-option label="待确认" :value="1"></el-option>
            <el-option label="待生产" :value="2"></el-option>
            <el-option label="生产中" :value="3"></el-option>
            <el-option label="已生产" :value="4"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item>
@@ -146,20 +138,18 @@
import dayjs from "dayjs";
import {
    productionReportUpdate,
    workListPage,
    workListPageById
} from "@/api/productionManagement/productionReporting.js";
import {
  productionProductMainListPage,
} from "@/api/productionManagement/production_product_main.js";
import {userListNoPageByTenantId} from "@/api/system/user.js";
const data = reactive({
    searchForm: {
        customerName: "",
        salesContractNo: "",
        projectName: "",
        status: "",
        entryDate: [dayjs().format("YYYY-MM-DD"), dayjs().format("YYYY-MM-DD")], // å½•入日期,默认当天
        entryDateStart: dayjs().format("YYYY-MM-DD"),
        entryDateEnd: dayjs().format("YYYY-MM-DD"),
    nickName: "",
    workOrderNo: "",
    workOrderStatus: "",
    },
});
const { searchForm } = toRefs(data);
@@ -167,13 +157,23 @@
const expandData = ref([]);
const userList = ref([])
const tableColumn = ref([
  {
    label: "报工单号",
    prop: "productNo",
    width: 120,
  },
  {
    label: "报工人员",
    prop: "nickName",
    width: 120,
  },
  {
    label: "工单编号",
    prop: "workOrderNo",
    width: 120,
  },
    {
        type: "expand",
        dataType: "slot",
        slot: "expand",
    },
    {
        label: "状态",
        label: "报工状态",
        prop: "status",
        dataType: "tag",
        formatData: (params) => {
@@ -195,92 +195,54 @@
            }
        },
    },
    {
        label: "排产日期",
        prop: "schedulingDate",
        width: 120,
    },
    {
        label: "排产人",
        prop: "schedulingUserName",
    },
    {
        label: "产线",
        prop: "productionLine",
    },
    {
        label: "合同号",
        prop: "salesContractNo",
        width: 200,
    },
    // {
    //     label: "客户合同号",
    //     prop: "customerContractNo",
    //     width: 200,
    // },
    {
        label: "客户名称",
        prop: "customerName",
        width: 200,
    },
    // {
    //     label: "项目名称",
    //     prop: "projectName",
    //     width:300
    // },
    {
        label: "产品大类",
        prop: "productCategory",
        width: 150,
    },
    {
        label: "规格型号",
        prop: "specificationModel",
        width: 150,
    },
    {
        label: "绑定机器",
        prop: "speculativeTradingName",
        width: 220,
    },
    {
        label: "单位",
        prop: "unit",
    },
    {
        label: "工序",
        prop: "process",
    },
    // {
    //     label: "口味分类",
    //     prop: "type",
    //     width: 150,
    // },
    {
        label: "损耗",
        prop: "loss",
        width: 150,
    },
    {
        label: "排产数量",
        prop: "schedulingNum",
        width: 100,
    },
    {
        label: "生产数量",
        prop: "finishedNum",
        width: 100,
    },
    {
        label: "待生产数量",
        prop: "pendingFinishNum",
        width: 100,
    },
    {
        label: "备注",
        prop: "remark",
        width: 200,
    },
  {
    label: "工单状态",
    prop: "workOrderStatus",
    dataType: "tag",
    formatData: (params) => {
      switch (params) {
        case "1":
          return "待确认";
        case "2":
          return "待生产";
        case "3":
          return "生产中";
        case "4":
          return "已生产";
        default:
          return "";
      }
    },
    formatType: (params) => {
      switch (params) {
        case "1":
          return "primary";
        case "2":
          return "info";
        case "3":
          return "warning";
        case "4":
          return "success";
        default:
          return "";
      }
    },
  },
  {
    dataType: "action",
    label: "操作",
    align: "center",
    fixed: "right",
    width: 200,
    operation: [
      {
        name: "查看",
        type: "text",
        clickFun: (row) => {
        }
      },
    ]
  }
]);
const tableData = ref([]);
const selectedRows = ref([]);
@@ -320,7 +282,7 @@
    const params = { ...searchForm.value, ...page };
    params.entryDate = undefined
    expandedRowKeys.value = []
    workListPage(params).then(res => {
    productionProductMainListPage(params).then(res => {
        tableLoading.value = false;
        tableData.value = res.data.records.map(item => ({
            ...item,