中英文翻译

This commit is contained in:
2025-04-14 17:40:58 +08:00
parent 39937a1602
commit 2ab2d3df93
8 changed files with 360 additions and 300 deletions

View File

@@ -1,74 +1,74 @@
<template>
<el-dialog :model-value="props.showes" @close="closeFun" width="80%">
<div style="display: flex; align-items: center; margin-bottom: 16px">
<div>发票号</div>
<el-input style="width: 300px" v-model="state.f_VHUB_Text" placeholder="请填写发票号" size="default" />
<div>{{ t('message.index.invoiceNumber') }}</div>
<el-input style="width: 300px" v-model="state.f_VHUB_Text" :placeholder="t('message.index.invoiceNumber')" size="default" />
</div>
<avue-crud ref="crudRef" :data="state.data" :option="state.option">
<template #fSupplierLot="{ row }">
<div style="display: flex; align-items: center; justify-content: center">
<el-input v-model="row.fSupplierLot" placeholder="批号" size="small" />
<el-input v-model="row.fSupplierLot" :placeholder="t('message.index.supplierLot')" size="small" />
</div>
</template>
<template #notSendQtyText="{ row }">
<div>{{row.notSendQty}}</div>
<template #notSendQtyText="{ row }">
<div>{{ row.notSendQty }}</div>
</template>
<template #notSendQty="{ row }">
<div style="display: flex; align-items: center; justify-content: center">
<el-input-number v-model="row.notSendQty" size="small" />
</div>
</template>
<!-- <template #chengNuoJiaoQi="{ row }">-->
<!-- <div style="display: flex; align-items: center; justify-content: center">-->
<!-- <el-date-picker-->
<!-- v-model="row.chengNuoJiaoQi"-->
<!-- type="date"-->
<!-- size="small"-->
<!-- style="width: 100%"-->
<!-- format="YYYY/MM/DD"-->
<!-- @change="batchSetChengNuoJiaoQiFun([{ id: row.id, newTime: row.chengNuoJiaoQi }])"-->
<!-- />-->
<!-- </div>-->
<!-- </template>-->
<!-- <template #newChengNuoJiaoQi="{ row }">-->
<!-- <div style="display: flex; align-items: center; justify-content: center">-->
<!-- <el-date-picker-->
<!-- v-model="row.newChengNuoJiaoQi"-->
<!-- type="date"-->
<!-- size="small"-->
<!-- style="width: 100%"-->
<!-- format="YYYY/MM/DD"-->
<!-- @change="batchSetNewChengNuoJiaoQiFun([{ id: row.id, newTime: row.newChengNuoJiaoQi }])"-->
<!-- />-->
<!-- </div>-->
<!-- </template>-->
<template #menu-left>
<div class="selectBoxes">
<el-date-picker
v-model="state.chengNuoJiaoQiP"
type="date"
placeholder="批量修改选中承诺日期"
style="width: 190px"
@change="chengNuoJiaoQiPFun('0')"
/>
<el-date-picker
v-model="state.newChengNuoJiaoQiP"
type="date"
placeholder="批量修改选中承诺最新交期"
style="width: 190px; margin-left: 12px"
@change="chengNuoJiaoQiPFun('1')"
/>
<el-input v-model="state.fSupplierLot" style="width: 190px; margin-left: 12px" placeholder="批号" @input="fSupplierLotFun" />
</div>
</template>
<!-- <template #chengNuoJiaoQi="{ row }">-->
<!-- <div style="display: flex; align-items: center; justify-content: center">-->
<!-- <el-date-picker-->
<!-- v-model="row.chengNuoJiaoQi"-->
<!-- type="date"-->
<!-- size="small"-->
<!-- style="width: 100%"-->
<!-- format="YYYY/MM/DD"-->
<!-- @change="batchSetChengNuoJiaoQiFun([{ id: row.id, newTime: row.chengNuoJiaoQi }])"-->
<!-- />-->
<!-- </div>-->
<!-- </template>-->
<!-- <template #newChengNuoJiaoQi="{ row }">-->
<!-- <div style="display: flex; align-items: center; justify-content: center">-->
<!-- <el-date-picker-->
<!-- v-model="row.newChengNuoJiaoQi"-->
<!-- type="date"-->
<!-- size="small"-->
<!-- style="width: 100%"-->
<!-- format="YYYY/MM/DD"-->
<!-- @change="batchSetNewChengNuoJiaoQiFun([{ id: row.id, newTime: row.newChengNuoJiaoQi }])"-->
<!-- />-->
<!-- </div>-->
<!-- </template>-->
<!-- <template #menu-left>-->
<!-- <div class="selectBoxes">-->
<!-- <el-date-picker-->
<!-- v-model="state.chengNuoJiaoQiP"-->
<!-- type="date"-->
<!-- placeholder="批量修改选中承诺日期"-->
<!-- style="width: 190px"-->
<!-- @change="chengNuoJiaoQiPFun('0')"-->
<!-- />-->
<!-- <el-date-picker-->
<!-- v-model="state.newChengNuoJiaoQiP"-->
<!-- type="date"-->
<!-- placeholder="批量修改选中承诺最新交期"-->
<!-- style="width: 190px; margin-left: 12px"-->
<!-- @change="chengNuoJiaoQiPFun('1')"-->
<!-- />-->
<!-- <el-input v-model="state.fSupplierLot" style="width: 190px; margin-left: 12px" placeholder="批号" @input="fSupplierLotFun" />-->
<!-- </div>-->
<!-- </template>-->
</avue-crud>
<div class="btnList">
<el-button type="primary" :loading="state.loading" @click="batchAddInvoiceOrderFun">确定</el-button>
<el-button type="primary" :loading="state.loading" @click="batchAddInvoiceOrderFun">{{ t('message.index.confirm') }}</el-button>
</div>
</el-dialog>
</template>
<script setup lang="ts">
import { defineProps, reactive, defineEmits, watch } from 'vue';
import { defineProps, reactive, defineEmits, watch, computed } from 'vue';
import { listApi } from '../../api/list/index';
const emits = defineEmits(['generateDocuments', 'close']);
@@ -88,7 +88,7 @@ const props = defineProps({
});
const state = reactive({
loading:false,
loading: false,
f_VHUB_Text: '',
fSupplierLot: '',
dialogVisible: true,
@@ -109,17 +109,17 @@ const state = reactive({
searchMenuSpan: 6,
addBtn: false,
column: [
{ label: 'PO号', prop: 'fBillNo' },
{ label: '物料编码', prop: 'materialCode' },
{ label: '物料名称', prop: 'materialName', width: '180' },
{ label: '采购单位', prop: 'unitName' },
{ label: '采购数量', prop: 'qty' },
{ label: '已发货数量', prop: 'sendedQty' },
{ label: '剩余收料数量', prop: 'notSendQtyText' },
{ label: '批号', prop: 'fSupplierLot' },
{ label: '本次发货数量', prop: 'notSendQty', width: '180' },
{ label: '供应商承诺交期', prop: 'chengNuoJiaoQi', width: '180' },
{ label: '供应商承诺最新交期', prop: 'newChengNuoJiaoQi', width: '180' },
{ label: computed(() => t('message.index.DocNumber')), prop: 'fBillNo' },
{ label: computed(() => t('message.index.partNumber')), prop: 'materialCode' },
{ label: computed(() => t('message.index.materialName')), prop: 'materialName', width: '180' },
{ label: computed(() => t('message.index.unit')), prop: 'unitName' },
{ label: computed(() => t('message.index.qty')), prop: 'qty' },
{ label: computed(() => t('message.index.receivedQTY')), prop: 'sendedQty' },
{ label: computed(() => t('message.index.unreceivedQTY')), prop: 'notSendQtyText' },
{ label: computed(() => t('message.index.supplierLot')), prop: 'fSupplierLot' },
{ label: computed(() => t('message.index.shipmentQTY')), prop: 'notSendQty', width: '180' },
{ label: computed(() => t('message.index.earliestDeliveryDate')), prop: 'chengNuoJiaoQi', width: '180' },
{ label: computed(() => t('message.index.latestDeliveryDate')), prop: 'newChengNuoJiaoQi', width: '180' },
],
},
topId: '',
@@ -190,33 +190,32 @@ const batchSetNewChengNuoJiaoQiFun = (arr: any) => {
});
};
const batchAddInvoiceOrderFun = () => {
if(props.listData.length != 0){
state.loading = true
console.log(props.listData);
let arr: any = [];
props.listData.forEach((item: any) => {
arr.push({
id: item.id,
qty: item.notSendQty,
fSupplierLot:item.fSupplierLot
});
});
listApi()
.batchAddInvoiceOrder({ f_VHUB_Text: state.f_VHUB_Text, upDateList: arr })
.then((res: any) => {
state.loading = false
if (res.resultCode === 0) {
ElMessage.success('操作成功');
emits('generateDocuments');
}
if (res.resultCode === -1) {
ElMessage.error(res.errorMessage);
}
});
} else {
ElMessage.error('没有数据')
}
if (props.listData.length != 0) {
state.loading = true;
console.log(props.listData);
let arr: any = [];
props.listData.forEach((item: any) => {
arr.push({
id: item.id,
qty: item.notSendQty,
fSupplierLot: item.fSupplierLot,
});
});
listApi()
.batchAddInvoiceOrder({ f_VHUB_Text: state.f_VHUB_Text, upDateList: arr })
.then((res: any) => {
state.loading = false;
if (res.resultCode === 0) {
ElMessage.success('操作成功');
emits('generateDocuments');
}
if (res.resultCode === -1) {
ElMessage.error(res.errorMessage);
}
});
} else {
ElMessage.error('没有数据');
}
};
const closeFun = () => {
emits('close');