| | |
| | | style="width: 160px;" |
| | | @change="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="合同号:"> |
| | | <el-form-item label="订单编号:"> |
| | | <el-input v-model="searchForm.salesContractNo" |
| | | placeholder="请输入" |
| | | clearable |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-button type="primary" @click="isShowNewModal = true">新增</el-button> |
| | | <!-- <el-button type="primary" @click="isShowNewModal = true">新增</el-button>--> |
| | | <el-button type="danger" @click="handleDelete">删除</el-button> |
| | | <el-button @click="handleOut">导出</el-button> |
| | | </div> |
| | |
| | | </template> |
| | | </PIMTable> |
| | | </div> |
| | | <el-dialog v-model="bindRouteDialogVisible" |
| | | title="绑定工艺路线" |
| | | width="500px"> |
| | | <el-form label-width="90px"> |
| | | <el-form-item label="工艺路线"> |
| | | <el-select v-model="bindForm.routeId" |
| | | placeholder="请选择工艺路线" |
| | | style="width: 100%;" |
| | | :loading="bindRouteLoading"> |
| | | <el-option v-for="item in routeOptions" |
| | | :key="item.id" |
| | | :label="`${item.processRouteCode || ''}`" |
| | | :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button type="primary" |
| | | :loading="bindRouteSaving" |
| | | @click="handleBindRouteConfirm">确 认</el-button> |
| | | <el-button @click="bindRouteDialogVisible = false">取 消</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <BindRouteDialog |
| | | ref="BindRouteDialogRef" |
| | | v-model="bindRouteDialogVisible" |
| | | :type="bindDialogType" |
| | | :rowData="rowData" |
| | | @confirm="handleBindRouteSubmit" |
| | | /> |
| | | <new-product-order v-if="isShowNewModal" |
| | | v-model:visible="isShowNewModal" |
| | | @completed="handleQuery" /> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { onMounted, ref } from "vue"; |
| | | import { defineAsyncComponent, getCurrentInstance, onMounted, reactive, ref, toRefs } from "vue"; |
| | | import { ElMessageBox } from "element-plus"; |
| | | import dayjs from "dayjs"; |
| | | import { useRouter } from "vue-router"; |
| | | import { |
| | | productOrderListPage, |
| | | listProcessRoute, |
| | | bindingRoute, |
| | | listProcessBom, delProductOrder, |
| | | delProductOrder, |
| | | saveProductionProductInput, |
| | | viewGetByProductWordId |
| | | } from "@/api/productionManagement/productionOrder.js"; |
| | | import { listMain as getOrderProcessRouteMain } from "@/api/productionManagement/productProcessRoute.js"; |
| | | import {fileDel} from "@/api/financialManagement/revenueManagement.js"; |
| | | import PIMTable from "@/components/PIMTable/PIMTable.vue"; |
| | | import BindRouteDialog from "./BindRouteDialog.vue"; |
| | | import {getDeviceLedger} from "@/api/equipmentManagement/ledger.js"; |
| | | const NewProductOrder = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/New.vue")); |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | const router = useRouter(); |
| | | const isShowNewModal = ref(false); |
| | | const MOCK_MODE = true; |
| | | |
| | | const loading = ref(false) |
| | | const dialogVisible = ref(false) |
| | | const bindDialogType = ref('add') |
| | | const BindRouteDialogRef = ref(null) |
| | | |
| | | const handleBindRouteSubmit =async (data)=>{ |
| | | const res = await saveProductionProductInput(data) |
| | | console.log(res) |
| | | |
| | | } |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | |
| | | label: "操作", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 200, |
| | | width: 300, |
| | | operation: [ |
| | | { |
| | | name: "工艺路线", |
| | | type: "text", |
| | | clickFun: row => { |
| | | showRouteItemModal(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "绑定工艺路线", |
| | | type: "text", |
| | | showHide: row => !row.processRouteCode, |
| | | clickFun: row => { |
| | | openBindRouteDialog(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "查看工艺路线", |
| | | type: "text", |
| | | showHide: row => row.processRouteCode, |
| | | clickFun: row => { |
| | | openBindRouteDialog(row,"view"); |
| | | }, |
| | | }, |
| | | { |
| | |
| | | const bindRouteLoading = ref(false); |
| | | const bindRouteSaving = ref(false); |
| | | const routeOptions = ref([]); |
| | | const rowData = ref(null) |
| | | const bindForm = reactive({ |
| | | orderId: null, |
| | | routeId: null, |
| | | }); |
| | | |
| | | const openBindRouteDialog = async row => { |
| | | const openBindRouteDialog = async (row,type) => { |
| | | bindForm.orderId = row.id; |
| | | bindForm.routeId = null; |
| | | bindRouteDialogVisible.value = true; |
| | | routeOptions.value = []; |
| | | if (!row.productModelId) { |
| | | proxy.$modal.msgWarning("当前订单缺少产品型号,无法查询工艺路线"); |
| | | bindRouteDialogVisible.value = false; |
| | | return; |
| | | } |
| | | bindRouteLoading.value = true; |
| | | if(type === "view") { |
| | | bindDialogType.value = "view" |
| | | let res = await viewGetByProductWordId(row.id) |
| | | console.log(res) |
| | | } |
| | | BindRouteDialogRef.value?.getProductOrder() |
| | | |
| | | try { |
| | | const res = await listProcessRoute({ productModelId: row.productModelId }); |
| | | routeOptions.value = res.data || []; |
| | | rowData.value = row; |
| | | } catch (e) { |
| | | console.error("获取工艺路线列表失败:", e); |
| | | proxy.$modal.msgError("获取工艺路线列表失败"); |
| | |
| | | }); |
| | | }; |
| | | |
| | | const handleConfirmRoute = () => {}; |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | }); |
| | |
| | | } |
| | | |
| | | ::v-deep .red { |
| | | background-color: #f80202; |
| | | background-color: #ffe5e5; |
| | | } |
| | | |
| | | ::v-deep .purple{ |
| | | background-color: #F4DEFA; |
| | | } |
| | | |
| | | :deep(.fixed-desc .el-descriptions__table) { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | } |
| | | |
| | | :deep(.fixed-desc .el-descriptions__cell) { |
| | | width: 25%; |
| | | word-break: break-word; |
| | | } |
| | | </style> |