From b85a6fbf48fb3ce159e266db4bb760041b1514d9 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期二, 18 十一月 2025 15:06:25 +0800
Subject: [PATCH] 补交
---
north-glass-erp/northglass-erp/src/views/mm/ingredientStock/MaterialAddition.vue | 30 ++++++++++++++++++++++--------
1 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/MaterialAddition.vue b/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/MaterialAddition.vue
index 178ff8a..5b4eba3 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/MaterialAddition.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/ingredientStock/MaterialAddition.vue
@@ -55,12 +55,15 @@
// 瀹氫箟琛ㄥご涓婁紶鏁版嵁
let titleUploadData = ref({
+ id:'',
+ materialCode:'',
producer:'',
dateOfManufacture:'',
qualityGuaranteePeriod:'',
inventoryOrganization:'',
inventoryArea:'',
inventoryQuantity:'',
+ availableQuantity:'',
remarks:''
})
@@ -121,7 +124,7 @@
//鍒楁煡璇�
const getStoreWork = () => {
- value.value=t('ingredients.originalFilm')
+ filterDatas.value.type=value.value
request.get(`/BasicWarehouse/BasicWarehouseType/${value.value}`).then((res) => {
if(res.code==200){
gridOption.columns=[]
@@ -139,11 +142,11 @@
gridOption.columns.push(column)
}
- if(value.value==t('ingredients.accessories')){
+ /*if(value.value==t('ingredients.accessories')){
titleUploadData.value.inventoryOrganization=titleSelectJson.value.inventoryOrganization[1].operateTypeName
}else{
titleUploadData.value.inventoryOrganization=titleSelectJson.value.inventoryOrganization[0].operateTypeName
- }
+ }*/
getStoreWorks()
@@ -177,6 +180,7 @@
}
const update = () => {
+ gridOption.toolbarConfig.buttons[0].disabled = true
let flowData = ref({
title: titleUploadData.value,
materialInventoryId: props.data.id,
@@ -190,10 +194,12 @@
ElMessage.success(t('basicData.msg.saveSuccess'))
router.push({path: '/main/ingredientsStock/SelectIngredientsStock', query:{random:Math.random()}})
}else if(res.data==="false1") {
- ElMessage.warning("搴撳瓨瀛樺湪澶氭潯")
+ ElMessage.warning(t('ingredientsStock.msg1'))
}else {
ElMessage.warning(t('basicData.msg.ServerConnectionError'))
}
+ }).finally(()=>{
+ gridOption.toolbarConfig.buttons[0].disabled = false
})
}
@@ -258,7 +264,7 @@
})
}
-
+ gridOption.toolbarConfig.buttons[0].disabled = true
request.post("/materialInventory/saveMaterialInventory", flowData.value).then((res) => {
if(res.code==200 && res.data==="true"){
ElMessage.success(t('basicData.msg.saveSuccess'))
@@ -266,6 +272,8 @@
}else {
ElMessage.warning(t('basicData.msg.ServerConnectionError'))
}
+ }).finally(()=>{
+ gridOption.toolbarConfig.buttons[0].disabled = false
})
}
@@ -287,7 +295,7 @@
})
onMounted(async ()=>{
- await select()
+
if(props.data!=null){
titleUploadData.value.dateOfManufacture=props.data.dateOfManufacture
titleUploadData.value.qualityGuaranteePeriod=props.data.qualityGuaranteePeriod
@@ -295,9 +303,15 @@
titleUploadData.value.inventoryArea=props.data.inventoryArea
titleUploadData.value.inventoryQuantity=props.data.inventoryQuantity
titleUploadData.value.remarks=props.data.remarks
+ titleUploadData.value.materialCode=props.data.materialCode
+ titleUploadData.value.id=props.data.id
+ titleUploadData.value.availableQuantity=props.data.availableQuantity
+ titleUploadData.value.inventoryOrganization=props.data.inventoryOrganization
isDisabled=true
}else{
+ await select()
isDisabled=false
+ value.value=t('ingredients.originalFilm')
getStoreWork()
}
@@ -326,7 +340,7 @@
<el-col :span="2"><el-text>{{$t('ingredientsStock.qualityGuaranteePeriod')}}:</el-text></el-col>
<el-col :span="3"><el-input v-model="titleUploadData.qualityGuaranteePeriod" /></el-col>
<el-col :span="1"><el-text>{{$t('ingredientsStock.producer')}}:</el-text></el-col>
- <el-col :span="3"><el-input v-model="titleUploadData.producer" /></el-col>
+ <el-col :span="3"><el-input v-model.trim="titleUploadData.producer" /></el-col>
</el-row>
<el-row>
@@ -363,7 +377,7 @@
</el-row>
</div>
<div class="main-div-customers" style="height: 350px">
- <el-button v-if="props.type===2" @click="update">{{$t('basicData.save')}}</el-button>
+ <el-button v-if="props.type===2" type="primary" @click="update">{{$t('basicData.save')}}</el-button>
<vxe-grid
height="100%"
class="mytable-scrollbar"
--
Gitblit v1.8.0