|
@@ -146,7 +146,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="unit" label="单位" width="100" />
|
|
|
+ <el-table-column prop="unit" label="单位" width="100" :formatter="(row) => dictValueLabel(row.unit, productUnit)" />
|
|
|
<el-table-column label="数量" width="150">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
@@ -358,6 +358,7 @@ const accountCurrency = ref([]);
|
|
|
const fundsPaymentMethod = ref([]);
|
|
|
const tradeMethods = ref([]);
|
|
|
const shippingMethod = ref([]);
|
|
|
+const productUnit = ref([]);
|
|
|
const templateList = ref([]);
|
|
|
const corporationList = ref([]);
|
|
|
const customerList = ref([]);
|
|
@@ -456,7 +457,6 @@ const rules = ref({
|
|
|
payName: [{ required: true, message: "请输入收费项目", trigger: ["change", "blur"] }],
|
|
|
currency: [{ required: true, message: "请选择币种", trigger: "change" }],
|
|
|
effective: [{ required: true, message: "请输入报价有效期", trigger: "blur" }],
|
|
|
- deliveryTime: [{ required: true, message: "请选择交货期限", trigger: "change" }],
|
|
|
paymentMethod: [{ required: true, message: "请选择付款方式", trigger: "change" }],
|
|
|
advanceRatio: [{ required: true, message: "请输入预付比例", trigger: "blur" }],
|
|
|
tradeMethods: [{ required: true, message: "请选择贸易方式", trigger: "change" }],
|
|
@@ -465,7 +465,7 @@ const rules = ref({
|
|
|
remark: [{ required: true, message: "请输入付款条件", trigger: "blur" }],
|
|
|
});
|
|
|
const getDict = () => {
|
|
|
- proxy.getDictOne(["account_currency", "funds_payment_method", "trade_methods", "shipping_method"]).then((res) => {
|
|
|
+ proxy.getDictOne(["account_currency", "funds_payment_method", "trade_methods", "shipping_method", "unit"]).then((res) => {
|
|
|
accountCurrency.value = res["account_currency"].map((x) => ({
|
|
|
label: x.dictValue,
|
|
|
value: x.dictKey,
|
|
@@ -482,6 +482,10 @@ const getDict = () => {
|
|
|
label: x.dictValue,
|
|
|
value: x.dictKey,
|
|
|
}));
|
|
|
+ productUnit.value = res["unit"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
});
|
|
|
proxy.post("/contractTemplate/page", { pageNum: 1, pageSize: 999 }).then((res) => {
|
|
|
templateList.value = res.rows.map((item) => {
|
|
@@ -679,12 +683,19 @@ const pushGoods = (goods) => {
|
|
|
if (item.fileList && item.fileList.length > 0) {
|
|
|
fileUrl = item.fileList[0].fileUrl;
|
|
|
}
|
|
|
+ let name = item.name;
|
|
|
+ if (item.standardJson) {
|
|
|
+ let standardJson = JSON.parse(item.standardJson);
|
|
|
+ if (standardJson && standardJson.englishName) {
|
|
|
+ name = standardJson.englishName;
|
|
|
+ }
|
|
|
+ }
|
|
|
return {
|
|
|
fileUrl: fileUrl,
|
|
|
code: item.code,
|
|
|
productId: item.id,
|
|
|
name: item.name,
|
|
|
- productName: item.name,
|
|
|
+ productName: name,
|
|
|
productModel: item.spec,
|
|
|
unit: item.unit,
|
|
|
quantity: undefined,
|
|
@@ -825,10 +836,14 @@ onMounted(() => {
|
|
|
}
|
|
|
if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
|
|
|
for (let i = 0; i < formData.data.quotationProductList.length; i++) {
|
|
|
+ delete formData.data.quotationProductList[i].id;
|
|
|
proxy.post("/productInfo/detail", { id: formData.data.quotationProductList[i].productId }).then((resProduct) => {
|
|
|
+ formData.data.quotationProductList[i].name = resProduct.name;
|
|
|
formData.data.quotationProductList[i].code = resProduct.code;
|
|
|
+ formData.data.quotationProductList[i].unit = resProduct.unit;
|
|
|
});
|
|
|
}
|
|
|
+ console.log(formData.data.quotationProductList);
|
|
|
let fileIds = formData.data.quotationProductList.map((item) => item.productId);
|
|
|
proxy.post("/fileInfo/getList", { businessIdList: fileIds }).then((resFile) => {
|
|
|
for (let i = 0; i < formData.data.quotationProductList.length; i++) {
|
|
@@ -844,14 +859,6 @@ onMounted(() => {
|
|
|
if (formData.data.provinceId) {
|
|
|
getCityData(formData.data.provinceId, "30");
|
|
|
}
|
|
|
- if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
|
|
|
- formData.data.quotationProductList = formData.data.quotationProductList.map((item) => {
|
|
|
- delete item.id;
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
if (formData.data.quotationPayList && formData.data.quotationPayList.length > 0) {
|
|
|
formData.data.quotationPayList = formData.data.quotationPayList.map((item) => {
|
|
|
delete item.id;
|