Commit c12534a8 authored by lwy's avatar lwy

CCAP内容维护页面

parent f2ec6ab5
import request from '@/utils/request'
...@@ -9,6 +9,15 @@ export function listRelation(query) { ...@@ -9,6 +9,15 @@ export function listRelation(query) {
}) })
} }
// 查询关键零部件和事业部关系列表
export function getPartsList(query) {
return request({
url: '/control/partsBusinessRelation/partsList',
method: 'get',
params: query
})
}
//获取事业部下拉列表 //获取事业部下拉列表
export function listbusinessUnit(query) { export function listbusinessUnit(query) {
return request({ return request({
......
...@@ -213,43 +213,7 @@ ...@@ -213,43 +213,7 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 添加事业部·复制新增的 对话框-->
<el-dialog
top="30"
v-model="tableDialogVisible"
:title="tableDialogTitle"
width="500"
>
<div style="width: 70%;margin-left: 15%;padding: 20px 0">
<el-form :model="tableDialogForm" ref="dialogForm2">
<el-form-item :rules="[
{ required: true, message: '请选择事业部', trigger: 'blur' }
]" label="事业部:" prop="businessId" >
<el-select
v-model="tableDialogForm.businessId"
placeholder="请选择"
clearable
>
<el-option
v-for="dict in businessListExclude"
:label="dict.businessUnitName"
:value="dict.id"
/>
</el-select>
</el-form-item>
</el-form>
</div>
<template #footer>
<div class="dialog-footer">
<el-button class="btn-B" @click="dialog2Cancel">取消</el-button>
<el-button class="btn-A" type="primary" @click="dialog2Sure">
确定
</el-button>
</div>
</template>
</el-dialog>
</template> </template>
......
...@@ -191,7 +191,7 @@ import { ...@@ -191,7 +191,7 @@ import {
listbusinessUnit, listbusinessUnit,
copyAdd, copyAdd,
addBusinessUnit addBusinessUnit
} from "@/api/CCAPCriticalParts/relation.js"; } from "@/api/RelationManagement/relation.js";
import { getAllBusinessUnitName } from "@/api/system/basicdata/businessunit.js"; import { getAllBusinessUnitName } from "@/api/system/basicdata/businessunit.js";
import cn from "@/locales/controlPlan/relationshipManagement/CCAPCriticalParts/cn.json"; import cn from "@/locales/controlPlan/relationshipManagement/CCAPCriticalParts/cn.json";
import en from "@/locales/controlPlan/relationshipManagement/CCAPCriticalParts/en.json"; import en from "@/locales/controlPlan/relationshipManagement/CCAPCriticalParts/en.json";
...@@ -200,6 +200,7 @@ import { useRouter } from 'vue-router'; ...@@ -200,6 +200,7 @@ import { useRouter } from 'vue-router';
import {ElMessage} from "element-plus"; import {ElMessage} from "element-plus";
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
// 对话框 // 对话框
const tableDialogVisible = ref(false) const tableDialogVisible = ref(false)
...@@ -210,7 +211,6 @@ const tableDialogForm = ref({ ...@@ -210,7 +211,6 @@ const tableDialogForm = ref({
id: null, id: null,
//类型(0-复制新增,1-添加事业部) //类型(0-复制新增,1-添加事业部)
type: null, type: null,
//认证机构(0-CCAP,1-CQC)
certificationBody: "CCAP", certificationBody: "CCAP",
//事业部id, //事业部id,
divisionId: null, divisionId: null,
...@@ -348,20 +348,19 @@ function handleBusinessSelect(selectedId) { ...@@ -348,20 +348,19 @@ function handleBusinessSelect(selectedId) {
} }
// 维护模板内容 // 维护模板内容
function handleMaintainContentView(row) { function handleMaintainContentView(row) {
proxy.$router.push({ proxy.$router.push({
path: 'CCAPMaintainContent' path: '/control/relationshipManagement/CCAPMaintainContent',
query: {
businessRelationId: row.id,
certificationBody: row.certificationBody,
divisionName: row.divisionName,
updateName: row.updateName,
isDefault: row.isDefault
}
})} })}
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
title.value = "添加关键零部件和事业部关系";
}
//复制新增按钮 //复制新增按钮
function handleCopyAdd(row){ function handleCopyAdd(row){
...@@ -486,15 +485,7 @@ const handleDelete = (row) => { ...@@ -486,15 +485,7 @@ const handleDelete = (row) => {
proxy.$modal.msgSuccess("删除成功"); proxy.$modal.msgSuccess("删除成功");
}).catch(() => {}); }).catch(() => {});
} }
/*function handleDelete(row) {
const _ids = row.id || ids.value;
proxy.$modal.confirm('是否确认删除?').then(function() {
return deleteById(_ids);
}).then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {});
}*/
onMounted(() => { onMounted(() => {
getBusinessUnitList() getBusinessUnitList()
......
...@@ -644,7 +644,7 @@ function openFactoryDialog(row) { ...@@ -644,7 +644,7 @@ function openFactoryDialog(row) {
// 监听选中的工厂变化,更新表单数据 // 监听选中的工厂变化,更新表单数据
watch(selectedFactories, (newVal) => { watch(selectedFactories, (newVal) => {
form.value.factoryName = JSON.stringify(newVal); // 存储为 JSON 字符串 form.value.factoryNames = JSON.stringify(newVal); // 存储为 JSON 字符串
}, { deep: true }); }, { deep: true });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment