新增物料,新增即入即出字段

This commit is contained in:
zxy 2026-01-15 16:37:30 +08:00
parent 4f0b5cca6a
commit 3e04b66e05
4 changed files with 37 additions and 17 deletions

View File

@ -110,4 +110,8 @@ public class StorageRespVO {
@Schema(description = "上游单号id")
private Long headerId;
}
@Schema(description = "即入即出标志")
@ExcelProperty("即入即出标志 1 是0不是")
private Boolean inOutFlag;
}

View File

@ -85,4 +85,6 @@ public class StorageSaveReqVO {
private Long pnId;
private List<StorageMatSaveReqVO> matItemDOList;
private Boolean inOutFlag;
}

View File

@ -13,6 +13,7 @@ import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
import org.apache.ibatis.type.JdbcType;
/**
* /出库 DO
@ -115,6 +116,10 @@ public class StorageDO extends BaseDO {
private Integer pickmode;
private Integer pickcar;
private Integer projectNo;
@TableField(jdbcType = JdbcType.BOOLEAN)
private Boolean inOutFlag;
@TableField(exist = false)
private String materialCode;
@TableField(exist = false)
@ -143,4 +148,4 @@ public class StorageDO extends BaseDO {
private Long headerId;
@TableField(exist = false)
private String type;
}
}

View File

@ -92,11 +92,16 @@ v-model="formData.whId" placeholder="下拉选择" clearable class="!w-400px" @c
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-col :span="8">
<el-form-item label="即入即出" prop="inOutFlag">
<el-switch v-model="formData.inOutFlag" :disabled="ctrView || ctrSave" />
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="备注" prop="description">
<el-input
type="textarea" v-model="formData.description" show-word-limit maxlength="200"
:disabled="ctrView || ctrSave" />
type="textarea" v-model="formData.description" show-word-limit maxlength="200"
:disabled="ctrView || ctrSave"/>
</el-form-item>
</el-col>
</el-row>
@ -111,10 +116,9 @@ type="textarea" v-model="formData.description" show-word-limit maxlength="200"
<el-col>
<el-card class="hl-incard">
<el-col>
<el-button
class="hl-addbutton" type="primary" size="large" @click="openMatForm"
<el-button class="hl-addbutton" type="primary" size="large" @click="openMatForm"
:disabled="ctrView || ctrSave">新增</el-button>
</el-col>
<el-button @click="openPnForm" type="success" v-if="btnSave" size="large">新增物料</el-button></el-col>
<el-form
ref="matSubFormRef" :model="formData.matItemDOList" :rules="subFormRules"
v-loading="subFormLoading" label-width="0">
@ -309,14 +313,10 @@ link type="primary" size="small" :disabled="ctrView || ctrDelete"
<template #header>
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">系统信息</span>
<el-button @click="() => router.go(-1)" size="large" style="margin-left: 5rem"> </el-button>
<el-button @click="isPrint()" type="primary" size="large" :loading="printLoading" >打印</el-button>
<el-button @click="submitForm" type="success" v-if="btnSave" size="large">
</el-button>
<el-button @click="handleStatus(2)" type="primary" v-if="btnSave" size="large">
</el-button>
<el-button @click="handleStatus(3)" type="danger" v-if="btnCancel&&formData.status != 2" size="large">
</el-button>
<el-button @click="isPrint()" type="primary" size="large" :loading="printLoading" > </el-button>
<el-button @click="submitForm" type="success" v-if="btnSave" size="large"> </el-button>
<el-button @click="handleStatus(2)" type="primary" v-if="btnSave" size="large"> </el-button>
<el-button @click="handleStatus(3)" type="danger" v-if="btnCancel&&formData.status != 2" size="large"> </el-button>
</template>
<el-row justify="center">
@ -367,6 +367,8 @@ link type="primary" size="small" :disabled="ctrView || ctrDelete"
<!-- 表单弹窗物料列表 -->
<projects ref="proOpenFormRef" @success="getProject" />
<purchaseorderDialog ref="projectPurchaseorderDialog" @success="handleSelectedProjectPurchaseorder" />
<!-- 表单弹窗新增物料 -->
<MaterialForm ref="materialOpenFormRef" @success="getList" />
<el-dialog v-model="printDialogVisible" width="80%" title="入库单打印" :close-on-click-modal="false">
<div id="printArea" class="print-content">
<div class="print-header">
@ -486,6 +488,7 @@ import materials1 from './materialsin1.vue'
import projects from './subproject.vue'
import {Search} from "@element-plus/icons-vue";
import purchaseorderDialog from '@/views/heli/outsourcestock/purchaseorderDialog.vue'
import MaterialForm from '@/views/heli/material/MaterialForm.vue'
import * as StorageinApi from "@/api/heli/storagein";
import * as storageInventoryApi from "@/api/heli/storageinventory";
@ -518,6 +521,7 @@ const formData = ref({
matItemDOList: [],
attachments: [],
headerId:undefined,
inOutFlag: true,
})
const formRules = reactive({
// name: [{ required: true, message: '', trigger: 'blur' }],
@ -544,8 +548,9 @@ const queryParams = reactive({
whId: undefined,
})
const matOpenFormRef = ref()
const proOpenFormRef = ref()
const matOpenFormRef1 = ref()
const proOpenFormRef = ref()
const materialOpenFormRef = ref()
const openMatForm = () => {
// if (formData.value.whId == undefined || formData.value.whId == '') {
@ -560,6 +565,10 @@ const openMatForm = () => {
matOpenFormRef.value.open(formData.value.whId,'in')
}
}
const openPnForm = () => {
materialOpenFormRef.value.open("create")
}
// const isPrint = async () => {
// var newVar = await StorageApi.isPrint(query.id);
// console.log(newVar)