guoyuji
2024-03-01 52204a6eb5ce441c2abdf68f1e83f8d3fe66549c
报工界面
1个文件已修改
233 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue 233 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
@@ -5,7 +5,7 @@
import {ElMessage} from "element-plus";
import {changeFilterEvent, filterChanged} from "@/hook"
import {indexOf} from "xe-utils";
let brokenVisible = ref(false)
const xGrid = ref()
let router = useRouter()
@@ -139,7 +139,6 @@
    //  {type:'expand',fixed:"left",slots: { content:'content' },width: 50},
    {
      field: 'order_number',
      width: 90,
      title: '序号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
@@ -147,7 +146,6 @@
    },
    {
      field: 'glass_child',
      width: 120,
      title: '单片名称',
      showOverflow: "ellipsis",
      filters: [{data: ''}],
@@ -156,7 +154,6 @@
    },
    {
      field: 'technology_number',
      width: 90,
      title: '标记',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
@@ -164,7 +161,6 @@
    },
    {
      field: 'glass_address',
      width: 100,
      title: '片标记',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
@@ -172,7 +168,6 @@
    },
    {
      field: 'quantity_card',
      width: 110,
      title: '流程卡数量',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
@@ -181,7 +176,6 @@
    },
    {
      field: 'child_width',
      width: 70,
      title: '宽',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
@@ -189,7 +183,6 @@
    },
    {
      field: 'child_height',
      width: 70,
      title: '高',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
@@ -197,16 +190,15 @@
    },
    {
      field: 'shape',
      width: 70,
      title: '形状',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      showOverflow: "ellipsis",
      filterMethod: filterChanged
    },
    {field: 'quantity', width: 120, title: '上工完工数量',},
    {field: 'quantity', title: '上工完工数量',},
    {
      field: 'completedQuantity', width: 100, title: '完工数量',
      field: 'completedQuantity', title: '完工数量',
      editRender: {
        name: 'input',
        attrs: {placeholder: ''},
@@ -214,49 +206,46 @@
    },
    {
      field: 'breakageNumber', width: 100, title: '次破数量',
      editRender: {
        name: 'input',
        attrs: {placeholder: ''}
      }
    },
    {field: 'available', width: 80, title: '可利用', editRender: {name: 'input', attrs: {placeholder: ''}}},
    {field: 'returnProcess', width: 100, title: '退回工序', editRender: {name: 'input', attrs: {placeholder: ''}}},
    {
      field: 'reasonType', width: 100, title: '次破类型',
      editRender: {name: 'input', attrs: {placeholder: '', type: 'selected'}}
    },
    {
      field: 'reasonDamage', width: 100, title: '次破原因',
      editRender: {name: 'input', attrs: {placeholder: ''}}
    },
    {
      field: 'responsibleProcess', width: 100, title: '责任工序',
      editRender: {},
      slots: {default: 'reportingWordSort_default', edit: 'reportingWordSort'}
      //editRender: {name: 'input', attrs: {placeholder: '',type: 'selected'}},
      field: 'breakageNumber',  title: '次破数量',
    },
    {
      field: 'responsibleEquipment',
      width: 100,
      title: '责任设备',
      editRender: {},
      slots: {default: 'reportingDeviceSort_default', edit: 'reportingDeviceSort'}
    // {field: 'available', width: 80, title: '可利用', editRender: {name: 'input', attrs: {placeholder: ''}}},
    // {field: 'returnProcess', width: 100, title: '退回工序', editRender: {name: 'input', attrs: {placeholder: ''}}},
    // {
    //   field: 'reasonType', width: 100, title: '次破类型',
    //   editRender: {name: 'input', attrs: {placeholder: '', type: 'selected'}}
    // },
    // {
    //   field: 'reasonDamage', width: 100, title: '次破原因',
      // editRender: {name: 'input', attrs: {placeholder: ''}}
    },
    {
      field: 'responsibleTeam', width: 100, title: '责任班组',
      editRender: {name: 'input', attrs: {placeholder: ''}}
    },
    {
      field: 'responsibilityPersonnel',
      width: 100,
      title: '责任人员',
      editRender: {name: 'input', attrs: {placeholder: ''}}
    },
    // },
    // {
    //   field: 'responsibleProcess', width: 100, title: '责任工序',
    //   editRender: {},
    //   slots: {default: 'reportingWordSort_default', edit: 'reportingWordSort'}
    //   //editRender: {name: 'input', attrs: {placeholder: '',type: 'selected'}},
    //
    // },
    // {
    //   field: 'responsibleEquipment',
    //   width: 100,
    //   title: '责任设备',
    //   editRender: {},
    //   slots: {default: 'reportingDeviceSort_default', edit: 'reportingDeviceSort'}
    //   // editRender: {name: 'input', attrs: {placeholder: ''}}
    // },
    //
    // {
    //   field: 'responsibleTeam', width: 100, title: '责任班组',
    //   editRender: {name: 'input', attrs: {placeholder: ''}}
    // },
    // {
    //   field: 'responsibilityPersonnel',
    //   width: 100,
    //   title: '责任人员',
    //   editRender: {name: 'input', attrs: {placeholder: ''}}
    //
    // },
    {field: 'completed', width: 90, title: '已完工',},
    {field: 'onceBroken', width: 90, title: '已次破',},
@@ -281,22 +270,130 @@
  },
  data: [],//table body实际数据
  //脚部求和
  footerMethod({columns, data}) {//页脚函数
    let footList = ['', '', '', '', '']
    return [
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
        }
        if (footList.includes(column.field)) {
          return sumNum(data, column.field)
        }
        return ''
      })
    ]
  }
  // footerMethod({columns, data}) {//页脚函数
  //   let footList = ['', '', '', '', '']
  //   return [
  //     columns.map((column, columnIndex) => {
  //       if (columnIndex === 0) {
  //         return '合计:'
  //       }
  //       if (footList.includes(column.field)) {
  //         return sumNum(data, column.field)
  //       }
  //       return ''
  //     })
  //   ]
  // }
})
let brokenRow = ref()
const gridEvents = {
  cellDblclick (params) {//表格内容双击打开产品界面
    const { row } = params
    brokenRow = row
    console.log(row)
    //brokenGrid.value.reload()
    //brokenVisible.value = true
  }
}
const brokenGrid =ref()
const brokenGridOptions = reactive({
  border: "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮
  id: 'CustomerList',
  showFooter: true,//显示脚
  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: [
    //  {type:'expand',fixed:"left",slots: { content:'content' },width: 50},
    {
      field: 'order_number',
      title: '序号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
    },
    {
      field: 'breakageNumber',  title: '次破数量',
    },
    {field: 'available',  title: '可利用', editRender: {name: 'input', attrs: {placeholder: ''}}},
    {field: 'returnProcess', title: '退回工序', editRender: {name: 'input', attrs: {placeholder: ''}}},
    {
      field: 'reasonType', title: '次破类型',
      editRender: {name: 'input', attrs: {placeholder: '', type: 'selected'}}
    },
    {
      field: 'reasonDamage', title: '次破原因',
      editRender: {name: 'input', attrs: {placeholder: ''}}
    },
    {
      field: 'responsibleProcess', title: '责任工序',
      editRender: {},
      slots: {default: 'reportingWordSort_default', edit: 'reportingWordSort'}
      //editRender: {name: 'input', attrs: {placeholder: '',type: 'selected'}},
    },
    {
      field: 'responsibleEquipment',
      title: '责任设备',
      editRender: {},
      slots: {default: 'reportingDeviceSort_default', edit: 'reportingDeviceSort'}
      // editRender: {name: 'input', attrs: {placeholder: ''}}
    },
    {
      field: 'responsibleTeam',  title: '责任班组',
      editRender: {name: 'input', attrs: {placeholder: ''}}
    },
    {
      field: 'responsibilityPersonnel',
      title: '责任人员',
      editRender: {name: 'input', attrs: {placeholder: ''}}
    },
  ],
//表单验证
  editRules: {},
  toolbarConfig: {//表头按钮
    buttons: [
      {code: 'print_lck', name: '添加', status: 'primary', icon: 'vxe-icon-save'},
    ],
    // import: false,
    // export: true,
    // print: true,
    zoom: true,
    custom: true
  },
})
//第一次加载数据
@@ -565,6 +662,7 @@
          max-height="100%"
          size="small"
          v-bind="gridOptions"
          v-on="gridEvents"
          @filter-change="filterChanged"
          @edit-closed="verifyNum"
@@ -598,6 +696,11 @@
      </vxe-grid>
      <el-dialog v-model="brokenVisible" title="破损列表"  style="width: 80%;height:75% ">
        <vxe-grid ref="brokenGrid" v-bind="brokenGridOptions">
        </vxe-grid>
      </el-dialog>
    </div>
  </div>
</template>