廖井涛
2025-12-01 2bdd525d521205f0106c6008f4e8e14d7b8051f6
订单工艺属性提交
16个文件已修改
3个文件已添加
842 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet1.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet2.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/sd/order/ProcessAttribute.vue 211 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/router/index.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/basicData/BasicData.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/basicData/SearchProcessAttributeConfig.vue 252 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue 116 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/sd/BasicGlassTypeController.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/sd/OrderController.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/sd/OrderDetail.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/sd/ProcessAttributeConfig.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/sd/BasicGlassTypeMapper.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/sd/BasicGlassTypeService.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/BasicGlassTypeMapper.xml 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/OrderDetailMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet1.vue
@@ -39,6 +39,7 @@
  request.post(`/delivery/getSelectDeliveryPrinting`,form.value).then((res) => {
    if(res.code==200){
      console.log(res.data)
      produceList.value = deepClone(res.data)
      for(let i=0;i<produceList.value.length;i++){
        let produceList1= ({
@@ -146,6 +147,13 @@
}
const showSimpleOrderId = ref(true);
// 2. 切换显示状态的函数
const toggleOrderDisplay = () => {
  showSimpleOrderId.value = !showSimpleOrderId.value;
};
defineExpose({
@@ -209,7 +217,10 @@
              <tr>
                <td style="font-size: 15px;text-align: left" colspan="4">产品名称:<span>{{item.DeliveryDetail.orderDetail.productName}}</span></td>
                <td v-if="company.showDeliveryCreator" style="font-size: 15px;text-align: left" colspan="2">订货日期:<span>{{item.DeliveryDetail.order.contractId}}</span></td>
                <td style="font-size: 15px;text-align: left" colspan="3">订单编号:<span>{{item.DeliveryDetail.orderDetail.orderId}}</span></td>
                <td style="font-size: 15px;text-align: left" v-show="showSimpleOrderId"
                    @dblclick="toggleOrderDisplay" colspan="3">订单编号:<span>{{item.DeliveryDetail.orderDetail.orderId}}</span></td>
                <td style="font-size: 15px;text-align: left" v-show="!showSimpleOrderId"
                    @dblclick="toggleOrderDisplay" colspan="3">订单编号:<span>{{item.DeliveryDetail.orderDetail.orderId}}({{item.DeliveryDetail.order.batch}})</span></td>
              </tr>
              <tr class="day-in" v-for="(items, index1) in item.DeliveryDetailList" :key="index1">
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet2.vue
@@ -90,6 +90,12 @@
const printSheet = () => {
}
const showSimpleOrderId = ref(true);
// 2. 切换显示状态的函数
const toggleOrderDisplay = () => {
  showSimpleOrderId.value = !showSimpleOrderId.value;
};
@@ -153,7 +159,10 @@
              <tr>
                <td style="font-size: 15px;text-align: left" colspan="5">产品名称:<span>{{item.DeliveryDetail.orderDetail.productName}}</span></td>
                <td v-if="company.showDeliveryCreator" style="font-size: 15px;text-align: left" colspan="2">订货日期:<span>{{item.DeliveryDetail.order.contractId}}</span></td>
                <td style="font-size: 15px;text-align: left" colspan="3">订单编号:<span>{{item.DeliveryDetail.orderDetail.orderId}}</span></td>
                <td style="font-size: 15px;text-align: left" v-show="showSimpleOrderId"
                    @dblclick="toggleOrderDisplay" colspan="3">订单编号:<span>{{item.DeliveryDetail.orderDetail.orderId}}</span></td>
                <td style="font-size: 15px;text-align: left" v-show="!showSimpleOrderId"
                    @dblclick="toggleOrderDisplay" colspan="3">订单编号:<span>{{item.DeliveryDetail.orderDetail.orderId}}({{item.DeliveryDetail.order.batch}})</span></td>
              </tr>
              <tr class="day-in" v-for="(items, index1) in item.DeliveryDetailList" :key="index1">
north-glass-erp/northglass-erp/src/components/sd/order/ProcessAttribute.vue
New file
@@ -0,0 +1,211 @@
<template>
  <div style="width: 100%">
    <template v-for="(itme, index) in dataCollection" :key="index">
      <div style="width: 90%;height: 120px;margin: auto;;background-color: aliceblue;">
      <div style="width: 200px;font-size: 18px;text-align: left;">{{itme.process_name}}</div>
      <div style="display: flex;margin-top: 10px">
        <template v-for="(itme1, index) in itme.detail" :key="index">
          <div v-if="itme1.input_type=='select'"
              style="width: 200px;display: flex;height: 30px;line-height: 30px;">
            {{itme1.process_name}}:
            <el-select
                v-model="dataList[itme.process_type][itme1.process_type]"
                placeholder=""
                clearable
                style="width: 120px"
            >
              <el-option
                  v-for="item in edgingTypeList[itme1.process_type]"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
              />
            </el-select>
          </div>
          <div v-else-if="itme1.input_type=='checkbox'"
              style="width: 100px;height: 30px;line-height: 30px;">
            {{itme1.process_name}}:<el-checkbox v-model="dataList.edgingProcess[itme1.process_type]"></el-checkbox>
          </div>
          <div v-else-if="itme1.input_type=='input'"
              style="width: 200px;display: flex;height: 30px;line-height: 30px;">
            {{itme1.process_name}}:<el-input style="width:100px" v-model.trim="dataList.edgingProcess[itme1.process_type]"></el-input>
          </div>
        </template>
      </div>
      </div>
      <br>
    </template>
    <div style="margin-top: 10px">
      <el-button @click="emitParent()" style="width: 80px;height: 30px"  type="primary" size="small">保存</el-button>
    </div>
  </div>
</template>
<script lang="ts" setup>
import { useI18n } from 'vue-i18n'
import { ref, reactive, onMounted } from 'vue'
import {ElMessage} from "element-plus";
import request from "@/utils/request"
const { t } = useI18n()
let props = defineProps({
  rowIndex:{},
  edgingTypeList: null
})
let dataCollection=ref()
const edgingTypeList = ref({
})
const initOrder = async () => {
  try {
    // 关键:await 真正等待接口响应,响应完成后再往下执行
    const res = await request.post("/order/processAttributeConfig");
    if (res.code === "200") {
      dataCollection.value = res.data.data || [];
      // 遍历 dataCollection 初始化 dataList 和 edgingTypeList
      dataCollection.value.forEach(items => {
        if (!items || !Array.isArray(items.detail) || items.detail.length === 0) {
          return;
        }
        // 修正2:dataList 是对象,初始化工艺类型对应的字段(若需要嵌套结构可调整)
        // 若需 dataList.value[items.process_type] 是对象(存储该工艺类型的所有属性)
        console.log(dataList.value[items.process_type])
        console.log(items.process_type)
        if (!dataList.value[items.process_type]) {
          dataList.value[items.process_type] = {}; // 初始化对象,而非数组
        }
        // 遍历工艺详情
        items.detail.forEach(item1 => {
          // 初始化该工艺项的默认值(根据 input_type 调整,这里保持用户原逻辑设为 null)
          dataList.value[items.process_type][item1.process_type] = null;
          // 处理 select 类型,构建下拉选项
          if (item1.input_type === 'select') {
            const baseOptions = props.edgingTypeList[item1.process_type];
            if (!Array.isArray(baseOptions) || baseOptions.length === 0) {
              console.warn(`工艺类型 ${item1.process_type} 无基础数据,跳过`);
              return;
            }
            // 初始化 edgingTypeList 对应字段为数组
            if (!Array.isArray(edgingTypeList.value[item1.process_type])) {
              edgingTypeList.value[item1.process_type] = [];
            }
            // 下拉选项去重并添加
            baseOptions.forEach(item => {
              const newOption = { label: item.basicName, value: item.basicName };
              const isAlreadyExist = edgingTypeList.value[item1.process_type].some(
                  opt => opt.value === newOption.value
              );
              if (!isAlreadyExist) {
                edgingTypeList.value[item1.process_type].push(newOption);
              }
            });
          }
        });
      });
    } else {
      ElMessage.warning(t('basicData.msg.getDataFailed'));
      dataCollection.value = [];
    }
  } catch (err) {
    ElMessage.error(t('basicData.msg.ServerConnectionError'));
    router.push("/login");
    throw err; // 抛出错误,让 onMounted 知道执行失败
  }
};
onMounted(async () => {
  await initOrder();
  const { processAttribute } = props.rowIndex; // 解构赋值,更简洁
  if (!processAttribute || processAttribute === "") {
    console.log('processAttribute 为空,跳过赋值');
    return;
  }
  // 解析 processAttribute(复用用户原逻辑,优化变量名和代码)
  let newProcessAttr;
  if (processAttribute === null || processAttribute === undefined) {
    newProcessAttr = {};
  } else if (typeof processAttribute === 'object') {
    newProcessAttr = processAttribute;
  } else if (typeof processAttribute === 'string') {
    try {
      newProcessAttr = JSON.parse(processAttribute);
    } catch (error) {
      console.warn('processAttribute 是字符串但非合法 JSON,已使用默认值:', error.message);
      newProcessAttr = {};
    }
  } else {
    console.warn('processAttribute 类型不合法,已使用默认值:', typeof processAttribute);
    newProcessAttr = {};
  }
  // 遍历解析后的数据,给 dataList 赋值(适配 dataList 的对象结构)
  Object.entries(newProcessAttr).forEach(([key, value]) => {
    dataList.value[key] = {};
    if (typeof value === "object" && value !== null) {
      Object.entries(value).forEach(([innerKey, innerValue]) => {
        if (dataList.value[key]) {
          dataList.value[key][innerKey] = innerValue;
        }
      });
    }
  });
  console.log(dataList.value)
});
let dataList=ref({})
let emit = defineEmits([
  'changePage'
])
const emitParent = () => {
  if(dataList.value.edgingProcess.edgingType!=null){
    emit('getEdgingProcess', dataList.value,dataList.value.edgingProcess.edgingType)
  }else{
    ElMessage.error(t('请选择磨边类型'))
  }
}
</script>
<style scoped>
:deep(.el-select .el-input__wrapper) {
  width: 100%;
  box-sizing: border-box;
}
:deep(.el-dialog__body) {
  padding: 20px;
}
:deep(.el-dialog__footer) {
  padding: 10px 20px 20px;
}
</style>
north-glass-erp/northglass-erp/src/router/index.js
@@ -157,6 +157,11 @@
              component: () => import('../views/sd/basicData/SearchGlassType.vue')
            },
            {
              path: 'searchProcessAttributeConfig',
              name: 'searchProcessAttributeConfig',
              component: () => import('../views/sd/basicData/SearchProcessAttributeConfig.vue')
            },
            {
              name: 'OrderBasicData',
              path: '',
              redirect:'/main/orderBasicData/searchBasicData'
north-glass-erp/northglass-erp/src/views/sd/basicData/BasicData.vue
@@ -22,6 +22,7 @@
      <el-breadcrumb :separator-icon="ArrowRight">
        <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/orderBasicData/searchBasicData' }">{{ $t('orderBasicData.page.searchOrderBasicData') }}</el-breadcrumb-item>
        <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/orderBasicData/searchGlassType' }">{{ $t('orderBasicData.page.searchGlassType') }}</el-breadcrumb-item>
        <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/orderBasicData/searchProcessAttributeConfig' }">{{ $t('工艺属性类别') }}</el-breadcrumb-item>
        <el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">报表</el-breadcrumb-item>
      </el-breadcrumb>
    </div>
north-glass-erp/northglass-erp/src/views/sd/basicData/SearchProcessAttributeConfig.vue
New file
@@ -0,0 +1,252 @@
<script setup>
import {onMounted, reactive, ref} from "vue";
import {VXETable} from "vxe-table";
import {ElMessage} from "element-plus";
import request from "@/utils/request"
import CreateBasicData from "@/views/sd/basicData/CreateBasicData.vue"
import {useRouter,useRoute} from "vue-router"
import {useI18n} from "vue-i18n"
import {changeFilterEvent, filterChanged} from "@/hook";
const { t } = useI18n()
let dialogTableVisible = ref(false)
const router = useRouter()
const xGrid = ref()
const gridOptions = reactive({
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮
  id: 'OrderList',
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    //remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },
  //表头参数
  columns:[
    {title: t('basicData.operate'), width: 110, slots: { default: 'button_slot' },fixed:"left",},
    {type: 'seq', title: t('basicData.number'), width: 80 ,fixed:"left",},
    {field:'level',title: t('orderBasicData.level')},
    {field:'processType',title: t('别名'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field:'processName',title: t('orderBasicData.name'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field:'inputType',title: t('类型')},
    {field:'createTime',title: t('basicData.creationTime')}
  ],
  //表头按钮
  toolbarConfig: {
    buttons: [
      {'code': 'add', 'name': t('basicData.insert'),status: 'primary'},
    ],
    // import: false,
    // export: true,
    // print: true,
    zoom: true,
    custom: true
  },
})
const rowIndex = ref(null)
const glassType = reactive([
  {
    value:1,
    label:t('orderBasicData.firstLevel')
  },
  {
    value: 2,
    label: t('orderBasicData.towLevel'),
    children: []
  }
])
const submit = ref({
  glassLevel:[null,null],
  inputType:null,
  processName:null,
  processType:null,
  type:null,
  id:null
})
onMounted(()=>{
  request.get(`/basicGlassType/findAllConfig`).then(res => {
    xGrid.value.reloadData(res.data)
    console.log(res.data)
  })
  request.get(`/basicGlassType/getOneLevelListMapConfig`).then(res => {
    glassType[1].children = res.data
  })
})
const gridEvents = {
  toolbarButtonClick ({ code }) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
        case 'add': {
          dialogTableVisible.value = true
          break
        }
      }
    }
  }
}
const getTableRow =  (row,type) => {
  switch (type) {
    case 'edit': {
      rowIndex.value = row
      submit.value.glassLevel = row.level===1?[parseInt(row.level)]:[parseInt(row.level),row.belong]
      submit.value.processType = row.processType
      submit.value.processName = row.processName
      submit.value.inputType = row.inputType
      submit.value.id = row.id
      dialogTableVisible.value = true
      break
    }
    case 'delete': {
      request.get(`/basicGlassType/deleteProcessAttributeConfig/${row.id}`).then((res) => {
        if(res.code==='200' && res.data===true){
          ElMessage.success(t('searchOrder.msgDeleteSuccess'))
          router.push({
            path:'/main/orderBasicData/searchProcessAttributeConfig',
            query:{random:Math.random()
            }
          })
        }else{
          ElMessage.warning(t('searchOrder.msgDeleteFail'))
        }
      })
      break
    }
  }
}
const saveBasicData =  (type) =>{
  if(submit.value.glassLevel[0]===null){
    ElMessage.warning("请选择类别")
    return
  }
  if(submit.value.processName===null||submit.value.processName===""){
    ElMessage.warning("请输入名称")
    return
  }
  if(submit.value.processType===null||submit.value.processType===""){
    ElMessage.warning("请输入别名")
    return
  }
  submit.value.type = type
  request.post(`/basicGlassType/addConfig`, submit.value).then(res => {
    if (res.code==='200') {
      ElMessage.success(t('basicData.msg.saveSuccess'))
      router.push({
        path:'/main/orderBasicData/searchProcessAttributeConfig',
        query:{random:Math.random()
        }
      })
    }
  })
}
</script>
<template>
  <div  style="width: 100%;height: 100%">
    <div class="main-table">
    <vxe-grid
        class="mytable-scrollbar"
        height="100%"
        ref="xGrid"
        v-bind="gridOptions"
        v-on="gridEvents"
    >
      <template #button_slot="{ row }">
        <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{ $t('basicData.edit') }}</el-button>
        <el-popconfirm @confirm="getTableRow(row,'delete')" :title="$t('searchOrder.deleteConfirm')">
          <template #reference>
            <el-button  link type="primary" size="small">{{ $t('basicData.delete') }}</el-button>
          </template>
        </el-popconfirm>
      </template>
      <template #num1_filter="{ column, $panel }">
        <div>
          <div v-for="(option, index) in column.filters" :key="index">
            <input
                type="type"
                v-model="option.data"
                @keyup.enter.native="$panel.confirmFilter()"
                @input="changeFilterEvent($event, option, $panel)"/>
          </div>
        </div>
      </template>
    </vxe-grid>
  </div>
    <el-dialog
        v-model="dialogTableVisible"
        destroy-on-close
        style="width: 20%;height:50% ">
      <el-row>
        <el-cascader
            v-model="submit.glassLevel"
            :options="glassType"
            clearable
            :placeholder="$t('processCard.pleaseSelect')"
            :disabled="rowIndex"
        />
      </el-row>
      <el-row>
          别名:<el-input style="width: 250px;" v-model="submit.processType"/>
      </el-row>
      <el-row>
          名称:<el-input style="width: 250px;" v-model="submit.processName"/>
      </el-row>
      <el-row>
          类型:<el-input style="width: 250px;" v-model="submit.inputType"/>
      </el-row>
      <el-row>
        <el-button v-if="!rowIndex" @click="saveBasicData('add')"   type="primary">{{ $t('basicData.insert') }}</el-button>
        <el-button v-else @click="saveBasicData('update')" type="primary">{{ $t('basicData.update') }}</el-button>
      </el-row>
    </el-dialog>
  </div>
</template>
<style scoped>
.el-row{
  margin-top: 10px;
}
.head{
  width: 100%;
  height: 35px;
}
.main-table{
  width: 100%;
  height: calc(100% - 0px);
}
</style>
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -21,6 +21,7 @@
import {multiply,multiplyAuto,divideAuto} from '@/utils/decimal'
import OrderNumberReportTransfer from "@/components/sd/order/OrderNumberReportTransfer.vue"
import UploadPicture from "@/components/sd/order/UploadPicture.vue"
import ProcessAttribute from "@/components/sd/order/ProcessAttribute.vue"
const { t } = useI18n()
let dialogTableVisible = ref(false)
@@ -32,6 +33,7 @@
let uploadPictureVisible = ref(false)
let alienEditorVisible = ref(false)
let fileUploadVisible = ref(false)
let processAttributeVisible = ref(false)
const transferData = ref({
  oldOrderId:null,
  newOrderNumber:null,
@@ -50,7 +52,7 @@
const shapeList = ref([
    {label:t('order.universalShape'),value:'1'}, {label:t('order.alien'),value:'2'}
])
const edgingTypeList = ref([])
const newOrderId = ref([])
const orderTypeState = ref(0)
@@ -188,8 +190,14 @@
      filters:[{ data: '' }],
      slots: { filter: 'num1_filter',edit:'shape_edit',default:'default_shape' }, sortable: true,filterMethod:filterChanged},
    {field: 'bendRadius',width:160,  title: t('order.bendRadius'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'edgingType',width:160,  title: t('order.edgingType'),editRender: { name: 'input'},filters:[{ data: '' }],
      slots: { filter: 'num1_filter',edit:'edgingType_edit' }, sortable: true,filterMethod:filterChanged},
    {field: 'edgingType',width:160,  title: t('order.edgingType'),filters:[{ data: '' }],
      slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {
      field: 'processAttribute',
      width: 160,
      title: t('工艺属性'),
      filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged
    },
    {field: 'processingNote',width:200,  title: t('order.processingNote'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'fileName',width:200,  title: t('order.drawingNo'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'remarks',width:140,  title: t('basicData.remarks'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
@@ -581,6 +589,24 @@
                  item["productName"] = val1
                }
              })
            }else if(result.cell=='processAttribute'){
              const val = dataList[result.start][result.cell]
              const val1 = dataList[result.start]["edgingType"]
              dataList.forEach((item,index) =>{
                if(index>=result.start && index<=result.end){
                  item[result.cell] = val
                  item["edgingType"] = val1
                }
              })
            }else if(result.cell=='edgingType'){
              const val = dataList[result.start][result.cell]
              const val1 = dataList[result.start]["processAttribute"]
              dataList.forEach((item,index) =>{
                if(index>=result.start && index<=result.end){
                  item[result.cell] = val
                  item["processAttribute"] = val1
                }
              })
            }else{
              const val = getNestedProperty(dataList[result.start],result.cell)
@@ -619,6 +645,24 @@
                  item["productName"] = val1
                }
              })
            }else if(result.cell=='processAttribute'){
              const val = dataList[result.start][result.cell]
              const val1 = dataList[result.start]["edgingType"]
              dataList.forEach((item,index) =>{
                if(index>=result.start ){
                  item[result.cell] = val
                  item["edgingType"] = val1
                }
              })
            }else if(result.cell=='edgingType'){
              const val = dataList[result.start][result.cell]
              const val1 = dataList[result.start]["processAttribute"]
              dataList.forEach((item,index) =>{
                if(index>=result.start ){
                  item[result.cell] = val
                  item["processAttribute"] = val1
                }
              })
            }else{
              const val = getNestedProperty(dataList[result.start],result.cell)
              dataList.forEach((item,index) =>{
@@ -639,11 +683,28 @@
          let result = toolbarButtonClickEvent()
          if(result){
            const dataList = xGrid.value.getTableData().visibleData
            dataList.forEach((item,index) =>{
              if(index>=result.start && index<=result.end){
                item[result.cell] = ''
              }
            })
            if(result.cell=='processAttribute'){
              dataList.forEach((item,index) =>{
                if(index>=result.start && index<=result.end){
                  item[result.cell] = ''
                  item['edgingType'] = ''
                }
              })
            }else if(result.cell=='edgingType'){
              dataList.forEach((item,index) =>{
                if(index>=result.start && index<=result.end){
                  item[result.cell] = ''
                  item['processAttribute'] = ''
                }
              })
            }else{
              dataList.forEach((item,index) =>{
                if(index>=result.start && index<=result.end){
                  item[result.cell] = ''
                }
              })
            }
          }
          computedMoney(result.cell)
          gridOptions.menuConfig.body.options[0][5].disabled=false
@@ -841,9 +902,13 @@
  },
  cellDblclick (params) {//表格内容双击打开产品界面
    const { row,column } = params
    if(column.field==='productName' || column.field==='productId'){
    if (column.field === 'processAttribute'||column.field === 'edgingType') {
      rowIndex = row
      processAttributeVisible.value = true
    } else if (column.field === 'productName' || column.field === 'productId') {
      // 保留原产品选择逻辑
      productVisible.value = true
      rowIndex=row
      rowIndex = row
    }
  },
@@ -1092,10 +1157,7 @@
        })
      }
      titleSelectJson.value.edgingType.forEach(item=>{
        let type= {label:item.basicName,value:item.basicName}
        edgingTypeList.value.push(type)
      })
      //进入页面下拉框设置默认值
      titleUploadData.value.orderType = titleSelectJson.value.orderType[0].basicName
      titleUploadData.value.orderClassify = titleSelectJson.value.orderClassify[0].basicName
@@ -1733,6 +1795,15 @@
  });
};
const getEdgingProcess = (value,edgingType) => {
  rowIndex.processAttribute=JSON.stringify(value)
  rowIndex.edgingType=edgingType
  processAttributeVisible.value = false
}
</script>
<template>
@@ -1915,9 +1986,7 @@
        <template #shape_edit="{ row }">
          <vxe-select v-model="row.shape" transfer :options="shapeList"  placeholder=" "/>
        </template>
        <template #edgingType_edit="{ row }">
          <vxe-select v-model="row.edgingType" transfer :options="edgingTypeList"  placeholder=" "/>
        </template>
      </vxe-grid>
@@ -2041,6 +2110,19 @@
    </el-dialog>
    <el-dialog
        v-model="processAttributeVisible"
        :close-on-click-modal="false"
        :close-on-press-escape="false"
        destroy-on-close
        style="width: 1114px;height:650px ">
      <process-attribute :rowIndex="rowIndex"
          :edging-type-list="titleSelectJson"
          @getEdgingProcess="getEdgingProcess"
      />
    </el-dialog>
  </div>
</template>
north-glass-erp/src/main/java/com/example/erp/controller/sd/BasicGlassTypeController.java
@@ -47,4 +47,25 @@
        return Result.success(basicGlassTypeServise.add(map));
    }
    @GetMapping("/findAllConfig")
    public Result findAllConfig(){
        return Result.success(basicGlassTypeServise.findAllConfig());
    }
    @GetMapping("/getOneLevelListMapConfig")
    public Result getOneLevelListMapConfig(){
        return Result.success(basicGlassTypeServise.getOneLevelListMapConfig());
    }
    @PostMapping("/addConfig")
    public Result addConfig(@RequestBody Map<String,Object> map){
        return Result.success(basicGlassTypeServise.addConfig(map));
    }
    @GetMapping("/deleteProcessAttributeConfig/{id}")
    public Result deleteProcessAttributeConfig(@PathVariable Integer id){
        return Result.success(basicGlassTypeServise.deleteProcessAttributeConfig(id));
    }
}
north-glass-erp/src/main/java/com/example/erp/controller/sd/OrderController.java
@@ -283,4 +283,12 @@
    }
    @ApiOperation("查询工艺属性配置")
    @PostMapping("/processAttributeConfig")
    public Result processAttributeConfig()  {
        return  Result.success(orderService.processAttributeConfig());
    }
}
north-glass-erp/src/main/java/com/example/erp/entity/sd/OrderDetail.java
@@ -36,6 +36,7 @@
    private String processingNote;
    private String remarks;
    private Double bendRadius;
    private String processAttribute;
    private String edgingType;
    private Double archRise;
    private Double weight;
