|
|
@ -247,13 +247,20 @@
|
|
|
|
<el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col>
|
|
|
|
<el-col>
|
|
|
|
<el-card class="hl-incard">
|
|
|
|
<el-card class="hl-incard">
|
|
|
|
<el-form ref="projectOrderSubFormRef" :model="formData.projectOrderSubs" :rules="subFormRules"
|
|
|
|
<el-form ref="subFormRef" :model="formData.projectOrderSubs" :rules="subFormRules"
|
|
|
|
v-loading="subFormLoading" label-width="0">
|
|
|
|
v-loading="subFormLoading" label-width="0">
|
|
|
|
<el-table :data="formData.projectOrderSubs" class="hl-table">
|
|
|
|
<el-table :data="formData.projectOrderSubs" class="hl-table">
|
|
|
|
<el-table-column label="序号" type="index" width="80" />
|
|
|
|
<el-table-column label="序号" type="index" width="80" fixed />
|
|
|
|
<el-table-column prop="name" label="子项目名称" min-width="120" align="center" />
|
|
|
|
<el-table-column prop="name" label="子项目名称" min-width="120" align="center" fixed/>
|
|
|
|
<el-table-column prop="shortName" label="子项目简称" min-width="120" align="center" />
|
|
|
|
<el-table-column prop="projectSubShortName" min-width="150" align="center" :rules="subFormRules.projectSubShortName" >
|
|
|
|
<el-table-column prop="code" label="子项目编号" min-width="120" align="center" />
|
|
|
|
<template #header>子项目简称</template>
|
|
|
|
|
|
|
|
<template #default="{ row, $index }">
|
|
|
|
|
|
|
|
<el-form-item :prop="`${$index}.projectSubShortName`" class="mb-0px!">
|
|
|
|
|
|
|
|
<el-input v-model="row.projectSubShortName" placeholder="子项目简称" @change="(name)=>handleSubCode(row,name)" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="projectSubCode" label="子项目编号" min-width="120" align="center" />
|
|
|
|
<el-table-column prop="mouldId" align="center" min-width="120">
|
|
|
|
<el-table-column prop="mouldId" align="center" min-width="120">
|
|
|
|
<template #header> 模具类型 </template>
|
|
|
|
<template #header> 模具类型 </template>
|
|
|
|
<template #default="scope">
|
|
|
|
<template #default="scope">
|
|
|
@ -265,7 +272,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="equipId" align="center" min-width="120">
|
|
|
|
<el-table-column prop="equipId" align="center" min-width="120">
|
|
|
|
<template #header> 设备型号 </template>
|
|
|
|
<template #header> 设备信息 </template>
|
|
|
|
<template #default="scope">
|
|
|
|
<template #default="scope">
|
|
|
|
<el-form-item :prop="`${scope.$index}.equipId`" class="mb-0px!">
|
|
|
|
<el-form-item :prop="`${scope.$index}.equipId`" class="mb-0px!">
|
|
|
|
<el-select v-model="scope.row.equipId" clearable placeholder="下拉选择" style="width: 100%">
|
|
|
|
<el-select v-model="scope.row.equipId" clearable placeholder="下拉选择" style="width: 100%">
|
|
|
@ -336,8 +343,6 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
</el-card>
|
|
|
|
</el-card>
|
|
|
@ -396,7 +401,7 @@
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
</el-card>
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
|
|
<el-card class="hl-card-info">
|
|
|
|
<el-card class="hl-card-info" v-if="false">
|
|
|
|
<template #header>
|
|
|
|
<template #header>
|
|
|
|
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">操作日志</span>
|
|
|
|
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">操作日志</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -447,6 +452,7 @@ const reload = inject('reload')
|
|
|
|
|
|
|
|
|
|
|
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
|
|
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
|
|
|
const formRef = ref() // 表单
|
|
|
|
const formRef = ref() // 表单
|
|
|
|
|
|
|
|
const subFormRef = ref() //子表单 Ref
|
|
|
|
const formData = ref({
|
|
|
|
const formData = ref({
|
|
|
|
id: undefined,
|
|
|
|
id: undefined,
|
|
|
|
projectId: undefined,
|
|
|
|
projectId: undefined,
|
|
|
@ -473,6 +479,10 @@ const formData = ref({
|
|
|
|
const formRules = reactive({
|
|
|
|
const formRules = reactive({
|
|
|
|
projectCode: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }],
|
|
|
|
projectCode: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
const subFormRules = reactive({
|
|
|
|
|
|
|
|
projectSubShortName: [{ required: true, message: '子项目简称不能为空', trigger: 'blur' }],
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
const projectOrderDialog = ref()
|
|
|
|
const projectOrderDialog = ref()
|
|
|
|
const openProjectOrderDialog = () => {
|
|
|
|
const openProjectOrderDialog = () => {
|
|
|
@ -495,6 +505,11 @@ const handleSelectedProjectOrder = (arr: ProjectOrderVO[]) => {
|
|
|
|
handleInitPlanSub()
|
|
|
|
handleInitPlanSub()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handleSubCode = (row,name) =>{
|
|
|
|
|
|
|
|
row.projectSubCode = formData.value.projectCode+'-'+customerInit.value.code + '-'+ name
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const handleMouldType = async (scope,mid) => {
|
|
|
|
const handleMouldType = async (scope,mid) => {
|
|
|
|
// 获得设备信息下拉列表
|
|
|
|
// 获得设备信息下拉列表
|
|
|
|
scope.row.equipList = equipInit.value.filter( rg => rg.mould_type_id == mid)
|
|
|
|
scope.row.equipList = equipInit.value.filter( rg => rg.mould_type_id == mid)
|
|
|
@ -503,6 +518,7 @@ const handleMouldType = async (scope,mid) => {
|
|
|
|
const submitForm = async () => {
|
|
|
|
const submitForm = async () => {
|
|
|
|
// 校验表单
|
|
|
|
// 校验表单
|
|
|
|
await formRef.value.validate()
|
|
|
|
await formRef.value.validate()
|
|
|
|
|
|
|
|
await subFormRef.value.validate()
|
|
|
|
// 提交请求
|
|
|
|
// 提交请求
|
|
|
|
formLoading.value = true
|
|
|
|
formLoading.value = true
|
|
|
|
try {
|
|
|
|
try {
|
|
|
@ -514,6 +530,8 @@ const submitForm = async () => {
|
|
|
|
var subData = item as unknown as PlanSubApid.PlanSubVo
|
|
|
|
var subData = item as unknown as PlanSubApid.PlanSubVo
|
|
|
|
subData.projectId = item.projectOrderId
|
|
|
|
subData.projectId = item.projectOrderId
|
|
|
|
subData.projectPlanId = formData.value.id
|
|
|
|
subData.projectPlanId = formData.value.id
|
|
|
|
|
|
|
|
subData.projectSubShortName = item.projectSubShortName
|
|
|
|
|
|
|
|
subData.projectSubCode = item.projectSubCode
|
|
|
|
subData.projectSubId = item.id
|
|
|
|
subData.projectSubId = item.id
|
|
|
|
if(item.planSubId == undefined){
|
|
|
|
if(item.planSubId == undefined){
|
|
|
|
subData.id = 0
|
|
|
|
subData.id = 0
|
|
|
@ -554,6 +572,8 @@ const handleInitPlanSub = async ()=>{
|
|
|
|
item.projectPlanId = subTemp.projectPlanId
|
|
|
|
item.projectPlanId = subTemp.projectPlanId
|
|
|
|
item.projectId = subTemp.projectId
|
|
|
|
item.projectId = subTemp.projectId
|
|
|
|
item.projectSubId = subTemp.projectSubId
|
|
|
|
item.projectSubId = subTemp.projectSubId
|
|
|
|
|
|
|
|
item.projectSubShortName = subTemp.projectSubShortName
|
|
|
|
|
|
|
|
item.projectSubCode = subTemp.projectSubCode
|
|
|
|
item.mouldId = subTemp.mouldId
|
|
|
|
item.mouldId = subTemp.mouldId
|
|
|
|
item.equipId = subTemp.equipId
|
|
|
|
item.equipId = subTemp.equipId
|
|
|
|
item.blankDate = subTemp.blankDate
|
|
|
|
item.blankDate = subTemp.blankDate
|
|
|
@ -570,6 +590,7 @@ const handleInitPlanSub = async ()=>{
|
|
|
|
|
|
|
|
|
|
|
|
const equipInit = ref()
|
|
|
|
const equipInit = ref()
|
|
|
|
const mouldTypeList = ref()
|
|
|
|
const mouldTypeList = ref()
|
|
|
|
|
|
|
|
const customerInit = ref()
|
|
|
|
onMounted(async () => {
|
|
|
|
onMounted(async () => {
|
|
|
|
|
|
|
|
|
|
|
|
// 模具类型下拉列表数据
|
|
|
|
// 模具类型下拉列表数据
|
|
|
@ -582,12 +603,12 @@ onMounted(async () => {
|
|
|
|
await handleInitPlanSub()
|
|
|
|
await handleInitPlanSub()
|
|
|
|
|
|
|
|
|
|
|
|
var projectInit = await ProjectOrderApi.getProjectOrder(formData.value.projectId)
|
|
|
|
var projectInit = await ProjectOrderApi.getProjectOrder(formData.value.projectId)
|
|
|
|
var customerInit = await CustomerApi.getCustomer(projectInit.customerId)
|
|
|
|
customerInit.value = await CustomerApi.getCustomer(projectInit.customerId)
|
|
|
|
var businessManInit = await UserApi.getUser(projectInit.businessMan)
|
|
|
|
var businessManInit = await UserApi.getUser(projectInit.businessMan)
|
|
|
|
|
|
|
|
|
|
|
|
formData.value.projectCode = projectInit.code
|
|
|
|
formData.value.projectCode = projectInit.code
|
|
|
|
formData.value.projectStatus = projectInit.orderStatus
|
|
|
|
formData.value.projectStatus = projectInit.orderStatus
|
|
|
|
formData.value.customerName = customerInit?.name
|
|
|
|
formData.value.customerName = customerInit?.value.name
|
|
|
|
formData.value.projectName = projectInit.projectName
|
|
|
|
formData.value.projectName = projectInit.projectName
|
|
|
|
formData.value.businessMan = businessManInit?.nickname
|
|
|
|
formData.value.businessMan = businessManInit?.nickname
|
|
|
|
formData.value.projectStartTime = projectInit.projectStartTime
|
|
|
|
formData.value.projectStartTime = projectInit.projectStartTime
|
|
|
|