From ea324e1975ffec307758e00b5736b4399c36e6f6 Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期五, 24 四月 2026 10:02:25 +0800
Subject: [PATCH] 绑定工艺路线调整
---
src/views/productionManagement/productionOrder/index.vue | 107 ++++++++++++++++++++++++++++-------------------------
1 files changed, 57 insertions(+), 50 deletions(-)
diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index 55fcc05..15e7cba 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -11,7 +11,7 @@
style="width: 160px;"
@change="handleQuery" />
</el-form-item>
- <el-form-item label="鍚堝悓鍙�:">
+ <el-form-item label="璁㈠崟缂栧彿:">
<el-input v-model="searchForm.salesContractNo"
placeholder="璇疯緭鍏�"
clearable
@@ -41,7 +41,7 @@
</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>
@@ -65,32 +65,14 @@
</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" />
@@ -98,25 +80,39 @@
</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([
{
@@ -187,21 +183,22 @@
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");
},
},
{
@@ -273,25 +270,27 @@
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("鑾峰彇宸ヨ壓璺嚎鍒楄〃澶辫触");
@@ -443,8 +442,6 @@
});
};
- const handleConfirmRoute = () => {};
-
onMounted(() => {
getList();
});
@@ -464,10 +461,20 @@
}
::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>
--
Gitblit v1.9.3