廖井涛
2024-04-09 0daaeb174e75859e3bf969d4e9185fc14fda977d
删除前端打印
12个文件已修改
90 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/views/mm/mainIngredient/CreateIngredients.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainIngredient/SelectIngredients.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/CreateOutBound.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/MaterialOutbound.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/SelectIngredientsStock.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/Replenish/AddReplenish.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/Replenish/SelectReplenish.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/rework/SelectRework.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/mm/MaterialInventory.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/mm/MaterialInventory.xml 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/mm/MaterialInventory.xml 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainIngredient/CreateIngredients.vue
@@ -89,7 +89,6 @@
    type:value.value,
    json:productName
  }
  console.log(materialStore)
  if(isBool){
    request.post("/MaterialStore/saveMaterialStore", materialStore).then((res) => {
      if(res.code==200){
north-glass-erp/northglass-erp/src/views/mm/mainIngredient/SelectIngredients.vue
@@ -90,7 +90,6 @@
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()
@@ -140,11 +139,9 @@
//数据绑定
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)
@@ -167,11 +164,9 @@
//分页查询
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)
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/CreateOutBound.vue
@@ -108,7 +108,6 @@
  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() +
@@ -161,12 +160,10 @@
    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=[]
@@ -192,13 +189,11 @@
      })
    }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=[]
@@ -232,14 +227,12 @@
  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
@@ -283,7 +276,6 @@
      switch (code) {
        case 'add': {
          const selectRecords = $grid.getCheckboxRecords()
          console.log(selectRecords)
          if (selectRecords.length === 0) {
            ElMessage.warning(t('productStock.unselectedData'))
            return
@@ -324,7 +316,6 @@
            materialOutboundId: route.query.materialOutboundId
          })
          console.log(flowData)
          request.post("/MaterialInventory/saveMaterialOutbound", flowData.value).then((res) => {
            if(res.code==200){
              ElMessage.success('保存成功')
@@ -343,7 +334,6 @@
            type: 1
          })
          console.log(flowData.value)
          request.post("/MaterialInventory/updateMaterialOutboundToExamine", flowData.value).then((res) => {
            if (res.code == 200) {
              ElMessage.success(t('basicData.msg.ReviewSuccess'))
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/MaterialOutbound.vue
@@ -77,7 +77,6 @@
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
north-glass-erp/northglass-erp/src/views/mm/mainIngredientStock/SelectIngredientsStock.vue
@@ -88,6 +88,7 @@
  //{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},
@@ -128,7 +129,6 @@
  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])
@@ -151,11 +151,9 @@
}
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])
@@ -189,7 +187,6 @@
    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])
@@ -327,7 +324,6 @@
            ElMessage.warning(t('productStock.unselectedData'))
            return
          }
          console.log(selectRecords)
          let id = ""
          const array = [];
          if (values.value==='库存'){
@@ -367,7 +363,6 @@
          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()
@@ -522,11 +517,9 @@
//数据绑定
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)
@@ -553,7 +546,6 @@
      switch (code) {
        case 'add': {
          const selectRecords = $grid.getRadioRecord()
          console.log(selectRecords)
          if (selectRecords == null) {
            ElMessage.warning(t('productStock.unselectedData'))
            return
@@ -594,10 +586,6 @@
          })
          console.log(flowData)
          request.post("/MaterialInventory/saveMaterialInventory", flowData.value).then((res) => {
            if(res.code==200){
              ElMessage.success('保存成功')
north-glass-erp/northglass-erp/src/views/pp/Replenish/AddReplenish.vue
@@ -33,7 +33,6 @@
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
north-glass-erp/northglass-erp/src/views/pp/Replenish/SelectReplenish.vue
@@ -57,7 +57,6 @@
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
north-glass-erp/northglass-erp/src/views/pp/rework/SelectRework.vue
@@ -34,7 +34,6 @@
const getTableRow = (row, type) => {
  switch (type) {
    case 'edit' : {
      console.log(type)
      // router.push({path: '/main/Rework/SelectRework', query: { id: row.id }})
      break
@@ -68,7 +67,6 @@
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
north-glass-erp/src/main/java/com/example/erp/entity/mm/MaterialInventory.java
@@ -23,6 +23,7 @@
    private Integer inventoryQuantity;
    private Integer availableQuantity;
    private Integer safetyStock;
    private Integer planQuantity;
    private Double totalArea;
    private Double singlePieceArea;
    private LocalDate dateOfManufacture;
north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java
@@ -83,13 +83,15 @@
                    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());
                    }
                    }*/
                }
@@ -295,10 +297,10 @@
                List<MaterialOutboundDetail> materialOutboundDetailList = materialInventoryMapper.getIsNotMaterialOutboundDetail(materialOutboundId);
                if (!materialOutboundDetailList.isEmpty()) {
                    for (MaterialOutboundDetail materialOutboundDetail : materialOutboundDetailList) {
                        if(materialOutboundDetail.getUseId()==null){
                            //修改物料库存数量
                            materialInventoryMapper.updateMaterialInventoryInventoryOut(materialOutboundDetail.getInventoryId(), materialOutboundDetail.getOutboundQuantity());
                        }
                    }
                }
@@ -307,10 +309,10 @@
                List<MaterialOutboundDetail> materialOutboundDetailList = materialInventoryMapper.getIsNotMaterialOutboundDetail(materialOutboundId);
                if (!materialOutboundDetailList.isEmpty()) {
                    for (MaterialOutboundDetail materialOutboundDetail : materialOutboundDetailList) {
                        if(materialOutboundDetail.getUseId()==null){
                            //修改物料库存数量
                            materialInventoryMapper.updateMaterialInventoryInventoryInt(materialOutboundDetail.getInventoryId(), materialOutboundDetail.getOutboundQuantity());
                        }
                    }
                }
north-glass-erp/src/main/resources/mapper/mm/MaterialInventory.xml
@@ -14,6 +14,7 @@
        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,
@@ -51,7 +52,8 @@
        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,
@@ -97,6 +99,7 @@
        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,
@@ -138,7 +141,8 @@
        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,
@@ -618,14 +622,14 @@
    </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>
@@ -643,13 +647,13 @@
    <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>
north-glass-erp/target/classes/mapper/mm/MaterialInventory.xml
@@ -14,6 +14,7 @@
        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,
@@ -51,7 +52,8 @@
        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,
@@ -97,6 +99,7 @@
        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,
@@ -138,7 +141,8 @@
        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,
@@ -618,14 +622,14 @@
    </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>
@@ -643,13 +647,13 @@
    <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>