From f761fc0f9428786d995b774543fea47b26a0d01b Mon Sep 17 00:00:00 2001
From: clll <1320612696@qq.com>
Date: 星期一, 25 十二月 2023 11:51:44 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/mm/stockReport/StockReport.vue | 6
north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Create.vue | 524 ++++++--
north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/PurchaseOrder.vue | 22
north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Select.vue | 435 ++++--
north-glass-erp/northglass-erp/src/views/mm/stockReport/StockWarehouseReport.vue | 347 ++++--
north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Payment.vue | 288 +++-
north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Storage.vue | 370 ++++++
north-glass-erp/northglass-erp/src/views/mm/stockReport/StockMonthReport.vue | 330 +++-
north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Return.vue | 375 ++++++
north-glass-erp/northglass-erp/src/views/mm/stockReport/SubsidiaryMonthReport.vue | 323 +++-
north-glass-erp/northglass-erp/src/views/mm/stockReport/WarehouseReport.vue | 367 ++++--
11 files changed, 2,555 insertions(+), 832 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Create.vue b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Create.vue
index 1f71ced..5048120 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Create.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Create.vue
@@ -1,130 +1,393 @@
-
-
<template>
-<div>
- <el-form label-width="100px" :inline="true" :model="formInline" class="demo-form-inline">
- <el-form-item label="閲囪喘绫诲瀷" class="item-style" >
- <el-select v-model="form.buyType" class="m-2" placeholder="閫夋嫨閲囪喘绫诲瀷" clearable >
- <el-option
- v-for="item in CGTypeOptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </el-form-item>
-
- <el-form-item label="閲囪喘閮ㄩ棬" class="item-style" >
- <el-select v-model="cgBuMen" class="m-2" placeholder="閫夋嫨閲囪喘閮ㄩ棬" clearable >
- <el-option
- v-for="item in CGBuMenOptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </el-form-item>
-
- <el-form-item label="渚涘簲鍟�" class="item-style" >
- <el-cascader
- placeholder="閫夋嫨渚涘簲鍟�"
- :options="buyerOptions"
- filterable
- clearable
- empty-text="empty-text"
- :v-model="form.supplier"
- >
- </el-cascader>
- </el-form-item>
-
-
- <el-form-item label="閲囪喘鍛�" class="item-style" >
- <el-select v-model="form.buyer" class="m-2" placeholder="閫夋嫨閲囪喘閮ㄩ棬" clearable >
- <el-option
- v-for="item in BuyerOptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </el-form-item>
-
- <el-form-item label="閲囪喘缁勭粐" class="item-style" >
- <el-input v-model="form.buyItem" placeholder="閲囪喘缁勭粐" clearable ></el-input>
- </el-form-item>
-
- <el-form-item label="鍒惰〃鏃ユ湡" class="item-style" >
-
- <el-date-picker
- v-model="form.date"
- type="date"
- placeholder="閫夋嫨鍒惰〃鏃ユ湡"
- style="width: 100%"
- />
-
- </el-form-item>
- <el-form-item class="item-style" >
+ <el-header height="auto">
+ <el-form label-width="100px" :inline="true" :model="formInline" class="demo-form-inline">
<el-row :gutter="10">
-
- <el-col :span="6" :offset="6">
- <el-button type="primary" @click="onSubmit">淇濆瓨</el-button>
+ <el-col :span="6">
+ <el-form-item label="閲囪喘绫诲瀷" class="item-style">
+ <el-select v-model="form.buyType" class="m-2" placeholder="閫夋嫨閲囪喘绫诲瀷" clearable>
+ <el-option
+ v-for="item in CGTypeOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
</el-col>
- <el-col :span="6" :offset="6">
- <el-button>鍙栨秷</el-button>
+ <el-col :span="6">
+ <el-form-item label="閲囪喘閮ㄩ棬" class="item-style">
+ <el-select v-model="cgBuMen" class="m-2" placeholder="閫夋嫨閲囪喘閮ㄩ棬" clearable>
+ <el-option
+ v-for="item in CGBuMenOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
</el-col>
-
-
-
+ <el-col :span="6">
+ <el-form-item label="渚涘簲鍟�" class="item-style">
+ <el-cascader
+ placeholder="閫夋嫨渚涘簲鍟�"
+ :options="buyerOptions"
+ filterable
+ clearable
+ empty-text="empty-text"
+ :v-model="form.supplier"
+ >
+ </el-cascader>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="閲囪喘鍛�" class="item-style">
+ <el-select v-model="form.buyer" class="m-2" placeholder="閫夋嫨閲囪喘閮ㄩ棬" clearable>
+ <el-option
+ v-for="item in BuyerOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
</el-row>
- </el-form-item>
- </el-form>
+ <el-row :gutter="10">
+ <el-col :span="6">
+ <el-form-item label="閲囪喘缁勭粐" class="item-style">
+ <el-input v-model="form.buyItem" placeholder="閲囪喘缁勭粐" clearable></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鍒惰〃鏃ユ湡" class="item-style">
-<div>
- <el-button class="mt-4" style="width: 10%" @click="onAddItem"
- >娣诲姞</el-button>
- <el-table :data="tableData" style="width: 98%" max-height="500" border show-summary
- sum-text=" ">
- <el-table-column fixed="left" label="鎿嶄綔" width="60">
- <template #default="scope">
- <el-button
- link
- type="primary"
- size="small"
- @click.prevent="deleteRow(scope.$index)"
- >
- 鍒犻櫎
- </el-button>
+ <el-date-picker
+ v-model="form.date"
+ type="date"
+ placeholder="閫夋嫨鍒惰〃鏃ユ湡"
+ style="width: 100%"
+ />
+
+ </el-form-item>
+ </el-col>
+<!-- <el-col :span="6">
+ <el-form-item class="item-style">
+ <el-row :gutter="10">
+
+ <el-col :span="6" :offset="6">
+ <el-button type="primary" @click="onSubmit">淇濆瓨</el-button>
+ </el-col>
+ <el-col :span="6" :offset="6">
+ <el-button>杩斿洖璁㈠崟鏌ヨ</el-button>
+ </el-col>
+
+
+ </el-row>
+
+ </el-form-item>
+ </el-col>-->
+ <el-col :span="6"></el-col>
+
+ </el-row>
+
+
+ </el-form>
+
+ </el-header>
+
+ <el-main style="padding-top: 5px;height:100%">
+<!-- <el-button class="mt-4" style="width: 10%" @click="onAddItem"
+ >娣诲姞
+ </el-button>-->
+
+ <vxe-grid
+
+ max-height="500"
+ @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>
- </el-table-column>
- <el-table-column fixed prop="wlcode" label="鐗╂枡缂栫爜" width="150" />
- <el-table-column prop="wlname" label="鐗╂枡鍚嶇О" width="180" />
- <el-table-column prop="cd" label="浜у湴" width="100" />
- <el-table-column prop="kd" label="瀹藉害" width="70" />
- <el-table-column prop="gd" label="楂樺害" width="70" />
- <el-table-column prop="hd" label="鍘氬害" width="60" />
- <el-table-column prop="xh" label="鍨嬪彿" width="80" />
- <el-table-column prop="hd" label="鍗曚綅鏁伴噺" width="100" />
- <el-table-column prop="hd" label="鍗曚綅" width="60" />
- <el-table-column prop="hd" label="绠辨暟" width="60" />
- <el-table-column prop="hd" label="鍗曠墖闈㈢Н" width="100" />
- <el-table-column prop="hd" label="鍗曚环" width="60" />
- <el-table-column prop="hd" label="鎬绘暟閲�" width="80" />
- <el-table-column prop="hd" label="鎬婚潰绉�" width="80" />
- <el-table-column prop="hd" label="鎬婚噾棰�" width="80" />
- <el-table-column prop="hd" label="澶囨敞" width="120" />
- </el-table>
+ <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
+ <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>
-</div>
-</div>
+ <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>
+
+ </el-main>
+
</template>
<script setup>
-import { ref,reactive } from 'vue'
+import {ref, reactive} from 'vue'
+let router = useRouter()
-// do not use same name with 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: [
+ //{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: 'cgdh', width: '10%', title: '鐗╂枡缂栫爜', filters: [{data: ''}], slots: {filter: 'num1_filter'}, editRender: { name: 'input', attrs: { placeholder: '' } },sortable: true},
+ {field: 'cgzt', width: '10%', title: '鐗╂枡鍚嶇О', filters: [{data: ''}], slots: {filter: 'num1_filter'},editRender: { name: 'input', attrs: { placeholder: '' } }, sortable: true},
+ {field: 'gys', width: '10%',title: '浜у湴', filters: [{data: ''}], slots: {filter: 'num1_filter'}, editRender: { name: 'input', attrs: { placeholder: '' } },sortable: true},
+ {field: 'w', width: '8%',title: '瀹藉害', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/ editRender: { name: 'input', attrs: { placeholder: '' } }, sortable: true},
+ {field: 'g', width: '8%',title: '楂樺害', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/ editRender: { name: 'input', attrs: { placeholder: '' } },sortable: true},
+ {field: 'h', width: '8%',title: '鍘氬害', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/ editRender: { name: 'input', attrs: { placeholder: '' } },sortable: true},
+ {field: 'xh', width: '8%',title: '鍨嬪彿',/*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/ editRender: { name: 'input', attrs: { placeholder: '' } },sortable: true},
+ {field: 'dw', width: '8%',title: '鍗曚綅', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/ editRender: { name: 'input', attrs: { placeholder: '' } },sortable: true},
+ {field: 'sl', width: '8%',title: '鏁伴噺', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/ editRender: { name: 'input', attrs: { placeholder: '' } },sortable: true},
+ {field: 'sl', width: '8%',title: '鎿嶄綔鏁伴噺', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/ editRender: { name: 'input', attrs: { placeholder: '' } }},
+ {field: 'sl', width: '12%',title: '绠辨暟', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/ editRender: { name: 'input', attrs: { placeholder: '' } },sortable: true},
+ {field: 'je', width: '8%',title: '鍗曠墖闈㈢Н', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/ editRender: { name: 'input', attrs: { placeholder: '' } },sortable: true},
+ {field: 'je', width: '12%',title: '鍗曚环', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/ editRender: { name: 'input', attrs: { placeholder: '' } },sortable: true},
+ {field: '6', width: '8%',title: '鎬绘暟閲�', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/ editRender: { name: 'input', attrs: { placeholder: '' } },sortable: true},
+ {field: 'sl', width: '8%',title: '鎬婚潰绉�', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/ editRender: { name: 'input', attrs: { placeholder: '' } },sortable: true},
+ {field: 'yl', width: '10%',title: '鎬婚噾棰�',/*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/ editRender: { name: 'input', attrs: { placeholder: '' } },sortable: true},
+ {field: 'yl', width: '10%',title: '澶囨敞', /*filters: [{data: ''}], slots: {filter: 'num1_filter'},*/ editRender: { name: 'input', attrs: { placeholder: '' } }, sortable: true}
+ ],//琛ㄥご鍙傛暟
+ toolbarConfig: {
+ buttons: [
+ {type:'text'},
+ {
+ 'name': '鏂板',
+
+ 'code':'Add',
+ },
+ {
+ 'name': '绉婚櫎',
+
+ 'code':'Remove'
+ },
+ {
+ 'name': '淇濆瓨璁㈠崟',
+ status:'primary',
+ 'code':'Save'
+ },{
+ 'name': '鍏ュ簱',
+ status:'primary',
+ 'code':'Storage'
+ },
+ {
+ 'name': '閫�璐�',
+ status:'primary',
+ 'code':'Return'
+ },
+ {
+ 'name': '杩斿洖鏌ヨ',
+
+ 'code':'GoSelect'
+ }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true,
+ tools: [
+
+ ],
+
+ },//琛ㄥご鎸夐挳
+ /*data: [{},{},{},{},{},{}],//table body瀹為檯鏁版嵁*/
+ 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 xGrid = ref()
+const gridEvents = {
+ toolbarButtonClick({code}) {
+ const $grid = xGrid.value
+ if ($grid) {
+ switch (code) {
+ case 'Add': {//鏂板
+ const record = {
+ checked: false
+ }
+ $grid.insertAt(record, 0).then(({row}) => {
+ $grid.setEditRow(row)
+ })
+ break
+ }
+ case 'Remove': {//绉婚櫎
+ 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 'Save': {//淇濆瓨
+
+
+ if(form.buyItem === null || form.buyItem === ''){
+ openAlert({type: 'message', content: '閲囪喘缁勭粐涓嶅彲涓虹┖', status: 'warning'})
+ }
+
+return
+
+ if(buyerOptions.values() <= 0){
+
+ }
+
+ const type = VXETable.modal.confirm('鏄惁纭畾淇濆瓨褰撳墠璁㈠崟淇℃伅锛�');
+ openAlert({type: 'message', content: $grid.rows.number+'', status: 'warning'})
+ return
+
+ break
+ }
+ case 'GoSelect':{
+
+ router.push({path: '/main/purchaseOrder/SelectPurchaseOrder'})
+ break
+ }
+
+ case 'Storage': {//鍏ュ簱
+ 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 'Return': {//閫�搴�
+ if ($grid.getCheckboxRecords().length === 0) {
+ openAlert({type: 'message', content: '璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�', status: 'warning'})
+ //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+ return
+ } else {
+ /* async ()=>{
+ const type = await.VXETable.modal.confirm('鎮ㄩ�夋嫨浜�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒,鏄惁纭閫�搴擄紵');
+ }*/
+ const type = VXETable.modal.confirm('鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭閫�搴擄紵');
+
+
+ /* if(VXETable.modal.confirm('鎮ㄩ�夋嫨浜�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒,鏄惁纭閫�搴擄紵' )){
+ //openAlert({type:'message', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success',lockView: false, mask: false })
+
+
+ }*/
+
+ /* if(type==='confirm'){
+ openAlert({type:'message', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
+ }
+
+*/
+ //openAlert({type:'alert', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
+ //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+ return
+ }
+ 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 form = reactive({
name: '',
region: '',
@@ -133,16 +396,18 @@
type: [],
resource: '',
desc: '',
- supplier:'',
- buyer:'',
- buyItem:'',
- buyType:''
+ supplier: '',
+ buyer: '',
+ buyItem: '',
+ buyType: ''
})
const onSubmit = () => {
console.log('submit!')
}
+
+//渚涘簲鍟�
const buyerOptions = [
{value: '0', label: '渚涘簲鍟�1'},
{value: '1', label: '渚涘簲鍟�2'},
@@ -153,10 +418,10 @@
]
-
const value = ref('')
const cgBuMen = ref('')
+//閲囪喘绫诲瀷
const CGTypeOptions = [
{
value: '1',
@@ -173,8 +438,8 @@
]
-
-const CGBuMenOptions=[
+//閲囪喘閮ㄩ棬
+const CGBuMenOptions = [
{
value: '0',
label: '閲囪喘鍗庡寳閮�',
@@ -198,7 +463,8 @@
]
-const BuyerOptions=[
+//閲囪喘浜�
+const BuyerOptions = [
{
value: '0',
label: '閲囪喘鍛�1',
@@ -223,6 +489,8 @@
]
import dayjs from 'dayjs'
+import {VXETable} from "vxe-table";
+import {useRouter} from "vue-router";
const now = new Date()
@@ -234,7 +502,7 @@
hd: '8',
gd: '2440',
kd: '3660',
- xh:'CN10P'
+ xh: 'CN10P'
},
{
wlcode: '202312305101',
@@ -243,7 +511,7 @@
gd: '2440',
kd: '3660',
hd: '5',
- xh:'CN10P'
+ xh: 'CN10P'
},
{
wlcode: '202312405101',
@@ -252,20 +520,19 @@
hd: '12',
gd: '2440',
kd: '3660',
- xh:'CN10P'
+ xh: 'CN10P'
},
])
-
const onAddItem = () => {
now.setDate(now.getDate() + 1)
tableData.value.push({
- wlcode: dayjs(now).format('YYYYMMDDss')+'01',
+ wlcode: dayjs(now).format('YYYYMMDDss') + '01',
wlname: '杩欐槸涓�涓墿鏂欏悕绉�',
cd: '浜у湴1',
hd: '6',
- xh:'CN10P',
+ xh: 'CN10P',
gd: '2440',
kd: '3660',
})
@@ -285,7 +552,8 @@
height: unset;
}
}
-.item-style{
- width:300px;
+
+.item-style {
+ width: 300px;
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Payment.vue b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Payment.vue
index 7037b80..8b12b58 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Payment.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Payment.vue
@@ -15,7 +15,6 @@
format="YYYY/MM/DD"
value-format="YYYY-MM-DD"
/>
-
</el-col>
<el-col :span="2">
@@ -30,50 +29,44 @@
</el-header>
<el-main style="padding-top: 5px">
- <div>
+ <vxe-grid
- <el-table :data="tableData" empty-text="鏆傛棤鏁版嵁" style="width: 100%" max-height="550px" border
- show-summary
- sum-text=" ">
- <el-table-column fixed="left" prop="rIndex" label="" width="50" align="center"></el-table-column>
+ max-height="600"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="PayOptions"
+ @="gridEvents"
- <el-table-column fixed="left" label="鎿嶄綔" width="100%">
- <template #default="scope">
- <el-button
- link
- type="primary"
- size="small"
- @click.prevent="editRow(scope.$index)"
- >
- 缂栬緫
- </el-button>
- <el-button
- link
- type="primary"
- size="small"
- @click.prevent="deleteRow(scope.$index)"
- >
- 鍒犻櫎
- </el-button>
- </template>
- </el-table-column>
+ >
+ <!-- @="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>
- <el-table-column prop="ordernumber" label="閲囪喘鍗曞彿" width="200%"/>
- <el-table-column prop="name" label="鏈堜唤" width="100%"/>
- <el-table-column prop="strockNumber" label="渚涘簲鍟�" width="200%"/>
- <el-table-column prop="city" label="鏈熷垵閲戦" width="100%"/>
- <el-table-column prop="width" sortable label="鏈湡搴斾粯" width="150%"/>
- <el-table-column prop="height" sortable label="鏈湡宸蹭粯" width="150%"/>
- <el-table-column prop="thick" sortable label="鏈熸湯浣欓" width="150%"/>
- <el-table-column prop="zip" label="绋庣巼" width="150%"/>
- <el-table-column prop="zip" label="澶囨敞" width="200"/>
-
-
- </el-table>
-
-
- </div>
+ <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>
</el-main>
</el-container>
</template>
@@ -81,46 +74,192 @@
<script setup>
import {ref} from 'vue'
-import {Plus, Search} from "@element-plus/icons-vue";
-
-import dayjs from 'dayjs'
+import {Search} from "@element-plus/icons-vue";
import 'dayjs/locale/zh-cn'
+import {VXETable} from "vxe-table";
+import {reactive} from "vue";
+import {useRouter} from 'vue-router'
-const now = new Date()
+//缁勪欢鎺ユ敹鍙傛暟
+const PayOptions = 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: '5%'},
+ {type: 'checkbox', fixed: "left", title: '', width: '5%'},
+ {type: 'expand', title: '璇︽儏', fixed: "left", slots: {content: 'content'}, width: '5%'},
+ {
+ 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: '10%', title: '鏈湡宸蹭粯', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'g', width: '10%', title: '鏈熸湯浣欓', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'h', width: '9%', 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': '搴斾粯纭',
+ 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: 3}
+ ],//鍚堝苟鑴�
+ 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 tableData = ref([])
+})
-const autoAddRow = () => {
- for (let i = 0; i < 10; i++) {
- now.setDate(now.getDate() + 1)
- const randomInt = Math.floor(Math.random() * 999) + 1000;
- const randomOrderInt = Math.floor(Math.random() * 99) + 100;
- const randomSumInt = Math.floor(Math.random() * 99) + 10;
- var t = i % 2 === 0 ? 5 : 6;
- var s = i % 3 === 0 ? '' : i % 4 === 0 ? '宸查噰璐�' : '寰呭鏍�';
- var oNo = 'NGNO100000' + randomOrderInt;//璁㈠崟缂栧彿
- var wlNo = 'NGWL100000' + randomInt
- tableData.value.push({
- date: dayjs(now).format('YYYY-MM-DD'),
- name: '渚涘簲鍟�' + randomSumInt,
- state: s,
- city: 'Los Angeles',
- address: 'No. 189, Grove St, Los Angeles',
- zip: 'CA 90036',
- number: randomInt,
- width: '3660',
- height: '2440',
- rIndex: tableData.value.length + 1,
- ordernumber: oNo,
- strockNumber: wlNo,
- thick: t
- })
- }
+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 'Storage': {//鍏ュ簱
+ 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 'Return': {//閫�搴�
+ if ($grid.getCheckboxRecords().length === 0) {
+ openAlert({type: 'message', content: '璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�', status: 'warning'})
+ //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+ return
+ } else {
+ /* async ()=>{
+ const type = await.VXETable.modal.confirm('鎮ㄩ�夋嫨浜�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒,鏄惁纭閫�搴擄紵');
+ }*/
+ const type = VXETable.modal.confirm('鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭閫�搴擄紵');
+
+
+ /* if(VXETable.modal.confirm('鎮ㄩ�夋嫨浜�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒,鏄惁纭閫�搴擄紵' )){
+ //openAlert({type:'message', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success',lockView: false, mask: false })
+
+
+ }*/
+
+ /* if(type==='confirm'){
+ openAlert({type:'message', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
+ }
+
+*/
+ //openAlert({type:'alert', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
+ //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+ return
+ }
+ break
+ }
+ }
+ }
+ },
+ toolbarToolClick({code}) {
+ const $grid = xGrid.value
+ if ($grid) {
+ switch (code) {
+ case 'myPrint': {
+ $grid.print()
+ break
+ }
+ }
+ }
+ },
}
-const CreatePurchaseOrder = () => {
-
+const openAlert = (options) => {
+ if (options.type === 'message') {
+ VXETable.modal.message(options)
+ } else {
+ VXETable.modal.alert(options)
+ }
}
@@ -155,7 +294,6 @@
},
},
]
-
</script>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/PurchaseOrder.vue b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/PurchaseOrder.vue
index 7d68473..3addbe5 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/PurchaseOrder.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/PurchaseOrder.vue
@@ -1,27 +1,33 @@
<template>
<div class="common-layout">
- <el-container>
+ <el-container>
<el-header style="height: 30px">
<el-breadcrumb :separator-icon="ArrowRight" >
- <el-breadcrumb-item>閲囪喘涓庣墿璧�</el-breadcrumb-item>
+<!-- <el-breadcrumb-item>閲囪喘涓庣墿璧�</el-breadcrumb-item>
<el-breadcrumb-item>閲囪喘璁㈠崟
+ </el-breadcrumb-item>-->
+ <el-breadcrumb-item :to="{path:'/main/purchaseOrder/SelectPurchaseOrder'}">鏌ヨ璁㈠崟
</el-breadcrumb-item>
- <el-breadcrumb-item :to="{path:'/main/purchaseOrder/SelectPurchaseOrder'}">鏌ヨ
+ <el-breadcrumb-item :to="{path:'/main/purchaseOrder/CreatePurchaseOrder'}">鍒涘缓璁㈠崟
</el-breadcrumb-item>
- <el-breadcrumb-item :to="{path:'/main/purchaseOrder/CreatePurchaseOrder'}">鍒涘缓
+ <el-breadcrumb-item :to="{path:'/main/purchaseOrder/StoragePurchaseOrder'}">璁㈠崟鍏ュ簱
</el-breadcrumb-item>
- <el-breadcrumb-item :to="{path:'/main/purchaseOrder/PaymentPurchaseOrder'}">搴斾粯
+ <el-breadcrumb-item :to="{path:'/main/purchaseOrder/ReturnPurchaseOrder'}">璁㈠崟閫�璐�
</el-breadcrumb-item>
- <el-breadcrumb-item >
+ <el-breadcrumb-item :to="{path:'/main/purchaseOrder/PaymentPurchaseOrder'}">搴斾粯璁㈠崟
</el-breadcrumb-item>
+ <el-breadcrumb-item style="display: none"></el-breadcrumb-item>
</el-breadcrumb>
</el-header>
<el-main style="padding: 0">
- <router-view/>
+<router-view/>
</el-main>
- <!-- <el-footer>Footer</el-footer>-->
+<!-- <el-footer>Footer</el-footer>-->
</el-container>
+
+
</div>
+
</template>
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/Select.vue b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Select.vue
index fe28c9d..37d938a 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Select.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Select.vue
@@ -23,189 +23,304 @@
id="select"
type="primary"
:icon="Search"
- @click="autoAddRow">鏌ヨ
+ @click="BtnSearchPurchaseOrder">鏌ヨ
</el-button>
</el-col>
</el-row>
-
</el-header>
- <el-main style="padding-top: 5px">
- <div @scroll="handleTableScroll">
+ <el-main style="padding-top: 5px;height:100%">
+ <vxe-grid
- <el-table :data="tableData" empty-text="鏆傛棤鏁版嵁" style="width: 100%" max-height="550px" border
- show-summary
- sum-text=" ">
- <el-table-column fixed="left" prop="rIndex" label="" width="50" align="center"></el-table-column>
+ max-height="600"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
+ v-on="gridEvents"
+ >
- <el-table-column fixed="left" label="鎿嶄綔" width="120">
- <template #default="scope">
- <el-button
- link
- type="primary"
- size="small"
- @click.prevent="editRow(scope.$index)"
- >
- 缂栬緫
- </el-button>
- <el-button
- link
- type="primary"
- size="small"
- @click.prevent="deleteRow(scope.$index)"
- >
- 鍒犻櫎
- </el-button>
- </template>
- </el-table-column>
+ <!-- @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>
- <el-table-column prop="ordernumber" label="閲囪喘鍗曞彿" width="150"/>
- <el-table-column prop="name" label="渚涘簲鍟�" width="120"/>
- <el-table-column prop="strockNumber" label="鐗╂枡缂栧彿" width="200"/>
- <el-table-column prop="city" label="鐗╂枡鍚嶇О" width="120"/>
- <el-table-column prop="width" sortable label="瀹藉害" width="120"/>
- <el-table-column prop="height" sortable label="楂樺害" width="120"/>
- <el-table-column prop="thick" sortable label="鍘氬害" width="120"/>
- <el-table-column prop="zip" label="鍨嬪彿" width="120"/>
- <el-table-column prop="number" label="鍗曚綅" width="120"/>
- <el-table-column prop="number" sortable label="涓嶅惈绋庡崟浠�" width="120"/>
- <el-table-column prop="number" label="鏁伴噺" width="120" show-summary="ture"/>
- <el-table-column prop="number" label="宸查噰璐暟閲�" width="120"/>
- <el-table-column prop="zip" sortable label="閲戦" width="120"/>
- <el-table-column prop="zip" label="涓嶅惈绋庨噾棰�" width="120"/>
- <el-table-column prop="date" label="绋庣巼" width="120"/>
- <el-table-column prop="date" label="搴撳瓨" width="120"/>
- <el-table-column prop="zip" label="鍛ㄧ敤閲�" width="120"/>
- <el-table-column prop="zip" label="鏈堢敤閲�" width="120"/>
- <el-table-column prop="state" label="鍗曟嵁鐘舵��" width="120"/>
- <el-table-column prop="ordernumber" label="閿�鍞崟鍙�" width="200"/>
- <el-table-column prop="date" label="鍒跺崟鏃ユ湡" width="120"/>
- <el-table-column prop="zip" label="鍒跺崟浜�" width="120"/>
- <el-table-column prop="zip" label="閲囪喘閮ㄩ棬" width="120"/>
- <el-table-column prop="zip" label="閲囪喘缁勭粐" width="120"/>
- <el-table-column prop="zip" label="澶囨敞" width="200"/>
+ <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>
- </el-table>
+ <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>
- </div>
</el-main>
</el-container>
</template>
<script setup>
-import {ref} from 'vue'
-import {Plus, Search} from "@element-plus/icons-vue";
+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";
-const s_wuliaomingcheng = ref('')
-const s_buyOrderNumber = ref('')
-const s_width = ref('')
-const s_height = ref('')
-const s_thick = ref('')
+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': {
-const options = [
- {
- value: '0',
- label: '鍏ㄩ儴'
- },
- {
- value: '1',
- label: '鍘熺墖'
- },
- {
- value: '2',
- label: '鍖栧鍝�'
- },
- {
- value: '3',
- label: '宸ュ叿'
- },
- {
- value: '4',
- label: '鏈ㄧ'
- },
- {
- value: '5',
- label: '鐧界幓'
- },
-]
-const buyerOptions = [
- {
- value: '0',
- label: '鍏ㄩ儴'
- },
- {
- value: '1',
- label: '閲囪喘鐢�'
- },
- {
- value: '2',
- label: '閲囪喘涔�'
- },
-]
-
-const stateOptions = [
- {
- value: '0',
- label: '寰呭鏍�'
- },
- {
- value: '1',
- label: '寰呴噰璐�'
- },
- {
- value: '2',
- label: '宸查噰璐�'
- },
-]
-
-import dayjs from 'dayjs'
-import 'dayjs/locale/zh-cn'
-
-const now = new Date()
-
-const tableData = ref([])
-
-const autoAddRow = () => {
- for (let i = 0; i < 10; i++) {
- now.setDate(now.getDate() + 1)
- const randomInt = Math.floor(Math.random() * 999) + 1000;
- const randomOrderInt = Math.floor(Math.random() * 99) + 100;
- const randomSumInt = Math.floor(Math.random() * 99) + 10;
- var t = i % 2 === 0 ? 5 : 6;
- var s = i % 3 === 0 ? '' : i % 4 === 0 ? '宸查噰璐�' : '寰呭鏍�';
- var oNo = 'NGNO100000' + randomOrderInt;//璁㈠崟缂栧彿
- var wlNo = 'NGWL100000' + randomInt
- tableData.value.push({
-
- date: dayjs(now).format('YYYY-MM-DD'),
- name: '渚涘簲鍟�' + randomSumInt,
- state: s,
- city: 'Los Angeles',
- address: 'No. 189, Grove St, Los Angeles',
- zip: 'CA 90036',
- number: randomInt,
- width: '3660',
- height: '2440',
- rIndex: tableData.value.length + 1,
- ordernumber: oNo,
- strockNumber: wlNo,
- thick: t
- })
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅'+row.id)
+ break
+ }
}
}
-const CreatePurchaseOrder = () => {
+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 'AddNo': {//鏃犲崟鏂板
+ 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 ? '寰呭鏍�' : i % 5 === 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,
+ 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 datevalue = 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: [
+ {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: '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':'Add',
+ },
+
+ {
+ 'name': '鏃犲崟鏂板',
+
+ 'code':'AddNo'
+ }],
+ 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: '杩戜竴鍛�',
@@ -240,19 +355,5 @@
<style scoped>
-.el-row {
- margin-bottom: 20px;
-}
-.el-row:last-child {
- margin-bottom: 0;
-}
-
-.el-col {
- border-radius: 4px;
-}
-
-.m-header {
- height: 32px;
-}
</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
diff --git a/north-glass-erp/northglass-erp/src/views/mm/stockReport/StockMonthReport.vue b/north-glass-erp/northglass-erp/src/views/mm/stockReport/StockMonthReport.vue
index 6393784..b8cc81a 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/stockReport/StockMonthReport.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/stockReport/StockMonthReport.vue
@@ -1,6 +1,6 @@
<template>
<el-container>
- <el-header class="m-header" style="height: auto">
+ <el-header class="m-header">
<el-row :gutter="10">
<el-col :span="6">
<el-date-picker
@@ -27,57 +27,43 @@
</el-row>
</el-header>
<el-main style="padding-top: 5px">
- <el-table :data="tableData" style="width: 100%" max-height="550" border show-summary sum-text=" "
- empty-text="鏆傛棤鏁版嵁">
- <el-table-column fixed="left" prop="rIndex" label="" width="50" align="center"></el-table-column>
+ <vxe-grid
+ max-height="600"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
+ @="gridEvents"
+ >
- <el-table-column fixed="left" label="鎿嶄綔" width="120">
- <template #default="scope">
- <el-button
- link
- type="primary"
- size="small"
- @click.prevent="deleteRow(scope.$index)"
- >
- 鍒犻櫎
- </el-button>
- <el-button
- link
- type="primary"
- size="small"
- @click.prevent="deleteRow(scope.$index)"
- >
- 缂栬緫
- </el-button>
- </template>
- </el-table-column>
+ <!-- @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>
- <el-table-column prop="name" label="搴撳瓨缁勭粐" width="150"/>
- <el-table-column prop="wlNumber" label="鐗╂枡缂栫爜" width="150"/>
- <el-table-column prop="state" label="鐗╂枡鍚嶇О" width="120"/>
- <el-table-column prop="city" label="浜у湴" width="120"/>
- <el-table-column prop="kcNumber" label="搴撳瓨缂栧彿" width="150"/>
- <el-table-column prop="width" sortable label="瀹藉害" width="120"/>
- <el-table-column prop="height" sortable label="楂樺害" width="120"/>
- <el-table-column prop="thick" sortable label="鍘氬害" width="120"/>
- <el-table-column prop="zip" label="涓诲崟浣�" width="120"/>
- <el-table-column prop="number" label="瀹夊叏搴撳瓨" width="120"/>
- <el-table-column prop="number" sortable label="搴撳瓨鏁�" width="120"/>
- <el-table-column prop="number" label="鍙敤搴撳瓨" width="120" show-summary="ture"/>
- <el-table-column prop="number" label="鏈鏁伴噺" width="120"/>
- <el-table-column prop="zip" sortable label="鎬婚潰绉�" width="120"/>
- <el-table-column prop="zip" label="鍗曠墖闈㈢Н" width="120"/>
- <el-table-column prop="date" label="鐢熶骇鏃ユ湡" width="120"/>
- <el-table-column prop="date" label="淇濊川鏈�" width="120"/>
- <el-table-column prop="zip" label="搴撳瓨缂栧彿" width="120"/>
- <el-table-column prop="zip" label="搴撳尯" width="120"/>
- <el-table-column prop="zip" label="搴撲綅" width="120"/>
- <el-table-column prop="zip" label="绉帇搴撳瓨" width="120"/>
- <el-table-column prop="zip" label="澶囨敞" width="120"/>
+ <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>
-
- </el-table>
</el-main>
</el-container>
</template>
@@ -85,73 +71,207 @@
<script setup>
-import {ref} from 'vue'
-import dayjs from 'dayjs'
+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 now = new Date()
+//缁勪欢鎺ユ敹鍙傛暟
+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: '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: '6', width: '10%',title: '澶囨敞', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
+ ],//琛ㄥご鍙傛暟
+ toolbarConfig: {
+ buttons: [{type:'text'},{type:'text',name:'鍘熺墖鏈堢粨鎶ヨ〃'}],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true,
+ style: 'paddling-left:10px'
+ },//琛ㄥご鎸夐挳
+ data: [
+ {},{},{},{},{},{},{},{},{},{},{},
-const tableData = ref([])
+ ],//table body瀹為檯鏁版嵁
+ mergeFooterItems: [
+ {row: 0, col: 0, rowspan: 1, colspan: 2}
+ ],//鍚堝苟鑴�
+ 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 autoAddRow = () => {
- for (let i = 0; i < 10; i++) {
- const randomKCInt = Math.floor(Math.random() * 9999) + 10000;
- const randomInt = Math.floor(Math.random() * 999) + 1000;
- const randomZZInt = Math.floor(Math.random() * 99) + 100;
- const randomSumInt = Math.floor(Math.random() * 99) + 10;
- const kcThick = i % 3 === 0 ? 5 : i % 4 === 0 ? 6 : i % 5 === 0 ? 8 : 10;
- now.setDate(now.getDate() + 1)
- tableData.value.push({
- date: dayjs(now).format('YYYY-MM-DD'),
- name: '鐗╂枡缁勭粐' + randomZZInt,
- state: '鐗╂枡' + randomSumInt,
- city: '浜у湴' + (randomSumInt * 6),
- address: 'No. 189, Grove St, Los Angeles',
- zip: 'CA 90036',
- number: 666 + 66 * i,
- width: '3660',
- height: '2440',
- rIndex: tableData.value.length + 1,
- wlNumber: 'NGWL1000' + randomInt,
- kcNumber: 'NGKC100' + randomKCInt,
- thick: kcThick
- })
+
+
+
+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 'Storage': {//鍏ュ簱
+ 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 'Return': {//閫�搴�
+ if ($grid.getCheckboxRecords().length === 0) {
+ openAlert({type: 'message', content: '璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�', status: 'warning'})
+ //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+ return
+ } else {
+ /* async ()=>{
+ const type = await.VXETable.modal.confirm('鎮ㄩ�夋嫨浜�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒,鏄惁纭閫�搴擄紵');
+ }*/
+ const type = VXETable.modal.confirm('鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭閫�搴擄紵');
+
+
+ /* if(VXETable.modal.confirm('鎮ㄩ�夋嫨浜�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒,鏄惁纭閫�搴擄紵' )){
+ //openAlert({type:'message', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success',lockView: false, mask: false })
+
+
+ }*/
+
+ /* if(type==='confirm'){
+ openAlert({type:'message', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
+ }
+
+*/
+ //openAlert({type:'alert', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
+ //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+ return
+ }
+ 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)
+ }
+
}
</script>
<style scoped>
-.el-row {
- margin-bottom: 20px;
-}
-
-.el-row:last-child {
- margin-bottom: 0;
-}
-
-.el-col {
- border-radius: 4px;
-}
-
.m-header {
- height: 32px;
-}
-
-#main {
- width: 100%;
- height: 100%;
-}
-
-#div-title {
- height: 5%;
- width: 100%;
- padding-left: 20px;
-}
-
-#main-body {
- width: 100%;
- height: 64%;
- margin-top: 1%;
+ height: auto
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/mm/stockReport/StockReport.vue b/north-glass-erp/northglass-erp/src/views/mm/stockReport/StockReport.vue
index 65ca331..631737d 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/stockReport/StockReport.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/stockReport/StockReport.vue
@@ -3,9 +3,9 @@
<el-container>
<el-header style="height: 30px">
<el-breadcrumb :separator-icon="ArrowRight">
- <el-breadcrumb-item>閲囪喘涓庣墿璧�</el-breadcrumb-item>
+<!-- <el-breadcrumb-item>閲囪喘涓庣墿璧�</el-breadcrumb-item>
<el-breadcrumb-item>浠撳偍鎶ヨ〃
- </el-breadcrumb-item>
+ </el-breadcrumb-item>-->
<el-breadcrumb-item :to="{path:'/main/stockReport/WarehouseReport'}">鍘熸潗鏂欐姤琛�
</el-breadcrumb-item>
<el-breadcrumb-item :to="{path:'/main/stockReport/StockWarehouseReport'}">鎴愬搧鎶ヨ〃
@@ -15,7 +15,7 @@
<el-breadcrumb-item :to="{path:'/main/stockReport/SubsidiaryMonthReport'}">
杈呮枡鏈堢粨
</el-breadcrumb-item>
- <el-breadcrumb-item></el-breadcrumb-item>
+ <el-breadcrumb-item style="display: none"></el-breadcrumb-item>
</el-breadcrumb>
</el-header>
<el-main style="padding: 0;width: 99%;height: 100%;">
diff --git a/north-glass-erp/northglass-erp/src/views/mm/stockReport/StockWarehouseReport.vue b/north-glass-erp/northglass-erp/src/views/mm/stockReport/StockWarehouseReport.vue
index bd4c436..8c4e6c9 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/stockReport/StockWarehouseReport.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/stockReport/StockWarehouseReport.vue
@@ -1,144 +1,255 @@
<template>
- <div style="padding: 0;width: 100%;height: 100%">
+<div style="padding: 0;width: 100%;height: 100%">
<el-header class="m-header" style="height: auto">
</el-header>
<el-main style="padding-top: 5px">
- <el-table :data="tableData" style="width: 100%" max-height="620px" border show-summary sum-text=" "
- empty-text="鏆傛棤鏁版嵁">
- <el-table-column fixed="left" prop="rIndex" label="" width="50" align="center"></el-table-column>
+ <vxe-grid
+ max-height="600"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
+ v-on="gridEvents"
+ >
- <el-table-column fixed="left" label="鎿嶄綔" width="120">
- <template #default="scope">
- <el-button
- link
- type="primary"
- size="small"
- @click.prevent="deleteRow(scope.$index)"
- >
- 鍒犻櫎
- </el-button>
- <el-button
- link
- type="primary"
- size="small"
- @click.prevent="deleteRow(scope.$index)"
- >
- 缂栬緫
- </el-button>
- </template>
- </el-table-column>
+ <!-- @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>
- <el-table-column prop="name" label="鎴愬搧搴撳瓨缁勭粐" width="150"/>
- <el-table-column prop="wlNumber" label="鐗╂枡缂栫爜" width="150"/>
- <el-table-column prop="state" label="鐗╂枡鍚嶇О" width="120"/>
- <el-table-column prop="city" label="浜у湴" width="120"/>
- <el-table-column prop="kcNumber" label="搴撳瓨缂栧彿" width="150"/>
- <el-table-column prop="width" sortable label="瀹藉害" width="120"/>
- <el-table-column prop="height" sortable label="楂樺害" width="120"/>
- <el-table-column prop="thick" sortable label="鍘氬害" width="120"/>
- <el-table-column prop="zip" label="涓诲崟浣�" width="120"/>
- <el-table-column prop="number" label="瀹夊叏搴撳瓨" width="120"/>
- <el-table-column prop="number" sortable label="搴撳瓨鏁�" width="120"/>
- <el-table-column prop="number" label="鍙敤搴撳瓨" width="120" show-summary="ture"/>
- <el-table-column prop="number" label="鏈鏁伴噺" width="120"/>
- <el-table-column prop="zip" sortable label="鎬婚潰绉�" width="120"/>
- <el-table-column prop="zip" label="鍗曠墖闈㈢Н" width="120"/>
- <el-table-column prop="date" label="鐢熶骇鏃ユ湡" width="120"/>
- <el-table-column prop="date" label="淇濊川鏈�" width="120"/>
- <el-table-column prop="zip" label="搴撳瓨缂栧彿" width="120"/>
- <el-table-column prop="zip" label="搴撳尯" width="120"/>
- <el-table-column prop="zip" label="搴撲綅" width="120"/>
- <el-table-column prop="zip" label="绉帇搴撳瓨" width="120"/>
- <el-table-column prop="zip" label="澶囨敞" width="120"/>
-
-
- </el-table>
+ <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>
</el-main>
</div>
</template>
<script setup>
-
import {ref} from 'vue'
-const wuliaoxinxi = ref('')
-const wuliaokuan = ref('')
-const wuliaogao = ref('')
-const options = [
- {
- value: '0',
- label: '鍏ㄩ儴'
- },
- {
- value: '1',
- label: '鍘熺墖'
- },
- {
- value: '2',
- label: '鍖栧鍝�'
- },
- {
- value: '3',
- label: '宸ュ叿'
- },
- {
- value: '4',
- label: '鏈ㄧ'
- },
- {
- value: '5',
- label: '鐧界幓'
- },
-]
+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()
-import dayjs from 'dayjs'
+//缁勪欢鎺ユ敹鍙傛暟
+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: '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: '6', width: '10%',title: '澶囨敞', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
+ ],//琛ㄥご鍙傛暟
+ toolbarConfig: {
+ buttons: [{type:'text'},{
+ 'name': '鎴愬搧搴撳瓨',
+ 'code': 'ProductStockList',
+ },{
+ 'name': '鍏ュ簱璁板綍',
+ 'code': 'StorageRecord',
+ }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true,
+ style: 'paddling-left:10px'
+ },//琛ㄥご鎸夐挳
+ data: [
+ {},{},{},{},{},{},{},{},{},{},{},
-const now = new Date()
+ ],//table body瀹為檯鏁版嵁
+ mergeFooterItems: [
+ {row: 0, col: 0, rowspan: 1, colspan: 2}
+ ],//鍚堝苟鑴�
+ 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 tableData = ref([
- {
- date: '2016-05-01',
- name: 'Tom',
- state: 'California',
- city: 'Los Angeles',
- address: 'No. 189, Grove St, Los Angeles',
- zip: 'CA 90036',
- number: '999',
- width: '3660',
- height: '2440',
- rIndex: 1,
- }
-])
-const autoAddRow = () => {
- for (let i = 0; i < 10; i++) {
- const randomKCInt = Math.floor(Math.random() * 9999) + 10000;
- const randomInt = Math.floor(Math.random() * 999) + 1000;
- const randomZZInt = Math.floor(Math.random() * 99) + 100;
- const randomSumInt = Math.floor(Math.random() * 99) + 10;
- const kcThick = i % 3 === 0 ? 5 : i % 4 === 0 ? 6 : i % 5 === 0 ? 8 : 10;
- now.setDate(now.getDate() + 1)
- tableData.value.push({
- date: dayjs(now).format('YYYY-MM-DD'),
- name: '鐗╂枡缁勭粐' + randomZZInt,
- state: '鐗╂枡' + randomSumInt,
- city: '浜у湴' + (randomSumInt * 6),
- address: 'No. 189, Grove St, Los Angeles',
- zip: 'CA 90036',
- number: 666 + 66 * i,
- width: '3660',
- height: '2440',
- rIndex: tableData.value.length + 1,
- wlNumber: 'NGWL1000' + randomInt,
- kcNumber: 'NGKC100' + randomKCInt,
- thick: kcThick
- })
+
+
+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 'ProductStockList': {//鏂板
+ router.push({path: '/main/productStock/ProductStockList'})
+ break
+ }
+ case 'StorageRecord': {//鍏ュ簱
+ if ($grid.getCheckboxRecords().length === 0) {
+ openAlert({type: 'alert', content: '鎮ㄧ偣鍑讳簡鏌ョ湅鍏ュ簱璁板綍', status: 'success'})
+ //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 'Return': {//閫�搴�
+ if ($grid.getCheckboxRecords().length === 0) {
+ openAlert({type: 'message', content: '璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�', status: 'warning'})
+ //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+ return
+ } else {
+ /* async ()=>{
+ const type = await.VXETable.modal.confirm('鎮ㄩ�夋嫨浜�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒,鏄惁纭閫�搴擄紵');
+ }*/
+ const type = VXETable.modal.confirm('鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭閫�搴擄紵');
+
+
+ /* if(VXETable.modal.confirm('鎮ㄩ�夋嫨浜�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒,鏄惁纭閫�搴擄紵' )){
+ //openAlert({type:'message', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success',lockView: false, mask: false })
+
+
+ }*/
+
+ /* if(type==='confirm'){
+ openAlert({type:'message', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
+ }
+
+*/
+ //openAlert({type:'alert', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
+ //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+ return
+ }
+ 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)
+ }
+
+}
+
+
</script>
diff --git a/north-glass-erp/northglass-erp/src/views/mm/stockReport/SubsidiaryMonthReport.vue b/north-glass-erp/northglass-erp/src/views/mm/stockReport/SubsidiaryMonthReport.vue
index f87630b..5c6c1bb 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/stockReport/SubsidiaryMonthReport.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/stockReport/SubsidiaryMonthReport.vue
@@ -1,6 +1,6 @@
<template>
<el-container>
- <el-header class="m-header" style="height: auto">
+ <el-header class="m-header">
<el-row :gutter="10">
<el-col :span="6">
<el-date-picker
@@ -23,63 +23,47 @@
:icon="Search"
@click="autoAddRow">鏌ヨ
</el-button>
-
</el-col>
-
</el-row>
</el-header>
<el-main style="padding-top: 5px">
- <el-table :data="tableData" style="width: 100%" max-height="550" border show-summary sum-text=" "
- empty-text="鏆傛棤鏁版嵁">
- <el-table-column fixed="left" prop="rIndex" label="" width="50" align="center"></el-table-column>
+ <vxe-grid
+ max-height="600"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
+ @="gridEvents"
+ >
- <el-table-column fixed="left" label="鎿嶄綔" width="120">
- <template #default="scope">
- <el-button
- link
- type="primary"
- size="small"
- @click.prevent="deleteRow(scope.$index)"
- >
- 鍒犻櫎
- </el-button>
- <el-button
- link
- type="primary"
- size="small"
- @click.prevent="deleteRow(scope.$index)"
- >
- 缂栬緫
- </el-button>
- </template>
- </el-table-column>
+ <!-- @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>
- <el-table-column prop="name" label="搴撳瓨缁勭粐" width="150"/>
- <el-table-column prop="wlNumber" label="鐗╂枡缂栫爜" width="150"/>
- <el-table-column prop="state" label="鐗╂枡鍚嶇О" width="120"/>
- <el-table-column prop="city" label="浜у湴" width="120"/>
- <el-table-column prop="kcNumber" label="搴撳瓨缂栧彿" width="150"/>
- <el-table-column prop="width" sortable label="瀹藉害" width="120"/>
- <el-table-column prop="height" sortable label="楂樺害" width="120"/>
- <el-table-column prop="thick" sortable label="鍘氬害" width="120"/>
- <el-table-column prop="zip" label="涓诲崟浣�" width="120"/>
- <el-table-column prop="number" label="瀹夊叏搴撳瓨" width="120"/>
- <el-table-column prop="number" sortable label="搴撳瓨鏁�" width="120"/>
- <el-table-column prop="number" label="鍙敤搴撳瓨" width="120" show-summary="ture"/>
- <el-table-column prop="number" label="鏈鏁伴噺" width="120"/>
- <el-table-column prop="zip" sortable label="鎬婚潰绉�" width="120"/>
- <el-table-column prop="zip" label="鍗曠墖闈㈢Н" width="120"/>
- <el-table-column prop="date" label="鐢熶骇鏃ユ湡" width="120"/>
- <el-table-column prop="date" label="淇濊川鏈�" width="120"/>
- <el-table-column prop="zip" label="搴撳瓨缂栧彿" width="120"/>
- <el-table-column prop="zip" label="搴撳尯" width="120"/>
- <el-table-column prop="zip" label="搴撲綅" width="120"/>
- <el-table-column prop="zip" label="绉帇搴撳瓨" width="120"/>
- <el-table-column prop="zip" label="澶囨敞" width="120"/>
+ <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>
-
- </el-table>
</el-main>
</el-container>
</template>
@@ -87,75 +71,198 @@
<script setup>
-import {ref} from 'vue'
-import dayjs from 'dayjs'
+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 now = new Date()
+//缁勪欢鎺ユ敹鍙傛暟
+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: '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: '6', width: '10%',title: '澶囨敞', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
+ ],//琛ㄥご鍙傛暟
+ toolbarConfig: {
+ buttons: [{type:'text'},{type:'text',name:'杈呮枡鏈堢粨鎶ヨ〃'}],
+ 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: 2}
+ ],//鍚堝苟鑴�
+ 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 getTableRow = (row, type) => {
+ switch (type) {
+ case 'edit' : {
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/purchaseOrder/CreatePurchaseOrder', query: {id: row.id}})
+ break
+ }
+ case 'delete': {
-const tableData = ref([
-])
-const autoAddRow = () => {
- for (let i = 0; i < 10; i++) {
- const randomKCInt = Math.floor(Math.random() * 9999) + 10000;
- const randomInt = Math.floor(Math.random() * 999) + 1000;
- const randomZZInt = Math.floor(Math.random() * 99) + 100;
- const randomSumInt = Math.floor(Math.random() * 99) + 10;
- const kcThick = i % 3 === 0 ? 5 : i % 4 === 0 ? 6 : i % 5 === 0 ? 8 : 10;
- now.setDate(now.getDate() + 1)
- tableData.value.push({
- date: dayjs(now).format('YYYY-MM-DD'),
- name: '鐗╂枡缁勭粐' + randomZZInt,
- state: '鐗╂枡' + randomSumInt,
- city: '浜у湴' + (randomSumInt * 6),
- address: 'No. 189, Grove St, Los Angeles',
- zip: 'CA 90036',
- number: 666 + 66 * i,
- width: '3660',
- height: '2440',
- rIndex: tableData.value.length + 1,
- wlNumber: 'NGWL1000' + randomInt,
- kcNumber: 'NGKC100' + randomKCInt,
- thick: kcThick
- })
+ 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 'Storage': {//鍏ュ簱
+ 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 'Return': {//閫�搴�
+ if ($grid.getCheckboxRecords().length === 0) {
+ openAlert({type: 'message', content: '璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�', status: 'warning'})
+ //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+ return
+ } else {
+ /* async ()=>{
+ const type = await.VXETable.modal.confirm('鎮ㄩ�夋嫨浜�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒,鏄惁纭閫�搴擄紵');
+ }*/
+ const type = VXETable.modal.confirm('鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭閫�搴擄紵');
+
+
+ /* if(VXETable.modal.confirm('鎮ㄩ�夋嫨浜�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒,鏄惁纭閫�搴擄紵' )){
+ //openAlert({type:'message', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success',lockView: false, mask: false })
+
+
+ }*/
+
+ /* if(type==='confirm'){
+ openAlert({type:'message', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
+ }
+
+*/
+ //openAlert({type:'alert', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
+ //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+ return
+ }
+ 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)
+ }
+
}
</script>
<style scoped>
-.el-row {
- margin-bottom: 20px;
-}
-
-.el-row:last-child {
- margin-bottom: 0;
-}
-
-.el-col {
- border-radius: 4px;
-}
-
.m-header {
- height: 32px;
-}
-
-#main {
- width: 100%;
- height: 100%;
-}
-
-#div-title {
- height: 5%;
- width: 100%;
- padding-left: 20px;
-}
-
-#main-body {
- width: 100%;
- height: 64%;
- margin-top: 1%;
+ height: auto
}
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/mm/stockReport/WarehouseReport.vue b/north-glass-erp/northglass-erp/src/views/mm/stockReport/WarehouseReport.vue
index 1fc073c..11774ea 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/stockReport/WarehouseReport.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/stockReport/WarehouseReport.vue
@@ -5,140 +5,267 @@
</el-header>
<el-main style="padding-top: 5px">
- <el-table :data="tableData" style="width: 100%" max-height="620px" border show-summary sum-text=" "
- empty-text="鏆傛棤鏁版嵁">
- <el-table-column fixed="left" prop="rIndex" label="" width="50" align="center"></el-table-column>
+ <vxe-grid
+ max-height="600"
+ @filter-change="filterChanged"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
+ v-on="gridEvents"
+ >
- <el-table-column fixed="left" label="鎿嶄綔" width="120">
- <template #default="scope">
- <el-button
- link
- type="primary"
- size="small"
- @click.prevent="deleteRow(scope.$index)"
- >
- 鍒犻櫎
- </el-button>
- <el-button
- link
- type="primary"
- size="small"
- @click.prevent="deleteRow(scope.$index)"
- >
- 缂栬緫
- </el-button>
- </template>
- </el-table-column>
+ <!-- @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>
- <el-table-column prop="name" label="鍘熸潗鏂欏簱瀛樼粍缁�" width="150"/>
- <el-table-column prop="wlNumber" label="鐗╂枡缂栫爜" width="150"/>
- <el-table-column prop="state" label="鐗╂枡鍚嶇О" width="120"/>
- <el-table-column prop="city" label="浜у湴" width="120"/>
- <el-table-column prop="kcNumber" label="搴撳瓨缂栧彿" width="150"/>
- <el-table-column prop="width" sortable label="瀹藉害" width="120"/>
- <el-table-column prop="height" sortable label="楂樺害" width="120"/>
- <el-table-column prop="thick" sortable label="鍘氬害" width="120"/>
- <el-table-column prop="zip" label="涓诲崟浣�" width="120"/>
- <el-table-column prop="number" label="瀹夊叏搴撳瓨" width="120"/>
- <el-table-column prop="number" sortable label="搴撳瓨鏁�" width="120"/>
- <el-table-column prop="number" label="鍙敤搴撳瓨" width="120" show-summary="ture"/>
- <el-table-column prop="number" label="鏈鏁伴噺" width="120"/>
- <el-table-column prop="zip" sortable label="鎬婚潰绉�" width="120"/>
- <el-table-column prop="zip" label="鍗曠墖闈㈢Н" width="120"/>
- <el-table-column prop="date" label="鐢熶骇鏃ユ湡" width="120"/>
- <el-table-column prop="date" label="淇濊川鏈�" width="120"/>
- <el-table-column prop="zip" label="搴撳瓨缂栧彿" width="120"/>
- <el-table-column prop="zip" label="搴撳尯" width="120"/>
- <el-table-column prop="zip" label="搴撲綅" width="120"/>
- <el-table-column prop="zip" label="绉帇搴撳瓨" width="120"/>
- <el-table-column prop="zip" label="澶囨敞" width="120"/>
-
-
- </el-table>
+ <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>
</el-main>
</div>
</template>
<script setup>
-
import {ref} from 'vue'
-const wuliaoxinxi = ref('')
-const wuliaokuan = ref('')
-const wuliaogao = ref('')
-const options = [
- {
- value: '0',
- label: '鍏ㄩ儴'
- },
- {
- value: '1',
- label: '鍘熺墖'
- },
- {
- value: '2',
- label: '鍖栧鍝�'
- },
- {
- value: '3',
- label: '宸ュ叿'
- },
- {
- value: '4',
- label: '鏈ㄧ'
- },
- {
- value: '5',
- label: '鐧界幓'
- },
-]
+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()
-import dayjs from 'dayjs'
-
-const now = new Date()
-
-const tableData = ref([
- {
- date: '2016-05-01',
- name: 'Tom',
- state: 'California',
- city: 'Los Angeles',
- address: 'No. 189, Grove St, Los Angeles',
- zip: 'CA 90036',
- number: '999',
- width: '3660',
- height: '2440',
- rIndex: 1,
- }
-])
-
-const autoAddRow = () => {
- for (let i = 0; i < 10; i++) {
- const randomKCInt = Math.floor(Math.random() * 9999) + 10000;
- const randomInt = Math.floor(Math.random() * 999) + 1000;
- const randomZZInt = Math.floor(Math.random() * 99) + 100;
- const randomSumInt = Math.floor(Math.random() * 99) + 10;
- const kcThick = i % 3 === 0 ? 5 : i % 4 === 0 ? 6 : i % 5 === 0 ? 8 : 10;
- now.setDate(now.getDate() + 1)
- tableData.value.push({
- date: dayjs(now).format('YYYY-MM-DD'),
- name: '鐗╂枡缁勭粐' + randomZZInt,
- state: '鐗╂枡' + randomSumInt,
- city: '浜у湴' + (randomSumInt * 6),
- address: 'No. 189, Grove St, Los Angeles',
- zip: 'CA 90036',
- number: 666 + 66 * i,
- width: '3660',
- height: '2440',
- rIndex: tableData.value.length + 1,
- wlNumber: 'NGWL1000' + randomInt,
- kcNumber: 'NGKC100' + randomKCInt,
- thick: kcThick
- })
+const list = (i) => {
+ return {
+ 'kczz':'浜哄伐搴�',
+ 'wlbm':'NGWL202312000'+i,
+ 'wlmc':'杩欐槸鐗╂枡鍚嶇О',
+ 'cd':'鍦扮悆鏉�',
+ 'kcbh':'KC202300'+i,
+ 'w':'0',
+ 'g':'0',
+ 'h':'0',
+ 'zdw':'浠�',
+ 'aqkc':'0',
+ 'kcs':'20',
+ 'kykc':'30',
+ 'wlsl':'20',
+ 'zmj':'0',
+ 'dpmj':'0',
+ 'scrq':'2023-12-20',
+ 'bzq':'2025-12-20',
+ 'kq':'2000',
+ 'kw':'23',
+ 'jykc':'5',
+ 'bz':'杩欐槸澶囨敞*10086'
}
}
+//缁勪欢鎺ユ敹鍙傛暟
+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: 'kczz', width: '13%', title: '搴撳瓨缁勭粐', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'wlbm', 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: 'cd', width: '10%',title: '浜у湴', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'kcbh', 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: 'zdw', width: '8%',title: '涓诲崟浣�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'aqkc', width: '8%',title: '瀹夊叏搴撳瓨', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'kcs', width: '12%',title: '搴撳瓨鏁�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'kykc', width: '8%',title: '鍙敤搴撳瓨', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'wlsl', width: '12%',title: '鏈鏁伴噺', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'zmj', width: '8%',title: '鎬婚潰绉�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'dpmj', width: '12%',title: '鍗曠墖闈㈢Н', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'scrq', width: '8%',title: '鐢熶骇鏃ユ湡', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'bzq', width: '8%',title: '淇濊川鏈�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ /*{field: 'kcbh', width: '10%',title: '搴撳瓨缂栧彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},*/
+ {field: 'kq', width: '10%',title: '搴撳尯', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'kw', width: '10%',title: '搴撲綅', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'jykc', width: '10%',title: '绉帇搴撳瓨', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {field: 'bz', width: '10%',title: '澶囨敞', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
+ ],//琛ㄥご鍙傛暟
+ toolbarConfig: {
+ buttons: [{type:'text'},{
+ 'name': '鍏ュ簱璁板綍',
+ 'code': 'StorageRecord',
+ }],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true,
+ style: 'paddling-left:10px'
+ },//琛ㄥご鎸夐挳
+ data: [
+ list(0),list(1),list(2),list(3),list(4),list(5),list(6),list(7),list(8),list(9),
+
+ ],//table body瀹為檯鏁版嵁
+ mergeFooterItems: [
+ {row: 0, col: 0, rowspan: 1, colspan: 2}
+ ],//鍚堝苟鑴�
+ 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 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 'ProductStockList': {//鏂板
+ router.push({path: '/main/productStock/ProductStockList'})
+ break
+ }
+ case 'StorageRecord': {//鍏ュ簱
+ if ($grid.getCheckboxRecords().length === 0) {
+ openAlert({type: 'alert', content: '鎮ㄧ偣鍑讳簡鏌ョ湅鍏ュ簱璁板綍', status: 'success'})
+ //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 'Return': {//閫�搴�
+ if ($grid.getCheckboxRecords().length === 0) {
+ openAlert({type: 'message', content: '璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�', status: 'warning'})
+ //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+ return
+ } else {
+ /* async ()=>{
+ const type = await.VXETable.modal.confirm('鎮ㄩ�夋嫨浜�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒,鏄惁纭閫�搴擄紵');
+ }*/
+ const type = VXETable.modal.confirm('鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭閫�搴擄紵');
+
+
+ /* if(VXETable.modal.confirm('鎮ㄩ�夋嫨浜�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒,鏄惁纭閫�搴擄紵' )){
+ //openAlert({type:'message', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success',lockView: false, mask: false })
+
+
+ }*/
+
+ /* if(type==='confirm'){
+ openAlert({type:'message', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
+ }
+
+*/
+ //openAlert({type:'alert', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
+ //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+ return
+ }
+ 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)
+ }
+}
+
+
</script>
--
Gitblit v1.8.0