Browse Source

2026-02-04

收货入库任务通知、拣货出库任务通知和领料申请管理页面【编辑】控制
master
fengyuan_yang 8 months ago
parent
commit
86c3aa6b54
  1. 2
      src/views/modules/boxManage/com_saleBoxManage_boxing.vue
  2. 182
      src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue
  3. 23
      src/views/modules/qc/inboundNotification.vue
  4. 24
      src/views/modules/qc/outboundNotification.vue

2
src/views/modules/boxManage/com_saleBoxManage_boxing.vue

@ -586,7 +586,7 @@ export default {
// ===== 左侧文字信息 ===== // ===== 左侧文字信息 =====
// NO.文字: ADD_PRINT_TEXT(上边距, 左边距, 宽度, 高度, 内容) // NO.文字: ADD_PRINT_TEXT(上边距, 左边距, 宽度, 高度, 内容)
// 文字区域:从3mm到54mm,宽度50mm,字号5,Arial字体紧凑显示 // 文字区域:从3mm到54mm,宽度50mm,字号5,Arial字体紧凑显示
const text1 = LODOP.ADD_PRINT_TEXT('4.5mm', '3mm', '52mm', '5mm', 'NO:' + ('FHJH-2026010393-20260123037' || ''))
const text1 = LODOP.ADD_PRINT_TEXT('4.5mm', '3mm', '52mm', '5mm', 'NO:' + (this.searchData.orderNo || ''))
LODOP.SET_PRINT_STYLEA(text1, "FontName", "Arial") // 使用Arial,紧凑字体 LODOP.SET_PRINT_STYLEA(text1, "FontName", "Arial") // 使用Arial,紧凑字体
LODOP.SET_PRINT_STYLEA(text1, "FontSize", 5) // 5号字体 LODOP.SET_PRINT_STYLEA(text1, "FontSize", 5) // 5号字体
LODOP.SET_PRINT_STYLEA(text1, "Bold", 1) // 粗体 LODOP.SET_PRINT_STYLEA(text1, "Bold", 1) // 粗体

182
src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue

@ -2692,11 +2692,25 @@
this.$message.warning('该类型单据不能编辑!') this.$message.warning('该类型单据不能编辑!')
return return
} }
if (this.editBatchVisible) {
this.editBatchVisible = false
} else {
this.editBatchVisible = true
}
// 先查询材料汇总数据,校验是否有合计已发数量大于零
searchSumNotifyMaterialList(this.currentRow).then(({data}) => {
if (data && data.code === 0 && data.rows && data.rows.length > 0) {
const hasIssuedQty = data.rows.some(item => {
const qty = parseFloat(item.qtyToIssueOriginal) || 0;
return qty > 0;
});
if (hasIssuedQty) {
this.$message.warning('该单据已有合计已发数量,不能批量编辑材料明细!');
return;
}
}
// 校验通过,继续执行
if (this.editBatchVisible) {
this.editBatchVisible = false
} else {
this.editBatchVisible = true
}
});
}, },
// 批量保存 // 批量保存
@ -3017,27 +3031,41 @@
}) })
}, },
deleteNotifyMaterial(row){ deleteNotifyMaterial(row){
this.$confirm('确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteNotifyMaterial(row).then(({data}) => {
if (data && data.code === 0) {
this.refreshCurrentTabTable()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
// 先查询材料汇总数据,校验是否有合计已发数量大于零
searchSumNotifyMaterialList(this.currentRow).then(({data}) => {
if (data && data.code === 0 && data.rows && data.rows.length > 0) {
const hasIssuedQty = data.rows.some(item => {
const qty = parseFloat(item.qtyToIssueOriginal) || 0;
return qty > 0;
});
if (hasIssuedQty) {
this.$message.warning('该单据已有合计已发数量,不能删除材料明细!');
return;
} }
}
// 校验通过,继续执行删除
this.$confirm('确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteNotifyMaterial(row).then(({data}) => {
if (data && data.code === 0) {
this.refreshCurrentTabTable()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}) })
})
});
}, },
deleteNotifySOSPlus(row){ deleteNotifySOSPlus(row){
// 检查当前状态是否允许编辑 // 检查当前状态是否允许编辑
@ -3891,28 +3919,44 @@
}, },
editNotifyMaterialFun(row){ editNotifyMaterialFun(row){
// 设置当前行为要编辑的行
this.currentRow = JSON.parse(JSON.stringify(row));
editNotifyMaterial(row).then(({data})=>{
if (data.code === 0) {
//刷新主表数据
this.searchTable().then(() => { // 等刷新完成
const foundRow = this.dataList.find(item => item.notifyNo === row.notifyNo);
if (foundRow) {
this.currentRow = JSON.parse(JSON.stringify(foundRow));
this.$nextTick(() => {
this.$refs.mainTable.setCurrentRow(foundRow);
});
}
// 先查询该行的材料汇总数据,校验是否有合计已发数量大于零
searchSumNotifyMaterialList(row).then(({data}) => {
if (data && data.code === 0 && data.rows && data.rows.length > 0) {
// 检查是否有合计已发数量大于零的记录
const hasIssuedQty = data.rows.some(item => {
const qty = parseFloat(item.qtyToIssueOriginal) || 0;
return qty > 0;
}); });
this.$message.success( '操作成功')
}else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
if (hasIssuedQty) {
this.$message.warning('该单据已有合计已发数量,不能编辑主信息!');
return;
}
} }
})
// 校验通过,继续执行编辑操作
// 设置当前行为要编辑的行
this.currentRow = JSON.parse(JSON.stringify(row));
editNotifyMaterial(row).then(({data})=>{
if (data.code === 0) {
//刷新主表数据
this.searchTable().then(() => { // 等刷新完成
const foundRow = this.dataList.find(item => item.notifyNo === row.notifyNo);
if (foundRow) {
this.currentRow = JSON.parse(JSON.stringify(foundRow));
this.$nextTick(() => {
this.$refs.mainTable.setCurrentRow(foundRow);
});
}
});
this.$message.success( '操作成功')
}else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
});
}, },
// 判断当前状态是否可编辑 // 判断当前状态是否可编辑
@ -3956,24 +4000,38 @@
return false; return false;
} }
// 重置表单数据
this.newMaterialData = {
componentPartNo: '',
partDesc: '',
issueType: '替代料',
orderNo: '',
itemNo: '', // 申请单序号,将在选择生产订单时自动填充
remark: '',
componentScrap: 0,
firstInspectionQty: 0,
standardDosage: 0,
bomSeqNo: '',
warehouseId: '',
qtyToIssueOriginal: 0
};
// 加载生产订单选项
this.loadOrderOptions();
this.addMaterialModalFlag = true;
// 先查询材料汇总数据,校验是否有合计已发数量大于零
searchSumNotifyMaterialList(this.currentRow).then(({data}) => {
if (data && data.code === 0 && data.rows && data.rows.length > 0) {
const hasIssuedQty = data.rows.some(item => {
const qty = parseFloat(item.qtyToIssueOriginal) || 0;
return qty > 0;
});
if (hasIssuedQty) {
this.$message.warning('该单据已有合计已发数量,不能新增材料明细!');
return;
}
}
// 校验通过,继续执行
// 重置表单数据
this.newMaterialData = {
componentPartNo: '',
partDesc: '',
issueType: '替代料',
orderNo: '',
itemNo: '', // 申请单序号,将在选择生产订单时自动填充
remark: '',
componentScrap: 0,
firstInspectionQty: 0,
standardDosage: 0,
bomSeqNo: '',
warehouseId: '',
qtyToIssueOriginal: 0
};
// 加载生产订单选项
this.loadOrderOptions();
this.addMaterialModalFlag = true;
});
}, },
// 加载生产订单选项 // 加载生产订单选项