north-glass-erp/src/main/java/com/example/erp/entity/sd/ProcessAttributeConfig.java
New file
@@ -0,0 +1,18 @@
package com.example.erp.entity.sd;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
@Data
public class ProcessAttributeConfig {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private Integer level;
    private String processType;
    private String processName;
    private String inputType;
    private String belong;
    private String createTime;
}
north-glass-erp/src/main/java/com/example/erp/mapper/sd/BasicGlassTypeMapper.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.erp.entity.sd.BasicGlassType;
import com.example.erp.entity.sd.ProcessAttributeConfig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -19,4 +20,18 @@
    Boolean updateGlassTypeName(@Param("basicGlassType") BasicGlassType basicGlassType);
    List<ProcessAttributeConfig> getFindAllConfig();
    List<ProcessAttributeConfig> getOneLevelListMapConfig();
    ProcessAttributeConfig selectMaxTypeConfig(Integer type);
    ProcessAttributeConfig selectMaxTowLevelTypeConfig(String type);
    Boolean insertProcessAttributeConfig(@Param("processAttributeConfig") ProcessAttributeConfig processAttributeConfig);
    Boolean updateProcessAttributeConfig(@Param("processAttributeConfig") ProcessAttributeConfig processAttributeConfig);
    Boolean deleteProcessAttributeConfig(Integer id);
}
north-glass-erp/src/main/java/com/example/erp/mapper/sd/OrderMapper.java
@@ -68,4 +68,7 @@
    Map<String,String> selectOrderFile( String orderId,Integer orderNumber);
    List<Map<String,String>> selectOrderFileList( String orderId);
    List<Map<String,Object>> selectProcessAttributeConfigOne();
    List<Map<String,Object>> selectProcessAttributeConfigTow(String belong);
}
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportService.java
@@ -972,14 +972,14 @@
        }
        String inputVal= (String) dates.get("inputVal");
        String project= (String) dates.get("project");
        String terminationVals= dates.get("terminationVals").toString();
        if (inputVal==null) {
        String terminationVals= (String) dates.get("terminationVals");
        if ("null".equals(inputVal)) {
            inputVal = "";
        }
        if (project==null) {
        if ("null".equals(project)) {
            project = "";
        }
        if (terminationVals==null) {
        if ("null".equals(terminationVals)) {
            terminationVals = "";
        }
        List<WorkInProgressDTO> dataList1  =reportMapper.exportWorkInProgressMp(process,inputVal,project,terminationVals);
@@ -1243,14 +1243,14 @@
        }
        String inputVal= (String) dates.get("inputVal");
        String project= (String) dates.get("project");
        String terminationVals= dates.get("terminationVals").toString();
        if (inputVal==null) {
        String terminationVals= (String) dates.get("terminationVals");
        if ("null".equals(inputVal)) {
            inputVal = "";
        }
        if (project==null) {
        if ("null".equals(project)) {
            project = "";
        }
        if (terminationVals==null) {
        if ("null".equals(terminationVals)) {
            terminationVals = "";
        }
north-glass-erp/src/main/java/com/example/erp/service/sd/BasicGlassTypeService.java
@@ -3,6 +3,7 @@
import com.alibaba.fastjson.JSON;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.example.erp.entity.sd.BasicGlassType;
import com.example.erp.entity.sd.ProcessAttributeConfig;
import com.example.erp.mapper.sd.BasicGlassTypeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -105,4 +106,59 @@
        }
    }
    public List<ProcessAttributeConfig> findAllConfig() {
        return basicGlassTypeMapper.getFindAllConfig();
    }
    public List<Map<String,Object>> getOneLevelListMapConfig() {
        List<ProcessAttributeConfig> processAttributeConfigList = basicGlassTypeMapper.getOneLevelListMapConfig();
        List<Map<String,Object>> list = new ArrayList<>();
        for (ProcessAttributeConfig processAttributeConfig : processAttributeConfigList) {
            Map<String,Object> map = new HashMap<>();
            map.put("value", processAttributeConfig.getInputType());
            map.put("label", processAttributeConfig.getProcessName());
            list.add(map);
        }
        return list;
    }
    public Boolean addConfig(Map<String, Object> map) {
        List<Object> list = (List<Object>) map.get("glassLevel");
        if(list.get(0)==null
                || map.get("processType") == null
                || map.get("processType").equals("")){
            return false;
        }
        ProcessAttributeConfig processAttributeConfigS = new ProcessAttributeConfig();
        if(map.get("type").equals("add")){
            if(list.size()==1){
                ProcessAttributeConfig processAttributeConfig =  basicGlassTypeMapper.selectMaxTypeConfig((Integer) list.get(0));
                int maxId = Integer.parseInt(processAttributeConfig.getInputType());
                String newTypeId = String.format("%02d", maxId+1);
                processAttributeConfigS.setLevel((Integer) list.get(0));
                processAttributeConfigS.setInputType(newTypeId);
                processAttributeConfigS.setProcessType((String) map.get("processType"));
                processAttributeConfigS.setProcessName((String) map.get("processName"));
            }else if(list.size()==2) {
                processAttributeConfigS.setLevel((Integer) list.get(0));
                processAttributeConfigS.setInputType((String) map.get("inputType"));
                processAttributeConfigS.setProcessType((String) map.get("processType"));
                processAttributeConfigS.setProcessName((String) map.get("processName"));
                processAttributeConfigS.setBelong((String) list.get(1));
            }
            return basicGlassTypeMapper.insertProcessAttributeConfig(processAttributeConfigS);
        }else{
            processAttributeConfigS.setId((Integer) map.get("id"));
            processAttributeConfigS.setInputType((String) map.get("inputType"));
            processAttributeConfigS.setProcessType((String) map.get("processType"));
            processAttributeConfigS.setProcessName((String) map.get("processName"));
            return basicGlassTypeMapper.updateProcessAttributeConfig(processAttributeConfigS);
        }
    }
    public Boolean deleteProcessAttributeConfig(Integer id) {
        return basicGlassTypeMapper.deleteProcessAttributeConfig(id);
    }
}
north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
@@ -1069,4 +1069,16 @@
        return map;
    }
    //工艺属性配置查询
    public Map<String,Object> processAttributeConfig() {
        Map<String,Object> map = new HashMap<>();
        List<Map<String,Object>> processList = orderMapper.selectProcessAttributeConfigOne();
        for (Map<String,Object> objectMap:processList){
            objectMap.put("detail",orderMapper.selectProcessAttributeConfigTow(objectMap.get("input_type").toString()));
        }
        map.put("data",processList);
        return map;
    }
}
north-glass-erp/src/main/resources/mapper/sd/BasicGlassTypeMapper.xml
@@ -48,4 +48,65 @@
        where a.id = #{basicGlassType.id}
    </update>
    <select id="getFindAllConfig">
        select
            *
        from
            process_attribute_config
    </select>
    <select id="getOneLevelListMapConfig">
        select
            *
        from
            process_attribute_config
        where level=1
    </select>
    <select id="selectMaxTypeConfig">
        select
            *
        from
            process_attribute_config  as a
        where a.level=1
        ORDER BY  a.id  desc limit 1;
    </select>
    <select id="selectMaxTowLevelTypeConfig">
        select
            *
        from
            process_attribute_config  as a
        where
            a.level=2
          and a.belong = #{type}
        ORDER BY  a.id  desc limit 1;
    </select>
    <update id="updateProcessAttributeConfig" parameterType="com.example.erp.entity.sd.ProcessAttributeConfig" >
        update
            process_attribute_config as a
        set a.process_type = #{processAttributeConfig.processType},
            a.process_name = #{processAttributeConfig.processName},
            a.input_type = #{processAttributeConfig.inputType},
        where a.id = #{processAttributeConfig.id}
    </update>
    <insert id="insertProcessAttributeConfig"  useGeneratedKeys="true" >
        insert into sd.process_attribute_config (level,process_type,process_name,input_type,belong)
        values (
                   #{processAttributeConfig.level}, #{processAttributeConfig.processType}, #{processAttributeConfig.processName},
                   #{processAttributeConfig.inputType}, #{processAttributeConfig.belong}
               )
    </insert>
    <delete id="deleteProcessAttributeConfig"  >
        delete from
            process_attribute_config as a
            where a.id = #{id}
    </delete>
