chenlu
2024-12-02 e50fa16b6dbc4e7c50d5fbdbc04d2a556ca01c4e
north-glass-erp/northglass-erp/src/views/sd/order/SelectOrder.vue
@@ -121,6 +121,7 @@
      {field: 'area',width:120,  title: t('order.computeGrossArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
      {field: 'money',width:120,  title: t('order.money'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
      {field: 'createTime',width:120,   title: t('basicData.reportData'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
      {field: 'updateTime',width:120,   title: t('productStock.approvedDate'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
      {field: 'packType',width:120,  title: t('order.packType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
      {field: 'orderType',width:120,  title: t('order.orderType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
      {field: 'salesman',width:120,  title: t('order.salesman'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
@@ -135,7 +136,10 @@
      {field: 'processingNote',width:120,  title: t('order.processingNote'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
    ],
    mouseConfig:{selected: true},//鼠标选中
    keyboardConfig:{
      isArrow: true
    },
    //表头按钮
    toolbarConfig: {
      buttons: [
@@ -284,11 +288,11 @@
              ElMessage.warning(t('order.orderNotApproved'))
              return
            }
            if(rowClickIndex.value.warehousing>0){
            if(rowClickIndex.value.warehousing==2){
              ElMessage.warning(t('order.orderHasBeenReceived'))
              return
            }
            request.post(`/FinishedGoodsInventory/oneClickStorage/${rowClickIndex.value.orderId}/${userStore.user.userName}`).then((res) => {
            request.post(`/finishedGoodsInventory/oneClickStorage/${rowClickIndex.value.orderId}/${userStore.user.userName}`).then((res) => {
              if(res.code==200 && res.data===true){
                ElMessage.success(t('productStock.receivedSuccessfully'))
                router.push({path:'/main/order/selectOrder',query:{random:Math.random()}})
@@ -331,6 +335,7 @@
  }
  function filterChanged(column){
    //console.log(column)
    gridOptions.loading=true
    //筛选条件发生变化条件发生变化
    let value = column.datas[0]!=undefined?column.datas[0]:''
@@ -346,7 +351,6 @@
    }
    request.post(`/order/getOrderList/${pageNum.value}/${total.pageSize}/${orderType.value}/${orderInfo.selectDate}`,filterData.value).then((res) => {
      if(res.code==200){
        console.log(res.data.data)
        total.dataTotal = res.data.total.total*1
        total.pageTotal=parseInt(res.data.total)
        pageNum.value=1
@@ -464,6 +468,26 @@
}
const handleKeyDown = (evnt) =>{
  if(evnt.$event.keyCode === 38 ){
    let nextRowIndex = xGrid.value.getRowIndex(xGrid.value.getCurrentRecord()) - 1;
    if (nextRowIndex < xGrid.value.getTableData().fullData.length && nextRowIndex>=0) {
      xGrid.value.setCurrentRow(xGrid.value.getTableData().fullData[nextRowIndex]);
      rowClickIndex.value = xGrid.value.getCurrentRecord()
    }
  }
  if(evnt.$event.keyCode === 40 ){
    let nextRowIndex = xGrid.value.getRowIndex(xGrid.value.getCurrentRecord()) + 1;
    if (nextRowIndex < xGrid.value.getTableData().fullData.length) {
      xGrid.value.setCurrentRow(xGrid.value.getTableData().fullData[nextRowIndex]);
      rowClickIndex.value = xGrid.value.getCurrentRecord()
    }
  }
}
</script>
<template>
@@ -493,6 +517,7 @@
          ref="xGrid"
          v-bind="gridOptions"
          v-on="gridEvents"
          @keydown="handleKeyDown"
      >
        <!--      下拉显示所有信息插槽-->
@@ -537,14 +562,20 @@
        <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"
                  @keyup.enter.native="$panel.confirmFilter()"
                  @input="changeFilterEvent($event, option, $panel)"/>
            </div>
          </div>
        </template>
        <template #num2_filter="{ column, $panel }">
          <div>
            <div v-for="(option, index) in column.filters" :key="index">
              <vxe-select v-model="option.data"  @change="changeFilterEvent($event, option, $panel)" :placeholder="$t('processCard.pleaseSelect')">
              <vxe-select
                  v-model="option.data"
                  @change="changeFilterEvent($event, option, $panel)"
                  :placeholder="$t('processCard.pleaseSelect')">
                <vxe-option value="0" :label="$t('basicData.unchecked')"></vxe-option>
                <vxe-option value="1" :label="$t('basicData.partiallySelected')"></vxe-option>
                <vxe-option value="2" :label="$t('basicData.selected')"></vxe-option>