Merge remote-tracking branch 'origin/dev_浪潮' into dev_浪潮
| | |
| | | prop: "schedulingUserName", |
| | | minWidth: 100, |
| | | }, |
| | | { |
| | | label: "车间", |
| | | prop: "workshopName", |
| | | minWidth: 100, |
| | | }, |
| | | // { |
| | | // label: "合同号", |
| | | // prop: "salesContractNo", |
| | |
| | | <el-form-item label="状态:"> |
| | | <el-select v-model="searchForm.status" |
| | | placeholder="请选择" |
| | | style="width: 160px;" |
| | | style="width: 100px;" |
| | | @change="handleQuery"> |
| | | <el-option label="待开始" |
| | | value="1" /> |
| | |
| | | value="4" /> |
| | | <el-option label="已结束" |
| | | value="5" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="车间:"> |
| | | <el-select v-model="searchForm.workshopId" |
| | | placeholder="请选择车间" |
| | | clearable |
| | | filterable |
| | | @change="handleQuery" |
| | | style="width: 160px"> |
| | | <el-option v-for="item in workshopOptions" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | |
| | | import { ElMessageBox } from "element-plus"; |
| | | import dayjs from "dayjs"; |
| | | import { useRouter } from "vue-router"; |
| | | import { workshopPage } from "@/api/basicData/workshop.js"; |
| | | import { |
| | | productOrderListPage, |
| | | listProcessRoute, |
| | |
| | | const sourcePage = reactive({ |
| | | total: 0, |
| | | }); |
| | | const workshopOptions = ref([]); |
| | | |
| | | const processColumnWidth = computed(() => { |
| | | if (!tableData.value || tableData.value.length === 0) return "200px"; |
| | |
| | | prop: "planCompleteTime", |
| | | formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""), |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "车间", |
| | | prop: "workshopName", |
| | | }, |
| | | { |
| | | dataType: "action", |
| | |
| | | productName: "", |
| | | model: "", |
| | | status: "", |
| | | workshopName: "" |
| | | }, |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | |
| | | return "red"; |
| | | } |
| | | }; |
| | | function parseWorkshopPagePayload(res) { |
| | | const payload = res?.data; |
| | | if (!payload) { |
| | | return { records: [], total: 0 }; |
| | | } |
| | | if (Array.isArray(payload)) { |
| | | return { records: payload, total: payload.length }; |
| | | } |
| | | const records = payload.records ?? payload.list ?? payload.rows ?? []; |
| | | const total = Number(payload.total ?? payload.totalCount ?? 0); |
| | | return { records: Array.isArray(records) ? records : [], total }; |
| | | } |
| | | const fetchWorkshopOptions = () => { |
| | | workshopPage({ |
| | | name: "", |
| | | principal: "", |
| | | contactPhone: "", |
| | | current: 1, |
| | | size: 999, |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | const { records } = parseWorkshopPagePayload(res); |
| | | workshopOptions.value = records; |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | |
| | | // 绑定工艺路线弹框 |
| | | const bindRouteDialogVisible = ref(false); |
| | |
| | | productName: "", |
| | | model: "", |
| | | status: "", |
| | | workshopName: "", |
| | | }; |
| | | handleQuery(); |
| | | }; |
| | |
| | | }) |
| | | .then(() => { |
| | | proxy.download( |
| | | "/productOrder/export", |
| | | "/productionOrder/export", |
| | | { ...searchForm.value }, |
| | | "生产订单.xlsx" |
| | | "生产订单数据.xlsx" |
| | | ); |
| | | }) |
| | | .catch(() => { |
| | |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | fetchWorkshopOptions(); |
| | | }); |
| | | </script> |
| | | |
| | |
| | | prop: "unit", |
| | | width: 120, |
| | | }, |
| | | |
| | | { |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "车间", |
| | | prop: "workshopName", |
| | | width: 120, |
| | | }, |
| | | { |
| | | dataType: "action", |
| | | label: "操作", |
| | | align: "center", |
| | |
| | | :status="rowData.productionOrderDto?.completionStatus >= 100 ? 'success' : ''" |
| | | style="width: 80%;" /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="车间">{{rowData.productionOrderDto?.workshopName}}</el-descriptions-item> |
| | | |
| | | </el-descriptions> |
| | | </div> |
| | | <el-empty v-else |
| | |
| | | width: "180", |
| | | }, |
| | | { |
| | | label: "车间", |
| | | prop: "workshopName", |
| | | width: "180", |
| | | }, |
| | | { |
| | | label: "操作", |
| | | width: "200", |
| | | align: "center", |
| | |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "车间", |
| | | prop: "workshopName", |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "操作", |
| | | width: "260", |
| | | align: "center", |
| | |
| | | destroy-on-close |
| | | title="合并下发" |
| | | width="600px"> |
| | | <el-form :model="mergeForm" |
| | | <el-form :model="mergeForm" :rules="mergeFormRules" |
| | | label-width="120px"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="10"> |
| | |
| | | @change="onBlur" |
| | | style="width: 100%" /> |
| | | </el-form-item> |
| | | <el-form-item label="车间"> |
| | | <el-form-item label="车间" prop="workshopId" required> |
| | | <el-select v-model="mergeForm.workshopId" |
| | | placeholder="请选择车间" |
| | | clearable |
| | |
| | | total: 0, |
| | | }); |
| | | const selectedRows = ref([]); |
| | | |
| | | const mergeFormRules = { |
| | | workshopId: [ |
| | | { required: true, message: '请选择车间', trigger: 'change' } |
| | | ] |
| | | } |
| | | |
| | | // 产品类别汇总统计数据 |
| | | const categorySummary = ref([]); |
| | |
| | | ElMessage.warning("请输入生产数量"); |
| | | return; |
| | | } |
| | | if(!mergeForm.workshopId){ |
| | | ElMessage.warning("请选择车间"); |
| | | return; |
| | | } |
| | | console.log(sumAssignedQuantity.value, "sumAssignedQuantity"); |
| | | |
| | | // 验证totalAssignedQuantity不能大于总方数 |