|
@@ -90,7 +90,7 @@
|
|
<el-table-column type="index" label="行号" width="50" align="center" />
|
|
<el-table-column type="index" label="行号" width="50" align="center" />
|
|
<el-table-column label="生产计划单号" prop="productionPlanNo" width="110" align="center" />
|
|
<el-table-column label="生产计划单号" prop="productionPlanNo" width="110" align="center" />
|
|
<el-table-column label="产品描述" prop="productDescription" align="center" />
|
|
<el-table-column label="产品描述" prop="productDescription" align="center" />
|
|
- <el-table-column label="当前投产量" prop="productionVolume" width="80" align="center" />
|
|
|
|
|
|
+ <el-table-column label="当前投产量" prop="productionQuantity" width="80" align="center" />
|
|
<el-table-column label="当前投产批数" prop="lotNumber" width="100" align="center">
|
|
<el-table-column label="当前投产批数" prop="lotNumber" width="100" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-input-number
|
|
<el-input-number
|
|
@@ -121,10 +121,12 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="操作" width="150" align="center">
|
|
<el-table-column label="操作" width="150" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-button v-if="!scope.row.editStatus" icon="edit" link type="warning" @click="handleEditSubDetail(scope.row)">编辑 </el-button>
|
|
|
|
|
|
+ <el-button v-if="!scope.row.editStatus" icon="edit" link type="warning" @click="handleShowSubDetailDialog(scope.row)"
|
|
|
|
+ >编辑
|
|
|
|
+ </el-button>
|
|
<el-button v-if="!scope.row.editStatus" icon="delete" link type="danger" @click="handleDelSubDetail(scope.row)">删除 </el-button>
|
|
<el-button v-if="!scope.row.editStatus" icon="delete" link type="danger" @click="handleDelSubDetail(scope.row)">删除 </el-button>
|
|
<el-button v-if="scope.row.editStatus" icon="Check" link type="success" @click="handleSaveSubDetail(scope.row)">确认 </el-button>
|
|
<el-button v-if="scope.row.editStatus" icon="Check" link type="success" @click="handleSaveSubDetail(scope.row)">确认 </el-button>
|
|
- <el-button v-if="scope.row.editStatus" icon="close" link type="info" @click="handleEditSubDetail(scope.row)">取消 </el-button>
|
|
|
|
|
|
+ <el-button v-if="scope.row.editStatus" icon="close" link type="info" @click="handleShowSubDetailDialog(scope.row)">取消 </el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -150,7 +152,7 @@
|
|
<el-form class="list-search-container" :inline="true">
|
|
<el-form class="list-search-container" :inline="true">
|
|
<el-form-item class="section-title" label="设置设备" />
|
|
<el-form-item class="section-title" label="设置设备" />
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button icon="Plus" type="primary" :disabled="!processRow.id" @click="openEquipment">选择设备</el-button>
|
|
|
|
|
|
+ <el-button icon="Plus" type="primary" :disabled="!currentProcess.id" @click="openEquipment">选择设备</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div class="el-table-container">
|
|
<div class="el-table-container">
|
|
@@ -179,7 +181,7 @@
|
|
</section>
|
|
</section>
|
|
</section>
|
|
</section>
|
|
<!-- 表单 -->
|
|
<!-- 表单 -->
|
|
- <production-lot-form ref="productionRef" @handlerSaveSuccess="handlePlanDetailCurrentChange" />
|
|
|
|
|
|
+ <production-lot-form ref="productionRef" @handleSaveSuccess="handlePlanDetailCurrentChange(currentPlanDetail)" />
|
|
<equipment ref="equipmentRef" :get-list="handleProcessCurrentChange" :multipleSelected="equipmentSelected" :multiple="true" />
|
|
<equipment ref="equipmentRef" :get-list="handleProcessCurrentChange" :multipleSelected="equipmentSelected" :multiple="true" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -205,11 +207,14 @@ const deptList = ref([])
|
|
const planDetailTable = ref(null)
|
|
const planDetailTable = ref(null)
|
|
const subDetailsTable = ref(null)
|
|
const subDetailsTable = ref(null)
|
|
const processTable = ref(null)
|
|
const processTable = ref(null)
|
|
|
|
+
|
|
/**生产计划批次点击对象 */
|
|
/**生产计划批次点击对象 */
|
|
-const detailRow = ref({})
|
|
|
|
|
|
+const currentPlanDetail = ref({})
|
|
|
|
+
|
|
/**子计划点击对象 */
|
|
/**子计划点击对象 */
|
|
-const subRow = ref({})
|
|
|
|
-const processRow = ref({})
|
|
|
|
|
|
+const currentSubDetail = ref({})
|
|
|
|
+const currentProcess = ref({})
|
|
|
|
+
|
|
const subDetailsLoading = ref(false)
|
|
const subDetailsLoading = ref(false)
|
|
const equipmentLoading = ref(false)
|
|
const equipmentLoading = ref(false)
|
|
const detailPlanList = ref([])
|
|
const detailPlanList = ref([])
|
|
@@ -283,7 +288,7 @@ function handleEquipmentSelectionChange(selection) {
|
|
/** 生产计划明细 current-change 事件 */
|
|
/** 生产计划明细 current-change 事件 */
|
|
function handlePlanDetailCurrentChange(row) {
|
|
function handlePlanDetailCurrentChange(row) {
|
|
if (row) {
|
|
if (row) {
|
|
- detailRow.value = row
|
|
|
|
|
|
+ currentPlanDetail.value = row
|
|
subDetailsLoading.value = true
|
|
subDetailsLoading.value = true
|
|
listPlanDetailSubDetail({
|
|
listPlanDetailSubDetail({
|
|
productionPlanDetailId: row.id,
|
|
productionPlanDetailId: row.id,
|
|
@@ -305,7 +310,7 @@ function handlePlanDetailCurrentChange(row) {
|
|
/** 生产子计划 current-change 事件 */
|
|
/** 生产子计划 current-change 事件 */
|
|
function handleSubDetailCurrentChange(row) {
|
|
function handleSubDetailCurrentChange(row) {
|
|
if (row) {
|
|
if (row) {
|
|
- subRow.value = row
|
|
|
|
|
|
+ currentSubDetail.value = row
|
|
listTechnologicalProcessDetail({ technologicalProcessId: row.technologicalProcessId }).then((res) => {
|
|
listTechnologicalProcessDetail({ technologicalProcessId: row.technologicalProcessId }).then((res) => {
|
|
processList.value = res.rows
|
|
processList.value = res.rows
|
|
if (processList.value.length > 0) {
|
|
if (processList.value.length > 0) {
|
|
@@ -319,15 +324,15 @@ function handleSubDetailCurrentChange(row) {
|
|
}
|
|
}
|
|
/**工段下拉框change事件 */
|
|
/**工段下拉框change事件 */
|
|
function handleDeptChange() {
|
|
function handleDeptChange() {
|
|
- handlePlanDetailCurrentChange(detailRow.value)
|
|
|
|
|
|
+ handlePlanDetailCurrentChange(currentPlanDetail.value)
|
|
}
|
|
}
|
|
/** 工序 current-change 事件 */
|
|
/** 工序 current-change 事件 */
|
|
function handleProcessCurrentChange(row) {
|
|
function handleProcessCurrentChange(row) {
|
|
if (row) {
|
|
if (row) {
|
|
- processRow.value = row
|
|
|
|
|
|
+ currentProcess.value = row
|
|
equipmentLoading.value = true
|
|
equipmentLoading.value = true
|
|
listEquipment({
|
|
listEquipment({
|
|
- productionPlanDetailSubDetailId: subRow.value.id,
|
|
|
|
|
|
+ productionPlanDetailSubDetailId: currentSubDetail.value.id,
|
|
technologicalProcessId: row.technologicalProcessId,
|
|
technologicalProcessId: row.technologicalProcessId,
|
|
processId: row.id
|
|
processId: row.id
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
@@ -347,8 +352,8 @@ function openEquipment() {
|
|
for (var i = 0; i < equipmentList.value.length; i++) {
|
|
for (var i = 0; i < equipmentList.value.length; i++) {
|
|
equipmentCodeIds.value.push(equipmentList.value[i].equipmentDetailCode)
|
|
equipmentCodeIds.value.push(equipmentList.value[i].equipmentDetailCode)
|
|
}
|
|
}
|
|
- subRow.value.equipmentCodeIds = equipmentCodeIds.value
|
|
|
|
- proxy.$refs.equipmentRef.open(subRow.value)
|
|
|
|
|
|
+ currentSubDetail.value.equipmentCodeIds = equipmentCodeIds.value
|
|
|
|
+ proxy.$refs.equipmentRef.open(currentSubDetail.value)
|
|
}
|
|
}
|
|
|
|
|
|
/**新增按钮生产子计划 */
|
|
/**新增按钮生产子计划 */
|
|
@@ -362,19 +367,16 @@ function handleAddSubDetail(row) {
|
|
newDetail.productId = row.productId
|
|
newDetail.productId = row.productId
|
|
newDetail.productDescription = row.productDescription
|
|
newDetail.productDescription = row.productDescription
|
|
newDetail.deptId = queryParams.value.deptId
|
|
newDetail.deptId = queryParams.value.deptId
|
|
- newDetail.drawingNumber = row.drawingNumber
|
|
|
|
- newDetail.totalLotNumber = row.totalLotNumber
|
|
|
|
|
|
+ newDetail.lotNumber = row.totalLotNumber
|
|
newDetail.technologicalProcessId = row.technologicalProcessId
|
|
newDetail.technologicalProcessId = row.technologicalProcessId
|
|
- //给下达日期一个当前日期的默认值
|
|
|
|
- const date = new Date()
|
|
|
|
- newDetail.issuanceDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
|
|
|
|
|
|
+ newDetail.technologyVersion = row.technologyVersion
|
|
|
|
|
|
// 打开 生产子计划 对话框
|
|
// 打开 生产子计划 对话框
|
|
- handleEditSubDetail(newDetail)
|
|
|
|
|
|
+ handleShowSubDetailDialog(newDetail)
|
|
}
|
|
}
|
|
|
|
|
|
/** 修改 生产子计划 事件 */
|
|
/** 修改 生产子计划 事件 */
|
|
-function handleEditSubDetail(row) {
|
|
|
|
|
|
+function handleShowSubDetailDialog(row) {
|
|
proxy.$refs.productionRef.open(row)
|
|
proxy.$refs.productionRef.open(row)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -383,7 +385,7 @@ function handleSaveSubDetail(row) {
|
|
savePlanDetailSubDetail(row).then((res) => {
|
|
savePlanDetailSubDetail(row).then((res) => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
proxy.$modal.msgSuccess('保存成功!')
|
|
proxy.$modal.msgSuccess('保存成功!')
|
|
- handlePlanDetailCurrentChange(detailRow.value)
|
|
|
|
|
|
+ handlePlanDetailCurrentChange(currentPlanDetail.value)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -397,7 +399,7 @@ function handleDelSubDetail(row) {
|
|
return delPlanDetailSubDetail(_ids)
|
|
return delPlanDetailSubDetail(_ids)
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
- handlePlanDetailCurrentChange(detailRow.value)
|
|
|
|
|
|
+ handlePlanDetailCurrentChange(currentPlanDetail.value)
|
|
|
|
|
|
proxy.$modal.msgSuccess('删除成功!')
|
|
proxy.$modal.msgSuccess('删除成功!')
|
|
})
|
|
})
|
|
@@ -413,7 +415,7 @@ function handleEquipmentDelete(row) {
|
|
return delEquipment(_ids)
|
|
return delEquipment(_ids)
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
- handleProcessCurrentChange(processRow.value)
|
|
|
|
|
|
+ handleProcessCurrentChange(currentProcess.value)
|
|
proxy.$modal.msgSuccess('删除成功!')
|
|
proxy.$modal.msgSuccess('删除成功!')
|
|
})
|
|
})
|
|
.catch(() => {})
|
|
.catch(() => {})
|
|
@@ -422,21 +424,21 @@ function equipmentSelected(selection) {
|
|
const equipment = []
|
|
const equipment = []
|
|
for (let i = 0; i < selection.length; i++) {
|
|
for (let i = 0; i < selection.length; i++) {
|
|
const item = {}
|
|
const item = {}
|
|
- item.productionPlanId = detailRow.value.productionPlanId
|
|
|
|
- item.productionPlanDetailId = detailRow.value.id
|
|
|
|
- item.productionPlanDetailSubDetailId = subRow.value.id
|
|
|
|
- item.productId = subRow.value.productId
|
|
|
|
- item.technologicalProcessId = subRow.value.technologicalProcessId
|
|
|
|
- item.processId = processRow.value.id
|
|
|
|
|
|
+ item.productionPlanId = currentPlanDetail.value.productionPlanId
|
|
|
|
+ item.productionPlanDetailId = currentPlanDetail.value.id
|
|
|
|
+ item.productionPlanDetailSubDetailId = currentSubDetail.value.id
|
|
|
|
+ item.productId = currentSubDetail.value.productId
|
|
|
|
+ item.technologicalProcessId = currentSubDetail.value.technologicalProcessId
|
|
|
|
+ item.processId = currentProcess.value.id
|
|
item.equipmentDetailId = selection[i].id
|
|
item.equipmentDetailId = selection[i].id
|
|
item.equipmentDetailCode = selection[i].equipmentCode
|
|
item.equipmentDetailCode = selection[i].equipmentCode
|
|
- item.deptId = subRow.value.deptId
|
|
|
|
|
|
+ item.deptId = currentSubDetail.value.deptId
|
|
equipment.push(item)
|
|
equipment.push(item)
|
|
}
|
|
}
|
|
saveBatchEquipment(equipment).then((res) => {
|
|
saveBatchEquipment(equipment).then((res) => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
proxy.$modal.msgSuccess('保存成功!')
|
|
proxy.$modal.msgSuccess('保存成功!')
|
|
- handleProcessCurrentChange(processRow.value)
|
|
|
|
|
|
+ handleProcessCurrentChange(currentProcess.value)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|