添加原料临期设置

This commit is contained in:
zzyuan 2025-08-22 14:10:58 +08:00
parent 6757122d6e
commit 344e14a041
3 changed files with 32 additions and 7 deletions

View File

@ -99,6 +99,16 @@
/>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item label="临期天数" prop="shelfLifeDays">
<el-input v-model="form.shelfLifeDays"
placeholder="请输入临期天数"
maxlength="6" @input="(v)=>(form.shelfLifeDays=v.replace(/[^\d]/g,''))"
><template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="营养信息类别" prop="nutritionTypeId">
<el-cascader
@ -243,10 +253,11 @@ export default {
materialName: '',//
areaId: null,//
materialTypeId: null,//
salesMode: '1',//
salesMode: '2',//
unitId: '',//
unitPrice: '',//()
unitPrice: '0',//()
barCode: '',//
shelfLifeDays:0,//
nutritionTypeId:null,//
nutritionId:null,//
//
@ -291,6 +302,7 @@ export default {
areaId: [{ required: true, message: '请选择所属区域', trigger: 'change' }],
materialTypeId: [{ required: true, message: '请选择原料类别', trigger: 'change' }],
salesMode: [{ required: true, message: '请选择计量类型', trigger: 'change' }],
shelfLifeDays: [{ required: true, message: '请输入临期天数', trigger: 'change' }],
nutritionTypeId: [{ required: true, message: '请选择营养信息类别', trigger: 'change' }],
nutritionId: [{ required: true, message: '请选择营养信息', trigger: 'change' }],
},
@ -514,6 +526,7 @@ export default {
this.$set(this.form,"salePrice",Number((row.salePrice/100).toFixed(2)))
this.$set(this.form,"unitPrice",Number((row.unitPrice/100).toFixed(2)))
this.$set(this.form,"barCode",row.barCode)
this.$set(this.form,"shelfLifeDays",row.shelfLifeDays)
if(row.nutritionTypeId){
this.$set(this.form,"nutritionTypeId",Number(row.nutritionTypeId))
this.nutritionAllList(this.form.nutritionTypeId)
@ -566,10 +579,11 @@ export default {
materialName: '',//
areaId: null,//
materialTypeId: null,//
salesMode: '1',//
salesMode: '2',//
unitId: '',//
unitPrice: '',//()
unitPrice: '0',//()
barCode: '',//
shelfLifeDays:0,
nutritionType:null,//
nutritionId:null,//
//

View File

@ -26,6 +26,13 @@
<el-form-item label="批次号" prop="intoCode">
<el-input v-model="queryParams.intoCode" placeholder="请输入批次号" maxlength="30" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="过期状态" prop="expireState">
<el-select v-model="queryParams.expireState" placeholder="请选择过期状态" style="width: 240px;">
<el-option label="过期" :value="1"></el-option>
<el-option label="保质期内" :value="2"></el-option>
<el-option label="临期" :value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -63,6 +70,7 @@
<template slot-scope="scope">
<span v-if="scope.row.expireState==1">过期</span>
<span v-if="scope.row.expireState==2">保质期内</span>
<span v-if="scope.row.expireState==3">临期</span>
</template>
</el-table-column>
<el-table-column label="剩余天数" align="center" prop="expireDay" :show-overflow-tooltip="true" width="120"/>
@ -201,6 +209,7 @@ export default {
"warehouseId": this.queryParams.warehouseId,
"materialName": this.queryParams.materialName,
"intoCode": this.queryParams.intoCode,
"expireState": this.queryParams.expireState,
}
stockExpireWarningPageApi(param).then(response => {
this.tableListData = response.rows;

View File

@ -804,7 +804,7 @@ export default {
deptId:225
}
listUserAll(param).then((response) => {
this.supplierUserList = response.rows
this.supplierUserList = response.rows;
// this.total = response.total
})
},
@ -902,8 +902,9 @@ export default {
this.form.categoryModelList.forEach(item=>{
arr.push(item.categoryId)
})
this.$set(this.form,"categoryIdList",arr)
this.$set(this.form,"supplierUserId",Number(row.supplierUserId))
this.$set(this.form,"categoryIdList",arr)
this.$set(this.form,"supplierUserId",Number(row.supplierUserId))
this.open = true;
this.title = "修改";
},
@ -914,6 +915,7 @@ export default {
},
//
reset() {
this.getSupplierUserList()
this.activeName='baseInfo'
this.fileList1=[]
this.idCardImgZ=[]