From 35d7d95fa9cf21e8297ed24dcc2f1c83e948361a Mon Sep 17 00:00:00 2001
From: NNowhZzU <1539353356@qq.com>
Date: 星期一, 25 十二月 2023 11:44:46 +0800
Subject: [PATCH] 入库页、退货页

---
 north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Storage.vue |  370 ++++++++++++++++++++++++++++
 north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Return.vue  |  375 ++++++++++++++++++++++++++++
 2 files changed, 745 insertions(+), 0 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Return.vue b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Return.vue
new file mode 100644
index 0000000..8e9c01e
--- /dev/null
+++ b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Return.vue
@@ -0,0 +1,375 @@
+<template>
+  <el-container>
+    <el-header class="m-header" style="height: auto">
+      <el-row :gutter="10" style="margin-bottom: 5px">
+        <el-col :span="7">
+          <el-date-picker
+              v-model="datevalue"
+              type="daterange"
+              unlink-panels
+              range-separator="鍒�"
+              start-placeholder="寮�濮嬫棩鏈�"
+              end-placeholder="缁撴潫鏃ユ湡"
+              :shortcuts="shortcuts"
+              :size="size"
+              format="YYYY/MM/DD"
+              value-format="YYYY-MM-DD"
+          />
+
+        </el-col>
+
+        <el-col :span="2">
+          <el-button
+              id="select"
+              type="primary"
+              :icon="Search"
+              @click="BtnSearchPurchaseOrder">鏌ヨ
+          </el-button>
+        </el-col>
+      </el-row>
+    </el-header>
+    <el-main style="padding-top: 5px;height:100%">
+      <vxe-grid
+
+          max-height="600"
+          @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,'delete')" link type="primary" size="small">鍒犻櫎</el-button>-->
+          <!--          <el-button @click="cellClickEvent" 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>
+      </vxe-grid>
+
+
+      <vxe-modal v-model="showDetails" title="鏌ョ湅璇︽儏" width="600" height="400" :mask="false" :lock-view="false" resize>
+        <template #default>
+          <vxe-table
+              border="inner"
+              auto-resize
+              show-overflow
+              height="auto"
+              :row-config="{isHover: true}"
+              :show-header="false"
+              :sync-resize="showDetails"
+              :data="detailData">
+            <vxe-column field="label" width="40%"></vxe-column>
+            <vxe-column field="value"></vxe-column>
+          </vxe-table>
+        </template>
+      </vxe-modal>
+
+
+    </el-main>
+  </el-container>
+</template>
+
+
+<script setup>
+import {ref} from "vue";
+import {reactive} from "vue";
+import {useRouter} from 'vue-router'
+import {Search} from "@element-plus/icons-vue";
+import dayjs from "dayjs";
+import {VXETable} from "vxe-table";
+
+let router = useRouter()
+const getTableRow = (row, type) => {
+  switch (type) {
+    case 'edit' : {
+      //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+      router.push({path: '/main/purchaseOrder/CreatePurchaseOrder', query: {id: row.id}})
+      break
+    }
+    case 'delete': {
+
+
+
+      alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅'+row.id)
+      break
+    }
+  }
+}
+
+const xGrid = ref()
+const gridEvents = {
+  toolbarButtonClick({code}) {
+    const $grid = xGrid.value
+    if ($grid) {
+      switch (code) {
+        case 'Add': {//鏂板
+          router.push({path: '/main/purchaseOrder/CreatePurchaseOrder'})
+          break
+        }
+        case 'Sure':{
+          if ($grid.getCheckboxRecords().length === 0) {
+            openAlert({type: 'message', content: '璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�', status: 'warning'})
+            //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+            return
+          } else {
+            const type = VXETable.modal.confirm('鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭閫�璐э紵');
+            //openAlert({type:'alert', content: '鎴愬姛鍏ュ簱'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
+            //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+            return
+          }
+          break
+        }
+        case 'Log':{
+
+          openAlert({type: 'alert', content: '鐐瑰嚮浜嗛��璐ц褰�', status: 'success'})
+          break
+        }
+
+      }
+    }
+  },
+  toolbarToolClick({code}) {
+    const $grid = xGrid.value
+    if ($grid) {
+      switch (code) {
+        case 'myPrint': {
+          $grid.print()
+          break
+        }
+      }
+    }
+  },
+}
+
+const openAlert = (options) => {
+  if(options.type==='message'){
+    VXETable.modal.message(options)
+  }else{
+    VXETable.modal.alert(options)
+  }
+
+}
+const closeAlert = (id) => {
+  VXETable.modal.close(id)
+}
+
+const confirmEvent = async () => {
+  const type = await VXETable.modal.confirm('鎮ㄧ‘瀹氳鍒犻櫎鍚楋紵')
+  VXETable.modal.message({ content: `鐐瑰嚮浜� ${type}` })
+}
+
+const BtnSearchPurchaseOrder =()=>{
+  for (let i = 1; i < 6; i++) {
+    const randomInt = Math.floor(Math.random() * 999) + 1000;//4浣嶆暟闅忔満鏁�
+    const randomSumInt = Math.floor(Math.random() * 99) + 10;//2浣嶆暟闅忔満鏁�
+    const randomOrderInt = Math.floor(Math.random() * 99) + 100;//3浣嶆暟闅忔満鏁�
+    const t = i % 2 === 0 ? 5 : 6;
+    const s = i % 2 === 0 ?  '鍏ュ簱' :i % 3 === 0?'閫�璐�':'閮ㄥ垎鍏ュ簱';
+    const thdh = i % 2 === 0 ?  '' :i % 3 === 0?'THID'+randomOrderInt:'';
+    const CGNo = 'NGCG231200' + randomOrderInt;//閲囪喘缂栧彿
+    const wlNo = 'NGWL1000' + randomInt;
+    const xh = 'NGXH' + randomSumInt;
+    const wlmc = 'WLMC' + randomInt;
+    const gys = '渚涘簲鍟�' + randomSumInt;
+    const xhdh='NG231200'+randomOrderInt;
+    const w = i % 2 === 0 ? '3300' : i % 3 === 0 ? '3660' : i % 4 === 0 ? '2250' : '2580';
+    const h = i % 2 === 0 ? '2440' : i % 3 === 0 ? '2440' : i % 4 === 0 ? '2000' : '2300';
+    const dw = i % 2 === 0 ? '鐗�' : i % 3 === 0 ? '骞崇背' : i % 4 === 0 ? '鍖�' : '鍚�';
+    now.setDate(now.getDate() + 1);
+    gridOptions.data.push({
+      cgdh: CGNo,
+      thdh:thdh,
+      h: t,
+      xh: xh,
+      wlbh: wlNo,
+      wlmc: wlmc,
+      gys: gys,
+      w: w,
+      g: h,
+      dw: dw,
+      cgzt:s,
+      rq:dayjs(now).format('YYYY-MM-DD'),
+      yl:randomSumInt,
+      sl:randomOrderInt,
+      xsdh:xhdh,
+      je:randomInt,
+      6: '139xxxxxxxx',
+
+    })
+  }
+
+}
+
+
+
+//缁勪欢鎺ユ敹鍙傛暟
+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: [
+    {title: '鎿嶄綔', width: '8%', slots: {default: 'button_slot'}, fixed: "left"},
+    {type: 'seq', fixed: "left", title: ' ', width: 50},
+    { type: 'checkbox',fixed:"left", title: '', width: 50 },
+    {type: 'expand', title:'璇︽儏', fixed: "left", slots: {content: 'content'}, width: 50},
+    {field: 'thdh', width: '10%', title: '閫�璐у崟鍙�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'cgdh', width: '10%', title: '閲囪喘鍗曞彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'cgzt', width: '10%', title: '鐘舵��', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'gys', width: '10%',title: '渚涘簲鍟�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'wlbh', width: '10%',title: '鐗╂枡缂栧彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'wlmc', width: '10%', title: '鐗╂枡鍚嶇О', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'w', width: '8%',title: '瀹藉害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'g', width: '8%',title: '楂樺害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'h', width: '8%',title: '鍘氬害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'xh', width: '8%',title: '鍨嬪彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'dw', width: '8%',title: '鍗曚綅', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: '6', width: '12%',title: '涓嶅惈绋庡崟浠�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'sl', width: '8%',title: '鏁伴噺', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'sl', width: '12%',title: '宸查噰璐暟閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'je', width: '8%',title: '閲戦', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'je', width: '12%',title: '涓嶅惈绋庨噾棰�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: '6', width: '8%',title: '绋庣巼', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'sl', width: '8%',title: '搴撳瓨', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'yl', width: '10%',title: '鍛ㄧ敤閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'yl', width: '10%',title: '鏈堢敤閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'cgzt', width: '10%',title: '鍗曟嵁鐘舵��', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'xsdh', width: '10%',title: '閿�鍞崟鍙�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'rq', width: '10%',title: '鍒跺崟鏃ユ湡', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: '6', width: '10%', title: '鍒跺崟浜�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: '6', width: '10%',title: '閲囪喘閮ㄩ棬', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: '6', width: '10%',title: '閲囪喘缁勭粐', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: '6', width: '10%',title: '澶囨敞', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
+  ],//琛ㄥご鍙傛暟
+  toolbarConfig: {
+    buttons: [{type:'text'},{
+        'name': '閫�璐ц褰�',
+
+        'code':'Log'
+      },
+      {
+        'name': '纭閫�璐�',
+        status:'primary',
+        'code':'Sure'
+      }],
+    import: false,
+    export: true,
+    print: true,
+    zoom: true,
+    custom: true,
+    style: 'paddling-left:10px'
+  },//琛ㄥご鎸夐挳
+  data: [],//table body瀹為檯鏁版嵁
+  mergeFooterItems: [
+    {row: 0, col: 0, rowspan: 1, colspan: 4}
+  ],//鍚堝苟鑴�
+  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 showDetails = ref(false)
+const detailData = ref([])
+const cellClickEvent = ({ row }) => {
+  detailData.value = ['閲囪喘鍗曞彿', 'wlbh', 'wlmc', 'gys', 'h', 'k', 'g'].map(field => {
+    return { label: field, value: row[field] }
+  })
+  showDetails.value = true
+}*/
+
+
+const now = new Date()
+
+//鏃堕棿蹇嵎閫夋嫨
+const datevalue = ref('')
+const shortcuts = [
+  {
+    text: '杩戜竴鍛�',
+    value: () => {
+      const end = new Date()
+      const start = new Date()
+      start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
+      return [start, end]
+    },
+  },
+  {
+    text: '杩戜竴涓湀',
+    value: () => {
+      const end = new Date()
+      const start = new Date()
+      start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+      return [start, end]
+    },
+  },
+  {
+    text: '杩戜笁涓湀',
+    value: () => {
+      const end = new Date()
+      const start = new Date()
+      start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
+      return [start, end]
+    },
+  },
+]
+
+</script>
+
+
+<style scoped>
+
+</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Storage.vue b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Storage.vue
new file mode 100644
index 0000000..ffe36de
--- /dev/null
+++ b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Storage.vue
@@ -0,0 +1,370 @@
+<template>
+  <el-container>
+    <el-header class="m-header" style="height: auto">
+      <el-row :gutter="10" style="margin-bottom: 5px">
+        <el-col :span="7">
+          <el-date-picker
+              v-model="datevalue"
+              type="daterange"
+              unlink-panels
+              range-separator="鍒�"
+              start-placeholder="寮�濮嬫棩鏈�"
+              end-placeholder="缁撴潫鏃ユ湡"
+              :shortcuts="shortcuts"
+              :size="size"
+              format="YYYY/MM/DD"
+              value-format="YYYY-MM-DD"
+          />
+
+        </el-col>
+
+        <el-col :span="2">
+          <el-button
+              id="select"
+              type="primary"
+              :icon="Search"
+              @click="BtnSearchPurchaseOrder">鏌ヨ
+          </el-button>
+        </el-col>
+      </el-row>
+    </el-header>
+    <el-main style="padding-top: 5px;height:100%">
+      <vxe-grid
+
+          max-height="600"
+          @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,'delete')" link type="primary" size="small">鍒犻櫎</el-button>-->
+          <!--          <el-button @click="cellClickEvent" 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>
+      </vxe-grid>
+
+
+      <vxe-modal v-model="showDetails" title="鏌ョ湅璇︽儏" width="600" height="400" :mask="false" :lock-view="false" resize>
+        <template #default>
+          <vxe-table
+              border="inner"
+              auto-resize
+              show-overflow
+              height="auto"
+              :row-config="{isHover: true}"
+              :show-header="false"
+              :sync-resize="showDetails"
+              :data="detailData">
+            <vxe-column field="label" width="40%"></vxe-column>
+            <vxe-column field="value"></vxe-column>
+          </vxe-table>
+        </template>
+      </vxe-modal>
+
+
+    </el-main>
+  </el-container>
+</template>
+
+
+<script setup>
+import {ref} from "vue";
+import {reactive} from "vue";
+import {useRouter} from 'vue-router'
+import {Search} from "@element-plus/icons-vue";
+import dayjs from "dayjs";
+import {VXETable} from "vxe-table";
+
+let router = useRouter()
+const getTableRow = (row, type) => {
+  switch (type) {
+    case 'edit' : {
+      //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+      router.push({path: '/main/purchaseOrder/CreatePurchaseOrder', query: {id: row.id}})
+      break
+    }
+    case 'delete': {
+
+
+
+      alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅'+row.id)
+      break
+    }
+  }
+}
+
+const xGrid = ref()
+const gridEvents = {
+  toolbarButtonClick({code}) {
+    const $grid = xGrid.value
+    if ($grid) {
+      switch (code) {
+        case 'Sure':{
+          if ($grid.getCheckboxRecords().length === 0) {
+            openAlert({type: 'message', content: '璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�', status: 'warning'})
+            //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+            return
+          } else {
+            const type = VXETable.modal.confirm('鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭閫�璐э紵');
+            //openAlert({type:'alert', content: '鎴愬姛鍏ュ簱'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
+            //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+            return
+          }
+          break
+        }
+        case 'Log':{
+
+          openAlert({type: 'alert', content: '鐐瑰嚮浜嗛��璐ц褰�', status: 'success'})
+          break
+        }
+      }
+    }
+  },
+  toolbarToolClick({code}) {
+    const $grid = xGrid.value
+    if ($grid) {
+      switch (code) {
+        case 'myPrint': {
+          $grid.print()
+          break
+        }
+      }
+    }
+  },
+}
+
+const openAlert = (options) => {
+  if(options.type==='message'){
+    VXETable.modal.message(options)
+  }else{
+    VXETable.modal.alert(options)
+  }
+
+}
+const closeAlert = (id) => {
+  VXETable.modal.close(id)
+}
+
+const confirmEvent = async () => {
+  const type = await VXETable.modal.confirm('鎮ㄧ‘瀹氳鍒犻櫎鍚楋紵')
+  VXETable.modal.message({ content: `鐐瑰嚮浜� ${type}` })
+}
+
+const BtnSearchPurchaseOrder =()=>{
+  for (let i = 1; i < 6; i++) {
+    const randomInt = Math.floor(Math.random() * 999) + 1000;//4浣嶆暟闅忔満鏁�
+    const randomSumInt = Math.floor(Math.random() * 99) + 10;//2浣嶆暟闅忔満鏁�
+    const randomOrderInt = Math.floor(Math.random() * 99) + 100;//3浣嶆暟闅忔満鏁�
+    const t = i % 2 === 0 ? 5 : 6;
+    const s = i % 2 === 0 ? '鍏ュ簱':i % 3 === 0 ? '寰呭鏍�' : '宸查噰璐�';
+    const rkdh = i % 2 === 0 ? 'RKID'+randomOrderInt:i % 3 === 0 ? '' : '';
+    const CGNo = 'NGCG231200' + randomOrderInt;//閲囪喘缂栧彿
+    const wlNo = 'NGWL1000' + randomInt;
+    const xh = 'NGXH' + randomSumInt;
+    const wlmc = 'WLMC' + randomInt;
+    const gys = '渚涘簲鍟�' + randomSumInt;
+    const xhdh='NG231200'+randomOrderInt;
+    const w = i % 2 === 0 ? '3300' : i % 3 === 0 ? '3660' : i % 4 === 0 ? '2250' : '2580';
+    const h = i % 2 === 0 ? '2440' : i % 3 === 0 ? '2440' : i % 4 === 0 ? '2000' : '2300';
+    const dw = i % 2 === 0 ? '鐗�' : i % 3 === 0 ? '骞崇背' : i % 4 === 0 ? '鍖�' : '鍚�';
+    now.setDate(now.getDate() + 1);
+    gridOptions.data.push({
+      cgdh: CGNo,
+      rkdh:rkdh,
+      h: t,
+      xh: xh,
+      wlbh: wlNo,
+      wlmc: wlmc,
+      gys: gys,
+      w: w,
+      g: h,
+      dw: dw,
+      cgzt:s,
+      rq:dayjs(now).format('YYYY-MM-DD'),
+      yl:randomSumInt,
+      sl:randomOrderInt,
+      xsdh:xhdh,
+      je:randomInt,
+      6: '139xxxxxxxx',
+
+    })
+  }
+
+}
+
+
+
+//缁勪欢鎺ユ敹鍙傛暟
+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: [
+    {title: '鎿嶄綔', width: '8%', slots: {default: 'button_slot'}, fixed: "left"},
+    {type: 'seq', fixed: "left", title: ' ', width: 50},
+    { type: 'checkbox',fixed:"left", title: '', width: 50 },
+    {type: 'expand', title:'璇︽儏', fixed: "left", slots: {content: 'content'}, width: 50},
+    {field: 'rkdh', width: '10%', title: '鍏ュ簱鍗曞彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'cgdh', width: '10%', title: '閲囪喘鍗曞彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'cgzt', width: '10%', title: '鐘舵��', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'gys', width: '10%',title: '渚涘簲鍟�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'wlbh', width: '10%',title: '鐗╂枡缂栧彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'wlmc', width: '10%', title: '鐗╂枡鍚嶇О', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'w', width: '8%',title: '瀹藉害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'g', width: '8%',title: '楂樺害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'h', width: '8%',title: '鍘氬害', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'xh', width: '8%',title: '鍨嬪彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'dw', width: '8%',title: '鍗曚綅', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: '6', width: '12%',title: '涓嶅惈绋庡崟浠�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'sl', width: '8%',title: '鏁伴噺', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'sl', width: '12%',title: '宸查噰璐暟閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'je', width: '8%',title: '閲戦', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'je', width: '12%',title: '涓嶅惈绋庨噾棰�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: '6', width: '8%',title: '绋庣巼', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'sl', width: '8%',title: '搴撳瓨', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'yl', width: '10%',title: '鍛ㄧ敤閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'yl', width: '10%',title: '鏈堢敤閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'cgzt', width: '10%',title: '鍗曟嵁鐘舵��', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'xsdh', width: '10%',title: '閿�鍞崟鍙�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: 'rq', width: '10%',title: '鍒跺崟鏃ユ湡', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: '6', width: '10%', title: '鍒跺崟浜�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: '6', width: '10%',title: '閲囪喘閮ㄩ棬', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: '6', width: '10%',title: '閲囪喘缁勭粐', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+    {field: '6', width: '10%',title: '澶囨敞', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
+  ],//琛ㄥご鍙傛暟
+  toolbarConfig: {
+    buttons: [{type:'text'/*,name:'璁㈠崟鍏ュ簱'*/},{
+      'name': '鍏ュ簱璁板綍',
+
+      'code':'Log'
+    },
+      {
+        'name': '纭鍏ュ簱',
+        status:'primary',
+        'code':'Sure'
+      }],
+    import: false,
+    export: true,
+    print: true,
+    zoom: true,
+    custom: true,
+    style: 'paddling-left:10px'
+  },//琛ㄥご鎸夐挳
+  data: [],//table body瀹為檯鏁版嵁
+  mergeFooterItems: [
+    {row: 0, col: 0, rowspan: 1, colspan: 4}
+  ],//鍚堝苟鑴�
+  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 showDetails = ref(false)
+const detailData = ref([])
+const cellClickEvent = ({ row }) => {
+  detailData.value = ['閲囪喘鍗曞彿', 'wlbh', 'wlmc', 'gys', 'h', 'k', 'g'].map(field => {
+    return { label: field, value: row[field] }
+  })
+  showDetails.value = true
+}*/
+
+
+const now = new Date()
+
+//鏃堕棿蹇嵎閫夋嫨
+const datevalue = ref('')
+const shortcuts = [
+  {
+    text: '杩戜竴鍛�',
+    value: () => {
+      const end = new Date()
+      const start = new Date()
+      start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
+      return [start, end]
+    },
+  },
+  {
+    text: '杩戜竴涓湀',
+    value: () => {
+      const end = new Date()
+      const start = new Date()
+      start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+      return [start, end]
+    },
+  },
+  {
+    text: '杩戜笁涓湀',
+    value: () => {
+      const end = new Date()
+      const start = new Date()
+      start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
+      return [start, end]
+    },
+  },
+]
+
+</script>
+
+
+<style scoped>
+
+</style>
\ No newline at end of file

--
Gitblit v1.8.0