| | |
| | | |
| | | // 定义表头上传数据 |
| | | let titleUploadData = ref({ |
| | | id:'', |
| | | materialCode:'', |
| | | producer:'', |
| | | dateOfManufacture:'', |
| | | qualityGuaranteePeriod:'', |
| | | inventoryOrganization:'', |
| | | inventoryArea:'', |
| | | inventoryQuantity:'', |
| | | availableQuantity:'', |
| | | remarks:'' |
| | | }) |
| | | |
| | |
| | | |
| | | //列查询 |
| | | 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=[] |
| | |
| | | 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() |
| | | |
| | |
| | | } |
| | | |
| | | const update = () => { |
| | | gridOption.toolbarConfig.buttons[0].disabled = true |
| | | let flowData = ref({ |
| | | title: titleUploadData.value, |
| | | materialInventoryId: props.data.id, |
| | |
| | | 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 |
| | | }) |
| | | } |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | |
| | | 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')) |
| | |
| | | }else { |
| | | ElMessage.warning(t('basicData.msg.ServerConnectionError')) |
| | | } |
| | | }).finally(()=>{ |
| | | gridOption.toolbarConfig.buttons[0].disabled = false |
| | | }) |
| | | } |
| | | |
| | |
| | | }) |
| | | |
| | | onMounted(async ()=>{ |
| | | await select() |
| | | |
| | | if(props.data!=null){ |
| | | titleUploadData.value.dateOfManufacture=props.data.dateOfManufacture |
| | | titleUploadData.value.qualityGuaranteePeriod=props.data.qualityGuaranteePeriod |
| | |
| | | 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() |
| | | } |
| | | |
| | |
| | | <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> |
| | |
| | | </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" |