From 96aea12d4cbbda5d51fd8e85fdfb871c1f20a7fc Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期三, 10 四月 2024 11:30:17 +0800 Subject: [PATCH] 生丝定价,数据字典,车间管理接口联调 --- src/views/systemSetting/workshopManage/index.vue | 47 ++++++++++++++++++++++++++++++++--------------- 1 files changed, 32 insertions(+), 15 deletions(-) diff --git a/src/views/systemSetting/workshopManage/index.vue b/src/views/systemSetting/workshopManage/index.vue index 2864e5a..80fd301 100644 --- a/src/views/systemSetting/workshopManage/index.vue +++ b/src/views/systemSetting/workshopManage/index.vue @@ -1,7 +1,7 @@ <template> <div class="silkStandardSetting-container"> <div class="filter-card"> - <CommonSearch :show-add="false" :amount-view="false" placeholder="璇疯緭鍏ュ叧閿瘝" @searchClick="onFilterSearch"> + <CommonSearch ref="searchRef" :show-add="false" :amount-view="false" placeholder="璇疯緭鍏ュ叧閿瘝" @searchClick="onFilterSearch"> <template slot="leftButton"> <el-button size="small" type="primary" @click="addBtnClick" >鏂板</el-button> <el-button size="small" type="primary" @click="refreshClick">鍒锋柊</el-button> @@ -10,7 +10,7 @@ </CommonSearch> </div> <div class="body-card"> - <div> + <div class="list-view"> <TableCommonView :table-list="tableList" @selTableCol="selTableCol" @@ -28,6 +28,9 @@ </el-table-column> </template> </TableCommonView> + </div> + <div class="btn-pager"> + <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> </div> </div> <AddWorkshop @@ -47,11 +50,12 @@ import { getWorkshopManageList,deleteWorkshopManage } from "@/api/systemSetting/workshopManage" import TableCommonView from '@/components/makepager/TableCommonView.vue' import AddWorkshop from '@/views/systemSetting/workshopManage/components/addWorkshop.vue' +import pageMixin from "@/components/makepager/pager/mixin/pageMixin" export default { name: "workshopManage", props: {}, components: { TableCommonView,AddWorkshop,AddDataDictionaries }, - mixins: [], + mixins: [pageMixin], computed: {}, data() { return { @@ -69,8 +73,6 @@ // 绫诲瀷 workList: [], getDataParams: { - page: 1, - pageSize: 10, keyWord: '', }, editConfig:{ @@ -88,7 +90,6 @@ }, methods: { setTable() { - console.log(this.tableColumn,"鐪嬬湅") // top 鏄庣粏鍗曞垪琛� this.tableList = { selectIndex: true, @@ -126,13 +127,12 @@ }, // 鎼滅储 onFilterSearch(searchText) { - console.log(searchText,"鏄暐") this.getDataParams.keyWord=searchText, this.getData() }, // 鏂板 addBtnClick() { - this.editConfig.infomitton=[] + this.editConfig.infomitton={} this.editConfig.dialogTitle="鏂板" this.editConfig.visible=true }, @@ -141,14 +141,19 @@ }, // 鍒锋柊 - refreshClick() {}, + refreshClick() { + this.getDataParams.keyWord = "" + this.pagerOptions.currPage = 1 + this.pagerOptions.pageSize = 15 + this.$refs.searchRef.searchInput="" + this.getData() + }, // 鎵撳嵃 printClick() {}, // 鍒犻櫎 delBtnClick(){}, // 缁勫埆 - handleShow(item){ - console.log(item,"item") + handleShow(){ this.$refs.bomTypeDialog.editDialogVisible = true; }, handleGetBomKindDictList() { @@ -157,7 +162,7 @@ // }); }, handleConfirmSave(data) { - console.log(data,"data") + console.log(data) // postSaveBomKindDict({ data: data }).then((res) => { // if (res.code == 200) { // this.$message({ @@ -173,10 +178,11 @@ async getData() { await getWorkshopManageList({ keyWord: this.getDataParams.keyWord, - page: this.getDataParams.page, - pageSize: this.getDataParams.pageSize, + page: this.pagerOptions.currPage, + pageSize: this.pagerOptions.pageSize }).then((res) => { this.tableList.tableInfomation = res.data + this.pagerOptions.totalCount = res.total }) }, getStatusCarFlag(val) { @@ -187,10 +193,10 @@ } }, handleClick(row,type){ - console.log(row,"row") if(type==="鏌ョ湅"){ this.editConfig.infomitton=row this.editConfig.infomitton.workshopId=row.ID + this.editConfig.infomitton.workshopNumber=Number(this.editConfig.infomitton.workshopNumber) this.editConfig.dialogTitle=type this.editConfig.visible=true }else if(type==="淇敼"){ @@ -256,5 +262,16 @@ } } } +.list-view { + height: calc(100% - 60px); + overflow: hidden; +} +.btn-pager { + display: flex; + margin-top: 10px; + .page { + margin-left: auto; + } +} </style> -- Gitblit v1.8.0