Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
| | |
| | | type:value.value, |
| | | json:productName |
| | | } |
| | | console.log(materialStore) |
| | | if(isBool){ |
| | | request.post("/MaterialStore/saveMaterialStore", materialStore).then((res) => { |
| | | if(res.code==200){ |
| | |
| | | request.get(`/BasicWarehouse/BasicWarehouseType/${value.value}`).then((res) => { |
| | | if(res.code==200){ |
| | | gridOptions.columns.splice(0,gridOptions.columns.length) |
| | | console.log(res.data) |
| | | BasicData.value = res.data |
| | | //添加列 |
| | | gridOptions.columns=arr.slice() |
| | |
| | | |
| | | //数据绑定 |
| | | const getWorks = () => { |
| | | console.log(filterData.value) |
| | | request.post(`/MaterialStore/getSelectMaterialStore/1/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | materialStore.value=[] |
| | | for (let i=0;i<res.data.data.length;i++){ |
| | | materialStore.value[i]= JSON.parse(res.data.data[i].json) |
| | |
| | | |
| | | //分页查询 |
| | | const getWorkPaging = () => { |
| | | console.log(filterData.value) |
| | | request.post(`/MaterialStore/getSelectMaterialStore/${pageNum.value}/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data.data) |
| | | materialStore.value=[] |
| | | for (let i=0;i<res.data.data.length;i++){ |
| | | materialStore.value[i]= JSON.parse(res.data.data[i].json) |
| | |
| | | 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')) |
| | |
| | | request.post(`/MaterialInventory/getSelectMaterialOutboundDate/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageNum.value=1 |
| | |
| | | //{field: 'safetyStock', width: '100',title: '安全库存', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'inventoryQuantity',width: '100', title: '库存数量', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'availableQuantity', width: '100',title: '可用库存', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'planQuantity', width: '100',title: '计划数量', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'totalArea',width: '100', title: '总面积', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'dateOfManufacture',width: '100', title: '生产日期', sortable: true}, |
| | | {field: 'qualityGuaranteePeriod',width: '100', title: '保质期', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | |
| | | request.post(`/MaterialInventory/getSelectMaterialInventoryDate/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | materialStore.value=[] |
| | | for (let i=0;i<res.data.data.length;i++){ |
| | | materialStore.value[i]=(res.data.data[i]) |
| | |
| | | } |
| | | |
| | | const getInventoryWorkPaging = () => { |
| | | console.log(filterData.value) |
| | | request.post(`/MaterialInventory/getSelectMaterialInventoryDate/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | materialStore.value=[] |
| | | for (let i=0;i<res.data.data.length;i++){ |
| | | materialStore.value[i]=(res.data.data[i]) |
| | |
| | | request.post(`/MaterialInventory/getSelectMaterialInventoryEngineeringDate/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | materialStore.value=[] |
| | | for (let i=0;i<res.data.data.length;i++){ |
| | | materialStore.value[i]=(res.data.data[i]) |
| | |
| | | ElMessage.warning(t('productStock.unselectedData')) |
| | | return |
| | | } |
| | | console.log(selectRecords) |
| | | let id = "" |
| | | const array = []; |
| | | if (values.value==='库存'){ |
| | |
| | | request.get(`/BasicWarehouse/BasicWarehouseType/${value.value}`).then((res) => { |
| | | if(res.code==200){ |
| | | gridOption.columns.splice(0,gridOption.columns.length) |
| | | console.log(res.data) |
| | | BasicData.value = res.data |
| | | //添加列 |
| | | gridOption.columns=arr.slice() |
| | |
| | | |
| | | //数据绑定 |
| | | const getStoreWorks = () => { |
| | | console.log(filterDatas.value) |
| | | request.post(`/MaterialStore/getSelectMaterialStore/1/${total.pageSize}`,filterDatas.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | materialStores.value=[] |
| | | for (let i=0;i<res.data.data.length;i++){ |
| | | materialStores.value[i]=JSON.parse(res.data.data[i].json) |
| | |
| | | switch (code) { |
| | | case 'add': { |
| | | const selectRecords = $grid.getRadioRecord() |
| | | console.log(selectRecords) |
| | | if (selectRecords == null) { |
| | | ElMessage.warning(t('productStock.unselectedData')) |
| | | return |
| | |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | console.log(flowData) |
| | | request.post("/MaterialInventory/saveMaterialInventory", flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | ElMessage.success('保存成功') |
| | |
| | | request.post(`/Replenish/getSelectReplenish/${pageNum}/100`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | produceList = deepClone(res.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | request.post(`/Replenish/SelectReplenish/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data.data) |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | |
| | |
| | | max-height="100%" |
| | | v-bind="gridOptions" |
| | | v-on="teamGridEvents" |
| | | @filter-change="filterChanged" |
| | | |
| | | > |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input v-model="option.data" type="type" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input v-model="option.data" type="text" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | max-height="100%" |
| | | v-bind="gridOptions" |
| | | v-on="teamGridEvents" |
| | | @filter-change="filterChanged" |
| | | > |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input v-model="option.data" type="type" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input v-model="option.data" type="text" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | class="mytable-scrollbar" |
| | | max-height="100%" |
| | | v-bind="gridOptions" |
| | | @filter-change="filterChanged" |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | loading: true, |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({ |
| | | path: '/main/processCard/AddProcessCard', |
| | | query: {orderId: row.orderId, productionId: row.orderGlassDetail.productionId} |
| | | query: {orderId: row.order_id, productionId: row.production_id} |
| | | }) |
| | | break |
| | | } |
| | |
| | | size="small" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | @filter-change="filterChanged" |
| | | @edit-closed="editClosedEvent" |
| | | |
| | | > |
| | |
| | | const getTableRow = (row, type) => { |
| | | switch (type) { |
| | | case 'edit' : { |
| | | console.log(type) |
| | | |
| | | // router.push({path: '/main/Rework/SelectRework', query: { id: row.id }}) |
| | | break |
| | |
| | | request.post(`/rework/SelectRework/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data.data) |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | |
| | |
| | | private Integer inventoryQuantity; |
| | | private Integer availableQuantity; |
| | | private Integer safetyStock; |
| | | private Integer planQuantity; |
| | | private Double totalArea; |
| | | private Double singlePieceArea; |
| | | private LocalDate dateOfManufacture; |
| | |
| | | Integer materialOutboundDetailMaximum = materialInventoryMapper.getMaterialOutboundDetailMaximum(oddNumber); |
| | | //新增材料出库明细数据 |
| | | materialInventoryMapper.insertMaterialOutboundDetail(materialOutboundDetail, oddNumber, materialOutboundDetailMaximum + 1); |
| | | if(materialOutboundDetail.getUseId()!=null){ |
| | | //修改物料库存表出库数量 |
| | | materialInventoryMapper.updateMaterialInventoryAvailableOut(materialOutboundDetail.getId(), materialOutboundDetail.getOutboundQuantity()); |
| | | /*if(materialOutboundDetail.getUseId()!=null){ |
| | | //修改优化工程表出库数量 |
| | | materialInventoryMapper.updateMaterialInventoryAvailableOptOut(materialOutboundDetail.getUseId(), materialOutboundDetail.getOutboundQuantity()); |
| | | }else{ |
| | | //修改物料库存表出库数量 |
| | | materialInventoryMapper.updateMaterialInventoryAvailableOut(materialOutboundDetail.getId(), materialOutboundDetail.getOutboundQuantity()); |
| | | } |
| | | }*/ |
| | | |
| | | |
| | | } |
| | |
| | | List<MaterialOutboundDetail> materialOutboundDetailList = materialInventoryMapper.getIsNotMaterialOutboundDetail(materialOutboundId); |
| | | if (!materialOutboundDetailList.isEmpty()) { |
| | | for (MaterialOutboundDetail materialOutboundDetail : materialOutboundDetailList) { |
| | | if(materialOutboundDetail.getUseId()==null){ |
| | | |
| | | //修改物料库存数量 |
| | | materialInventoryMapper.updateMaterialInventoryInventoryOut(materialOutboundDetail.getInventoryId(), materialOutboundDetail.getOutboundQuantity()); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | List<MaterialOutboundDetail> materialOutboundDetailList = materialInventoryMapper.getIsNotMaterialOutboundDetail(materialOutboundId); |
| | | if (!materialOutboundDetailList.isEmpty()) { |
| | | for (MaterialOutboundDetail materialOutboundDetail : materialOutboundDetailList) { |
| | | if(materialOutboundDetail.getUseId()==null){ |
| | | |
| | | //修改物料库存数量 |
| | | materialInventoryMapper.updateMaterialInventoryInventoryInt(materialOutboundDetail.getInventoryId(), materialOutboundDetail.getOutboundQuantity()); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | mi.producer, |
| | | mi.inventory_quantity AS inventoryQuantity, |
| | | mi.available_quantity AS availableQuantity, |
| | | mi.plan_quantity AS planQuantity, |
| | | mi.safety_stock AS safetyStock, |
| | | mi.total_area AS totalArea, |
| | | mi.single_piece_area singlePieceArea, |
| | |
| | | ou.id as useId, |
| | | ou.project_no as projectNo, |
| | | ou.use_count AS inventoryQuantity, |
| | | ou.not_use_count AS availableQuantity, |
| | | mi.plan_quantity AS availableQuantity, |
| | | mi.plan_quantity AS planQuantity, |
| | | mi.id, |
| | | mi.inventory_organization as inventoryOrganization, |
| | | mi.material_code AS materialCode, |
| | |
| | | mi.producer, |
| | | mi.inventory_quantity AS inventoryQuantity, |
| | | mi.available_quantity AS availableQuantity, |
| | | mi.plan_quantity AS planQuantity, |
| | | mi.safety_stock AS safetyStock, |
| | | mi.total_area AS totalArea, |
| | | mi.single_piece_area singlePieceArea, |
| | |
| | | ou.id as useId, |
| | | ou.project_no as projectNo, |
| | | ou.use_count AS inventoryQuantity, |
| | | ou.not_use_count AS availableQuantity, |
| | | mi.plan_quantity AS availableQuantity, |
| | | mi.plan_quantity AS planQuantity, |
| | | mi.id, |
| | | mi.inventory_organization as inventoryOrganization, |
| | | mi.material_code AS materialCode, |
| | |
| | | </insert> |
| | | |
| | | <update id="updateMaterialInventoryAvailableOptOut"> |
| | | update pp.optimize_use |
| | | set not_use_count=not_use_count-#{quantity} |
| | | update mm.material_inventory |
| | | set available_quantity=available_quantity-#{quantity} |
| | | where id=#{useId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryAvailableOptInt"> |
| | | update pp.optimize_use |
| | | set not_use_count=not_use_count+#{quantity} |
| | | update mm.material_inventory |
| | | set available_quantity=available_quantity+#{quantity} |
| | | where id=#{useId} |
| | | </update> |
| | | |
| | |
| | | |
| | | <update id="updateMaterialInventoryInventoryOut"> |
| | | update mm.material_inventory |
| | | set inventory_quantity=inventory_quantity-#{quantity} |
| | | set inventory_quantity=inventory_quantity-#{quantity},plan_quantity=if(plan_quantity-#{quantity}>=0,plan_quantity-#{quantity},0) |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryInventoryInt"> |
| | | update mm.material_inventory |
| | | set inventory_quantity=inventory_quantity+#{quantity} |
| | | set inventory_quantity=inventory_quantity+#{quantity},plan_quantity=plan_quantity+#{quantity} |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | |
| | | mi.producer, |
| | | mi.inventory_quantity AS inventoryQuantity, |
| | | mi.available_quantity AS availableQuantity, |
| | | mi.plan_quantity AS planQuantity, |
| | | mi.safety_stock AS safetyStock, |
| | | mi.total_area AS totalArea, |
| | | mi.single_piece_area singlePieceArea, |
| | |
| | | ou.id as useId, |
| | | ou.project_no as projectNo, |
| | | ou.use_count AS inventoryQuantity, |
| | | ou.not_use_count AS availableQuantity, |
| | | mi.plan_quantity AS availableQuantity, |
| | | mi.plan_quantity AS planQuantity, |
| | | mi.id, |
| | | mi.inventory_organization as inventoryOrganization, |
| | | mi.material_code AS materialCode, |
| | |
| | | mi.producer, |
| | | mi.inventory_quantity AS inventoryQuantity, |
| | | mi.available_quantity AS availableQuantity, |
| | | mi.plan_quantity AS planQuantity, |
| | | mi.safety_stock AS safetyStock, |
| | | mi.total_area AS totalArea, |
| | | mi.single_piece_area singlePieceArea, |
| | |
| | | ou.id as useId, |
| | | ou.project_no as projectNo, |
| | | ou.use_count AS inventoryQuantity, |
| | | ou.not_use_count AS availableQuantity, |
| | | mi.plan_quantity AS availableQuantity, |
| | | mi.plan_quantity AS planQuantity, |
| | | mi.id, |
| | | mi.inventory_organization as inventoryOrganization, |
| | | mi.material_code AS materialCode, |
| | |
| | | </insert> |
| | | |
| | | <update id="updateMaterialInventoryAvailableOptOut"> |
| | | update pp.optimize_use |
| | | set not_use_count=not_use_count-#{quantity} |
| | | update mm.material_inventory |
| | | set available_quantity=available_quantity-#{quantity} |
| | | where id=#{useId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryAvailableOptInt"> |
| | | update pp.optimize_use |
| | | set not_use_count=not_use_count+#{quantity} |
| | | update mm.material_inventory |
| | | set available_quantity=available_quantity+#{quantity} |
| | | where id=#{useId} |
| | | </update> |
| | | |
| | |
| | | |
| | | <update id="updateMaterialInventoryInventoryOut"> |
| | | update mm.material_inventory |
| | | set inventory_quantity=inventory_quantity-#{quantity} |
| | | set inventory_quantity=inventory_quantity-#{quantity},plan_quantity=if(plan_quantity-#{quantity}>=0,plan_quantity-#{quantity},0) |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryInventoryInt"> |
| | | update mm.material_inventory |
| | | set inventory_quantity=inventory_quantity+#{quantity} |
| | | set inventory_quantity=inventory_quantity+#{quantity},plan_quantity=plan_quantity+#{quantity} |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |