工艺穿梭框分页

master
zhaoxiaolin 1 year ago
parent 33b8871f39
commit f0a6cdb12a

@ -59,3 +59,11 @@ export function getProductionList(query) {
params: query
});
}
//成品产量报表
export function getDailyReport(query) {
return request({
url: '/mes/reportWork/getDailyReport',
method: 'get',
params: query
});
}

@ -43,7 +43,7 @@ export function delProduct(recordId) {
});
}
// 查询工艺线体关联列表
// 查询工艺产品关联列表
export function getListProduct(query) {
return request({
url: '/technology/pro/routeprodproduct/getList',
@ -51,3 +51,12 @@ export function getListProduct(query) {
params: query
});
}
// 查询工艺已经关联的产品列表
export function getRightList(query) {
return request({
url: '/technology/pro/routeprodproduct/getRightList',
method: 'get',
params: query
});
}

@ -692,6 +692,20 @@ export default {
changeRoute(routeCode) {
getProEquipment(routeCode).then(response => {
this.eRouteOptions = response.data
//
let selectAll = [];
this.eRouteOptions.forEach(it => {
var children = it.children;
if(children != null){
children.forEach(it2=>{
let arr = []
arr.push(it.value)
arr.push(it2.value)
selectAll.push(arr)
})
}
})
this.splitForm.prodLineCodeArray = selectAll
})
},
// 线
@ -1189,7 +1203,9 @@ export default {
},
/** 拆分表单重置 */
resetBatch() {
this.eRouteOptions= [],
this.splitForm = {
prodLineCodeArray: [],
id: null,
prodLineCode: [],
splitNum: null,

@ -1,11 +1,83 @@
<template>
<el-transfer v-model="rightList" :data="leftList" :titles="titles" :filterable=true
@change="handleChange"
></el-transfer>
>
<!-- 左侧栏分页 -->
<el-button
type="text"
style="color:#606266"
v-if="leftLength != 0"
class="transfer-footer"
slot="left-footer"
size="small"
>{{ Ltotal }}</el-button>
<el-button
v-if="leftLength != 0"
class="transfer-footer"
slot="left-footer"
size="small"
@click="leftPageNumChange"
:disabled="LPageNum - 1 < 1"
>上一页</el-button>
<el-input
v-if="leftLength != 0"
v-model="LPageNum"
size="mini"
class="transfer-footer"
slot="left-footer"
:placeholder="LPageNum"
style="width: 67px;padding: 1px 3px"
disabled
></el-input>
<el-button
class="transfer-footer"
slot="left-footer"
size="small"
@click="leftAddPageNumChange"
v-if="leftLength != 0"
:disabled="LNextPage>LPages"
>下一页</el-button>
<!-- 右侧栏分页 -->
<el-button
type="text"
style="color:#606266"
v-if="rightLength != 0"
class="transfer-footer"
slot="right-footer"
size="small"
>{{ Rtotal }}</el-button>
<el-button
v-if="rightLength != 0"
class="transfer-footer"
slot="right-footer"
size="small"
@click="rightPageNumChange"
:disabled="RPageNum - 1 < 1"
>上一页</el-button>
<el-input
v-if="rightLength != 0"
v-model="RPageNum"
size="mini"
class="transfer-footer"
slot="right-footer"
:placeholder="RPageNum"
style="width: 43px"
></el-input>
<el-button
class="transfer-footer"
slot="right-footer"
size="small"
@click="rightAddPageNumChange"
v-if="rightLength != 0"
:disabled="RNextPage>RPages"
>下一页</el-button>
</el-transfer>
</template>
<script>
import { getListProduct, addProduct , updateProduct, getProduct, delProduct} from "@/api/technology/routeprodproduct";
import { getListProduct,getRightList ,addProduct , updateProduct, getProduct, delProduct} from "@/api/technology/routeprodproduct";
export default {
name: "Routeprodproduct",
@ -52,7 +124,31 @@ export default {
//--------------------->
leftList: [],
rightList: [],
titles:['未关联产品','已关联产品']
titles:['未关联产品','已关联产品'],
//
Ltotal: "",
LPageNum: "1",
LPageSize: "20",
LNextPage: null,
LPages: null,
leftLength: null,
leftQueryParams: {
routeId: this.routeId,
pageNum: 1,
pageSize: 20
},
//
Rtotal: "",
RPageNum: "1",
RPageSize: "20",
RPages: null,
rightLength: null,
RNextPage: null,
rightQueryParams: {
routeId: this.routeId,
pageNum: 1,
pageSize: 20
},
};
},
props :{
@ -61,23 +157,69 @@ export default {
},
created() {
this.getList();
this.getRightListFun();
},
methods: {
/** 查询未分配线体列表 */
/** 查询未分配产品列表 */
getList() {
debugger
this.loading = true;
getListProduct(this.queryParams).then(response => {
this.leftList = response.unSelect;
getListProduct(this.leftQueryParams).then(response => {
this.LPages = Math.ceil(response.total/this.LPageSize)
this.leftList = response.rows;
this.Ltotal = response.total;
this.LPageNum = this.leftQueryParams.pageNum;
this.LNextPage = this.leftQueryParams.pageNum+1;
this.loading = false;
});
},
/**左边上一页**/
leftPageNumChange(){
this.leftQueryParams.pageNum = this.LPageNum-1;
this.loading = true;
this.getList();
this.getRightListFun();
},
/**左边下一页**/
leftAddPageNumChange(){
this.leftQueryParams.pageNum = this.LNextPage;
this.loading = true;
this.getList();
this.getRightListFun();
},
/** 查询已分配产品列表 -------------------------------*/
getRightListFun() {
this.loading = true;
getRightList(this.rightQueryParams).then(response => {
this.RPages = Math.ceil(response.total/this.RPageSize);
const dataright = [];
for(let i in response.selected){
for(let i in response.rows){
// 穿
dataright.push(response.selected[i].key)
dataright.push(response.rows[i].key)
}
this.rightList = dataright;
this.Rtotal = response.total;
this.RPageNum = this.rightQueryParams.pageNum;
this.RNextPage = this.rightQueryParams.pageNum+1;
this.loading = false;
});
},
/**右边上一页**/
rightPageNumChange(){
this.rightQueryParams.pageNum = this.RPageNum-1;
this.loading = true;
this.getRightListFun();
},
/**右边下一页**/
rightAddPageNumChange(){
this.rightQueryParams.pageNum = this.RNextPage;
this.loading = true;
this.getRightListFun();
},
//
cancel() {
this.open = false;
@ -116,3 +258,8 @@ export default {
}
};
</script>
<style>
.el-transfer-panel {
width: 350px;
};
</style>

Loading…
Cancel
Save