中英文翻译
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
<el-card class="layout-padding-auto" shadow="hover">
|
||||
<div class="selectBoxes">
|
||||
<div class="selectItem">
|
||||
<el-input v-model="state.formData.fBillNo" style="width: 12vw" placeholder="单据编号" size="default" />
|
||||
<el-input v-model="state.formData.fBillNo" style="width: 12vw" :placeholder="t('message.index.DocNumber')" size="default" />
|
||||
</div>
|
||||
<div class="selectItem">
|
||||
<el-select placeholder="业务状态" size="default" style="width: 12vw" v-model="state.formData.fmrpCloseStatus">
|
||||
<el-select :placeholder="t('message.index.DocStatus')" size="default" style="width: 12vw" v-model="state.formData.fmrpCloseStatus">
|
||||
<el-option v-for="item in state.option.column[2].dicData" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</div>
|
||||
@@ -16,8 +16,8 @@
|
||||
style="width: 25vw"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始采购日期"
|
||||
end-placeholder="采购结束日期"
|
||||
:start-placeholder="t('message.index.StartDate')"
|
||||
:end-placeholder="t('message.index.EndDate')"
|
||||
size="default"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
@@ -25,18 +25,18 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="selectItem" style="margin-right: 0">
|
||||
<el-button type="primary" size="default" @click="selectFun">搜索</el-button>
|
||||
<el-button size="default" @click="resetFun">重置</el-button>
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
<span>{{ t('message.index.selected') }} {{ state.selectedData.length }} {{ t('message.index.items') }},{{ t('message.index.proceed') }}</span>
|
||||
</el-button>
|
||||
<el-date-picker
|
||||
v-model="state.chengNuoJiaoQiP"
|
||||
type="date"
|
||||
placeholder="批量修改选中承诺日期"
|
||||
:placeholder="t('message.index.batchUpdateEarliestDeliveryDate')"
|
||||
size="small"
|
||||
style="width: 45%; margin-left: 12px"
|
||||
@change="chengNuoJiaoQiPFun('0')"
|
||||
@@ -44,7 +44,7 @@
|
||||
<el-date-picker
|
||||
v-model="state.newChengNuoJiaoQiP"
|
||||
type="date"
|
||||
placeholder="批量修改选中承诺最新交期"
|
||||
:placeholder="t('message.index.batchUpdateLatestDeliveryDate')"
|
||||
size="small"
|
||||
style="width: 45%; margin-left: 12px"
|
||||
@change="chengNuoJiaoQiPFun('1')"
|
||||
@@ -62,12 +62,11 @@
|
||||
:table-loading="state.loading"
|
||||
>
|
||||
<template #fBillNo="{ row }">
|
||||
<span v-if="row.ifHidden === 0" @click="toPurchaseDetails(row)" style="cursor: pointer">{{ row.fBillNo }}</span>
|
||||
<!-- {{ row.ifHidden === 0 ? row.fBillNo : '' }}-->
|
||||
</template>
|
||||
<span v-if="row.ifHidden === 0" @click="toPurchaseDetails(row)" style="cursor: pointer; color: #409eff">{{ row.fBillNo }}</span>
|
||||
</template>
|
||||
<template #fDate="{ row }">{{ row.ifHidden === 0 ? row.fDate : '' }}</template>
|
||||
<template #fCancelStatus="{ row }">
|
||||
{{ row.ifHidden === 0 ? (row.fCancelStatus === 'A' ? '未关闭' : '已关闭') : '' }}
|
||||
{{ row.ifHidden === 0 ? (row.fCancelStatus === 'A' ? t('message.index.closed') : t('message.index.unclosed')) : '' }}
|
||||
</template>
|
||||
<template #materialName="{ row }">
|
||||
<el-tooltip :content="row.materialName" placement="top">
|
||||
@@ -78,7 +77,7 @@
|
||||
<el-date-picker
|
||||
v-model="row.chengNuoJiaoQi"
|
||||
type="date"
|
||||
placeholder="日期"
|
||||
:placeholder="t('message.index.date')"
|
||||
size="small"
|
||||
style="width: 220px"
|
||||
format="YYYY-MM-DD"
|
||||
@@ -90,7 +89,7 @@
|
||||
<el-date-picker
|
||||
v-model="row.newChengNuoJiaoQi"
|
||||
type="date"
|
||||
placeholder="日期"
|
||||
:placeholder="t('message.index.date')"
|
||||
size="small"
|
||||
style="width: 220px"
|
||||
format="YYYY-MM-DD"
|
||||
@@ -100,7 +99,7 @@
|
||||
</template>
|
||||
<template #menu-left></template>
|
||||
<template #menu="{ row }">
|
||||
<el-button type="text" icon="el-icon-pie-chart" @click="toPurchaseDetails(row)">查看</el-button>
|
||||
<el-button type="text" icon="el-icon-pie-chart" @click="toPurchaseDetails(row)">{{ t('message.index.view') }}</el-button>
|
||||
</template>
|
||||
</avue-crud>
|
||||
</el-card>
|
||||
@@ -123,13 +122,13 @@
|
||||
import { reactive, onMounted, computed, nextTick, ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { listApi } from '../../api/list/index';
|
||||
// import { useI18n } from 'vue-i18n';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import SelectedData from '/@/views/mssPurchaseOrder/selectedData.vue';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import { Session } from '/@/utils/storage';
|
||||
// import { Session } from '/@/utils/storage';
|
||||
|
||||
const selectedDataRef = ref();
|
||||
// const { t } = useI18n();
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
// 定义变量内容
|
||||
const state = reactive({
|
||||
@@ -142,7 +141,7 @@ const state = reactive({
|
||||
height: computed(() => window.innerHeight - window.innerHeight * 0.23 + ''),
|
||||
tip: false,
|
||||
index: true,
|
||||
menu: false,
|
||||
menu: true,
|
||||
menuWidth: 85,
|
||||
border: true,
|
||||
delBtn: false,
|
||||
@@ -154,36 +153,36 @@ const state = reactive({
|
||||
searchMenuSpan: 3,
|
||||
addBtn: false,
|
||||
column: [
|
||||
{ label: '采购单号', prop: 'fBillNo', /*search: true,*/ searchSpan: 3, width: '125' },
|
||||
{ label: '采购日期', prop: 'fDate', /*search: true,*/ type: 'datetime', searchSpan: 6, searchRange: true },
|
||||
{ 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 },
|
||||
{
|
||||
label: '关闭状态',
|
||||
label: computed(() => t('message.index.status')),
|
||||
prop: 'fCancelStatus',
|
||||
dicData: [
|
||||
{ label: '未关闭', value: 'A' },
|
||||
{ label: '已关闭', value: 'B' },
|
||||
{ label: computed(() => t('message.index.closed')), value: 'A' },
|
||||
{ label: computed(() => t('message.index.unclosed')), value: 'B' },
|
||||
],
|
||||
width: '90',
|
||||
},
|
||||
{ label: '物料编码', prop: 'materialCode', width: '120' },
|
||||
{ label: '物料名称', prop: 'materialName', width: '240' },
|
||||
{ label: '采购单位', prop: 'unitName', width: '90' },
|
||||
{ label: '采购数量', prop: 'qty', width: '90' },
|
||||
{ label: '交货日期', prop: 'fDeliveryDate', width: '165' },
|
||||
{ label: computed(() => t('message.index.partNumber')), prop: 'materialCode', width: '120' },
|
||||
{ label: computed(() => t('message.index.materialName')), prop: 'materialName', width: '240' },
|
||||
{ label: computed(() => t('message.index.unit')), prop: 'unitName', width: '90' },
|
||||
{ label: computed(() => t('message.index.qty')), prop: 'qty', width: '90' },
|
||||
{ label: computed(() => t('message.index.deliveryDate')), prop: 'fDeliveryDate', width: '165' },
|
||||
{
|
||||
label: '业务状态',
|
||||
prop: 'fmrpCloseStatus' /*search: true,*/,
|
||||
label: computed(() => t('message.index.DocStatus')),
|
||||
prop: 'fmrpCloseStatus',
|
||||
searchSpan: 3,
|
||||
dicData: [
|
||||
{ label: '正常', value: 'A' },
|
||||
{ label: '业务关闭', value: 'B' },
|
||||
{ label: computed(() => t('message.index.normal')), value: 'A' },
|
||||
{ label: computed(() => t('message.index.closed')), value: 'B' },
|
||||
],
|
||||
width: '90',
|
||||
},
|
||||
{ label: '累计收料数量', prop: 'sendedQty', width: '110' },
|
||||
{ label: '剩余收料数量', prop: 'notSendQty', width: '110' },
|
||||
{ label: '供应商承诺交期', prop: 'chengNuoJiaoQi', width: '160' },
|
||||
{ label: '供应商承诺最新交期', prop: 'newChengNuoJiaoQi', width: '160' },
|
||||
{ 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' },
|
||||
],
|
||||
},
|
||||
data: [],
|
||||
@@ -212,13 +211,69 @@ const chengNuoJiaoQiPFun = (e: string) => {
|
||||
state.selectedData.forEach((item: any) => {
|
||||
arr.push({ id: item.id, newTime: state.chengNuoJiaoQiP });
|
||||
});
|
||||
batchSetChengNuoJiaoQiFun(arr);
|
||||
ElMessageBox({
|
||||
closeOnClickModal: false,
|
||||
closeOnPressEscape: false,
|
||||
title: '提示',
|
||||
message: '是否要修正此项日期',
|
||||
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();
|
||||
ElMessage.success('操作成功');
|
||||
}
|
||||
if (res.resultCode === -1) {
|
||||
getList();
|
||||
ElMessage.success(res.errorMessage);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
if (e === '1') {
|
||||
state.selectedData.forEach((item: any) => {
|
||||
arr.push({ id: item.id, newTime: state.newChengNuoJiaoQiP });
|
||||
});
|
||||
batchSetNewChengNuoJiaoQiFun(arr);
|
||||
ElMessageBox({
|
||||
closeOnClickModal: false,
|
||||
closeOnPressEscape: false,
|
||||
title: '提示',
|
||||
message: '是否要修正此项日期',
|
||||
showCancelButton: true,
|
||||
buttonSize: 'default',
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === 'confirm') {
|
||||
instance.confirmButtonLoading = true;
|
||||
instance.confirmButtonText = '1';
|
||||
listApi()
|
||||
.batchSetNewChengNuoJiaoQi(arr)
|
||||
.then((res: any) => {
|
||||
done();
|
||||
if (res.resultCode === 0) {
|
||||
getList();
|
||||
ElMessage.success('操作成功');
|
||||
}
|
||||
if (res.resultCode === -1) {
|
||||
getList();
|
||||
ElMessage.success(res.errorMessage);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
} else {
|
||||
ElMessage.warning('请先选中数据');
|
||||
@@ -234,18 +289,19 @@ const batchSetChengNuoJiaoQiFun = (arr: any) => {
|
||||
buttonSize: 'default',
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === 'confirm') {
|
||||
instance.confirmButtonLoading = true;
|
||||
instance.confirmButtonText = '1';
|
||||
listApi()
|
||||
.batchSetChengNuoJiaoQi(arr)
|
||||
.then((res: any) => {
|
||||
done();
|
||||
done();
|
||||
if (res.resultCode === 0) {
|
||||
ElMessage.success('操作成功');
|
||||
getList();
|
||||
state.chengNuoJiaoQiP = '';
|
||||
ElMessage.success('操作成功');
|
||||
}
|
||||
if (res.resultCode === -1) {
|
||||
getList();
|
||||
ElMessage.success(res.errorMessage);
|
||||
state.chengNuoJiaoQiP = '';
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@@ -264,18 +320,19 @@ const batchSetNewChengNuoJiaoQiFun = (arr: any) => {
|
||||
buttonSize: 'default',
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === 'confirm') {
|
||||
instance.confirmButtonLoading = true;
|
||||
instance.confirmButtonText = '1';
|
||||
listApi()
|
||||
.batchSetNewChengNuoJiaoQi(arr)
|
||||
.then((res: any) => {
|
||||
done();
|
||||
done();
|
||||
if (res.resultCode === 0) {
|
||||
ElMessage.success('操作成功');
|
||||
getList();
|
||||
state.newChengNuoJiaoQiP = ''
|
||||
ElMessage.success('操作成功');
|
||||
}
|
||||
if (res.resultCode === -1) {
|
||||
getList();
|
||||
ElMessage.success(res.errorMessage);
|
||||
state.newChengNuoJiaoQiP = ''
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -76,12 +76,9 @@
|
||||
import {reactive, onMounted, computed, nextTick, ref} from 'vue';
|
||||
import { useRouter,useRoute } from 'vue-router';
|
||||
import { listApi } from '../../api/list/index';
|
||||
// import { useI18n } from 'vue-i18n';
|
||||
import SelectedData from '/@/views/mssPurchaseOrder/selectedData.vue';
|
||||
import {ElMessage, ElMessageBox} from 'element-plus';
|
||||
const selectedDataRef = ref()
|
||||
// const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
const route = useRoute()
|
||||
// 定义变量内容
|
||||
const state = reactive({
|
||||
@@ -163,13 +160,69 @@ const chengNuoJiaoQiPFun = (e: string) => {
|
||||
state.selectedData.forEach((item: any) => {
|
||||
arr.push({ id: item.id, newTime: state.chengNuoJiaoQiP });
|
||||
});
|
||||
batchSetChengNuoJiaoQiFun(arr);
|
||||
ElMessageBox({
|
||||
closeOnClickModal: false,
|
||||
closeOnPressEscape: false,
|
||||
title: '提示',
|
||||
message: '是否要修正此项日期',
|
||||
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();
|
||||
ElMessage.success('操作成功');
|
||||
}
|
||||
if (res.resultCode === -1) {
|
||||
getList();
|
||||
ElMessage.success(res.errorMessage);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
if (e === '1') {
|
||||
state.selectedData.forEach((item: any) => {
|
||||
arr.push({ id: item.id, newTime: state.newChengNuoJiaoQiP });
|
||||
});
|
||||
batchSetNewChengNuoJiaoQiFun(arr);
|
||||
ElMessageBox({
|
||||
closeOnClickModal: false,
|
||||
closeOnPressEscape: false,
|
||||
title: '提示',
|
||||
message: '是否要修正此项日期',
|
||||
showCancelButton: true,
|
||||
buttonSize: 'default',
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === 'confirm') {
|
||||
instance.confirmButtonLoading = true;
|
||||
instance.confirmButtonText = '1';
|
||||
listApi()
|
||||
.batchSetNewChengNuoJiaoQi(arr)
|
||||
.then((res: any) => {
|
||||
done();
|
||||
if (res.resultCode === 0) {
|
||||
getList();
|
||||
ElMessage.success('操作成功');
|
||||
}
|
||||
if (res.resultCode === -1) {
|
||||
getList();
|
||||
ElMessage.success(res.errorMessage);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
} else {
|
||||
ElMessage.warning('请先选中数据');
|
||||
@@ -185,18 +238,19 @@ const batchSetChengNuoJiaoQiFun = (arr: any) => {
|
||||
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) {
|
||||
ElMessage.success('操作成功');
|
||||
getList();
|
||||
state.chengNuoJiaoQiP = '';
|
||||
ElMessage.success('操作成功');
|
||||
}
|
||||
if (res.resultCode === -1) {
|
||||
getList();
|
||||
ElMessage.success(res.errorMessage);
|
||||
state.chengNuoJiaoQiP = '';
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@@ -215,18 +269,19 @@ const batchSetNewChengNuoJiaoQiFun = (arr: any) => {
|
||||
buttonSize: 'default',
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === 'confirm') {
|
||||
instance.confirmButtonLoading = true;
|
||||
instance.confirmButtonText = '1';
|
||||
listApi()
|
||||
.batchSetNewChengNuoJiaoQi(arr)
|
||||
.then((res: any) => {
|
||||
done();
|
||||
if (res.resultCode === 0) {
|
||||
ElMessage.success('操作成功');
|
||||
getList();
|
||||
state.newChengNuoJiaoQiP = ''
|
||||
ElMessage.success('操作成功');
|
||||
}
|
||||
if (res.resultCode === -1) {
|
||||
getList();
|
||||
ElMessage.success(res.errorMessage);
|
||||
state.newChengNuoJiaoQiP = ''
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user