Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
d6a3ff0abe
@ -146,4 +146,6 @@ public class ProcessBomDetailDO extends BaseDO {
|
|||||||
private String sortAttr;
|
private String sortAttr;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String matType;
|
private String matType;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private BigDecimal price;
|
||||||
}
|
}
|
||||||
|
@ -48,9 +48,10 @@ public interface ProcessBomDetailMapper extends BaseMapperX<ProcessBomDetailDO>
|
|||||||
// .eq(ProcessBomDetailDO::getBomId,bomId);
|
// .eq(ProcessBomDetailDO::getBomId,bomId);
|
||||||
// return selectJoinList(ProcessBomDetailDO.class, query);
|
// return selectJoinList(ProcessBomDetailDO.class, query);
|
||||||
// }
|
// }
|
||||||
@Select("SELECT p.*, IFNULL(SUM(s.storage_ok_qty), 0) AS storage_ok_qty " +
|
@Select("SELECT p.*, IFNULL(SUM(s.storage_ok_qty), 0) AS storage_ok_qty,COALESCE(m.price, 0) as price " +
|
||||||
"FROM pro_process_bom_detail p " +
|
"FROM pro_process_bom_detail p " +
|
||||||
"LEFT JOIN v_storage_material_now s ON p.material_id = s.id " +
|
"LEFT JOIN v_storage_material_now s ON p.material_id = s.id " +
|
||||||
|
"LEFT JOIN base_material m ON s.id=m.id "+
|
||||||
"WHERE p.bom_id = #{bomId} and p.material_id is not null AND p.deleted IN (0, 1) " +
|
"WHERE p.bom_id = #{bomId} and p.material_id is not null AND p.deleted IN (0, 1) " +
|
||||||
"GROUP BY p.material_code")
|
"GROUP BY p.material_code")
|
||||||
List<ProcessBomDetailDO> selectStandardListByBomId(@Param("bomId") Long bomId);
|
List<ProcessBomDetailDO> selectStandardListByBomId(@Param("bomId") Long bomId);
|
||||||
|
@ -53,7 +53,7 @@ public interface StorageLogNowMapper extends BaseMapperX<StorageLogNowDO> {
|
|||||||
MPJLambdaWrapper<StorageLogNowDO> query = new MPJLambdaWrapper<>();
|
MPJLambdaWrapper<StorageLogNowDO> query = new MPJLambdaWrapper<>();
|
||||||
|
|
||||||
query.selectAll(StorageLogNowDO.class)
|
query.selectAll(StorageLogNowDO.class)
|
||||||
.select("a.material_type as materialTypeId","a.unit as matUnitId")
|
.select("a.material_type as materialTypeId","a.unit as matUnitId","COALESCE(a.price, 0) as price")
|
||||||
|
|
||||||
.leftJoin(MaterialDO.class,"a",MaterialDO::getId,StorageLogNowDO::getId)
|
.leftJoin(MaterialDO.class,"a",MaterialDO::getId,StorageLogNowDO::getId)
|
||||||
.orderByDesc(StorageLogNowDO::getId);
|
.orderByDesc(StorageLogNowDO::getId);
|
||||||
|
@ -349,7 +349,6 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
|||||||
//去重查询,重复则不加
|
//去重查询,重复则不加
|
||||||
List<bdgzsomthingDO> selecteqint = bdgzsomthingMapper.selecteqint(BdgzsomthingDO);
|
List<bdgzsomthingDO> selecteqint = bdgzsomthingMapper.selecteqint(BdgzsomthingDO);
|
||||||
|
|
||||||
System.out.println("生产任务单"+BdgzsomthingDO);
|
|
||||||
if(selecteqint.size()>0){
|
if(selecteqint.size()>0){
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
@ -35,7 +35,8 @@
|
|||||||
t.updater,
|
t.updater,
|
||||||
t.deleted,
|
t.deleted,
|
||||||
g.material_type AS materialTypeId,
|
g.material_type AS materialTypeId,
|
||||||
g.unit AS matUnitId
|
g.unit AS matUnitId,
|
||||||
|
COALESCE(g.price, 0) AS price
|
||||||
<!-- materialType unitId lyw加的,其他之前的人写的-->
|
<!-- materialType unitId lyw加的,其他之前的人写的-->
|
||||||
FROM
|
FROM
|
||||||
v_storage_material_now t
|
v_storage_material_now t
|
||||||
|
@ -144,7 +144,8 @@
|
|||||||
<el-col>
|
<el-col>
|
||||||
<el-card class="hl-incard">
|
<el-card class="hl-incard">
|
||||||
<el-form ref="subFormRef" :model="formData.bomDetails" :rules="subFormRules" v-loading="formLoading" label-width="0" >
|
<el-form ref="subFormRef" :model="formData.bomDetails" :rules="subFormRules" v-loading="formLoading" label-width="0" >
|
||||||
<el-table :row-class-name="tableRowClassName" :data="formData.bomDetails" >
|
<el-table :row-class-name="tableRowClassName" :data="formData.bomDetails" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column label="序号" type="index" min-width="50px" />
|
<el-table-column label="序号" type="index" min-width="50px" />
|
||||||
<el-table-column label="变更次数" prop="bomEditStatus" max-width="60px" align="center">
|
<el-table-column label="变更次数" prop="bomEditStatus" max-width="60px" align="center">
|
||||||
<template #default="{ row}">
|
<template #default="{ row}">
|
||||||
@ -206,7 +207,7 @@
|
|||||||
<el-table-column min-width="80px" align="center" fixed="right">
|
<el-table-column min-width="80px" align="center" fixed="right">
|
||||||
<template #header><span class="hl-table_header">*</span>负责人</template>
|
<template #header><span class="hl-table_header">*</span>负责人</template>
|
||||||
<template #default="{ row}">
|
<template #default="{ row}">
|
||||||
<el-select :disabled="getDisable(row.bomEditStatus)" clearable filterable v-model="row.owner" placeholder="请选择负责人" style="width: 170px">
|
<el-select :disabled="getDisable(row.bomEditStatus)" clearable filterable v-model="row.owner" @change="change(row)" placeholder="请选择负责人" style="width: 170px">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in ownerList"
|
v-for="item in ownerList"
|
||||||
:key="item.index"
|
:key="item.index"
|
||||||
@ -267,7 +268,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { inject } from 'vue'
|
import {inject, ref} from 'vue'
|
||||||
import { Search, Plus } from '@element-plus/icons-vue'
|
import { Search, Plus } from '@element-plus/icons-vue'
|
||||||
import { getIntDictOptions, getStrDictOptions, getDictLabel, DICT_TYPE } from '@/utils/dict'
|
import { getIntDictOptions, getStrDictOptions, getDictLabel, DICT_TYPE } from '@/utils/dict'
|
||||||
import { betweenDay, formatDate, dateFormatter } from '@/utils/formatTime'
|
import { betweenDay, formatDate, dateFormatter } from '@/utils/formatTime'
|
||||||
@ -283,7 +284,7 @@ const { t } = useI18n() // 国际化
|
|||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { query } = useRoute()
|
const { query } = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const chkboxEnable = ref(0)
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formRef = ref() // 表单
|
const formRef = ref() // 表单
|
||||||
const subFormRef = ref() //子表单 Ref
|
const subFormRef = ref() //子表单 Ref
|
||||||
@ -337,6 +338,41 @@ const heliBomStatusOptions = ref<bomEditStatusEnum[]>([
|
|||||||
{ value: 3, label: '增补' },
|
{ value: 3, label: '增补' },
|
||||||
{ value: 4, label: '修改' },
|
{ value: 4, label: '修改' },
|
||||||
]);
|
]);
|
||||||
|
const change =(row:any)=>{
|
||||||
|
var bomDetails = formData.value.bomDetails;
|
||||||
|
if (row.chkboxEnable==1){
|
||||||
|
for (let i = 0; i < bomDetails.length; i++) {
|
||||||
|
if (bomDetails[i].chkboxEnable==1&&bomDetails[i].bomEditStatus!=1){
|
||||||
|
bomDetails[i].owner=row.owner
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
const handleSelectionChange = (row: any) => {
|
||||||
|
var bomDetails = formData.value.bomDetails;
|
||||||
|
if (row.length==0) {
|
||||||
|
for (let i = 0; i < bomDetails.length; i++) {
|
||||||
|
bomDetails[i].chkboxEnable=0
|
||||||
|
}
|
||||||
|
}else if (row.length==formData.value.bomDetails.length) {
|
||||||
|
for (let i = 0; i < bomDetails.length; i++) {
|
||||||
|
bomDetails[i].chkboxEnable=1
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
for (let i = 0; i < bomDetails.length; i++) {
|
||||||
|
for (let j = 0; j < row.length; j++) {
|
||||||
|
if (row[j].id==bomDetails[i].id){
|
||||||
|
bomDetails[i].chkboxEnable=1
|
||||||
|
break
|
||||||
|
}else {
|
||||||
|
bomDetails[i].chkboxEnable=0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
const submitForm = async (operate) => {
|
const submitForm = async (operate) => {
|
||||||
// 校验表单
|
// 校验表单
|
||||||
await subFormRef.value.validate()
|
await subFormRef.value.validate()
|
||||||
@ -426,6 +462,7 @@ onMounted(async () => {
|
|||||||
formData.value.bomDetails.forEach((item) => {
|
formData.value.bomDetails.forEach((item) => {
|
||||||
item.amount = formData.value.projectSubNum * item.amount;
|
item.amount = formData.value.projectSubNum * item.amount;
|
||||||
item.typeName = item.type == 1 ? '是' : '否'
|
item.typeName = item.type == 1 ? '是' : '否'
|
||||||
|
item.chkboxEnable=0
|
||||||
if(item.owner){
|
if(item.owner){
|
||||||
item.owner = Number(item.owner)
|
item.owner = Number(item.owner)
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ v-for="dict in getIntDictOptions(DICT_TYPE.HELI_STORAGE_STATUS)" :key="dict.valu
|
|||||||
<div class="flex items-center" style="width: 100% !important;">
|
<div class="flex items-center" style="width: 100% !important;">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="formData.headerNo"
|
v-model="formData.headerNo"
|
||||||
|
|
||||||
:disabled="ctrView || ctrSave || enableHeadNo"
|
:disabled="ctrView || ctrSave || enableHeadNo"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
@ -235,6 +235,7 @@ v-for="dict in scope.row.pnlist" :key="dict.id" :label="dict.pn_name"
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="price" label="库存单价" min-width="120" align="center" />
|
||||||
<el-table-column prop="lotNo" min-width="120" label="批次号" align="center" v-if="false" />
|
<el-table-column prop="lotNo" min-width="120" label="批次号" align="center" v-if="false" />
|
||||||
<el-table-column prop="projectSubName" label="子项目名称" align="center" min-width="180">
|
<el-table-column prop="projectSubName" label="子项目名称" align="center" min-width="180">
|
||||||
|
|
||||||
@ -388,7 +389,7 @@ link type="primary" size="small" :disabled="ctrView || ctrDelete"
|
|||||||
<el-button @click="handleStatus(2)" type="primary" v-if="btnSave" size="large">提
|
<el-button @click="handleStatus(2)" type="primary" v-if="btnSave" size="large">提
|
||||||
交</el-button>
|
交</el-button>
|
||||||
<el-button @click="handleStatus(3)" type="danger" v-if="btnCancel" size="large">作
|
<el-button @click="handleStatus(3)" type="danger" v-if="btnCancel" size="large">作
|
||||||
废</el-button>
|
废</el-button>
|
||||||
<!-- <el-button @click="handleStatus(4)" type="success" v-if="btnCancel" size="large">审核</el-button> -->
|
<!-- <el-button @click="handleStatus(4)" type="success" v-if="btnCancel" size="large">审核</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -490,7 +491,7 @@ const openMatForm = () => {
|
|||||||
// return
|
// return
|
||||||
// }
|
// }
|
||||||
// formData.value.whId
|
// formData.value.whId
|
||||||
if(formData.value.pickmode==1){
|
if(formData.value.pickmode==1){
|
||||||
matOpenFormRef.value.open(formData.value, 'bomfind')
|
matOpenFormRef.value.open(formData.value, 'bomfind')
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
@ -508,6 +509,7 @@ const openProjectForm = (scope) => {
|
|||||||
|
|
||||||
|
|
||||||
const getList = async (arrMat) => {
|
const getList = async (arrMat) => {
|
||||||
|
console.log(JSON.stringify(arrMat))
|
||||||
arrMat.forEach((row) => {
|
arrMat.forEach((row) => {
|
||||||
if (
|
if (
|
||||||
formData.value.matItemDOList.filter(
|
formData.value.matItemDOList.filter(
|
||||||
@ -600,7 +602,7 @@ const handleSelectedProjectOrder = (arr: ProjectOrderVO[]) => {
|
|||||||
let contractNo = ''
|
let contractNo = ''
|
||||||
let property = ''
|
let property = ''
|
||||||
let projectName = ''
|
let projectName = ''
|
||||||
|
|
||||||
for (let i = 0; i < arr.length; i++) {
|
for (let i = 0; i < arr.length; i++) {
|
||||||
let order = arr[i]
|
let order = arr[i]
|
||||||
saleOrderIds += order.id + ','
|
saleOrderIds += order.id + ','
|
||||||
@ -614,7 +616,7 @@ const handleSelectedProjectOrder = (arr: ProjectOrderVO[]) => {
|
|||||||
message.alertWarning('上游单据只允许选择一个!')
|
message.alertWarning('上游单据只允许选择一个!')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const deleteData = ref<StorageApi.StorageVO>();
|
const deleteData = ref<StorageApi.StorageVO>();
|
||||||
const deleteStorage = async() =>{
|
const deleteStorage = async() =>{
|
||||||
await StorageApi.updateStorage(deleteData.value)
|
await StorageApi.updateStorage(deleteData.value)
|
||||||
deleteData.value.cancel = useUserStore().getUser.id
|
deleteData.value.cancel = useUserStore().getUser.id
|
||||||
@ -872,7 +874,7 @@ const saveFormData = async () => {
|
|||||||
//物料信息保存
|
//物料信息保存
|
||||||
formData.value.matItemDOList.forEach((item) => {
|
formData.value.matItemDOList.forEach((item) => {
|
||||||
item.stockId = formData.value.id
|
item.stockId = formData.value.id
|
||||||
item.whId = formData.value.whId
|
item.whId = formData.value.whId
|
||||||
})
|
})
|
||||||
const dataMats = formData.value.matItemDOList as unknown as StorageMatApi.StorageMatVO[]
|
const dataMats = formData.value.matItemDOList as unknown as StorageMatApi.StorageMatVO[]
|
||||||
await StorageMatApi.createStorageMatBatch(dataMats, formData.value.id)
|
await StorageMatApi.createStorageMatBatch(dataMats, formData.value.id)
|
||||||
@ -1218,7 +1220,7 @@ onMounted(async () => {
|
|||||||
matEditList.value = matSimpVirtualList.value
|
matEditList.value = matSimpVirtualList.value
|
||||||
}
|
}
|
||||||
console.log(formData.value)
|
console.log(formData.value)
|
||||||
// 页面控件可视初始化
|
// 页面控件可视初始化
|
||||||
await initStatus(formData.value.status)
|
await initStatus(formData.value.status)
|
||||||
|
|
||||||
// 获得库区列表
|
// 获得库区列表
|
||||||
|
@ -223,6 +223,7 @@ v-for="dict in scope.row.pnlist" :key="dict.id" :label="dict.pn_name"
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="price" label="库存单价" min-width="120" align="center" />
|
||||||
<el-table-column prop="lotNo" min-width="120" label="批次号" align="center" v-if="false" />
|
<el-table-column prop="lotNo" min-width="120" label="批次号" align="center" v-if="false" />
|
||||||
<el-table-column prop="projectSubName" label="子项目名称" align="center" min-width="180">
|
<el-table-column prop="projectSubName" label="子项目名称" align="center" min-width="180">
|
||||||
|
|
||||||
@ -361,7 +362,7 @@ link type="primary" size="small" :disabled="ctrView || ctrDelete"
|
|||||||
<el-button @click="submitForm" type="success" v-if="btnSave" size="large">保
|
<el-button @click="submitForm" type="success" v-if="btnSave" size="large">保
|
||||||
存</el-button>
|
存</el-button>
|
||||||
<el-button @click="handleStatus(2)" type="primary" v-if="btnSave" size="large">提
|
<el-button @click="handleStatus(2)" type="primary" v-if="btnSave" size="large">提
|
||||||
|
|
||||||
交</el-button>
|
交</el-button>
|
||||||
<el-button @click="handleStatus(4)" type="success" v-if="btnok " size="large">审核</el-button>
|
<el-button @click="handleStatus(4)" type="success" v-if="btnok " size="large">审核</el-button>
|
||||||
<el-button @click="handleStatus(3)" type="danger" v-if="btnCancel " size="large">作
|
<el-button @click="handleStatus(3)" type="danger" v-if="btnCancel " size="large">作
|
||||||
@ -563,7 +564,7 @@ const handleStockType = async (typeid) => {
|
|||||||
enableHeadNo.value = true
|
enableHeadNo.value = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const deleteData = ref<StorageApi.StorageVO>();
|
const deleteData = ref<StorageApi.StorageVO>();
|
||||||
const deleteStorage = async() =>{
|
const deleteStorage = async() =>{
|
||||||
await StorageApi.updateStorage(deleteData.value)
|
await StorageApi.updateStorage(deleteData.value)
|
||||||
deleteData.value.cancel = useUserStore().getUser.id
|
deleteData.value.cancel = useUserStore().getUser.id
|
||||||
|
Loading…
Reference in New Issue
Block a user