huang
2024-12-17 f4b96a5c928ee615b398e50c21f83f520d1a7d2e
更新 优化页面代码
1个文件已修改
64 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/GlassInventory.vue 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/GlassInventory.vue
@@ -4,22 +4,21 @@
import request from "@/utils/request";
import {ElMessage, ElMessageBox} from "element-plus";
import {useRoute} from "vue-router";
const {t} = useI18n()
const { t } = useI18n()
const xGrid = ref()
const gridOptions = reactive({
  height: '100%',
  height:'100%',
  loading: false,
  border: "full",//表格加边框
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 30, useKey: true},//鼠标移动或选择高亮
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 30, useKey: true},//鼠标移动或选择高亮
  id: 'GlassInventory',
  scrollX: {enabled: true},
  scrollY: {enabled: true, gt: 0},//开启虚拟滚动
  showOverflow: true,
  scrollX:{enabled: true},
  scrollY:{ enabled: true ,gt:0},//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
    useKey: true
@@ -36,12 +35,12 @@
    showStatus: true
  },
  columns: [
    {type: 'seq', fixed: "left", title: ' ', width: 50},
  columns:[
    {type:'seq',fixed:"left", title:' ', width: 50},
    {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80},
    {field: 'id', title: '物料编码',},
    {field: 'width', title: t('order.width'),},
    {field: 'height', title: t('order.height')},
    {field:'width',title: t('order.width'),},
    {field: 'height',title: t('order.height')},
    {field: 'thickness', title: t('order.totalThickness'),},
    {field: 'model', title: t('warehouseBasicData.type'),},
    {field: 'leftTrim', title: '左修边',},
@@ -53,13 +52,12 @@
    {field: 'name', title: '名称',},
    {field: 'producer', title: '供应商',}
  ],//表头参数
  data: null,//表格数据
  data:null,//表格数据
  //右键菜单
  menuConfig: {
    body: {
      options: [
        [
          {code: 'choose', name: '选择',},
          {code: 'selectTrimming', name: '设置统一修边',},
          {code: 'Exports', name: '数据导出', prefixIcon: 'vxe-icon-download', visible: true, disabled: false},
        ],
@@ -69,7 +67,7 @@
  },
  toolbarConfig: {
    buttons: [],
    slots: {
    slots:{
      buttons: "toolbar_buttons"
    },
  },
@@ -79,21 +77,12 @@
// 右键菜单
const operationConfigs = [
  {
    code: 'choose',
    successMsg: '已选中!',
    gridRef: xGrid,
    requiresRow: false,
    showMessage: () => {
      ElMessage.info('此功能暂未完善,暂时无法执行隐藏流程卡操作。');
    }
  },
  {
    code: 'selectTrimming', // 设置统一修边
    successMsg: '已打开!',
    gridRef: xGrid,
    requiresRow: false,
    openTrimming: async () => {
      emit('select-trimming', true)
     emit ( 'select-trimming', true)
    }
  },
  {
@@ -144,7 +133,7 @@
const model = ref(route.params.model);
const selectMaterialStore = () => {
const selectMaterialStore = () =>{
  request.post(`/glassOptimize/materialStore/${thickness.value}/${model.value}`).then((res) => {
    if (Number(res.code) === 200) {
      const rawData = res.data.data;
@@ -187,7 +176,7 @@
  if (newData) {
    Trimming(newData);
  }
}, {immediate: true});
}, { immediate: true });
watch(() => props.InventoryData, (newInventoryData) => {
  if (newInventoryData) {
@@ -199,22 +188,22 @@
});
const props = defineProps({
  receivedData: {
  receivedData : {
    type: Object,
    required: false,
    properties: {
      quicksetLeft: {type: Number},
      quicksetBottom: {type: Number},
      quicksetRight: {type: Number},
      quicksetTop: {type: Number}
      quicksetLeft: { type: Number },
      quicksetBottom: { type: Number },
      quicksetRight: { type: Number },
      quicksetTop: { type: Number }
    }
  },
  InventoryData: {
  InventoryData : {
    type: Object,
    required: false,
    properties: {
      selectedLabel1: {type: String},
      selectedLabel2: {type: String},
      selectedLabel1: { type: String },
      selectedLabel2: { type: String },
    }
  }
});
@@ -268,8 +257,7 @@
      <template #num2_filter="{ column, $panel }">
        <div>
          <div v-for="(option, index) in column.filters" :key="index">
            <vxe-select v-model="option.data" :placeholder="$t('processCard.pleaseSelect')"
                        @change="changeFilterEvent($event, option, $panel)">
            <vxe-select v-model="option.data" :placeholder="$t('processCard.pleaseSelect')"  @change="changeFilterEvent($event, option, $panel)">
              <vxe-option value="0" :label="$t('basicData.unchecked')"></vxe-option>
              <vxe-option value="1" :label="$t('basicData.selected')"></vxe-option>
            </vxe-select>