From f84e425bb9debb5f2af8e417bf07d2a2b0077609 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期二, 28 四月 2026 17:00:03 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_NEW_pro' into dev_NEW_pro
---
src/views/productionManagement/productionOrder/index.vue | 330 ++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 289 insertions(+), 41 deletions(-)
diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index 670290c..5f4fa61 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -11,22 +11,6 @@
style="width: 160px;"
@change="handleQuery" />
</el-form-item>
- <el-form-item label="瀹㈡埛鍚嶇О:">
- <el-input v-model="searchForm.customerName"
- placeholder="璇疯緭鍏�"
- clearable
- prefix-icon="Search"
- style="width: 160px;"
- @change="handleQuery" />
- </el-form-item>
- <el-form-item label="鍚堝悓鍙�:">
- <el-input v-model="searchForm.salesContractNo"
- placeholder="璇疯緭鍏�"
- clearable
- prefix-icon="Search"
- style="width: 160px;"
- @change="handleQuery" />
- </el-form-item>
<el-form-item label="浜у搧鍚嶇О:">
<el-input v-model="searchForm.productName"
placeholder="璇疯緭鍏�"
@@ -43,16 +27,33 @@
style="width: 160px;"
@change="handleQuery" />
</el-form-item>
+ <el-form-item label="鐘舵��:">
+ <el-select v-model="searchForm.status"
+ placeholder="璇烽�夋嫨"
+ style="width: 160px;"
+ @change="handleQuery">
+ <el-option label="寰呭紑濮�"
+ value="1" />
+ <el-option label="杩涜涓�"
+ value="2" />
+ <el-option label="宸插畬鎴�"
+ value="3" />
+ <el-option label="宸插彇娑�"
+ value="4" />
+ </el-select>
+ </el-form-item>
<el-form-item>
<el-button type="primary"
@click="handleQuery">鎼滅储</el-button>
+ <el-button type="info"
+ @click="handleReset">閲嶇疆</el-button>
</el-form-item>
</el-form>
<div class="action-buttons">
- <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>
+ @click="handleDelete">閫�鍥�</el-button>
<el-button @click="handleOut">瀵煎嚭</el-button>
</div>
</div>
@@ -98,12 +99,85 @@
</span>
</template>
</el-dialog>
+ <!-- 鏉ユ簮鏁版嵁寮圭獥 -->
+ <el-dialog v-model="sourceDataDialogVisible"
+ title="鏉ユ簮鏁版嵁"
+ width="1200px">
+ <div v-if="sourceRowData"
+ class="applyno-summary1">
+ <div class="summary-item">
+ <span class="summary-label">浜у搧鍚嶇О锛�</span>
+ <span class="summary-value">
+ <el-tag type="primary">{{ sourceRowData.productName || '-' }}</el-tag>
+ </span>
+ </div>
+ <div class="summary-item">
+ <span class="summary-label">瑙勬牸锛�</span>
+ <span class="summary-value">{{ sourceRowData.model || '-' }}</span>
+ </div>
+ <div class="summary-item">
+ <span class="summary-label">璁㈠崟闇�姹傛暟閲忥細</span>
+ <span class="summary-value">{{ sourceRowData.quantity || 0 }}</span>
+ </div>
+ </div>
+ <div class="source-table-container">
+ <div class="source-data-cards-container">
+ <div v-for="(item, index) in sourceTableData"
+ :key="index"
+ class="source-data-card">
+ <div class="card-body">
+ <div class="info-grid">
+ <div class="info-item">
+ <div class="info-label">璁″垝鍙�</div>
+ <div class="info-value">{{ item.mpsNo || '-' }}</div>
+ </div>
+ <div class="info-item">
+ <div class="info-label">鏁版嵁鏉ユ簮</div>
+ <div class="info-value">
+ <el-tag :type="item.source === '閿�鍞�' ? 'primary' : 'warning'">
+ {{ item.source || '鏈煡' }}
+ </el-tag>
+ </div>
+ </div>
+ <div class="info-item">
+ <div class="info-label">鍚堝悓鍙�</div>
+ <div class="info-value">{{ item.salesContractNo || '-' }}</div>
+ </div>
+ <div class="info-item">
+ <div class="info-label">瀹㈡埛鍚嶇О</div>
+ <div class="info-value">{{ item.customerName || '-' }}</div>
+ </div>
+ <div class="info-item">
+ <div class="info-label">椤圭洰鍚嶇О</div>
+ <div class="info-value">{{ item.projectName || '-' }}</div>
+ </div>
+ <div class="info-item">
+ <div class="info-label">璁″垝闇�姹傛暟閲�</div>
+ <div class="info-value">{{ item.qtyRequired || 0 }} {{ item.unit || '' }}</div>
+ </div>
+ <div class="info-item">
+ <div class="info-label">鍗曚綅</div>
+ <div class="info-value">{{ item.unit || '-' }}</div>
+ </div>
+ <div class="info-item">
+ <div class="info-label">闇�姹傛棩鏈�</div>
+ <div class="info-value">{{ item.requiredDate ? dayjs(item.requiredDate).format('YYYY-MM-DD') : '-' }}</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </el-dialog>
<MaterialLedgerDialog v-model="materialDialogVisible"
:order-row="currentMaterialOrder"
@saved="getList" />
<MaterialDetailDialog v-model="materialDetailDialogVisible"
:order-row="currentMaterialDetailOrder"
@confirmed="getList" />
+ <MaterialSupplementDialog v-model="materialSupplementDialogVisible"
+ :order-row="currentMaterialSupplementOrder"
+ @saved="getList" />
<new-product-order v-if="isShowNewModal"
v-model:visible="isShowNewModal"
@completed="handleQuery" />
@@ -129,10 +203,12 @@
bindingRoute,
listProcessBom,
delProductOrder,
+ getProductOrderSource,
} from "@/api/productionManagement/productionOrder.js";
import { listMain as getOrderProcessRouteMain } from "@/api/productionManagement/productProcessRoute.js";
import MaterialLedgerDialog from "@/views/productionManagement/productionOrder/components/MaterialLedgerDialog.vue";
import MaterialDetailDialog from "@/views/productionManagement/productionOrder/components/MaterialDetailDialog.vue";
+ import MaterialSupplementDialog from "@/views/productionManagement/productionOrder/components/MaterialSupplementDialog.vue";
import PIMTable from "@/components/PIMTable/PIMTable.vue";
import { listPage } from "@/api/productionManagement/processRoute.js";
const NewProductOrder = defineAsyncComponent(() =>
@@ -143,6 +219,12 @@
const router = useRouter();
const isShowNewModal = ref(false);
+ const sourceDataDialogVisible = ref(false);
+ const sourceTableData = ref([]);
+ const sourceRowData = ref(null);
+ const sourcePage = reactive({
+ total: 0,
+ });
const tableColumn = ref([
{
@@ -150,15 +232,28 @@
prop: "npsNo",
width: "150px",
},
+ // 1.寰呭紑濮嬨��2.杩涜涓��3.宸插畬鎴愩��4.宸插彇娑�
{
- label: "閿�鍞悎鍚屽彿",
- prop: "salesContractNo",
+ label: "鐘舵��",
+ prop: "status",
width: "150px",
- },
- {
- label: "瀹㈡埛鍚嶇О",
- prop: "customerName",
- width: "200px",
+ dataType: "tag",
+ formatData: val =>
+ val === 1
+ ? "寰呭紑濮�"
+ : val === 2
+ ? "杩涜涓�"
+ : val === 3
+ ? "宸插畬鎴�"
+ : "宸插彇娑�",
+ formatType: val =>
+ val === 1
+ ? "primary"
+ : val === 2
+ ? "warning"
+ : val === 3
+ ? "success"
+ : "danger",
},
{
label: "浜у搧鍚嶇О",
@@ -213,11 +308,12 @@
label: "鎿嶄綔",
align: "center",
fixed: "right",
- width: 340,
+ width: 260,
operation: [
{
name: "宸ヨ壓璺嚎",
type: "text",
+ showHide: row => row.processRouteCode,
clickFun: row => {
showRouteItemModal(row);
},
@@ -227,26 +323,44 @@
type: "text",
showHide: row => !row.processRouteCode,
clickFun: row => {
- openBindRouteDialog(row);
+ openBindRouteDialog(row, "add");
},
},
- // {
- // name: "浜у搧缁撴瀯",
- // type: "text",
- // clickFun: row => {
- // showProductStructure(row);
- // },
- // },
+ {
+ name: "鏇存崲宸ヨ壓璺嚎",
+ type: "text",
+ showHide: row => row.processRouteCode,
+ clickFun: row => {
+ openBindRouteDialog(row, "change");
+ },
+ },
+ {
+ name: "鏉ユ簮",
+ type: "text",
+ clickFun: row => {
+ showSourceData(row);
+ },
+ },
{
name: "棰嗘枡",
type: "text",
+ color: "#5EC7AB",
clickFun: row => {
openMaterialDialog(row);
},
},
{
+ name: "琛ユ枡",
+ type: "text",
+ color: "#5EC7AB",
+ clickFun: row => {
+ openMaterialSupplementDialog(row);
+ },
+ },
+ {
name: "棰嗘枡璇︽儏",
type: "text",
+ color: "#5EC7AB",
clickFun: row => {
openMaterialDetailDialog(row);
},
@@ -271,6 +385,7 @@
projectName: "",
productName: "",
model: "",
+ status: "",
},
});
const { searchForm } = toRefs(data);
@@ -322,10 +437,12 @@
const currentMaterialOrder = ref(null);
const materialDetailDialogVisible = ref(false);
const currentMaterialDetailOrder = ref(null);
+ const materialSupplementDialogVisible = ref(false);
+ const currentMaterialSupplementOrder = ref(null);
- const openBindRouteDialog = async row => {
+ const openBindRouteDialog = async (row, type) => {
bindForm.orderId = row.id;
- bindForm.routeId = null;
+ bindForm.routeId = type === "add" ? null : row.processRouteCode;
bindRouteDialogVisible.value = true;
routeOptions.value = [];
if (!row.productModelId) {
@@ -354,7 +471,7 @@
try {
await bindingRoute({
id: bindForm.orderId,
- routeId: bindForm.routeId,
+ technologyRoutingId: bindForm.routeId,
});
proxy.$modal.msgSuccess("缁戝畾鎴愬姛");
bindRouteDialogVisible.value = false;
@@ -375,6 +492,25 @@
const openMaterialDetailDialog = async row => {
currentMaterialDetailOrder.value = row;
materialDetailDialogVisible.value = true;
+ };
+
+ const openMaterialSupplementDialog = row => {
+ currentMaterialSupplementOrder.value = row;
+ materialSupplementDialogVisible.value = true;
+ };
+
+ const handleReset = () => {
+ searchForm.value = {
+ ...searchForm.value,
+ npsNo: "",
+ customerName: "",
+ salesContractNo: "",
+ projectName: "",
+ productName: "",
+ model: "",
+ status: "",
+ };
+ handleQuery();
};
// 鏌ヨ鍒楄〃
@@ -427,12 +563,13 @@
path: "/productionManagement/processRouteItem",
query: {
id: data.id,
- bomId: data.bomId,
+ bomId: data.orderBomId,
processRouteCode: data.processRouteCode || "",
productName: row.productName || "",
model: row.model || "",
bomNo: row.bomNo || "",
description: data.description || "",
+ quantity: row.quantity || 0,
orderId,
type: "order",
},
@@ -457,6 +594,29 @@
});
};
+ // 鏌ョ湅鏉ユ簮鐢熶骇璁″垝鏁版嵁
+ const showSourceData = row => {
+ // 瀛樺偍鐐瑰嚮鏉ユ簮鎸夐挳鏃朵紶閫掔殑row鍙傛暟
+ sourceRowData.value = row;
+ // 璋冪敤API鑾峰彇鏉ユ簮鏁版嵁
+ getProductOrderSource(row.id)
+ .then(res => {
+ if (res.code === 200) {
+ // 鐩存帴瀛樺偍杩斿洖鐨勬墎骞冲寲鏁版嵁
+ sourceTableData.value = res.data || [];
+ sourcePage.total = sourceTableData.value.length;
+ // 鎵撳紑寮圭獥
+ sourceDataDialogVisible.value = true;
+ } else {
+ proxy.$modal.msgError(res.msg || "鑾峰彇鏉ユ簮鏁版嵁澶辫触");
+ }
+ })
+ .catch(err => {
+ proxy.$modal.msgError("鑾峰彇鏉ユ簮鏁版嵁澶辫触");
+ console.error(err);
+ });
+ };
+
// 琛ㄦ牸閫夋嫨鏁版嵁
const handleSelectionChange = selection => {
selectedRows.value = selection;
@@ -470,14 +630,15 @@
proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
return;
}
- ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
+ ElMessageBox.confirm("鏄惁閫�鍥炶鐢熶骇璁㈠崟锛�", "閫�鍥�", {
confirmButtonText: "纭",
cancelButtonText: "鍙栨秷",
type: "warning",
})
.then(() => {
+ console.log(ids, "ids");
delProductOrder(ids).then(res => {
- proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ proxy.$modal.msgSuccess("閫�鍥炴垚鍔�");
getList();
});
})
@@ -542,3 +703,90 @@
margin-top: unset;
}
</style>
+<style lang="scss">
+ .status-cell {
+ font-weight: 600;
+ color: #409eff;
+ font-family: "Courier New", monospace;
+ text-shadow: 0 1px 2px rgba(64, 158, 255, 0.2);
+ }
+
+ .source-table-container {
+ margin-top: 20px;
+ }
+
+ .source-data-cards-container {
+ display: flex;
+ flex-direction: column;
+ gap: 16px;
+ max-height: 500px;
+ overflow-y: auto;
+ padding: 10px;
+ background-color: #f5f7fa;
+ border-radius: 4px;
+ padding-bottom: 20px;
+
+ .source-data-card {
+ background: #fff;
+ border-radius: 8px;
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+ overflow: hidden;
+
+ .card-body {
+ padding: 20px;
+
+ .info-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
+ gap: 16px;
+
+ .info-item {
+ display: flex;
+ flex-direction: column;
+
+ .info-label {
+ font-size: 12px;
+ color: #909399;
+ margin-bottom: 4px;
+ font-weight: 500;
+ }
+
+ .info-value {
+ font-size: 14px;
+ color: #303133;
+ font-weight: 500;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ .applyno-summary1 {
+ padding: 16px 20px;
+ background: #f5f7fa;
+ border-bottom: 1px solid #e4e7ed;
+ display: flex;
+ flex-wrap: wrap;
+ gap: 16px;
+
+ .summary-item {
+ display: flex;
+ align-items: center;
+ margin-right: 20px;
+
+ .summary-label {
+ font-size: 13px;
+ color: #909399;
+ margin-right: 8px;
+ font-weight: 500;
+ }
+
+ .summary-value {
+ font-size: 14px;
+ color: #303133;
+ font-weight: 500;
+ }
+ }
+ }
+</style>
--
Gitblit v1.9.3