2025-03-21 09:20:29 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="system-user-container layout-padding">
|
|
|
|
|
|
<el-card class="layout-padding-auto" shadow="hover">
|
2025-04-12 20:40:39 +08:00
|
|
|
|
<div class="selectBoxes">
|
|
|
|
|
|
<div class="selectItem">
|
2025-04-14 16:04:52 +08:00
|
|
|
|
<el-input v-model="state.formData.fBillNo" style="width: 12vw" :placeholder="t('message.index.DocNumber')" size="default" />
|
2025-04-12 20:40:39 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="selectItem">
|
2025-04-14 16:04:52 +08:00
|
|
|
|
<el-select :placeholder="t('message.index.DocStatus')" size="default" style="width: 12vw" v-model="state.formData.fmrpCloseStatus">
|
2025-04-12 20:40:39 +08:00
|
|
|
|
<el-option v-for="item in state.option.column[2].dicData" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="selectItem">
|
|
|
|
|
|
<el-date-picker
|
|
|
|
|
|
v-model="state.elDatePicker"
|
|
|
|
|
|
style="width: 25vw"
|
|
|
|
|
|
type="daterange"
|
|
|
|
|
|
range-separator="-"
|
2025-04-14 16:04:52 +08:00
|
|
|
|
:start-placeholder="t('message.index.StartDate')"
|
|
|
|
|
|
:end-placeholder="t('message.index.EndDate')"
|
2025-04-12 20:40:39 +08:00
|
|
|
|
size="default"
|
|
|
|
|
|
format="YYYY-MM-DD"
|
|
|
|
|
|
value-format="YYYY-MM-DD"
|
|
|
|
|
|
@change="elDatePickerFun"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="selectItem" style="margin-right: 0">
|
2025-04-14 16:04:52 +08:00
|
|
|
|
<el-button type="primary" size="default" @click="selectFun">{{ t('message.index.search') }}</el-button>
|
|
|
|
|
|
<el-button size="default" @click="resetFun">{{ t('message.index.reset') }}</el-button>
|
2025-04-12 20:40:39 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="selectItem" style="flex: 1; margin-right: 0">
|
|
|
|
|
|
<div class="piliang">
|
|
|
|
|
|
<el-button type="primary" size="small" @click="state.selectedDataShow = true">
|
2025-04-14 16:04:52 +08:00
|
|
|
|
<span>{{ t('message.index.selected') }} {{ state.selectedData.length }} {{ t('message.index.items') }},{{ t('message.index.proceed') }}</span>
|
2025-04-12 20:40:39 +08:00
|
|
|
|
</el-button>
|
|
|
|
|
|
<el-date-picker
|
|
|
|
|
|
v-model="state.chengNuoJiaoQiP"
|
|
|
|
|
|
type="date"
|
2025-04-14 16:04:52 +08:00
|
|
|
|
:placeholder="t('message.index.batchUpdateEarliestDeliveryDate')"
|
2025-04-12 20:40:39 +08:00
|
|
|
|
size="small"
|
|
|
|
|
|
style="width: 45%; margin-left: 12px"
|
|
|
|
|
|
@change="chengNuoJiaoQiPFun('0')"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-date-picker
|
|
|
|
|
|
v-model="state.newChengNuoJiaoQiP"
|
|
|
|
|
|
type="date"
|
2025-04-14 16:04:52 +08:00
|
|
|
|
:placeholder="t('message.index.batchUpdateLatestDeliveryDate')"
|
2025-04-12 20:40:39 +08:00
|
|
|
|
size="small"
|
|
|
|
|
|
style="width: 45%; margin-left: 12px"
|
|
|
|
|
|
@change="chengNuoJiaoQiPFun('1')"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2025-03-27 23:36:30 +08:00
|
|
|
|
<avue-crud
|
2025-04-03 01:06:09 +08:00
|
|
|
|
ref="crudRef"
|
|
|
|
|
|
:data="state.data"
|
|
|
|
|
|
:option="state.option"
|
|
|
|
|
|
v-model:page="state.page"
|
|
|
|
|
|
@on-load="onLoadFun"
|
|
|
|
|
|
@selection-change="selectionChange"
|
|
|
|
|
|
:table-loading="state.loading"
|
|
|
|
|
|
>
|
2025-04-12 20:40:39 +08:00
|
|
|
|
<template #fBillNo="{ row }">
|
2025-04-14 16:04:52 +08:00
|
|
|
|
<span v-if="row.ifHidden === 0" @click="toPurchaseDetails(row)" style="cursor: pointer; color: #409eff">{{ row.fBillNo }}</span>
|
|
|
|
|
|
</template>
|
2025-04-03 01:06:09 +08:00
|
|
|
|
<template #fDate="{ row }">{{ row.ifHidden === 0 ? row.fDate : '' }}</template>
|
|
|
|
|
|
<template #fCancelStatus="{ row }">
|
2025-04-14 16:04:52 +08:00
|
|
|
|
{{ row.ifHidden === 0 ? (row.fCancelStatus === 'A' ? t('message.index.closed') : t('message.index.unclosed')) : '' }}
|
2025-03-27 23:36:30 +08:00
|
|
|
|
</template>
|
2025-04-03 01:06:09 +08:00
|
|
|
|
<template #materialName="{ row }">
|
|
|
|
|
|
<el-tooltip :content="row.materialName" placement="top">
|
|
|
|
|
|
<div class="multi-line-omit">{{ row.materialName }}</div>
|
|
|
|
|
|
</el-tooltip>
|
2025-03-21 09:20:29 +08:00
|
|
|
|
</template>
|
2025-04-03 01:06:09 +08:00
|
|
|
|
<template #chengNuoJiaoQi="{ row }">
|
|
|
|
|
|
<el-date-picker
|
|
|
|
|
|
v-model="row.chengNuoJiaoQi"
|
|
|
|
|
|
type="date"
|
2025-04-14 16:04:52 +08:00
|
|
|
|
:placeholder="t('message.index.date')"
|
2025-04-03 01:06:09 +08:00
|
|
|
|
size="small"
|
|
|
|
|
|
style="width: 220px"
|
|
|
|
|
|
format="YYYY-MM-DD"
|
|
|
|
|
|
value-format="YYYY-MM-DD"
|
|
|
|
|
|
@change="batchSetChengNuoJiaoQiFun([{ id: row.id, newTime: row.chengNuoJiaoQi }])"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template #newChengNuoJiaoQi="{ row }">
|
|
|
|
|
|
<el-date-picker
|
|
|
|
|
|
v-model="row.newChengNuoJiaoQi"
|
|
|
|
|
|
type="date"
|
2025-04-14 16:04:52 +08:00
|
|
|
|
:placeholder="t('message.index.date')"
|
2025-04-03 01:06:09 +08:00
|
|
|
|
size="small"
|
|
|
|
|
|
style="width: 220px"
|
|
|
|
|
|
format="YYYY-MM-DD"
|
|
|
|
|
|
value-format="YYYY-MM-DD"
|
|
|
|
|
|
@change="batchSetNewChengNuoJiaoQiFun([{ id: row.id, newTime: row.newChengNuoJiaoQi }])"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</template>
|
2025-04-12 20:40:39 +08:00
|
|
|
|
<template #menu-left></template>
|
2025-04-08 00:14:08 +08:00
|
|
|
|
<template #menu="{ row }">
|
2025-04-14 16:04:52 +08:00
|
|
|
|
<el-button type="text" icon="el-icon-pie-chart" @click="toPurchaseDetails(row)">{{ t('message.index.view') }}</el-button>
|
2025-04-03 01:06:09 +08:00
|
|
|
|
</template>
|
2025-03-21 09:20:29 +08:00
|
|
|
|
</avue-crud>
|
|
|
|
|
|
</el-card>
|
2025-04-03 01:06:09 +08:00
|
|
|
|
<selectedData
|
|
|
|
|
|
ref="selectedDataRef"
|
|
|
|
|
|
:showes="state.selectedDataShow"
|
|
|
|
|
|
:listData="state.selectedData"
|
|
|
|
|
|
@generateDocuments="generateDocumentsFun"
|
2025-04-08 00:14:08 +08:00
|
|
|
|
@close="
|
|
|
|
|
|
() => {
|
|
|
|
|
|
state.selectedDataShow = false;
|
|
|
|
|
|
getList();
|
|
|
|
|
|
}
|
|
|
|
|
|
"
|
2025-04-03 01:06:09 +08:00
|
|
|
|
/>
|
2025-03-21 09:20:29 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2025-04-03 01:06:09 +08:00
|
|
|
|
import { reactive, onMounted, computed, nextTick, ref } from 'vue';
|
|
|
|
|
|
import { useRouter } from 'vue-router';
|
|
|
|
|
|
import { listApi } from '../../api/list/index';
|
2025-04-14 16:04:52 +08:00
|
|
|
|
import { useI18n } from 'vue-i18n';
|
2025-04-03 01:06:09 +08:00
|
|
|
|
import SelectedData from '/@/views/mssPurchaseOrder/selectedData.vue';
|
2025-04-12 20:40:39 +08:00
|
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
2025-04-14 16:04:52 +08:00
|
|
|
|
// import { Session } from '/@/utils/storage';
|
2025-04-03 01:06:09 +08:00
|
|
|
|
|
|
|
|
|
|
const selectedDataRef = ref();
|
2025-04-14 16:04:52 +08:00
|
|
|
|
const { t } = useI18n();
|
2025-04-03 01:06:09 +08:00
|
|
|
|
const router = useRouter();
|
2025-03-21 09:20:29 +08:00
|
|
|
|
// 定义变量内容
|
|
|
|
|
|
const state = reactive({
|
|
|
|
|
|
page: {
|
|
|
|
|
|
total: 1000,
|
|
|
|
|
|
currentPage: 1,
|
2025-04-03 01:06:09 +08:00
|
|
|
|
pageSize: 30,
|
2025-03-21 09:20:29 +08:00
|
|
|
|
},
|
|
|
|
|
|
option: {
|
2025-04-12 20:40:39 +08:00
|
|
|
|
height: computed(() => window.innerHeight - window.innerHeight * 0.23 + ''),
|
2025-04-03 01:06:09 +08:00
|
|
|
|
tip: false,
|
2025-04-08 00:14:08 +08:00
|
|
|
|
index: true,
|
2025-04-14 16:04:52 +08:00
|
|
|
|
menu: true,
|
2025-04-11 18:00:39 +08:00
|
|
|
|
menuWidth: 85,
|
2025-03-21 09:20:29 +08:00
|
|
|
|
border: true,
|
|
|
|
|
|
delBtn: false,
|
|
|
|
|
|
editBtn: false,
|
|
|
|
|
|
align: 'center',
|
2025-04-03 01:06:09 +08:00
|
|
|
|
// searchLabelWidth:100,
|
|
|
|
|
|
selection: true,
|
2025-04-08 00:14:08 +08:00
|
|
|
|
reserveSelection: true,
|
2025-04-03 01:06:09 +08:00
|
|
|
|
searchMenuSpan: 3,
|
|
|
|
|
|
addBtn: false,
|
2025-03-21 09:20:29 +08:00
|
|
|
|
column: [
|
2025-04-14 16:04:52 +08:00
|
|
|
|
{ label: computed(() => t('message.index.DocNumber')), prop: 'fBillNo', searchSpan: 3, width: '125' },
|
|
|
|
|
|
{ label: computed(() => t('message.index.date')), prop: 'fDate', type: 'datetime', searchSpan: 6, searchRange: true },
|
2025-04-03 01:06:09 +08:00
|
|
|
|
{
|
2025-04-14 16:04:52 +08:00
|
|
|
|
label: computed(() => t('message.index.status')),
|
2025-04-03 01:06:09 +08:00
|
|
|
|
prop: 'fCancelStatus',
|
|
|
|
|
|
dicData: [
|
2025-04-14 16:04:52 +08:00
|
|
|
|
{ label: computed(() => t('message.index.closed')), value: 'A' },
|
|
|
|
|
|
{ label: computed(() => t('message.index.unclosed')), value: 'B' },
|
2025-04-03 01:06:09 +08:00
|
|
|
|
],
|
|
|
|
|
|
width: '90',
|
|
|
|
|
|
},
|
2025-04-14 16:04:52 +08:00
|
|
|
|
{ label: computed(() => t('message.index.partNumber')), prop: 'materialCode', width: '120' },
|
|
|
|
|
|
{ label: computed(() => t('message.index.materialName')), prop: 'materialName', width: '240' },
|
2025-04-14 17:40:58 +08:00
|
|
|
|
{ label: computed(() => t('message.index.specification')), prop: 'guige', width: '120' },
|
2025-04-14 16:04:52 +08:00
|
|
|
|
{ label: computed(() => t('message.index.unit')), prop: 'unitName', width: '90' },
|
|
|
|
|
|
{ label: computed(() => t('message.index.qty')), prop: 'qty', width: '90' },
|
2025-04-14 17:40:58 +08:00
|
|
|
|
{ label: computed(() => t('message.index.requestDate')), prop: 'fDeliveryDate', width: '165' },
|
2025-04-03 01:06:09 +08:00
|
|
|
|
{
|
2025-04-14 16:04:52 +08:00
|
|
|
|
label: computed(() => t('message.index.DocStatus')),
|
|
|
|
|
|
prop: 'fmrpCloseStatus',
|
2025-04-03 01:06:09 +08:00
|
|
|
|
searchSpan: 3,
|
|
|
|
|
|
dicData: [
|
2025-04-14 16:04:52 +08:00
|
|
|
|
{ label: computed(() => t('message.index.normal')), value: 'A' },
|
|
|
|
|
|
{ label: computed(() => t('message.index.closed')), value: 'B' },
|
2025-04-03 01:06:09 +08:00
|
|
|
|
],
|
|
|
|
|
|
width: '90',
|
|
|
|
|
|
},
|
2025-04-14 16:04:52 +08:00
|
|
|
|
{ label: computed(() => t('message.index.receivedQTY')), prop: 'sendedQty', width: '110' },
|
|
|
|
|
|
{ label: computed(() => t('message.index.unreceivedQTY')), prop: 'notSendQty', width: '110' },
|
|
|
|
|
|
{ label: computed(() => t('message.index.earliestDeliveryDate')), prop: 'chengNuoJiaoQi', width: '160' },
|
|
|
|
|
|
{ label: computed(() => t('message.index.latestDeliveryDate')), prop: 'newChengNuoJiaoQi', width: '160' },
|
2025-03-21 09:20:29 +08:00
|
|
|
|
],
|
|
|
|
|
|
},
|
2025-03-27 23:36:30 +08:00
|
|
|
|
data: [],
|
2025-04-03 01:06:09 +08:00
|
|
|
|
elDatePicker: '',
|
|
|
|
|
|
formData: {
|
|
|
|
|
|
fBillNo: '',
|
|
|
|
|
|
fDateBegin: '',
|
|
|
|
|
|
fDateEmd: '',
|
|
|
|
|
|
fmrpCloseStatus: '',
|
|
|
|
|
|
},
|
|
|
|
|
|
selectedData: [],
|
|
|
|
|
|
chengNuoJiaoQiP: '',
|
|
|
|
|
|
newChengNuoJiaoQiP: '',
|
|
|
|
|
|
selectedDataShow: false,
|
|
|
|
|
|
loading: false,
|
2025-03-21 09:20:29 +08:00
|
|
|
|
});
|
2025-04-03 01:06:09 +08:00
|
|
|
|
const selectionChange = (list: any) => {
|
|
|
|
|
|
nextTick(() => {
|
|
|
|
|
|
state.selectedData = JSON.parse(JSON.stringify(list));
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
const chengNuoJiaoQiPFun = (e: string) => {
|
|
|
|
|
|
if (state.selectedData.length != 0) {
|
|
|
|
|
|
let arr: any = [];
|
|
|
|
|
|
if (e === '0') {
|
|
|
|
|
|
state.selectedData.forEach((item: any) => {
|
|
|
|
|
|
arr.push({ id: item.id, newTime: state.chengNuoJiaoQiP });
|
|
|
|
|
|
});
|
2025-04-14 16:04:52 +08:00
|
|
|
|
ElMessageBox({
|
|
|
|
|
|
closeOnClickModal: false,
|
|
|
|
|
|
closeOnPressEscape: false,
|
2025-04-14 17:40:58 +08:00
|
|
|
|
title: t('message.index.prompt'),
|
|
|
|
|
|
message: t('message.index.pleaseConfirmTheDateChange'),
|
|
|
|
|
|
confirmButtonText: t('message.user.logOutConfirm'),
|
|
|
|
|
|
cancelButtonText: t('message.user.logOutCancel'),
|
2025-04-14 16:04:52 +08:00
|
|
|
|
showCancelButton: true,
|
|
|
|
|
|
buttonSize: 'default',
|
|
|
|
|
|
beforeClose: (action, instance, done) => {
|
|
|
|
|
|
if (action === 'confirm') {
|
|
|
|
|
|
instance.confirmButtonLoading = true;
|
|
|
|
|
|
instance.confirmButtonText = '1';
|
|
|
|
|
|
listApi()
|
|
|
|
|
|
.batchSetChengNuoJiaoQi(arr)
|
|
|
|
|
|
.then((res: any) => {
|
|
|
|
|
|
done();
|
|
|
|
|
|
if (res.resultCode === 0) {
|
|
|
|
|
|
getList();
|
2025-04-14 17:40:58 +08:00
|
|
|
|
ElMessage.success(t('message.index.changedSuccessfully'));
|
2025-04-14 16:04:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
if (res.resultCode === -1) {
|
|
|
|
|
|
getList();
|
|
|
|
|
|
ElMessage.success(res.errorMessage);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
done();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
});
|
2025-04-03 01:06:09 +08:00
|
|
|
|
}
|
|
|
|
|
|
if (e === '1') {
|
|
|
|
|
|
state.selectedData.forEach((item: any) => {
|
|
|
|
|
|
arr.push({ id: item.id, newTime: state.newChengNuoJiaoQiP });
|
|
|
|
|
|
});
|
2025-04-14 16:04:52 +08:00
|
|
|
|
ElMessageBox({
|
|
|
|
|
|
closeOnClickModal: false,
|
|
|
|
|
|
closeOnPressEscape: false,
|
2025-04-14 17:40:58 +08:00
|
|
|
|
title: t('message.index.prompt'),
|
|
|
|
|
|
message: t('message.index.pleaseConfirmTheDateChange'),
|
|
|
|
|
|
confirmButtonText: t('message.user.logOutConfirm'),
|
|
|
|
|
|
cancelButtonText: t('message.user.logOutCancel'),
|
2025-04-14 16:04:52 +08:00
|
|
|
|
showCancelButton: true,
|
|
|
|
|
|
buttonSize: 'default',
|
|
|
|
|
|
beforeClose: (action, instance, done) => {
|
|
|
|
|
|
if (action === 'confirm') {
|
|
|
|
|
|
instance.confirmButtonLoading = true;
|
|
|
|
|
|
listApi()
|
|
|
|
|
|
.batchSetNewChengNuoJiaoQi(arr)
|
|
|
|
|
|
.then((res: any) => {
|
|
|
|
|
|
done();
|
|
|
|
|
|
if (res.resultCode === 0) {
|
|
|
|
|
|
getList();
|
2025-04-14 17:40:58 +08:00
|
|
|
|
ElMessage.success(t('message.index.changedSuccessfully'));
|
2025-04-14 16:04:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
if (res.resultCode === -1) {
|
|
|
|
|
|
getList();
|
|
|
|
|
|
ElMessage.success(res.errorMessage);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
done();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
});
|
2025-04-03 01:06:09 +08:00
|
|
|
|
}
|
|
|
|
|
|
} else {
|
2025-04-14 17:40:58 +08:00
|
|
|
|
ElMessage.warning(t('message.index.PleaseSelectItemsFirstly'));
|
2025-04-03 01:06:09 +08:00
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
const batchSetChengNuoJiaoQiFun = (arr: any) => {
|
2025-04-12 20:40:39 +08:00
|
|
|
|
ElMessageBox({
|
|
|
|
|
|
closeOnClickModal: false,
|
|
|
|
|
|
closeOnPressEscape: false,
|
2025-04-14 17:40:58 +08:00
|
|
|
|
title: t('message.index.prompt'),
|
|
|
|
|
|
message: t('message.index.pleaseConfirmTheDateChange'),
|
|
|
|
|
|
confirmButtonText: t('message.user.logOutConfirm'),
|
|
|
|
|
|
cancelButtonText: t('message.user.logOutCancel'),
|
2025-04-12 20:40:39 +08:00
|
|
|
|
showCancelButton: true,
|
|
|
|
|
|
buttonSize: 'default',
|
|
|
|
|
|
beforeClose: (action, instance, done) => {
|
|
|
|
|
|
if (action === 'confirm') {
|
2025-04-14 16:04:52 +08:00
|
|
|
|
instance.confirmButtonLoading = true;
|
2025-04-12 20:40:39 +08:00
|
|
|
|
listApi()
|
|
|
|
|
|
.batchSetChengNuoJiaoQi(arr)
|
|
|
|
|
|
.then((res: any) => {
|
2025-04-14 16:04:52 +08:00
|
|
|
|
done();
|
2025-04-12 20:40:39 +08:00
|
|
|
|
if (res.resultCode === 0) {
|
|
|
|
|
|
getList();
|
2025-04-14 17:40:58 +08:00
|
|
|
|
ElMessage.success(t('message.index.changedSuccessfully'));
|
2025-04-12 20:40:39 +08:00
|
|
|
|
}
|
|
|
|
|
|
if (res.resultCode === -1) {
|
2025-04-14 16:04:52 +08:00
|
|
|
|
getList();
|
2025-04-12 20:40:39 +08:00
|
|
|
|
ElMessage.success(res.errorMessage);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
done();
|
2025-04-03 01:06:09 +08:00
|
|
|
|
}
|
2025-04-12 20:40:39 +08:00
|
|
|
|
},
|
|
|
|
|
|
});
|
2025-04-03 01:06:09 +08:00
|
|
|
|
};
|
|
|
|
|
|
const batchSetNewChengNuoJiaoQiFun = (arr: any) => {
|
2025-04-12 20:40:39 +08:00
|
|
|
|
ElMessageBox({
|
|
|
|
|
|
closeOnClickModal: false,
|
|
|
|
|
|
closeOnPressEscape: false,
|
2025-04-14 17:40:58 +08:00
|
|
|
|
title: t('message.index.prompt'),
|
|
|
|
|
|
message: t('message.index.pleaseConfirmTheDateChange'),
|
|
|
|
|
|
confirmButtonText: t('message.user.logOutConfirm'),
|
|
|
|
|
|
cancelButtonText: t('message.user.logOutCancel'),
|
2025-04-12 20:40:39 +08:00
|
|
|
|
showCancelButton: true,
|
|
|
|
|
|
buttonSize: 'default',
|
|
|
|
|
|
beforeClose: (action, instance, done) => {
|
|
|
|
|
|
if (action === 'confirm') {
|
2025-04-14 16:04:52 +08:00
|
|
|
|
instance.confirmButtonLoading = true;
|
2025-04-12 20:40:39 +08:00
|
|
|
|
listApi()
|
|
|
|
|
|
.batchSetNewChengNuoJiaoQi(arr)
|
|
|
|
|
|
.then((res: any) => {
|
2025-04-14 16:04:52 +08:00
|
|
|
|
done();
|
2025-04-12 20:40:39 +08:00
|
|
|
|
if (res.resultCode === 0) {
|
|
|
|
|
|
getList();
|
2025-04-14 17:40:58 +08:00
|
|
|
|
ElMessage.success(t('message.index.changedSuccessfully'));
|
2025-04-12 20:40:39 +08:00
|
|
|
|
}
|
|
|
|
|
|
if (res.resultCode === -1) {
|
2025-04-14 16:04:52 +08:00
|
|
|
|
getList();
|
2025-04-12 20:40:39 +08:00
|
|
|
|
ElMessage.success(res.errorMessage);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
done();
|
2025-04-03 01:06:09 +08:00
|
|
|
|
}
|
2025-04-12 20:40:39 +08:00
|
|
|
|
},
|
|
|
|
|
|
});
|
2025-04-03 01:06:09 +08:00
|
|
|
|
};
|
|
|
|
|
|
const generateDocumentsFun = () => {
|
|
|
|
|
|
state.selectedDataShow = false;
|
|
|
|
|
|
getList();
|
|
|
|
|
|
};
|
|
|
|
|
|
//跳转详情
|
|
|
|
|
|
const toPurchaseDetails = (item: any) => {
|
|
|
|
|
|
router.push({
|
|
|
|
|
|
path: '/purchaseDetails',
|
|
|
|
|
|
query: {
|
2025-04-12 20:40:39 +08:00
|
|
|
|
fBillNo: item.fBillNo,
|
2025-04-03 01:06:09 +08:00
|
|
|
|
},
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
const elDatePickerFun = (val: any) => {
|
|
|
|
|
|
state.formData.fDateBegin = val[0];
|
|
|
|
|
|
state.formData.fDateEmd = val[1];
|
|
|
|
|
|
};
|
|
|
|
|
|
//接口数据处理
|
|
|
|
|
|
const selectFun = () => {
|
|
|
|
|
|
state.page.currentPage = 1;
|
|
|
|
|
|
state.page.pageSize = 30;
|
|
|
|
|
|
getList();
|
|
|
|
|
|
};
|
|
|
|
|
|
const resetFun = () => {
|
|
|
|
|
|
state.page.currentPage = 1;
|
2025-04-11 18:00:39 +08:00
|
|
|
|
state.page.pageSize = 30;
|
2025-04-03 01:06:09 +08:00
|
|
|
|
state.elDatePicker = '';
|
|
|
|
|
|
state.formData = {
|
|
|
|
|
|
fBillNo: '',
|
|
|
|
|
|
fDateBegin: '',
|
|
|
|
|
|
fDateEmd: '',
|
|
|
|
|
|
fmrpCloseStatus: '',
|
|
|
|
|
|
};
|
|
|
|
|
|
getList();
|
|
|
|
|
|
};
|
|
|
|
|
|
const onLoadFun = (e: any) => {
|
|
|
|
|
|
state.page.currentPage = e.currentPage;
|
|
|
|
|
|
state.page.pageSize = e.pageSize;
|
|
|
|
|
|
getList();
|
|
|
|
|
|
};
|
|
|
|
|
|
const getList = () => {
|
|
|
|
|
|
state.loading = true;
|
|
|
|
|
|
listApi()
|
|
|
|
|
|
.getPageList({
|
|
|
|
|
|
condition: state.formData,
|
|
|
|
|
|
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;
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
// 页面加载时
|
2025-04-08 00:14:08 +08:00
|
|
|
|
onMounted(() => {
|
2025-04-12 20:40:39 +08:00
|
|
|
|
console.log(window.innerHeight - window.innerHeight * 0.25 + '');
|
2025-04-08 00:14:08 +08:00
|
|
|
|
});
|
2025-04-03 01:06:09 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2025-04-08 00:14:08 +08:00
|
|
|
|
:deep(.avue-crud__header) {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
}
|
2025-04-12 20:40:39 +08:00
|
|
|
|
|
|
|
|
|
|
:deep(.el-button--text) {
|
|
|
|
|
|
padding: 0 !important;
|
|
|
|
|
|
height: auto !important;
|
2025-04-08 00:14:08 +08:00
|
|
|
|
}
|
2025-04-12 20:40:39 +08:00
|
|
|
|
|
2025-04-08 00:14:08 +08:00
|
|
|
|
:deep(.avue-crud__pagination) {
|
|
|
|
|
|
padding: 0 12px !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-03 01:06:09 +08:00
|
|
|
|
:deep(.cell) {
|
|
|
|
|
|
padding: 0 !important;
|
|
|
|
|
|
}
|
2025-03-27 23:36:30 +08:00
|
|
|
|
|
2025-04-03 01:06:09 +08:00
|
|
|
|
:deep(.avue-crud__left) {
|
|
|
|
|
|
flex: 1;
|
2025-03-27 23:36:30 +08:00
|
|
|
|
}
|
2025-04-03 01:06:09 +08:00
|
|
|
|
|
|
|
|
|
|
:deep(.avue-crud__refreshBtn) {
|
|
|
|
|
|
display: none;
|
2025-03-27 23:36:30 +08:00
|
|
|
|
}
|
2025-04-03 01:06:09 +08:00
|
|
|
|
|
|
|
|
|
|
:deep(.avue-crud__gridBtn) {
|
|
|
|
|
|
display: none;
|
2025-03-27 23:36:30 +08:00
|
|
|
|
}
|
2025-04-03 01:06:09 +08:00
|
|
|
|
|
|
|
|
|
|
.piliang {
|
|
|
|
|
|
margin-left: 12px;
|
|
|
|
|
|
border: 1px solid #d5d5d5;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 4px;
|
2025-03-27 23:36:30 +08:00
|
|
|
|
}
|
2025-04-03 01:06:09 +08:00
|
|
|
|
|
|
|
|
|
|
.system-user-container {
|
|
|
|
|
|
padding: 0 !important;
|
2025-03-21 09:20:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-03 01:06:09 +08:00
|
|
|
|
.multi-line-omit {
|
|
|
|
|
|
word-break: break-all; // 允许单词内自动换行,如果一个单词很长的话
|
|
|
|
|
|
text-overflow: ellipsis; // 溢出用省略号显示
|
|
|
|
|
|
overflow: hidden; // 超出的文本隐藏
|
|
|
|
|
|
display: -webkit-box; // 作为弹性伸缩盒子模型显示
|
|
|
|
|
|
-webkit-line-clamp: 1; // 显示的行
|
|
|
|
|
|
-webkit-box-orient: vertical; // 设置伸缩盒子的子元素排列方式--从上到下垂直排列
|
2025-04-01 23:48:13 +08:00
|
|
|
|
}
|
2025-04-03 01:06:09 +08:00
|
|
|
|
|
|
|
|
|
|
.selectBoxes {
|
|
|
|
|
|
display: flex;
|
2025-04-12 20:40:39 +08:00
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
|
2025-04-03 01:06:09 +08:00
|
|
|
|
.selectItem {
|
|
|
|
|
|
margin-right: 16px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.avue-crud) {
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.avue-crud--card) {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.avue-crud__body) {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-table__header) {
|
|
|
|
|
|
height: 40px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-card__body) {
|
|
|
|
|
|
width: 100% !important;
|
|
|
|
|
|
height: 100% !important;
|
|
|
|
|
|
overflow: hidden !important;
|
|
|
|
|
|
padding: 0 !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-table__cell) {
|
|
|
|
|
|
padding: 0 !important;
|
|
|
|
|
|
//height: 56px !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-card) {
|
|
|
|
|
|
padding: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-form) {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-21 09:20:29 +08:00
|
|
|
|
.system-user-container {
|
|
|
|
|
|
:deep(.el-card__body) {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
overflow: auto;
|
|
|
|
|
|
|
|
|
|
|
|
.el-table {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-04-03 01:06:09 +08:00
|
|
|
|
|
|
|
|
|
|
:deep(.el-col) {
|
|
|
|
|
|
margin-bottom: 16px;
|
2025-03-21 09:20:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
</style>
|