NNowhZzU
2023-12-27 97c3f97a11524d8bacc6d36cf2ec4e3b93b5c277
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStockList.vue
@@ -1,287 +1,292 @@
<!-- 成品库存 -->
<script  lang="ts" setup>
import { ref } from 'vue'
import router from "@/router";
let tableData = ref([
  {
    "自序":'30',
    "订单序号":'1',
    "销售单号":'NG23072003',
    "项目名称":'钢化玻璃',
    "订单类型":'普通订单',
    "流程卡号":'NG23072003A01',
    "产品名称":'',
    "产品编号":'06040000022',
    "客户编号":'KD0071',
    "客户名称":'',
    "长度":'1075.00',
    "宽度":'440.00',
    "厚度":'3.00',
    "库存数":'360',
    "实际单片面积":'0.473000',
    "面积":'170.28',
    "结算单片面积":'0.47',
    "结算总面积":'170.28',
    "可用数量":'360',
    "楼层编号":'10927769',
    "送货地址":'钢化玻璃',
    "批次":'',
    "业务员":'陈宗凯',
    "平凡毫米":'1915.6500',
    "重量":'1.91565',
    "最后入库日期":'2023-09-22 08:31:17',
    "库位编号":'成品库',
    "库区":'库区',
    "库位":'0',
    "单据状态":'1',
    "备注":'',
  }, {
    "自序":'31',
    "订单序号":'1',
    "销售单号":'NG23072003',
    "项目名称":'钢化玻璃',
    "订单类型":'普通订单',
    "流程卡号":'NG23072003A02',
    "产品名称":'',
    "产品编号":'06040000022',
    "客户编号":'KD0071',
    "客户名称":'',
    "长度":'1075.00',
    "宽度":'440.00',
    "厚度":'3.00',
    "库存数":'360',
    "实际单片面积":'0.473000',
    "面积":'170.28',
    "结算单片面积":'0.47',
    "结算总面积":'170.28',
    "可用数量":'360',
    "楼层编号":'10927769',
    "送货地址":'钢化玻璃',
    "批次":'',
    "业务员":'陈宗凯',
    "平凡毫米":'1915.6500',
    "重量":'1.91565',
    "最后入库日期":'2023-09-22 08:31:17',
    "库位编号":'成品库',
    "库区":'库区',
    "库位":'0',
    "单据状态":'1',
    "备注":'',
  }, {
    "自序":'32',
    "订单序号":'1',
    "销售单号":'NG23072003',
    "项目名称":'钢化玻璃',
    "订单类型":'普通订单',
    "流程卡号":'NG23072003A01',
    "产品名称":'',
    "产品编号":'06040000022',
    "客户编号":'KD0071',
    "客户名称":'',
    "长度":'1075.00',
    "宽度":'440.00',
    "厚度":'3.00',
    "库存数":'360',
    "实际单片面积":'0.473000',
    "面积":'170.28',
    "结算单片面积":'0.47',
    "结算总面积":'170.28',
    "可用数量":'360',
    "楼层编号":'10927769',
    "送货地址":'钢化玻璃',
    "批次":'',
    "业务员":'陈宗凯',
    "平凡毫米":'1915.6500',
    "重量":'1.91565',
    "最后入库日期":'2023-09-22 08:31:17',
    "库位编号":'成品库',
    "库区":'库区',
    "库位":'0',
    "单据状态":'1',
    "备注":'',
  }, {
    "自序":'33',
    "订单序号":'1',
    "销售单号":'NG23072003',
    "项目名称":'钢化玻璃',
    "订单类型":'普通订单',
    "流程卡号":'NG23072003A01',
    "产品名称":'',
    "产品编号":'06040000022',
    "客户编号":'KD0071',
    "客户名称":'',
    "长度":'1075.00',
    "宽度":'440.00',
    "厚度":'3.00',
    "库存数":'360',
    "实际单片面积":'0.473000',
    "面积":'170.28',
    "结算单片面积":'0.47',
    "结算总面积":'170.28',
    "可用数量":'360',
    "楼层编号":'10927769',
    "送货地址":'钢化玻璃',
    "批次":'',
    "业务员":'陈宗凯',
    "平凡毫米":'1915.6500',
    "重量":'1.91565',
    "最后入库日期":'2023-09-22 08:31:17',
    "库位编号":'成品库',
    "库区":'库区',
    "库位":'0',
    "单据状态":'1',
    "备注":'',
  }, {
    "自序":'34',
    "订单序号":'1',
    "销售单号":'NG23072003',
    "项目名称":'钢化玻璃',
    "订单类型":'普通订单',
    "流程卡号":'NG23072003A01',
    "产品名称":'',
    "产品编号":'06040000022',
    "客户编号":'KD0071',
    "客户名称":'',
    "长度":'1075.00',
    "宽度":'440.00',
    "厚度":'3.00',
    "库存数":'360',
    "实际单片面积":'0.473000',
    "面积":'170.28',
    "结算单片面积":'0.47',
    "结算总面积":'170.28',
    "可用数量":'360',
    "楼层编号":'10927769',
    "送货地址":'钢化玻璃',
    "批次":'',
    "业务员":'陈宗凯',
    "平凡毫米":'1915.6500',
    "重量":'1.91565',
    "最后入库日期":'2023-09-22 08:31:17',
    "库位编号":'成品库',
    "库区":'库区',
    "库位":'0',
    "单据状态":'1',
    "备注":'',
  }, {
    "自序":'35',
    "订单序号":'1',
    "销售单号":'NG23072003',
    "项目名称":'钢化玻璃',
    "订单类型":'普通订单',
    "流程卡号":'NG23072003A01',
    "产品名称":'',
    "产品编号":'06040000022',
    "客户编号":'KD0071',
    "客户名称":'',
    "长度":'1075.00',
    "宽度":'440.00',
    "厚度":'3.00',
    "库存数":'360',
    "实际单片面积":'0.473000',
    "面积":'170.28',
    "结算单片面积":'0.47',
    "结算总面积":'170.28',
    "可用数量":'360',
    "楼层编号":'10927769',
    "送货地址":'钢化玻璃',
    "批次":'',
    "业务员":'陈宗凯',
    "平凡毫米":'1915.6500',
    "重量":'1.91565',
    "最后入库日期":'2023-09-22 08:31:17',
    "库位编号":'成品库',
    "库区":'库区',
    "库位":'0',
    "单据状态":'1',
    "备注":'',
<script setup>
import {reactive, ref} from "vue";
import {useRouter} from  'vue-router'
let router=useRouter()
const getTableRow = (row,type) =>{
  switch (type) {
    case 'edit' :{
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/productStock/OrderAllocation', query: { id: row.id }})
      break
    }
    case 'back':{
      router.push({path: '/main/productStock/FinishedProductRework', query: { id: row.id }})
      break
    }
    case 'out' :{
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/productStock/FinishedGoodsIssue', query: { id: row.id }})
      break
    }
  }
])
const name = ref('')
const productName = ref('')
const salId = ref('')
}
//子组件接收参数
const gridOptions = reactive({
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮
  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'},
    // { type: 'checkbox',fixed:"left", title: '选择', width: '80' },
    { type: 'seq',fixed:"left", title: '自序', width: '80' },
    // {title: '操作', width: '220', slots: { default: 'button_slot' },fixed:"left"},
    {field: 'OrderNumber', width:'150', title: '订单序号', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } } },
    {field: 'SalesOrderNumber', width: '150',title: '销售单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'ProjectName', width: '120',title: '项目名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'OrderType', width: '100',title: '订单类型', sortable: true},
    {field: 'ProcessCardNumber',width: '100', title: '流程卡号', sortable: true,showOverflow:"ellipsis"},
    {field: 'ProductName', width: '100',title: '产品名称', sortable: true},
    {field: 'ProductNumber',width: '100', title: '产品编号', sortable: true},
    {field: 'CustomerNumber', width: '100',title: '客户编号', sortable: true},
    {field: 'CustomerName',width: '100', title: '客户名称', sortable: true},
    {field: 'Length', width: '100',title: '长度', sortable: true},
    {field: 'Width',width: '100', title: '宽度', sortable: true},
    {field: 'Thickness', width: '100',title: '厚度', sortable: true},
    {field: 'InventoryCount',width: '140', title: '库存数', sortable: true},
    {field: 'ActualSingleArea',width: '140', title: '实际单片面积', sortable: true},
    {field: 'Area',width: '100', title: '面积', sortable: true},
    {field: 'SettlementSingleArea',width: '140', title: '结算单片面积', sortable: true},
    {field: 'SettlementTotalArea',width: '140', title: '结算总面积', sortable: true},
    {field: 'AvailableQuantity',width: '100', title: '可用数量', sortable: true},
    {field: 'FloorNumber',width: '100', title: '楼层编号', sortable: true},
    {field: 'DeliveryAddress',width: '100', title: '送货地址', sortable: true},
    {field: 'Batch',width: '100', title: '批次', sortable: true},
    {field: 'Salesman',width: '100', title: '业务员', sortable: true},
    {field: 'OrdinaryMillimeter',width: '100', title: '平凡毫米', sortable: true},
    {field: 'Weight',width: '100', title: '重量', sortable: true},
    {field: 'LastWarehousingDate',width: '140', title: '最后入库日期', sortable: true},
    {field: 'LocationNumber',width: '100', title: '库位编号', sortable: true},
    {field: 'StorageArea',width: '100', title: '存储区域', sortable: true},
    {field: 'Location',width: '100', title: '库位', sortable: true},
    {field: 'DocumentStatus',width: '100', title: '单据状态', sortable: true},
    {field: 'remark',width: '80', title: '备注', sortable: true},
  ],//表头按钮
  toolbarConfig: {
    buttons: [
      { 'code' :'issue','name':'订单调拨',status: 'primary'},
      { 'code' :'out','name':'成品领出',status: 'primary'},
      { 'code' :'rework','name':'成品返工',status: 'primary'},
    ],
    import: false,
    export: true,
    print: true,
    zoom: true,
    custom: true
  },
  data:  [
    {
      "OrderNumber": "1",
      "SalesOrderNumber": "NG23072003",
      "ProjectName": "钢化玻璃",
      "OrderType": "普通订单",
      "ProcessCardNumber": "NG23072003A01",
      "ProductName": '',
      "ProductNumber": "06040000022",
      "CustomerNumber": "KD0071",
      "CustomerName": "件",
      "Length": "1075.00",
      "Width": "440.00",
      "Thickness": "3.00",
      "InventoryCount": "360",
      "ActualSingleArea": "0.473000",
      "Area": "170.28",
      "SettlementSingleArea": "0.47",
      "SettlementTotalArea": "170.28",
      "AvailableQuantity": "360",
      "FloorNumber": "10927769",
      "DeliveryAddress": "上海",
      "Batch": "测试",
      "OrdinaryMillimeter": "陈宗凯",
      "Weight": "1915.6500",
      "LastWarehousingDate": "2023-09-22 08:31:17",
      "LocationNumber": "成品库",
      "StorageArea": "测试",
      "Location": "2",
      "DocumentStatus": "1",
      "Remarks": "测试",
    },
    {
      "OrderNumber": "1",
      "SalesOrderNumber": "NG23072003",
      "ProjectName": "钢化玻璃",
      "OrderType": "普通订单",
      "ProcessCardNumber": "NG23072003A01",
      "ProductName": '',
      "ProductNumber": "06040000022",
      "CustomerNumber": "KD0071",
      "CustomerName": "件",
      "Length": "1075.00",
      "Width": "440.00",
      "Thickness": "3.00",
      "InventoryCount": "360",
      "ActualSingleArea": "0.473000",
      "Area": "170.28",
      "SettlementSingleArea": "0.47",
      "SettlementTotalArea": "170.28",
      "AvailableQuantity": "360",
      "FloorNumber": "10927769",
      "DeliveryAddress": "上海",
      "Batch": "测试",
      "OrdinaryMillimeter": "陈宗凯",
      "Weight": "1915.6500",
      "LastWarehousingDate": "2023-09-22 08:31:17",
      "LocationNumber": "成品库",
      "StorageArea": "测试",
      "Location": "2",
      "DocumentStatus": "1",
      "Remarks": "测试",
    },{
      "OrderNumber": "1",
      "SalesOrderNumber": "NG23072003",
      "ProjectName": "钢化玻璃",
      "OrderType": "普通订单",
      "ProcessCardNumber": "NG23072003A01",
      "ProductName": '',
      "ProductNumber": "06040000022",
      "CustomerNumber": "KD0071",
      "CustomerName": "件",
      "Length": "1075.00",
      "Width": "440.00",
      "Thickness": "3.00",
      "InventoryCount": "360",
      "ActualSingleArea": "0.473000",
      "Area": "170.28",
      "SettlementSingleArea": "0.47",
      "SettlementTotalArea": "170.28",
      "AvailableQuantity": "360",
      "FloorNumber": "10927769",
      "DeliveryAddress": "上海",
      "Batch": "测试",
      "OrdinaryMillimeter": "陈宗凯",
      "Weight": "1915.6500",
      "LastWarehousingDate": "2023-09-22 08:31:17",
      "LocationNumber": "成品库",
      "StorageArea": "测试",
      "Location": "2",
      "DocumentStatus": "1",
      "Remarks": "测试",
    },
  ],//table body实际数据
  footerMethod ({ columns, data }) {//页脚函数
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
        }
        // if (props.tableProp.footList.includes(column.field)) {
        //   return sumNum(data, column.field)
        // }
        return ''
      })
    ]
  }
})
const  xGrid = ref();
const gridEvents = {
  toolbarButtonClick({ code }) {
    const $grid = xGrid.value
    if($grid){
      switch (code){
        case 'issue':{
          /*VXETable.modal.confirm('点击了库存调拨');*/
          router.push({path: '/main/productStock/OrderAllocation'});
          return;
          break
        }
        case 'out':{
          router.push({path: '/main/productStock/FinishedGoodsIssue'});
          return;
          break;
        }
        case 'rework':{
          router.push({path: '/main/productStock/FinishedProductRework'});
          return;
          break;
        }
      }
    }
  }
}
</script>
<template>
  <div>
    <!-- 表单开始 -->
    <div>
      <el-form  size="medium" >
       <el-row gutter="7">
