chenlu
2024-03-01 7bab8baa3279a76a594a8f47fc09b2d39cd3d682
生产基础数据修改
3个文件已修改
135 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue 107 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/ReportingWork.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue
@@ -12,6 +12,7 @@
import BasicTable from '@/components/basic/BasicTable.vue'
import {VXETable} from "vxe-table";
import useUserInfoStore from "@/stores/userInfo";
let router = useRouter()
const userStore = useUserInfoStore()
const username = userStore.user.userName
@@ -72,7 +73,6 @@
  date1: '',
  orderId:''
})
//表尾求和
@@ -142,6 +142,9 @@
    produceList = produceList.value.concat(deepClone(res.data.data))
    xGrid.value.reloadData(produceList)
    gridOptions.loading = false
    //禁用删除、保存按钮
    gridOptions.toolbarConfig.buttons[0].disabled = true
    gridOptions.toolbarConfig.buttons[1].disabled = true
  } else {
    ElMessage.warning(res.msg)
  }
@@ -166,50 +169,60 @@
        pageTotal.value = res.data.total
        xGrid.value.loadData(res.data.data)
        gridOptions.loading = false
        //禁用删除、保存按钮
        gridOptions.toolbarConfig.buttons[0].disabled = true
        gridOptions.toolbarConfig.buttons[1].disabled = true
      } else {
        ElMessage.warning(res.msg)
      }
    })
  }
  else if(inputVal!=null && selectState==1){
  } else if (inputVal != null && selectState == 1) {
    //根据订单号查询未排产数据
    request.post(`/productionScheduling/selectScheduling/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => {
      if (res.code == 200) {
        pageTotal.value = res.data.total
        xGrid.value.loadData(res.data.data)
        gridOptions.loading = false
        //禁用删除、保存按钮
        gridOptions.toolbarConfig.buttons[0].disabled = true
        gridOptions.toolbarConfig.buttons[1].disabled = true
      } else {
        ElMessage.warning(res.msg)
      }
    })
  }
  else  if(inputVal== null && selectState==2){
  } else if (inputVal == null && selectState == 2) {
    //根据时间查询已排产数据
    request.post(`/productionScheduling/selectScheduling/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => {
      if (res.code == 200) {
        pageTotal.value = res.data.total
        xGrid.value.loadData(res.data.data)
        gridOptions.loading = false
        //启用删除、保存按钮
        gridOptions.toolbarConfig.buttons[0].disabled = false
        gridOptions.toolbarConfig.buttons[1].disabled = false
        //禁用保存
        gridOptions.toolbarConfig.buttons[2].disabled = true
      } else {
        ElMessage.warning(res.msg)
      }
    })
  }
  else  if(inputVal!= null && selectState==2){
  } else if (inputVal != null && selectState == 2) {
    //根据订单号查询已排产数据
    request.post(`/productionScheduling/selectSchedulingNot/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => {
      if (res.code == 200) {
        pageTotal.value = res.data.total
        xGrid.value.loadData(res.data.data)
        gridOptions.loading = false
        //启用删除、保存按钮
        gridOptions.toolbarConfig.buttons[0].disabled = false
        gridOptions.toolbarConfig.buttons[1].disabled = false
        //禁用保存
        gridOptions.toolbarConfig.buttons[2].disabled = true
      } else {
        ElMessage.warning(res.msg)
      }
    })
  }
}
@@ -249,8 +262,18 @@
    {type:'expand',fixed:"left",slots: { content:'content' },width: 50},
    { type: 'checkbox',fixed:"left", title: '选择', width: 80 },
    { type: 'seq',fixed:"left", title: '自序', width: 50 },
    {field: 'scheduled_start_time' , width: 120,editRender: { name: 'input', attrs: { placeholder: '',type:'date' } }, title: '计划开始时间'},
    {field: 'plan_end_time' , width: 120,editRender: { name: 'input', attrs: { placeholder: '',type:'date' } }, title: '计划结束时间'},
    {
      field: 'scheduled_start_time',
      width: 120,
      editRender: {name: 'input', attrs: {placeholder: '', type: 'date'}},
      title: '计划开始时间'
    },
    {
      field: 'plan_end_time',
      width: 120,
      editRender: {name: 'input', attrs: {placeholder: '', type: 'date'}},
      title: '计划结束时间'
    },
    // {field: '排产编号', title: '排产编号',  width: 120 },
    {field: 'order_id', title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' },  width: 100 },
    {field: 'customer_name', title: '客户名称',  width: 110,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
@@ -261,7 +284,13 @@
    {field: 'height', title: '高',  width: 60},
    {field: 'quantity', title: '订单数量',  width: 70},
    {field: 'area', title: '订单面积',  width: 90},
    {field: 'scheduling_quantity' , width: 120,editRender: { name: 'input', attrs: { placeholder: '' } }, title: '排产数量', sortable: true},
    {
      field: 'scheduling_quantity',
      width: 120,
      editRender: {name: 'input', attrs: {placeholder: ''}},
      title: '排产数量',
      sortable: true
    },
    {field: 'pendingProductionQuantity', title: '待排产数量',  width: 120},
    {field: 'pendingProductionArea', title: '待排产面积',  width: 120},
    {field: 'productionScheduledQuantity', title: '已排产数量',  width: 120},
@@ -285,9 +314,7 @@
    zoom: true,
    custom: true
  },
  data:  [
  ],//table body实际数据
  data: [],//table body实际数据
  //脚部求和
  footerMethod ({ columns, data }) {//页脚函数
    let footList=['数量','面积','排产数量','已排产数量','已排产面积','未排产数量','未排产面积']
@@ -317,7 +344,7 @@
          if ($table) {
            const selectRecords = $table.getCheckboxRecords()
            if (selectRecords.length==0){
              ElMessage.success("请勾选排产数据")
              ElMessage.warning("请勾选排产数据")
              return;
            }
            for (let i = 0; i < selectRecords.length; i++){
@@ -326,13 +353,13 @@
              let number=selectRecords[i].scheduling_quantity
              //计划开始、结束时间,排产数量不能为空
              if (start==null || end==null || number==null){
                ElMessage.success("请填入对应的值再进行保存")
                ElMessage.warning("请填入对应的值再进行保存")
                return;
              }
            }
            let selectProcesses=value.value
            if (selectProcesses==null || selectProcesses==""){
              ElMessage.success("请选择排产工序")
              ElMessage.warning("请选择排产工序")
              return;
            }
@@ -364,6 +391,22 @@
}
const determineNum = () => {
  const $grid = xGrid.value
  const table = $grid.getTableData().fullData
  const selectRecords = $grid.getCheckboxRecords()
  console.log(selectRecords)
  table.forEach((selectRecords) => {
    if (selectRecords.scheduling_quantity > selectRecords.pendingProductionQuantity) {
      ElMessage.warning("排产数量不能大于待排产数量")
      //禁用保存按钮
      //gridOptions.toolbarConfig.buttons[2].disabled = true
    }
  })
}
</script>
@@ -373,16 +416,16 @@
      <el-row :gutter="0">
        <el-date-picker
            v-model="form.date1"
            type="daterange"
            format="YYYY/MM/DD"
            value-format="YYYY-MM-DD"
            start-placeholder="开始时间"
            end-placeholder="结束时间"
            :default-time="defaultTime"
            end-placeholder="结束时间"
            format="YYYY/MM/DD"
            start-placeholder="开始时间"
            type="daterange"
            value-format="YYYY-MM-DD"
        />
        &nbsp;&nbsp;
        <el-input placeholder="销售单号" v-model="form.orderId" style="width: 110px"></el-input>
        <el-input v-model="form.orderId" placeholder="销售单号" style="width: 110px"></el-input>
        &nbsp;
        <el-select v-model="value" class="m-2" placeholder="工序" style="width: 90px;">
          <el-option
@@ -403,20 +446,21 @@
        </el-select>
        &nbsp;&nbsp;
        <el-button
            @click="getWorkOrder"
            id="select"
            type="primary" :icon="Search">查询
            :icon="Search"
            type="primary" @click="getWorkOrder">查询
        </el-button>
      </el-row>
    </div>
    <vxe-grid
        max-height="100%"
        @filter-change="filterChanged"
        class="mytable-scrollbar"
        ref="xGrid"
        class="mytable-scrollbar"
        max-height="100%"
        v-bind="gridOptions"
        v-on="gridEvents"
        @filter-change="filterChanged"
        @checkbox-change="determineNum"
    >
      <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
      <!--      下拉显示所有信息插槽-->
@@ -433,7 +477,7 @@
      <template #num1_filter="{ column, $panel }">
        <div>
          <div v-for="(option, index) in column.filters" :key="index">
            <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
            <input v-model="option.data" type="type" @input="changeFilterEvent($event, option, $panel)"/>
          </div>
        </div>
      </template>
@@ -448,6 +492,7 @@
  width: 99%;
  height: 100%;
}
#selectForm {
  width: 70%;
  text-align: center;
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -43,17 +43,15 @@
    </select>
    <select id="SelectWorkBasicDeviceMp">
        select *
        from basic_data_produce as a
        where a.basic_category = #{process}
          and a.basic_type = '设备'
        SELECT bdp.id,bdp.basic_type,bdp.basic_name, bd.basic_name as basic_category FROM  sd.basic_data as bd left join  `basic_data_produce` as bdp
                                                                                                                          on bd.id=bdp.basic_category
        where bd.basic_category="process" and bdp.basic_type="device" and bd.basic_name = #{process}
    </select>
    <select id="SelectWorkBasicTeamsMp">
        select *
        from basic_data_produce as a
        where a.basic_category = #{process}
          and a.basic_type = '班组'
        SELECT bdp.id,bdp.basic_type,bdp.basic_name, bd.basic_name as basic_category FROM  sd.basic_data as bd left join  `basic_data_produce` as bdp
                                                                                                                          on bd.id=bdp.basic_category
        where bd.basic_category="process" and bdp.basic_type="teamsgroups" and bd.basic_name = #{process}
    </select>
    <!--    查询流程卡工艺流程-->
north-glass-erp/target/classes/mapper/pp/ReportingWork.xml
@@ -43,17 +43,15 @@
    </select>
    <select id="SelectWorkBasicDeviceMp">
        select *
        from basic_data_produce as a
        where a.basic_category = #{process}
          and a.basic_type = '设备'
        SELECT bdp.id,bdp.basic_type,bdp.basic_name, bd.basic_name as basic_category FROM  sd.basic_data as bd left join  `basic_data_produce` as bdp
                                                                                                                          on bd.id=bdp.basic_category
        where bd.basic_category="process" and bdp.basic_type="device" and bd.basic_name = #{process}
    </select>
    <select id="SelectWorkBasicTeamsMp">
        select *
        from basic_data_produce as a
        where a.basic_category = #{process}
          and a.basic_type = '班组'
        SELECT bdp.id,bdp.basic_type,bdp.basic_name, bd.basic_name as basic_category FROM  sd.basic_data as bd left join  `basic_data_produce` as bdp
                                                                                                                          on bd.id=bdp.basic_category
        where bd.basic_category="process" and bdp.basic_type="teamsgroups" and bd.basic_name = #{process}
    </select>
    <!--    查询流程卡工艺流程-->