Browse Source

单证0.6需求

cz 1 year ago
parent
commit
4fe4ee1cf6
1 changed files with 27 additions and 1 deletions
  1. 27 1
      src/views/salesMange/shipmentMange/document/index.vue

+ 27 - 1
src/views/salesMange/shipmentMange/document/index.vue

@@ -1933,6 +1933,9 @@
         <el-button type="primary" @click="clickDownload()" size="large"
           >下载PDF</el-button
         >
+        <el-button type="primary" @click="clickSave()" size="large"
+          >保存</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -2058,7 +2061,7 @@ const getDict = () => {
     if (res && res.length > 0) {
       countryData.value = res.map((item) => {
         return {
-          label: item.chineseName,
+          label: item.name,
           value: item.id,
         };
       });
@@ -2185,6 +2188,7 @@ const formConfig = computed(() => {
       prop: "countryId",
       label: "目的国",
       required: true,
+      filterable: true,
       data: countryData.value,
       itemWidth: 40,
     },
@@ -2264,6 +2268,9 @@ const changeContract = (val) => {
     } else {
       formData.data.documentsProductList = [];
     }
+    proxy.post('/contract/detail',{id:val}).then(res=>{
+      formData.data.countryId = res.buyCountryId
+    })
   } else {
     formData.data.documentsProductList = [];
   }
@@ -2484,6 +2491,25 @@ const clickDownload = () => {
     }, 1000);
   }
 };
+const clickSave = () => {
+  if (openStatus.value === 1) {
+    proxy.getPdf("装箱单PDF文件");
+  } else if (openStatus.value === 2) {
+    proxy.getPdf("商业发票PDF文件");
+  } else if (openStatus.value === 3) {
+    proxy.getPdf("销售确认书PDF文件");
+  } else if (openStatus.value === 4) {
+    textShow.value = true;
+    let data = proxy.deepClone(printCustomsDeclaration.value);
+    data.content = JSON.stringify(data.content);
+    proxy.post("/documentsPdf/add", data).then((res)=>{
+       ElMessage({
+          message: "保存成功",
+          type: "success",
+        });
+    });
+  }
+};
 const getStyle = (text) => {
   if (text) {
     return text.replace(/\n|\r\n/g, "<br>");