<!--  <el-col :span="4">-->
<!--    <el-input v-model="name" placeholder="请输入客户名称" style="width: 200px; height: 30px;" />-->
<!--  </el-col>-->
<!--  <el-col :span="4">-->
<!--    <el-input v-model="productName" placeholder="请输入项目名称" style="width: 200px; height: 30px;" />-->
<!--  </el-col>-->
<!--  <el-col :span="4">-->
<!--    <el-input v-model="salId" placeholder="请输入销售单号" style="width: 200px; height: 30px;" />-->
<!--  </el-col>-->
  <el-col :span="6.5">
    <el-date-picker
    type="daterange"
    start-placeholder="开始时间"
    end-placeholder="结束时间"
   />
  </el-col>
  <el-col :span="4">
           <el-button id="searchButton" type="primary" :icon="Search" style="width: 100px;">查询</el-button>
         </el-col>
</el-row>
  <div class="main-div-customer">
    <vxe-grid
        max-height="100%"
        @filter-change="filterChanged"
        class="mytable-scrollbar"
        ref="xGrid"
        v-bind="gridOptions"
        v-on="gridEvents"
    >
      <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
      <!--      下拉显示所有信息插槽-->
      <template #content="{ row}">
        <ul class="expand-wrapper">
          <li  v-for="(item,key,index) in row">
            <span style="font-weight: bold">{{key+':  '}}</span>
            <span>{{ item }}</span>
          </li>
        </ul>
      </template>
      <!--左边固定显示的插槽-->
      <template #button_slot="{ row }">