23
src/views/modules/qc/inboundNotification.vue

@ -202,9 +202,9 @@
<el-tab-pane label="入库明细" name="inboundDetail"> <el-tab-pane label="入库明细" name="inboundDetail">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px;"> <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px;">
<el-form label-position="top" style="margin-left: 2px; margin-bottom: 0;"> <el-form label-position="top" style="margin-left: 2px; margin-bottom: 0;">
<el-button v-if="currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中'" type="primary" @click="addInboundDetailModal()" icon="el-icon-plus">新增</el-button>
<el-button v-if="currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中'" type="primary" @click="deleteInboundDetail()" icon="el-icon-minus">删除</el-button>
<el-button v-if="!editBatchVisible && (currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中')" @click="editBatchModel">批量编辑</el-button>
<el-button v-if="(currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中') && !hasActualInboundQty" type="primary" @click="addInboundDetailModal()" icon="el-icon-plus">新增</el-button>
<el-button v-if="(currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中') && !hasActualInboundQty" type="primary" @click="deleteInboundDetail()" icon="el-icon-minus">删除</el-button>
<el-button v-if="!editBatchVisible && (currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中') && !hasActualInboundQty" @click="editBatchModel">批量编辑</el-button>
<el-button v-if="!editBatchVisible && (currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中')" @click="changeWarehouseBatch">更换仓库</el-button> <el-button v-if="!editBatchVisible && (currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中')" @click="changeWarehouseBatch">更换仓库</el-button>
<el-button v-if="editBatchVisible" @click="batchModel" :loading="saveLoading">批量保存</el-button> <el-button v-if="editBatchVisible" @click="batchModel" :loading="saveLoading">批量保存</el-button>
<el-button v-if="editBatchVisible" @click="editBatchVisible = false" type="info">取消编辑</el-button> <el-button v-if="editBatchVisible" @click="editBatchVisible = false" type="info">取消编辑</el-button>
@ -320,7 +320,7 @@
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link style="cursor: pointer" @click="inboundDetailModal(scope.row)">入库明细</el-link> <el-link style="cursor: pointer" @click="inboundDetailModal(scope.row)">入库明细</el-link>
<el-link v-if="currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中'" style="cursor: pointer; margin-left: 10px;" type="warning" @click="labelImportModal(scope.row)">标签导入</el-link>
<el-link v-if="(currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中') && !hasActualInboundQty" style="cursor: pointer; margin-left: 10px;" type="warning" @click="labelImportModal(scope.row)">标签导入</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -1274,6 +1274,16 @@
const qty = parseFloat(item.requiredQty) || 0; const qty = parseFloat(item.requiredQty) || 0;
return sum + qty; return sum + qty;
}, 0); }, 0);
},
// 判断是否有实际入库数量大于零的明细(有则禁止编辑)
hasActualInboundQty() {
if (!this.detailList || this.detailList.length === 0) {
return false;
}
return this.detailList.some(item => {
const qty = parseFloat(item.actualStockInQty) || 0;
return qty > 0;
});
} }
}, },
@ -1403,6 +1413,11 @@
this.$message.warning('该类型单据不能编辑!') this.$message.warning('该类型单据不能编辑!')
return return
} }
// 校验当前行的明细是否有实际入库数量大于零
if (this.hasActualInboundQty) {
this.$message.warning('该单据已有实际入库数量,不能编辑主信息!')
return
}
this.modalData = { this.modalData = {
flag: '2', flag: '2',
site: row.site, site: row.site,

24
src/views/modules/qc/outboundNotification.vue

@ -203,9 +203,9 @@
<el-tabs v-model="activeTable" style="width: 100%" :style="{height: secondHeight + 'px'}" type="border-card" @tab-click="tabClick" class="customer-tab"> <el-tabs v-model="activeTable" style="width: 100%" :style="{height: secondHeight + 'px'}" type="border-card" @tab-click="tabClick" class="customer-tab">
<el-tab-pane label="出库明细" name="outboundDetail"> <el-tab-pane label="出库明细" name="outboundDetail">
<el-form label-position="top" style="margin-left: 2px;"> <el-form label-position="top" style="margin-left: 2px;">
<el-button v-if="currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中'" type="primary" @click="addOutboundDetailModal()" icon="el-icon-plus">新增</el-button>
<el-button v-if="currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中'" type="primary" @click="deleteOutboundDetail()" icon="el-icon-minus">删除</el-button>
<el-button v-if="!editBatchVisible && (currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中')" @click="editBatchModel">批量编辑</el-button>
<el-button v-if="(currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中') && !hasActualOutboundQty" type="primary" @click="addOutboundDetailModal()" icon="el-icon-plus">新增</el-button>
<el-button v-if="(currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中') && !hasActualOutboundQty" type="primary" @click="deleteOutboundDetail()" icon="el-icon-minus">删除</el-button>
<el-button v-if="!editBatchVisible && (currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中') && !hasActualOutboundQty" @click="editBatchModel">批量编辑</el-button>
<el-button v-if="!editBatchVisible && (currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中')" @click="changeWarehouseBatch">更换仓库</el-button> <el-button v-if="!editBatchVisible && (currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中')" @click="changeWarehouseBatch">更换仓库</el-button>
<el-button v-if="editBatchVisible" @click="batchModel" :loading="saveLoading">批量保存</el-button> <el-button v-if="editBatchVisible" @click="batchModel" :loading="saveLoading">批量保存</el-button>
<el-button v-if="editBatchVisible" @click="editBatchVisible = false" type="info">取消编辑</el-button> <el-button v-if="editBatchVisible" @click="editBatchVisible = false" type="info">取消编辑</el-button>
@ -1227,6 +1227,19 @@
} }
}, },
computed: {
// 判断是否有实际出库数量大于零的明细(有则禁止编辑)
hasActualOutboundQty() {
if (!this.detailList || this.detailList.length === 0) {
return false;
}
return this.detailList.some(item => {
const qty = parseFloat(item.actualStockOutQty) || 0;
return qty > 0;
});
}
},
mounted () { mounted () {
this.$nextTick(() => { this.$nextTick(() => {
this.height = window.innerHeight / 2 - 100 this.height = window.innerHeight / 2 - 100
@ -1351,6 +1364,11 @@
this.$message.warning('销售出库单据不能编辑!') this.$message.warning('销售出库单据不能编辑!')
return return
} }
// 校验当前行的明细是否有实际出库数量大于零
if (this.hasActualOutboundQty) {
this.$message.warning('该单据已有实际出库数量,不能编辑主信息!')
return
}
this.modalData = { this.modalData = {
flag: '2', flag: '2',
site: row.site, site: row.site,

Loading…
Cancel
Save