| | |
| | | |
| | | //列查询 |
| | | 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.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() |
| | | } |
| | | |