<!--        <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">订单调拨</el-button>-->
<!--        <el-button @click="getTableRow(row,'out')" link type="primary" size="small">成品领出</el-button>-->
<!--        <el-button @click="getTableRow(row,'back')" link type="primary" size="small">成品返工</el-button>-->
      </template>
      <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)"/>
          </div>
        </div>
      </template>
        <!-- <el-form-item size="large">
          <el-button type="primary" @click="submitForm">查询</el-button>
          <el-button @click="resetForm">重置</el-button>
        </el-form-item>-->
      </el-form>
    </div>
    <!-- 表单结束 -->
    <!-- 表格开始 -->
    <div>
  <el-table :data="tableData" border style="width: 100%">
    <el-table-column prop="自序" label="自序" width="180" />
    <el-table-column prop="订单序号" label="订单序号" width="180" />
    <el-table-column prop="销售单号" label="销售单号" width="180"/>
    <el-table-column prop="项目名称" label="项目名称" width="180"/>
    <el-table-column prop="订单类型" label="订单类型" width="180"/>
    <el-table-column prop="流程卡号" label="流程卡号" width="180"/>
    <el-table-column prop="产品名称" label="产品名称" width="180"/>
    <el-table-column prop="产品编号" label="产品编号" width="180"/>
    <el-table-column prop="客户编号" label="客户编号" width="180"/>
    <el-table-column prop="客户名称" label="客户名称" width="180"/>
    <el-table-column prop="长度" label="长度" width="180"/>
    <el-table-column prop="宽度" label="宽度" width="180"/>
    <el-table-column prop="厚度" label="厚度" width="180"/>
    <el-table-column prop="库存数" label="库存数" width="180"/>
    <el-table-column prop="实际单片面积" label="实际单片面积" width="180"/>
    <el-table-column prop="面积" label="面积" width="180"/>
    <el-table-column prop="结算单片面积" label="结算单片面积" width="180"/>
    <el-table-column prop="结算总面积" label="结算总面积" width="180"/>
    <el-table-column prop="可用数量" label="可用数量" width="180"/>
    <el-table-column prop="楼层编号" label="楼层编号" width="180"/>
    <el-table-column prop="送货地址" label="送货地址" width="180"/>
    <el-table-column prop="批次" label="批次" width="180"/>
    <el-table-column prop="业务员" label="业务员" width="180"/>
    <el-table-column prop="平方毫米" label="平方毫米" width="180"/>
    <el-table-column prop="重量" label="重量" width="180"/>
    <el-table-column prop="最后入库日期" label="最后入库日期" width="180"/>
    <el-table-column prop="库位编号" label="库位编号" width="180"/>
    <el-table-column prop="库区" label="库区" width="180"/>
    <el-table-column prop="库位" label="库位" width="180"/>
    <el-table-column prop="单据状态" label="单据状态" width="180"/>
    <el-table-column prop="备注" label="备注" width="180"/>
  </el-table>
    </div>
    <!-- 表格结束 -->
    </vxe-grid>
  </div>
  </template>
</template>
  <style scoped>
  </style>
<style scoped>
.main-div-customer{
  width: 99%;
  height: 100%;
}
</style>