|
@@ -6,7 +6,7 @@
|
|
|
{{ printDetails.sellCorporationNameEn }}
|
|
|
</div>
|
|
|
<div style="text-align: center">
|
|
|
- {{ printDetails.sellCountryName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCityName }},{{ printDetails.sellDetailedAddress }}
|
|
|
+ {{ printDetails.sellDetailedAddress }},{{ printDetails.sellCityName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCountryName }}
|
|
|
</div>
|
|
|
<div style="font-size: 14px; color: #409eff; text-align: center; padding-top: 16px">PROFORMA INVOICE</div>
|
|
|
<div style="padding-top: 8px">
|
|
@@ -18,7 +18,7 @@
|
|
|
<div style="color: #409eff">VENDOR:</div>
|
|
|
<div>{{ printDetails.sellCorporationNameEn }}</div>
|
|
|
<div style="padding: 16px 0">
|
|
|
- {{ printDetails.sellCountryName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCityName }},{{ printDetails.sellDetailedAddress }}
|
|
|
+ {{ printDetails.sellDetailedAddress }},{{ printDetails.sellCityName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCountryName }}
|
|
|
</div>
|
|
|
<div>CONTACT: {{ printDetails.sellContactName }}</div>
|
|
|
<div>TEL.: {{ printDetails.sellContactNumber }}</div>
|
|
@@ -188,15 +188,15 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
+import { NumberToChinese } from "@/utils/util.js";
|
|
|
import { watch } from "vue";
|
|
|
-
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const printDetails = ref({});
|
|
|
const props = defineProps({
|
|
|
rowData: Object,
|
|
|
});
|
|
|
-const getPdfData = (query) => {
|
|
|
- proxy.post("/contract/getContractPdfInfo", query).then((res) => {
|
|
|
+const getPdfData = (row) => {
|
|
|
+ proxy.post("/contract/getContractPdfInfo", { id: row.id }).then((res) => {
|
|
|
printDetails.value = res;
|
|
|
});
|
|
|
};
|
|
@@ -222,18 +222,38 @@ const statisticsTwo = (label, index) => {
|
|
|
}
|
|
|
return num;
|
|
|
};
|
|
|
+
|
|
|
+if (props.rowData && props.rowData.id) {
|
|
|
+ getPdfData(props.rowData);
|
|
|
+}
|
|
|
+
|
|
|
+const productUnit = ref([]);
|
|
|
+const tradeMethods = ref([]);
|
|
|
+const shippingMethod = ref([]);
|
|
|
+
|
|
|
+const getDict = () => {
|
|
|
+ proxy.getDictOne(["trade_mode", "shipping_method", "unit"]).then((res) => {
|
|
|
+ tradeMethods.value = res["trade_mode"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ shippingMethod.value = res["shipping_method"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ productUnit.value = res["unit"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ });
|
|
|
+};
|
|
|
+getDict();
|
|
|
watch(
|
|
|
- props.rowData,
|
|
|
- () => {
|
|
|
- if (props.rowData.id) {
|
|
|
- getPdfData({ id: props.rowData.id });
|
|
|
- } else if (props.rowData.code) {
|
|
|
- getPdfData({ code: props.rowData.code });
|
|
|
+ () => props.rowData.id,
|
|
|
+ (val) => {
|
|
|
+ if (props.rowData && props.rowData.id) {
|
|
|
+ getPdfData(props.rowData);
|
|
|
}
|
|
|
- },
|
|
|
- {
|
|
|
- immediate: true,
|
|
|
- deep: true,
|
|
|
}
|
|
|
);
|
|
|
</script>
|