| | |
| | | if(res.code==200){ |
| | | |
| | | titleSelectJson.value=deepClone(res.data) |
| | | console.log(titleSelectJson.value) |
| | | const today = new Date |
| | | today.setTime(today.getTime() + (15 * 24 * 60 * 60 * 1000)) |
| | | titleUploadData.value.materialRequisitionDate = today.getFullYear() + |
| | |
| | | if(type==='库存'){ |
| | | filterData.value.stockId=id |
| | | number.value=id |
| | | console.log(filterData.value) |
| | | request.post("/MaterialInventory/getSelectMaterialInventory/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | |
| | | console.log(res.data.data) |
| | | titleUploadData.value.warehouseManager=userStore.user.userName |
| | | titleUploadData.value.outboundType = titleSelectJson.value.outboundType[0].operateTypeName |
| | | materialStore.value=[] |
| | |
| | | }) |
| | | }else{ |
| | | optimizeUse.value.rawStockCode=id |
| | | console.log(optimizeUse.value) |
| | | number.value=id |
| | | request.post("/MaterialInventory/getSelectMaterialInventoryEngineering/1/100",optimizeUse.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | |
| | | console.log(res.data.data) |
| | | titleUploadData.value.warehouseManager=userStore.user.userName |
| | | titleUploadData.value.outboundType = titleSelectJson.value.outboundType[0].operateTypeName |
| | | materialStore.value=[] |
| | |
| | | if (typeof str != 'undefined' && str != null && str !== '' && str !== '\n' && str !== '\r'){ |
| | | |
| | | filterData.value.materialOutboundId=str |
| | | console.log(filterData.value) |
| | | //第一次调用 |
| | | request.post("/MaterialInventory/getSelectMaterialOutbound/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | titleUploadData.value=deepClone(res.data.materialOutbound) |
| | | //根据审核状态显示审核按钮或者是反审按钮 |
| | | console.log(res.data.data) |
| | | if(titleUploadData.value.reviewedState!==0){ |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | |
| | | switch (code) { |
| | | case 'add': { |
| | | const selectRecords = $grid.getCheckboxRecords() |
| | | console.log(selectRecords) |
| | | if (selectRecords.length === 0) { |
| | | ElMessage.warning(t('productStock.unselectedData')) |
| | | return |
| | |
| | | materialOutboundId: route.query.materialOutboundId |
| | | |
| | | }) |
| | | console.log(flowData) |
| | | request.post("/MaterialInventory/saveMaterialOutbound", flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | ElMessage.success('保存成功') |
| | |
| | | type: 1 |
| | | |
| | | }) |
| | | console.log(flowData.value) |
| | | request.post("/MaterialInventory/updateMaterialOutboundToExamine", flowData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success(t('basicData.msg.ReviewSuccess')) |