|
@@ -6,29 +6,86 @@
|
|
|
<van-tab :title="proxy.t('priceSheet.otherCharges')" />
|
|
|
<van-tab :title="proxy.t('priceSheet.otherInformation')" />
|
|
|
<div class="common-process-card" v-show="active == 0">
|
|
|
- <div class="common-title">{{ proxy.t("priceSheet.transactionInformation") }}</div>
|
|
|
- <testForm v-model="formData.data" :formOption="formOption" :formConfig="formConfig" :rules="rules" ref="formDom1"> </testForm>
|
|
|
+ <div class="common-title">
|
|
|
+ {{ proxy.t("priceSheet.transactionInformation") }}
|
|
|
+ </div>
|
|
|
+ <testForm
|
|
|
+ v-model="formData.data"
|
|
|
+ :formOption="formOption"
|
|
|
+ :formConfig="formConfig"
|
|
|
+ :rules="rules"
|
|
|
+ ref="formDom1"
|
|
|
+ >
|
|
|
+ </testForm>
|
|
|
</div>
|
|
|
<div class="common-process-card" v-show="active == 1">
|
|
|
- <div class="common-title">{{ proxy.t("priceSheet.quotationDetails") }}</div>
|
|
|
- <testForm v-model="formData.data" :formOption="formGoodsOption" :formConfig="formEmptyConfig" :rules="rules" ref="formDom2"> </testForm>
|
|
|
- <testForm v-model="formData.data" :formOption="formOption" :formConfig="formAmountProductConfig" :rules="rules" ref="formDom3"> </testForm>
|
|
|
+ <div class="common-title">
|
|
|
+ {{ proxy.t("priceSheet.quotationDetails") }}
|
|
|
+ </div>
|
|
|
+ <testForm
|
|
|
+ v-model="formData.data"
|
|
|
+ :formOption="formGoodsOption"
|
|
|
+ :formConfig="formEmptyConfig"
|
|
|
+ :rules="rules"
|
|
|
+ ref="formDom2"
|
|
|
+ >
|
|
|
+ </testForm>
|
|
|
+ <testForm
|
|
|
+ v-model="formData.data"
|
|
|
+ :formOption="formOption"
|
|
|
+ :formConfig="formAmountProductConfig"
|
|
|
+ :rules="rules"
|
|
|
+ ref="formDom3"
|
|
|
+ >
|
|
|
+ </testForm>
|
|
|
</div>
|
|
|
<div class="common-process-card" v-show="active == 2">
|
|
|
<div class="common-title">{{ proxy.t("priceSheet.otherCharges") }}</div>
|
|
|
- <testForm v-model="formData.data" :formOption="formProjectOption" :formConfig="formEmptyConfig" :rules="rules" ref="formDom4"> </testForm>
|
|
|
- <testForm v-model="formData.data" :formOption="formOption" :formConfig="formAmountProjectConfig" :rules="rules" ref="formDom5"> </testForm>
|
|
|
+ <testForm
|
|
|
+ v-model="formData.data"
|
|
|
+ :formOption="formProjectOption"
|
|
|
+ :formConfig="formEmptyConfig"
|
|
|
+ :rules="rules"
|
|
|
+ ref="formDom4"
|
|
|
+ >
|
|
|
+ </testForm>
|
|
|
+ <testForm
|
|
|
+ v-model="formData.data"
|
|
|
+ :formOption="formOption"
|
|
|
+ :formConfig="formAmountProjectConfig"
|
|
|
+ :rules="rules"
|
|
|
+ ref="formDom5"
|
|
|
+ >
|
|
|
+ </testForm>
|
|
|
</div>
|
|
|
<div class="common-process-card" v-show="active == 3">
|
|
|
- <div class="common-title">{{ proxy.t("priceSheet.otherInformation") }}</div>
|
|
|
- <testForm v-model="formData.data" :formOption="formOption" :formConfig="formDeliveryConfig" :rules="rulesTwo" ref="formDom6"> </testForm>
|
|
|
+ <div class="common-title">
|
|
|
+ {{ proxy.t("priceSheet.otherInformation") }}
|
|
|
+ </div>
|
|
|
+ <testForm
|
|
|
+ v-model="formData.data"
|
|
|
+ :formOption="formOption"
|
|
|
+ :formConfig="formDeliveryConfig"
|
|
|
+ :rules="rulesTwo"
|
|
|
+ ref="formDom6"
|
|
|
+ >
|
|
|
+ </testForm>
|
|
|
</div>
|
|
|
</van-tabs>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref, getCurrentInstance, onMounted, defineProps, defineExpose, watch, reactive, toRefs } from "vue";
|
|
|
+import {
|
|
|
+ ref,
|
|
|
+ getCurrentInstance,
|
|
|
+ onMounted,
|
|
|
+ defineProps,
|
|
|
+ defineExpose,
|
|
|
+ watch,
|
|
|
+ reactive,
|
|
|
+ toRefs,
|
|
|
+} from "vue";
|
|
|
import { useRoute } from "vue-router";
|
|
|
import testForm from "@/components/testForm/index.vue";
|
|
|
import { getUserInfo } from "@/utils/auth";
|
|
@@ -87,34 +144,44 @@ const formConfig = reactive([
|
|
|
formData.data.sellContactName = "";
|
|
|
formData.data.sellContactNumber = "";
|
|
|
if (val.selectedValues[0]) {
|
|
|
- proxy.post("/contractTemplate/detail", { id: val.selectedValues[0] }).then((res) => {
|
|
|
- formData.data.sellCorporationId = res.data.corporationId;
|
|
|
- if (res.data.corporationId) {
|
|
|
- proxy.post("/corporation/detail", { id: res.data.corporationId }).then((detailCorporation) => {
|
|
|
- let sellCity = "";
|
|
|
- if (detailCorporation.data.countryEnStr) {
|
|
|
- formData.data.sellCountryName = detailCorporation.data.countryEnStr;
|
|
|
- sellCity = detailCorporation.data.countryEnStr;
|
|
|
- }
|
|
|
- if (detailCorporation.data.provinceEnStr) {
|
|
|
- formData.data.sellProvinceName = detailCorporation.data.provinceEnStr;
|
|
|
- sellCity = sellCity + " " + detailCorporation.data.provinceEnStr;
|
|
|
- }
|
|
|
- if (detailCorporation.data.cityEnStr) {
|
|
|
- formData.data.sellCityName = detailCorporation.data.cityEnStr;
|
|
|
- sellCity = sellCity + " " + detailCorporation.data.cityEnStr;
|
|
|
- }
|
|
|
- if (detailCorporation.data.addressEn) {
|
|
|
- formData.data.sellAddress = detailCorporation.data.addressEn;
|
|
|
- }
|
|
|
- formData.data.sellCity = sellCity;
|
|
|
- formDom1.value.formDataShowLabelOne();
|
|
|
- });
|
|
|
- }
|
|
|
- formData.data.sellContactName = res.data.contactName;
|
|
|
- formData.data.sellContactNumber = res.data.contactNumber;
|
|
|
- formDom1.value.formDataShowLabelOne();
|
|
|
- });
|
|
|
+ proxy
|
|
|
+ .post("/contractTemplate/detail", { id: val.selectedValues[0] })
|
|
|
+ .then((res) => {
|
|
|
+ formData.data.sellCorporationId = res.data.corporationId;
|
|
|
+ if (res.data.corporationId) {
|
|
|
+ proxy
|
|
|
+ .post("/corporation/detail", { id: res.data.corporationId })
|
|
|
+ .then((detailCorporation) => {
|
|
|
+ let sellCity = "";
|
|
|
+ if (detailCorporation.data.countryEnStr) {
|
|
|
+ formData.data.sellCountryName =
|
|
|
+ detailCorporation.data.countryEnStr;
|
|
|
+ sellCity = detailCorporation.data.countryEnStr;
|
|
|
+ }
|
|
|
+ if (detailCorporation.data.provinceEnStr) {
|
|
|
+ formData.data.sellProvinceName =
|
|
|
+ detailCorporation.data.provinceEnStr;
|
|
|
+ sellCity =
|
|
|
+ sellCity + " " + detailCorporation.data.provinceEnStr;
|
|
|
+ }
|
|
|
+ if (detailCorporation.data.cityEnStr) {
|
|
|
+ formData.data.sellCityName =
|
|
|
+ detailCorporation.data.cityEnStr;
|
|
|
+ sellCity =
|
|
|
+ sellCity + " " + detailCorporation.data.cityEnStr;
|
|
|
+ }
|
|
|
+ if (detailCorporation.data.addressEn) {
|
|
|
+ formData.data.sellAddress =
|
|
|
+ detailCorporation.data.addressEn;
|
|
|
+ }
|
|
|
+ formData.data.sellCity = sellCity;
|
|
|
+ formDom1.value.formDataShowLabelOne();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ formData.data.sellContactName = res.data.contactName;
|
|
|
+ formData.data.sellContactNumber = res.data.contactNumber;
|
|
|
+ formDom1.value.formDataShowLabelOne();
|
|
|
+ });
|
|
|
}
|
|
|
data.showPicker = false;
|
|
|
},
|
|
@@ -181,42 +248,49 @@ const formConfig = reactive([
|
|
|
formData.data.buyContactName = "";
|
|
|
formData.data.buyContactNumber = "";
|
|
|
if (val.selectedValues[0]) {
|
|
|
- proxy.post("/customer/detail", { id: val.selectedValues[0] }).then((res) => {
|
|
|
- if (res.data.customerUserList && res.data.customerUserList.length > 0) {
|
|
|
- formData.data.buyContactName = res.data.customerUserList[0].name;
|
|
|
- if (res.data.customerUserList[0].contactJson) {
|
|
|
- let contactJson = JSON.parse(res.data.customerUserList[0].contactJson);
|
|
|
- if (contactJson && contactJson.length > 0) {
|
|
|
- formData.data.buyContactNumber = contactJson[0].contactNo;
|
|
|
+ proxy
|
|
|
+ .post("/customer/detail", { id: val.selectedValues[0] })
|
|
|
+ .then((res) => {
|
|
|
+ if (
|
|
|
+ res.data.customerUserList &&
|
|
|
+ res.data.customerUserList.length > 0
|
|
|
+ ) {
|
|
|
+ formData.data.buyContactName = res.data.customerUserList[0].name;
|
|
|
+ if (res.data.customerUserList[0].contactJson) {
|
|
|
+ let contactJson = JSON.parse(
|
|
|
+ res.data.customerUserList[0].contactJson
|
|
|
+ );
|
|
|
+ if (contactJson && contactJson.length > 0) {
|
|
|
+ formData.data.buyContactNumber = contactJson[0].contactNo;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- let countryCityName = "";
|
|
|
- if (res.data.countryName) {
|
|
|
- countryCityName = res.data.countryName;
|
|
|
- if (res.data.provinceName) {
|
|
|
- countryCityName = countryCityName + " " + res.data.provinceName;
|
|
|
- if (res.data.cityName) {
|
|
|
- countryCityName = countryCityName + " " + res.data.cityName;
|
|
|
+ let countryCityName = "";
|
|
|
+ if (res.data.countryName) {
|
|
|
+ countryCityName = res.data.countryName;
|
|
|
+ if (res.data.provinceName) {
|
|
|
+ countryCityName = countryCityName + " " + res.data.provinceName;
|
|
|
+ if (res.data.cityName) {
|
|
|
+ countryCityName = countryCityName + " " + res.data.cityName;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- formData.data.countryCityName = countryCityName;
|
|
|
- if (res.data.cityId) {
|
|
|
- formData.data.countryCity = res.data.cityId;
|
|
|
- } else if (res.data.provinceId) {
|
|
|
- formData.data.countryCity = res.data.provinceId;
|
|
|
- } else if (res.data.countryId) {
|
|
|
- formData.data.countryCity = res.data.countryId;
|
|
|
- } else {
|
|
|
- formData.data.countryCity = "";
|
|
|
- }
|
|
|
- formData.data.countryId = res.data.countryId;
|
|
|
- formData.data.provinceId = res.data.provinceId;
|
|
|
- formData.data.cityId = res.data.cityId;
|
|
|
- formData.data.buyPostalCode = res.data.zipCode;
|
|
|
- formData.data.buyAddress = res.data.address;
|
|
|
- });
|
|
|
+ formData.data.countryCityName = countryCityName;
|
|
|
+ if (res.data.cityId) {
|
|
|
+ formData.data.countryCity = res.data.cityId;
|
|
|
+ } else if (res.data.provinceId) {
|
|
|
+ formData.data.countryCity = res.data.provinceId;
|
|
|
+ } else if (res.data.countryId) {
|
|
|
+ formData.data.countryCity = res.data.countryId;
|
|
|
+ } else {
|
|
|
+ formData.data.countryCity = "";
|
|
|
+ }
|
|
|
+ formData.data.countryId = res.data.countryId;
|
|
|
+ formData.data.provinceId = res.data.provinceId;
|
|
|
+ formData.data.cityId = res.data.cityId;
|
|
|
+ formData.data.buyPostalCode = res.data.zipCode;
|
|
|
+ formData.data.buyAddress = res.data.address;
|
|
|
+ });
|
|
|
} else {
|
|
|
formData.data.countryId = "";
|
|
|
formData.data.provinceId = "";
|
|
@@ -285,14 +359,20 @@ const formGoodsOption = reactive({
|
|
|
},
|
|
|
data: [],
|
|
|
changeFn: (val, data, index, indexTwo, propName) => {
|
|
|
- let selectList = formData.data[propName].filter((item, itemIndex) => item[data.prop] === val.selectedValues[0] && itemIndex !== index);
|
|
|
+ let selectList = formData.data[propName].filter(
|
|
|
+ (item, itemIndex) =>
|
|
|
+ item[data.prop] === val.selectedValues[0] && itemIndex !== index
|
|
|
+ );
|
|
|
if (selectList && selectList.length > 0) {
|
|
|
return showFailToast(proxy.t("priceSheet.productRepeat"));
|
|
|
}
|
|
|
formData.data[propName][index][data.prop] = val.selectedValues[0];
|
|
|
- let list = data.data.filter((item) => item[data.fieldNames.value] == val.selectedValues[0]);
|
|
|
+ let list = data.data.filter(
|
|
|
+ (item) => item[data.fieldNames.value] == val.selectedValues[0]
|
|
|
+ );
|
|
|
if (list && list.length > 0) {
|
|
|
- formData.data[propName][index][data.prop + "Name"] = list[0][data.fieldNames.text];
|
|
|
+ formData.data[propName][index][data.prop + "Name"] =
|
|
|
+ list[0][data.fieldNames.text];
|
|
|
let name = list[0].name;
|
|
|
if (list[0].standardJson) {
|
|
|
let standardJson = JSON.parse(list[0].standardJson);
|
|
@@ -344,7 +424,10 @@ const formGoodsOption = reactive({
|
|
|
},
|
|
|
],
|
|
|
clickFn: () => {
|
|
|
- if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
|
|
|
+ if (
|
|
|
+ formData.data.quotationProductList &&
|
|
|
+ formData.data.quotationProductList.length > 0
|
|
|
+ ) {
|
|
|
formData.data.quotationProductList.push({
|
|
|
productId: null,
|
|
|
productName: null,
|
|
@@ -431,7 +514,10 @@ const formProjectOption = reactive({
|
|
|
},
|
|
|
],
|
|
|
clickFn: () => {
|
|
|
- if (formData.data.quotationPayList && formData.data.quotationPayList.length > 0) {
|
|
|
+ if (
|
|
|
+ formData.data.quotationPayList &&
|
|
|
+ formData.data.quotationPayList.length > 0
|
|
|
+ ) {
|
|
|
formData.data.quotationPayList.push({
|
|
|
payName: null,
|
|
|
amount: null,
|
|
@@ -559,21 +645,39 @@ const formDeliveryConfig = reactive([
|
|
|
},
|
|
|
]);
|
|
|
const rules = {
|
|
|
- contractTemplateId: [{ required: true, message: proxy.t("priceSheet.contractTemplateIdMsg") }],
|
|
|
- sellCorporationId: [{ required: true, message: proxy.t("priceSheet.sellCorporationIdMsg") }],
|
|
|
- buyCorporationId: [{ required: true, message: proxy.t("priceSheet.buyCorporationIdMsg") }],
|
|
|
+ contractTemplateId: [
|
|
|
+ { required: true, message: proxy.t("priceSheet.contractTemplateIdMsg") },
|
|
|
+ ],
|
|
|
+ sellCorporationId: [
|
|
|
+ { required: true, message: proxy.t("priceSheet.sellCorporationIdMsg") },
|
|
|
+ ],
|
|
|
+ buyCorporationId: [
|
|
|
+ { required: true, message: proxy.t("priceSheet.buyCorporationIdMsg") },
|
|
|
+ ],
|
|
|
sellCity: [{ required: true, message: proxy.t("priceSheet.cityMsg") }],
|
|
|
countryCity: [{ required: true, message: proxy.t("priceSheet.cityMsg") }],
|
|
|
sellAddress: [{ required: true, message: proxy.t("priceSheet.addressMsg") }],
|
|
|
buyAddress: [{ required: true, message: proxy.t("priceSheet.addressMsg") }],
|
|
|
- sellContactName: [{ required: true, message: proxy.t("priceSheet.contactNameMsg") }],
|
|
|
- sellContactNumber: [{ required: true, message: proxy.t("priceSheet.contactNumberMsg") }],
|
|
|
+ sellContactName: [
|
|
|
+ { required: true, message: proxy.t("priceSheet.contactNameMsg") },
|
|
|
+ ],
|
|
|
+ sellContactNumber: [
|
|
|
+ { required: true, message: proxy.t("priceSheet.contactNumberMsg") },
|
|
|
+ ],
|
|
|
// buyPostalCode: [{ required: true, message: proxy.t("priceSheet.postalCodeMsg") }],
|
|
|
- buyContactName: [{ required: true, message: proxy.t("priceSheet.contactNameMsg") }],
|
|
|
- buyContactNumber: [{ required: true, message: proxy.t("priceSheet.contactNumberMsg") }],
|
|
|
+ buyContactName: [
|
|
|
+ { required: true, message: proxy.t("priceSheet.contactNameMsg") },
|
|
|
+ ],
|
|
|
+ buyContactNumber: [
|
|
|
+ { required: true, message: proxy.t("priceSheet.contactNumberMsg") },
|
|
|
+ ],
|
|
|
productId: [{ required: true, message: proxy.t("priceSheet.productIdMsg") }],
|
|
|
- productName: [{ required: true, message: proxy.t("priceSheet.productNameMsg") }],
|
|
|
- productModel: [{ required: true, message: proxy.t("priceSheet.productModelMsg") }],
|
|
|
+ productName: [
|
|
|
+ { required: true, message: proxy.t("priceSheet.productNameMsg") },
|
|
|
+ ],
|
|
|
+ productModel: [
|
|
|
+ { required: true, message: proxy.t("priceSheet.productModelMsg") },
|
|
|
+ ],
|
|
|
quantity: [{ required: true, message: proxy.t("priceSheet.quantityMsg") }],
|
|
|
price: [{ required: true, message: proxy.t("priceSheet.priceMsg") }],
|
|
|
payName: [{ required: true, message: proxy.t("priceSheet.chargeItemMsg") }],
|
|
@@ -582,11 +686,21 @@ const rules = {
|
|
|
const rulesTwo = {
|
|
|
currency: [{ required: true, message: proxy.t("priceSheet.currencyMsg") }],
|
|
|
effective: [{ required: true, message: proxy.t("priceSheet.effectiveMsg") }],
|
|
|
- paymentMethod: [{ required: true, message: proxy.t("priceSheet.paymentMethodMsg") }],
|
|
|
- advanceRatio: [{ required: true, message: proxy.t("priceSheet.advanceRatioMsg") }],
|
|
|
- tradeMethods: [{ required: true, message: proxy.t("priceSheet.tradeMethodsMsg") }],
|
|
|
- transportMethod: [{ required: true, message: proxy.t("priceSheet.transportMethodMsg") }],
|
|
|
- transportRemark: [{ required: true, message: proxy.t("priceSheet.transportRemarkMsg") }],
|
|
|
+ paymentMethod: [
|
|
|
+ { required: true, message: proxy.t("priceSheet.paymentMethodMsg") },
|
|
|
+ ],
|
|
|
+ advanceRatio: [
|
|
|
+ { required: true, message: proxy.t("priceSheet.advanceRatioMsg") },
|
|
|
+ ],
|
|
|
+ tradeMethods: [
|
|
|
+ { required: true, message: proxy.t("priceSheet.tradeMethodsMsg") },
|
|
|
+ ],
|
|
|
+ transportMethod: [
|
|
|
+ { required: true, message: proxy.t("priceSheet.transportMethodMsg") },
|
|
|
+ ],
|
|
|
+ transportRemark: [
|
|
|
+ { required: true, message: proxy.t("priceSheet.transportRemarkMsg") },
|
|
|
+ ],
|
|
|
remark: [{ required: true, message: proxy.t("priceSheet.remarksMsg") }],
|
|
|
};
|
|
|
const getDict = () => {
|
|
@@ -595,17 +709,19 @@ const getDict = () => {
|
|
|
pageSize: 999,
|
|
|
tenantId: getUserInfo().tenantId,
|
|
|
};
|
|
|
- proxy.post("/contractTemplate/page", { pageNum: 1, pageSize: 999 }).then((res) => {
|
|
|
- if (res.data.rows && res.data.rows.length > 0) {
|
|
|
- formConfig[0].data = res.data.rows.map((item) => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- label: item.templateName,
|
|
|
- value: item.id,
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
+ proxy
|
|
|
+ .post("/contractTemplate/page", { pageNum: 1, pageSize: 999 })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.rows && res.data.rows.length > 0) {
|
|
|
+ formConfig[0].data = res.data.rows.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ label: item.templateName,
|
|
|
+ value: item.id,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
proxy.post("/corporation/page", { pageNum: 1, pageSize: 999 }).then((res) => {
|
|
|
if (res.data.rows && res.data.rows.length > 0) {
|
|
|
formConfig[2].data = res.data.rows.map((item) => {
|
|
@@ -617,71 +733,75 @@ const getDict = () => {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
- proxy.post("/productInfo/page", { pageNum: 1, pageSize: 9999, definition: "1" }).then((res) => {
|
|
|
- if (res.data.rows && res.data.rows.length > 0) {
|
|
|
- formGoodsOption.btnConfig.listConfig[0].data = res.data.rows.map((item) => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- label: item.name,
|
|
|
- value: item.id,
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- proxy.post("/dictTenantData/page", { ...query, dictCode: "account_currency" }).then((res) => {
|
|
|
- if (res.data.rows && res.data.rows.length > 0) {
|
|
|
- formDeliveryConfig[1].data = res.data.rows.map((item) => {
|
|
|
- return {
|
|
|
- label: item.dictValue,
|
|
|
- value: item.dictKey,
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- proxy.post("/dictTenantData/page", { ...query, dictCode: "funds_payment_method" }).then((res) => {
|
|
|
- if (res.data.rows && res.data.rows.length > 0) {
|
|
|
- formDeliveryConfig[4].data = res.data.rows.map((item) => {
|
|
|
- return {
|
|
|
- label: item.dictValue,
|
|
|
- value: item.dictKey,
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- proxy.post("/dictTenantData/page", { ...query, dictCode: "trade_mode" }).then((res) => {
|
|
|
- if (res.data.rows && res.data.rows.length > 0) {
|
|
|
- formDeliveryConfig[7].data = res.data.rows.map((item) => {
|
|
|
- return {
|
|
|
- label: item.dictValue,
|
|
|
- value: item.dictKey,
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- proxy.post("/dictTenantData/page", { ...query, dictCode: "shipping_method" }).then((res) => {
|
|
|
- if (res.data.rows && res.data.rows.length > 0) {
|
|
|
- formDeliveryConfig[8].data = res.data.rows.map((item) => {
|
|
|
- return {
|
|
|
- label: item.dictValue,
|
|
|
- value: item.dictKey,
|
|
|
- };
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- if (["10", "20"].includes(route.query.processType)) {
|
|
|
- proxy.post("/customer/page", { pageNum: 1, pageSize: 999 }).then((res) => {
|
|
|
+ proxy
|
|
|
+ .post("/productInfo/page", { pageNum: 1, pageSize: 19999, definition: "1" })
|
|
|
+ .then((res) => {
|
|
|
if (res.data.rows && res.data.rows.length > 0) {
|
|
|
- formConfig[8].data = res.data.rows.map((item) => {
|
|
|
+ formGoodsOption.btnConfig.listConfig[0].data = res.data.rows.map(
|
|
|
+ (item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ label: item.name,
|
|
|
+ value: item.id,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ );
|
|
|
+ console.log(formGoodsOption.btnConfig.listConfig[0].data, "wadfzx");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ proxy
|
|
|
+ .post("/dictTenantData/page", { ...query, dictCode: "account_currency" })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.rows && res.data.rows.length > 0) {
|
|
|
+ formDeliveryConfig[1].data = res.data.rows.map((item) => {
|
|
|
return {
|
|
|
- ...item,
|
|
|
- label: item.name,
|
|
|
- value: item.id,
|
|
|
+ label: item.dictValue,
|
|
|
+ value: item.dictKey,
|
|
|
};
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
- } else {
|
|
|
- proxy.post("/customer/privateSeaPage", { pageNum: 1, pageSize: 999 }).then((res) => {
|
|
|
+ proxy
|
|
|
+ .post("/dictTenantData/page", {
|
|
|
+ ...query,
|
|
|
+ dictCode: "funds_payment_method",
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.rows && res.data.rows.length > 0) {
|
|
|
+ formDeliveryConfig[4].data = res.data.rows.map((item) => {
|
|
|
+ return {
|
|
|
+ label: item.dictValue,
|
|
|
+ value: item.dictKey,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ proxy
|
|
|
+ .post("/dictTenantData/page", { ...query, dictCode: "trade_mode" })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.rows && res.data.rows.length > 0) {
|
|
|
+ formDeliveryConfig[7].data = res.data.rows.map((item) => {
|
|
|
+ return {
|
|
|
+ label: item.dictValue,
|
|
|
+ value: item.dictKey,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ proxy
|
|
|
+ .post("/dictTenantData/page", { ...query, dictCode: "shipping_method" })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.rows && res.data.rows.length > 0) {
|
|
|
+ formDeliveryConfig[8].data = res.data.rows.map((item) => {
|
|
|
+ return {
|
|
|
+ label: item.dictValue,
|
|
|
+ value: item.dictKey,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (["10", "20"].includes(route.query.processType)) {
|
|
|
+ proxy.post("/customer/page", { pageNum: 1, pageSize: 999 }).then((res) => {
|
|
|
if (res.data.rows && res.data.rows.length > 0) {
|
|
|
formConfig[8].data = res.data.rows.map((item) => {
|
|
|
return {
|
|
@@ -692,16 +812,40 @@ const getDict = () => {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
+ } else {
|
|
|
+ proxy
|
|
|
+ .post("/customer/privateSeaPage", { pageNum: 1, pageSize: 999 })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.rows && res.data.rows.length > 0) {
|
|
|
+ formConfig[8].data = res.data.rows.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ label: item.name,
|
|
|
+ value: item.id,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
};
|
|
|
getDict();
|
|
|
const calculatedAmount = () => {
|
|
|
- if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
|
|
|
+ if (
|
|
|
+ formData.data.quotationProductList &&
|
|
|
+ formData.data.quotationProductList.length > 0
|
|
|
+ ) {
|
|
|
for (let i = 0; i < formData.data.quotationProductList.length; i++) {
|
|
|
let money = 0;
|
|
|
- if (formData.data.quotationProductList[i].quantity && formData.data.quotationProductList[i].price) {
|
|
|
+ if (
|
|
|
+ formData.data.quotationProductList[i].quantity &&
|
|
|
+ formData.data.quotationProductList[i].price
|
|
|
+ ) {
|
|
|
money = Number(
|
|
|
- Math.round(Number(formData.data.quotationProductList[i].quantity) * Number(formData.data.quotationProductList[i].price) * 10000) / 10000
|
|
|
+ Math.round(
|
|
|
+ Number(formData.data.quotationProductList[i].quantity) *
|
|
|
+ Number(formData.data.quotationProductList[i].price) *
|
|
|
+ 10000
|
|
|
+ ) / 10000
|
|
|
);
|
|
|
}
|
|
|
formData.data.quotationProductList[i].amount = money;
|
|
@@ -713,19 +857,48 @@ const handleChangeAmount = () => {
|
|
|
let money = 0;
|
|
|
let amountProduct = 0;
|
|
|
let amountProject = 0;
|
|
|
- if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
|
|
|
+ if (
|
|
|
+ formData.data.quotationProductList &&
|
|
|
+ formData.data.quotationProductList.length > 0
|
|
|
+ ) {
|
|
|
for (let i = 0; i < formData.data.quotationProductList.length; i++) {
|
|
|
if (formData.data.quotationProductList[i].amount) {
|
|
|
- money = Number(Math.round((Number(money) + Number(formData.data.quotationProductList[i].amount)) * 10000) / 10000);
|
|
|
- amountProduct = Number(Math.round((Number(amountProduct) + Number(formData.data.quotationProductList[i].amount)) * 10000) / 10000);
|
|
|
+ money = Number(
|
|
|
+ Math.round(
|
|
|
+ (Number(money) +
|
|
|
+ Number(formData.data.quotationProductList[i].amount)) *
|
|
|
+ 10000
|
|
|
+ ) / 10000
|
|
|
+ );
|
|
|
+ amountProduct = Number(
|
|
|
+ Math.round(
|
|
|
+ (Number(amountProduct) +
|
|
|
+ Number(formData.data.quotationProductList[i].amount)) *
|
|
|
+ 10000
|
|
|
+ ) / 10000
|
|
|
+ );
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (formData.data.quotationPayList && formData.data.quotationPayList.length > 0) {
|
|
|
+ if (
|
|
|
+ formData.data.quotationPayList &&
|
|
|
+ formData.data.quotationPayList.length > 0
|
|
|
+ ) {
|
|
|
for (let i = 0; i < formData.data.quotationPayList.length; i++) {
|
|
|
if (formData.data.quotationPayList[i].amount) {
|
|
|
- money = Number(Math.round((Number(money) + Number(formData.data.quotationPayList[i].amount)) * 10000) / 10000);
|
|
|
- amountProject = Number(Math.round((Number(amountProject) + Number(formData.data.quotationPayList[i].amount)) * 10000) / 10000);
|
|
|
+ money = Number(
|
|
|
+ Math.round(
|
|
|
+ (Number(money) + Number(formData.data.quotationPayList[i].amount)) *
|
|
|
+ 10000
|
|
|
+ ) / 10000
|
|
|
+ );
|
|
|
+ amountProject = Number(
|
|
|
+ Math.round(
|
|
|
+ (Number(amountProject) +
|
|
|
+ Number(formData.data.quotationPayList[i].amount)) *
|
|
|
+ 10000
|
|
|
+ ) / 10000
|
|
|
+ );
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -739,7 +912,12 @@ const handleSubmit = async () => {
|
|
|
active.value = 0;
|
|
|
return false;
|
|
|
} else {
|
|
|
- if (!(formData.data.quotationProductList && formData.data.quotationProductList.length > 0)) {
|
|
|
+ if (
|
|
|
+ !(
|
|
|
+ formData.data.quotationProductList &&
|
|
|
+ formData.data.quotationProductList.length > 0
|
|
|
+ )
|
|
|
+ ) {
|
|
|
active.value = 1;
|
|
|
showFailToast(proxy.t("priceSheet.pleaseAddProduct"));
|
|
|
return false;
|
|
@@ -776,13 +954,17 @@ const status = ref(true);
|
|
|
watch(
|
|
|
refProps.queryData,
|
|
|
() => {
|
|
|
- if (refProps.queryData.value && ["10", "20", "30"].includes(route.query.processType)) {
|
|
|
+ if (
|
|
|
+ refProps.queryData.value &&
|
|
|
+ ["10", "20", "30"].includes(route.query.processType)
|
|
|
+ ) {
|
|
|
for (const key in refProps.queryData.value) {
|
|
|
formData.data[key] = refProps.queryData.value[key];
|
|
|
}
|
|
|
formDom1.value.formDataShowLabelOne();
|
|
|
formDom2.value.formDataListShowLabelOne();
|
|
|
formDom6.value.formDataShowLabelOne();
|
|
|
+ console.log(formData.data, "dwada");
|
|
|
if (!formData.data.sellCity) {
|
|
|
let sellCity = "";
|
|
|
if (formData.data.sellCountryName) {
|
|
@@ -810,30 +992,45 @@ watch(
|
|
|
let countryCityName = "";
|
|
|
formData.data.countryCity = formData.data.countryId;
|
|
|
proxy.post("/customizeArea/list", { parentId: "0" }).then((res) => {
|
|
|
- let list = res.data.filter((item) => item.id == formData.data.countryId);
|
|
|
+ let list = res.data.filter(
|
|
|
+ (item) => item.id == formData.data.countryId
|
|
|
+ );
|
|
|
if (list && list.length > 0) {
|
|
|
countryCityName = list[0].name;
|
|
|
formData.data.countryCityName = countryCityName;
|
|
|
}
|
|
|
if (formData.data.provinceId) {
|
|
|
formData.data.countryCity = formData.data.provinceId;
|
|
|
- proxy.post("/customizeArea/list", { parentId: formData.data.countryId }).then((res) => {
|
|
|
- let list = res.data.filter((item) => item.id == formData.data.provinceId);
|
|
|
- if (list && list.length > 0) {
|
|
|
- countryCityName = countryCityName + " " + list[0].name;
|
|
|
- formData.data.countryCityName = countryCityName;
|
|
|
- }
|
|
|
- if (formData.data.cityId) {
|
|
|
- formData.data.countryCity = formData.data.cityId;
|
|
|
- proxy.post("/customizeArea/list", { parentId: formData.data.provinceId }).then((res) => {
|
|
|
- let list = res.data.filter((item) => item.id == formData.data.cityId);
|
|
|
- if (list && list.length > 0) {
|
|
|
- countryCityName = countryCityName + " " + list[0].name;
|
|
|
- formData.data.countryCityName = countryCityName;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
+ proxy
|
|
|
+ .post("/customizeArea/list", {
|
|
|
+ parentId: formData.data.countryId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ let list = res.data.filter(
|
|
|
+ (item) => item.id == formData.data.provinceId
|
|
|
+ );
|
|
|
+ if (list && list.length > 0) {
|
|
|
+ countryCityName = countryCityName + " " + list[0].name;
|
|
|
+ formData.data.countryCityName = countryCityName;
|
|
|
+ }
|
|
|
+ if (formData.data.cityId) {
|
|
|
+ formData.data.countryCity = formData.data.cityId;
|
|
|
+ proxy
|
|
|
+ .post("/customizeArea/list", {
|
|
|
+ parentId: formData.data.provinceId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ let list = res.data.filter(
|
|
|
+ (item) => item.id == formData.data.cityId
|
|
|
+ );
|
|
|
+ if (list && list.length > 0) {
|
|
|
+ countryCityName =
|
|
|
+ countryCityName + " " + list[0].name;
|
|
|
+ formData.data.countryCityName = countryCityName;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
}
|