chenlu
2024-02-22 687bbdb88ff3766744a0b3b7e6a1ec90a3e1fee2
Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

# Conflicts:
# north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
# north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
# north-glass-erp/target/classes/mapper/pp/FolwCard.xml
2个文件已修改
193 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue 145 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue
@@ -99,7 +99,7 @@
request.post(`/processCard/selectNoCard/${orderId}/${productionId}`, filterData.value).then((res) => {
  if (res.code == 200) {
    console.log(res.data.data)
    //console.log(res.data)
    pageTotal.value = res.data.total
    produceList = produceList.value.concat(deepClone(res.data.data))
    xGrid.value.reloadData(produceList)
@@ -183,24 +183,24 @@
  },//表头参数
  columns:[
    {type: 'checkbox', fixed: "left", title: '选择'},
    {field: 'orderDetail.orderNumber', title: '订序',filters:[{ data: '' }],slots: { filter: 'num1_filter' } },
    {field: 'orderDetail.shape',  title: '形状', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.width', title: '宽', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.height', title: '高',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.quantity', title: '数量', showOverflow:"ellipsis"},
    {field: 'orderDetail.computeGrossArea', title: '面积'},
    {field: 'product.totalThickness', title: '总厚度'},
    {field: 'product.thickness', title: '玻璃厚度'},
    {field: 'orderDetail.weight', title: '重量'}
    {field: 'orderNumber', title: '订序',filters:[{ data: '' }],slots: { filter: 'num1_filter' } },
    {field: 'shape',  title: '形状', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'width', title: '宽', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'height', title: '高',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'baiscQuantity', title: '数量', showOverflow:"ellipsis"},
    {field: 'computeGrossArea', title: '面积'},
    {field: 'totalThickness', title: '总厚度'},
    {field: 'thickness', title: '玻璃厚度'},
    {field: 'weight', title: '重量'}
  ],//表头按钮
  toolbarConfig: {
    // buttons: [{
    //
    // }],
    import: false,
    export: true,
    print: true,
    // import: false,
    // export: true,
    // print: true,
    zoom: true,
    custom: true
  },
@@ -258,14 +258,14 @@
  },//表头参数
  columns:[
    {type: 'checkbox', fixed: "left", title: '选择'},
    {field: 'orderDetail.orderNumber', title: '流程卡号',filters:[{ data: '' }],slots: { filter: 'num1_filter' },width:130 },
    {field: 'orderDetail.shape',  title: '订序', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.width', title: '落架顺序', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.height', title: '形状',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.quantity', title: '长边', showOverflow:"ellipsis"},
    {field: 'orderDetail.computeGrossArea', title: '短边'},
    {field: 'product.totalThickness', title: '总数量'},
    {field: 'product.totalThickness', title: '总厚度'},
    {field: 'processId', title: '流程卡号',filters:[{ data: '' }],slots: { filter: 'num1_filter' },width:130 },
    {field: 'orderNumber',  title: '订序', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'landingSequence', title: '落架顺序', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'shape', title: '形状',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'width', title: '宽', showOverflow:"ellipsis"},
    {field: 'height', title: '高'},
    {field: 'quantity', title: '总数量'},
    {field: 'totalThickness', title: '总厚度'},
  ],//表头按钮
  toolbarConfig: {
@@ -298,7 +298,102 @@
  }
})
//创建流程卡
const createProcessCard = () => {
  const $grid = xGrid.value
  const checkedList = $grid.getCheckboxRecords()
  if(checkedList.length===0){
    ElMessage.warning("请先选择右侧数据")
    return
  }
  //productionId
  const $gridLeft = xGridLeft.value
  const leftData = $gridLeft.getTableData().fullData
  let index = 1
  if(leftData.length!==0){
    index =  leftData[0].landingSequence + 1
    //index = index.toString().padStart(2, '0')
  }
  const processId = productionId + index.toString().padStart(2, '0')
  checkedList.forEach((item) => {
    item.processId = processId
    item.landingSequence = index
  })
  $gridLeft.insertAt(checkedList)
  $grid.remove(checkedList)
}
let checkedNum =  ref('')
//向右边表格添加数据
const addRight =   () => {
  try{
    //左边表格定义
    const $gridLeft = xGridLeft.value
    //右边表格定义
    const $grid = xGrid.value
    //获取左边表格checkbox选中的数据
    const checkedList = $gridLeft.getCheckboxRecords()
    //判断左边表格是否有选中的数据
    if(checkedList.length===0){
      ElMessage.warning("请先选择左侧数据")
      return
    }
    const  regex = /^(\d+|)$/;
    if(!regex.test(checkedNum.value)){
      ElMessage.warning("请输入正整数")
      return
    }
    //判断正整数
    if(/^[1-9]\d*$/.test(checkedNum.value)){
      //对选中的左边表格数据进行循环
      checkedList.forEach((item)=> {
        //判断可用数量是否大于等于输入的数量,不满足则抛出异常
        if(item.quantity <checkedNum.value) throw new Error("请输入小于等于可用数量的数字");
        //左边表格可用数量减去输入的数量
        item.quantity = item.quantity-checkedNum.value
        //右边表格数据
        let rightData = $grid.getTableData().fullData
        //右边表格数据中查找当前数据下标
        let filterIndex = rightData.findIndex(item1 => item1.orderNumber === item.orderNumber)
        //如果右边表格数据中存在当前数据则数量相加
        if (filterIndex>=0){
          rightData[filterIndex].baiscQuantity =rightData[filterIndex].baiscQuantity*1+ checkedNum.value*1
          //如果左边数量为0时删除此条数据
          if(item.quantity=== 0){
            $gridLeft.remove(item)
          }
        }else {
          //右边表格没有此条数据则往右边表格插入数据
          item.baiscQuantity = checkedNum.value
          $grid.insert(item)
        }
      })
    }else if(checkedNum.value===''){//判断数量输入框有无输入数字
      checkedList.forEach((item)=> {
        let rightData = $grid.getTableData().fullData
        let filterIndex = rightData.findIndex(item1 => item1.orderNumber === item.orderNumber)
        //无输入并且如果右边表格数据中存在当前数据则数量相加
        if(filterIndex>-1){
          rightData[filterIndex].baiscQuantity =rightData[filterIndex].baiscQuantity*1+ item.quantity*1
        }else{
          $grid.insert(item)
        }
        $gridLeft.remove(item)
      })
    }
  }
  catch (e){
    ElMessage.warning(e.message)
  }
}
//向左边表格添加数据
const addLeft =   () => {
}
</script>
@@ -364,14 +459,14 @@
        <el-main width="12%" style="">
          <span>未分数量:45</span><br>
          <span>未分重量:333</span><br>
          <span>选中数量:<el-input></el-input></span><br>
          <el-button type="primary"> → </el-button>
          <span>选中数量:<el-input type="number" v-model="checkedNum"></el-input></span><br>
          <el-button type="primary" @click="addRight"> → </el-button>
          <br>
          <br>
          <el-button type="primary">  ← </el-button>
          <el-button type="primary" @click="addLeft">  ← </el-button>
          <br>
          <br>
          <el-button type="primary">建立流程卡</el-button>
          <el-button @click="createProcessCard" type="primary">建立流程卡</el-button>
        </el-main>
        <el-aside width="44%" style="">
north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue
@@ -33,9 +33,19 @@
  stuffLowE:null,
  stuffPosition:null,
  stuffThickness:null,
  //夹层数据
  InterlayerType:null,
  InterlayerThickness:null,
  InterlayerColor:null
  InterlayerColor:null,
  //中空数据
  hollowGasType:null,
  hollowGlueDepth:null,
  hollowThickness:null,
  hollowType:null,
  //流程
  process:null
})
let stuff = ref({
@@ -161,8 +171,8 @@
        <h5>工艺属性</h5>
        <el-checkbox
            v-model="processChecked"
            v-for="item in processList"
            :label="item"
            v-for="item in BasicData.process"
            :label="item.basicName"
            class="glass-process-checkbox"
             size="small" />
      </div>
@@ -172,19 +182,43 @@
          <el-select
              size="small"
              style="width: 100px"
              clearable placeholder="*中空厚度:" />
              clearable placeholder="*中空厚度:" >
            <el-option v-for="item in BasicData.hollowThickness"
                       :key="item.id"
                       :label="item.basicName"
                       :value="item.basicName"
            />
          </el-select>
          <el-select
              size="small"
              style="width: 100px"
              clearable placeholder="*充气方式:" />
              clearable placeholder="*充气方式:" >
            <el-option v-for="item in BasicData.hollowGasType"
                       :key="item.id"
                       :label="item.basicName"
                       :value="item.basicName"
            />
          </el-select>
          <el-select
              size="small"
              style="width: 100px"
              clearable placeholder="*封胶:" />
              clearable placeholder="*封胶:" >
            <el-option v-for="item in BasicData.hollowType"
                       :key="item.id"
                       :label="item.basicName"
                       :value="item.basicName"
            />
          </el-select>
          <el-select
              size="small"
              style="width: 100px"
              clearable placeholder="*默认胶深:" />
              clearable placeholder="*默认胶深:" >
            <el-option v-for="item in BasicData.hollowGlueDepth"
                       :key="item.id"
                       :label="item.basicName"
                       :value="item.basicName"
            />
          </el-select>
          <el-button
              size="small"
              type="primary"