初次对接
This commit is contained in:
@@ -1,6 +1,32 @@
|
||||
<template>
|
||||
<div class="system-user-container layout-padding">
|
||||
|
||||
<el-card class="layout-padding-auto" shadow="hover">
|
||||
<div class="selectBoxes">
|
||||
<div class="selectItem" style="flex: 1;margin-right: 0">
|
||||
<div class="piliang">
|
||||
<el-button type="primary" size="small" @click="state.selectedDataShow = true">
|
||||
<span>已选中 {{ state.selectedData.length }} 条数据,去查看</span>
|
||||
</el-button>
|
||||
<el-date-picker
|
||||
v-model="state.chengNuoJiaoQiP"
|
||||
type="date"
|
||||
placeholder="批量修改选中承诺日期"
|
||||
size="small"
|
||||
style="width: 45%; margin-left: 12px"
|
||||
@change="chengNuoJiaoQiPFun('0')"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="state.newChengNuoJiaoQiP"
|
||||
type="date"
|
||||
placeholder="批量修改选中承诺最新交期"
|
||||
size="small"
|
||||
style="width: 45%; margin-left: 12px"
|
||||
@change="chengNuoJiaoQiPFun('1')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<avue-crud
|
||||
ref="crudRef"
|
||||
:data="state.data"
|
||||
@@ -65,7 +91,7 @@ const state = reactive({
|
||||
pageSize: 25,
|
||||
},
|
||||
option: {
|
||||
height: '790',
|
||||
height: computed(() => window.innerHeight - (window.innerHeight * 0.18) + ''),
|
||||
tip: false,
|
||||
index: true,
|
||||
menuWidth: 120,
|
||||
@@ -129,6 +155,7 @@ const state = reactive({
|
||||
const selectionChange = (list: any) => {
|
||||
state.selectedData = list;
|
||||
};
|
||||
|
||||
const chengNuoJiaoQiPFun = (e: string) => {
|
||||
if (state.selectedData.length != 0) {
|
||||
let arr: any = [];
|
||||
@@ -136,13 +163,13 @@ const chengNuoJiaoQiPFun = (e: string) => {
|
||||
state.selectedData.forEach((item: any) => {
|
||||
arr.push({ id: item.id, newTime: state.chengNuoJiaoQiP });
|
||||
});
|
||||
batchSetChengNuoJiaoQiFun(arr)
|
||||
batchSetChengNuoJiaoQiFun(arr);
|
||||
}
|
||||
if (e === '1') {
|
||||
state.selectedData.forEach((item: any) => {
|
||||
arr.push({ id: item.id, newTime: state.newChengNuoJiaoQiP });
|
||||
});
|
||||
batchSetNewChengNuoJiaoQiFun(arr)
|
||||
batchSetNewChengNuoJiaoQiFun(arr);
|
||||
}
|
||||
} else {
|
||||
ElMessage.warning('请先选中数据');
|
||||
@@ -176,52 +203,28 @@ const generateDocumentsFun = () => {
|
||||
state.selectedDataShow = false
|
||||
getList()
|
||||
}
|
||||
//跳转详情
|
||||
const toPurchaseDetails = (item: any) => {
|
||||
router.push({
|
||||
path: '/purchaseDetails',
|
||||
query: {
|
||||
topId: item.fiD,
|
||||
},
|
||||
});
|
||||
};
|
||||
const elDatePickerFun = (val: any) => {
|
||||
state.formData.fDateBegin = val[0];
|
||||
state.formData.fDateEmd = val[1];
|
||||
};
|
||||
//接口数据处理
|
||||
const selectFun = () => {
|
||||
state.page.currentPage = 1;
|
||||
state.page.pageSize = 20;
|
||||
getList();
|
||||
};
|
||||
const resetFun = () => {
|
||||
state.page.currentPage = 1;
|
||||
state.page.pageSize = 20;
|
||||
state.elDatePicker = '';
|
||||
state.formData = {
|
||||
fBillNo: '',
|
||||
fDateBegin: '',
|
||||
fDateEmd: '',
|
||||
fmrpCloseStatus: '',
|
||||
};
|
||||
getList();
|
||||
};
|
||||
|
||||
const getList = () => {
|
||||
state.loading = true
|
||||
listApi().getPurchaseOrderItemList({
|
||||
fid:state.topId
|
||||
}).then((res:any) => {
|
||||
state.loading = false
|
||||
if(res.resultCode === 0){
|
||||
state.data = res.data
|
||||
}
|
||||
})
|
||||
state.loading = true;
|
||||
listApi()
|
||||
.getPageList({
|
||||
condition: {
|
||||
fBillNo:state.formData.fBillNo
|
||||
},
|
||||
pageSize: state.page.pageSize,
|
||||
page: state.page.currentPage,
|
||||
})
|
||||
.then((res: any) => {
|
||||
state.loading = false;
|
||||
if (res.resultCode === 0) {
|
||||
state.data = res.data.dataList;
|
||||
state.page.total = res.data.total;
|
||||
}
|
||||
});
|
||||
};
|
||||
// 页面加载时
|
||||
onMounted(() => {
|
||||
state.topId = route.query.topId as string
|
||||
state.formData.fBillNo = route.query.fBillNo as string
|
||||
getList()
|
||||
});
|
||||
</script>
|
||||
@@ -281,6 +284,7 @@ onMounted(() => {
|
||||
.selectBoxes {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: 650px;
|
||||
.selectItem {
|
||||
margin-right: 16px;
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user