</mapper>
north-glass-erp/src/main/resources/mapper/sd/OrderDetailMapper.xml
@@ -29,7 +29,8 @@
                            perimeter,
                            monolithic_perimeter,
                            other_columns,
                            file_name
                            file_name,
                            process_attribute
                          )
        values
        <foreach collection ="orderDetails" item="orderDetail" separator =",">
@@ -57,7 +58,8 @@
            #{orderDetail.perimeter},
            #{orderDetail.monolithicPerimeter},
            #{orderDetail.otherColumns},
            #{orderDetail.fileName}
            #{orderDetail.fileName},
            #{orderDetail.processAttribute}
             )
        </foreach>
    </insert>
north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
@@ -95,7 +95,8 @@
            o.area = od.c,
            o.perimeter= od.aa,
            o.other_money = ifnull(c.money,0),
            o.other_remarks = (select group_concat( distinct edging_type) from order_detail where order_id = #{orderId} and  edging_type is not null)
            o.other_remarks = (select GROUP_CONCAT(DISTINCT edging_type)
        from order_detail where order_id = #{orderId} and  edging_type is not null)
        where
            o.order_id = #{orderId}
@@ -436,4 +437,17 @@
    <update id="updateOrderFile">
        update sd.order_file set file_name=#{fileName},file_data=#{dxfData},file_json=#{fileJson},create_time=now() where order_id=#{orderId} and order_number=#{orderNumber}
    </update>
    <select id="selectProcessAttributeConfigOne">
        select  * from sd.process_attribute_config
        where level=1
    </select>
    <select id="selectProcessAttributeConfigTow">
        select  * from sd.process_attribute_config
        where level=2 and belong=#{belong}
    </select>
</mapper>