中英文翻译
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
</div>
|
||||
<div class="selectItem">
|
||||
<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-option v-for="item in state.option.column[9].dicData" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="selectItem">
|
||||
@@ -205,6 +205,7 @@ const selectionChange = (list: any) => {
|
||||
state.selectedData = JSON.parse(JSON.stringify(list));
|
||||
});
|
||||
};
|
||||
|
||||
const chengNuoJiaoQiPFun = (e: string) => {
|
||||
if (state.selectedData.length != 0) {
|
||||
let arr: any = [];
|
||||
|
||||
@@ -15,65 +15,25 @@
|
||||
</template>
|
||||
<template #notSendQty="{ row }">
|
||||
<div style="display: flex; align-items: center; justify-content: center">
|
||||
<el-input-number v-model="row.notSendQty" size="small" />
|
||||
<el-input-number v-model="row.notSendQtyText" 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>-->
|
||||
</avue-crud>
|
||||
<div class="btnList">
|
||||
<el-button type="primary" :loading="state.loading" @click="batchAddInvoiceOrderFun">{{ t('message.index.confirm') }}</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, computed } from 'vue';
|
||||
import { listApi } from '../../api/list/index';
|
||||
|
||||
// import { useClipboard } from 'vue-clipboard3';
|
||||
// const { copy } = useClipboard();
|
||||
import useClipboard from 'vue-clipboard3';
|
||||
const { toClipboard } = useClipboard();
|
||||
const emits = defineEmits(['generateDocuments', 'close']);
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
@@ -130,65 +90,11 @@ watch(
|
||||
() => props.listData,
|
||||
() => {
|
||||
state.data = props.listData;
|
||||
state.data.forEach((item: any) => {
|
||||
item.notSendQtyText = item.notSendQty;
|
||||
});
|
||||
}
|
||||
);
|
||||
const fSupplierLotFun = () => {
|
||||
state.data.forEach((item: any) => {
|
||||
item.fSupplierLot = state.fSupplierLot;
|
||||
});
|
||||
console.log(state.data);
|
||||
// state.fSupplierLot = '';
|
||||
};
|
||||
const chengNuoJiaoQiPFun = (e: string) => {
|
||||
let arr: any = [];
|
||||
if (e === '0') {
|
||||
state.data.forEach((item: any) => {
|
||||
arr.push({ id: item.id, newTime: state.chengNuoJiaoQiP });
|
||||
});
|
||||
batchSetChengNuoJiaoQiFun(arr);
|
||||
}
|
||||
if (e === '1') {
|
||||
state.data.forEach((item: any) => {
|
||||
arr.push({ id: item.id, newTime: state.newChengNuoJiaoQiP });
|
||||
});
|
||||
batchSetNewChengNuoJiaoQiFun(arr);
|
||||
}
|
||||
};
|
||||
const batchSetChengNuoJiaoQiFun = (arr: any) => {
|
||||
listApi()
|
||||
.batchSetChengNuoJiaoQi(arr)
|
||||
.then((res: any) => {
|
||||
if (res.resultCode === 0) {
|
||||
ElMessage.success('操作成功');
|
||||
state.data.forEach((item: any) => {
|
||||
item.chengNuoJiaoQi = state.chengNuoJiaoQiP;
|
||||
});
|
||||
// state.chengNuoJiaoQiP = '';
|
||||
}
|
||||
if (res.resultCode === -1) {
|
||||
ElMessage.success(res.errorMessage);
|
||||
// state.newChengNuoJiaoQiP = '';
|
||||
}
|
||||
});
|
||||
};
|
||||
const batchSetNewChengNuoJiaoQiFun = (arr: any) => {
|
||||
listApi()
|
||||
.batchSetNewChengNuoJiaoQi(arr)
|
||||
.then((res: any) => {
|
||||
if (res.resultCode === 0) {
|
||||
ElMessage.success('操作成功');
|
||||
|
||||
state.data.forEach((item: any) => {
|
||||
item.newChengNuoJiaoQi = state.newChengNuoJiaoQiP;
|
||||
});
|
||||
// state.chengNuoJiaoQiP = '';
|
||||
}
|
||||
if (res.resultCode === -1) {
|
||||
ElMessage.success(res.errorMessage);
|
||||
// state.newChengNuoJiaoQiP = '';
|
||||
}
|
||||
});
|
||||
};
|
||||
const batchAddInvoiceOrderFun = () => {
|
||||
if (props.listData.length != 0) {
|
||||
state.loading = true;
|
||||
@@ -197,7 +103,7 @@ const batchAddInvoiceOrderFun = () => {
|
||||
props.listData.forEach((item: any) => {
|
||||
arr.push({
|
||||
id: item.id,
|
||||
qty: item.notSendQty,
|
||||
qty: item.notSendQtyText,
|
||||
fSupplierLot: item.fSupplierLot,
|
||||
});
|
||||
});
|
||||
@@ -206,15 +112,32 @@ const batchAddInvoiceOrderFun = () => {
|
||||
.then((res: any) => {
|
||||
state.loading = false;
|
||||
if (res.resultCode === 0) {
|
||||
ElMessage.success('操作成功');
|
||||
ElMessage.success(t('message.index.success'));
|
||||
emits('generateDocuments');
|
||||
ElMessageBox({
|
||||
closeOnClickModal: false,
|
||||
closeOnPressEscape: false,
|
||||
title: t('message.index.prompt'),
|
||||
message: t('message.index.deliveryNote') + ':' + res.data,
|
||||
confirmButtonText: t('message.index.copy'),
|
||||
showCancelButton: false,
|
||||
buttonSize: 'default',
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === 'confirm') {
|
||||
toClipboard(res.data)
|
||||
ElMessage.success(t('message.index.success'))
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
if (res.resultCode === -1) {
|
||||
ElMessage.error(res.errorMessage);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ElMessage.error('没有数据');
|
||||
ElMessage.error(t('message.index.noData'));
|
||||
}
|
||||
};
|
||||
const closeFun = () => {
|
||||
|
||||
Reference in New Issue
Block a user