Browse Source

调整背箱小票按钮

wfg 1 month ago
parent
commit
2551890da3

+ 16 - 2
src/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation.vue

@@ -415,11 +415,14 @@
                             <span slot="label">
                                 <span style="color: #1e9fff">ETD</span>
                             </span>
-                            <el-date-picker v-model="assemblyForm.etd" clearable style="width: 100%" type="date"
+                            <el-date-picker v-model="assemblyForm.etd" clearable style="width: 60%" type="date"
                                 size="small" :disabled="detailData.seeDisabled || generateBillsfalse"
                                 value-format="yyyy-MM-dd" :picker-options="etdPickerOptions" placeholder="请选择ETD日期"
                                 @change="handlePick">
                             </el-date-picker>
+                            <el-button style="margin-left: 6px" size="small" type="primary"
+                                       :disabled="!assemblyForm.id" @click="copyReceiptUrl(assemblyForm.id)">背箱小票链接
+                            </el-button>
                         </el-form-item>
                         <div>
                             <el-form-item label="船名" prop="vesselCnName" label-width="90px">
@@ -904,7 +907,7 @@ import { bportsList } from "@/api/iosBasicData/bports";
 import { bpackagesList } from "@/api/iosBasicData/bpackages";
 import { bcommodityList } from "@/api/iosBasicData/bcommodity";
 import { getBvesselsList } from "@/api/iosBasicData/bvessels";
-import { blinesList } from "@/api/iosBasicData/blines";
+import {blinesList, getReceiptUrl} from "@/api/iosBasicData/blines";
 import { bcorpstypedefineList } from "@/api/iosBasicData/bcorpstypedefine";
 import bcorpstypedefine from "@/views/iosBasicData/bcorps/bcorpstypedefine.vue";
 import { textareaWrap } from "@/util/messageReminder";
@@ -1891,6 +1894,17 @@ export default {
             })
         },
 
+        copyReceiptUrl(id){
+            getReceiptUrl(id).then(res => {
+                console.info('res---', res)
+                const input = document.createElement('textarea');
+                document.body.appendChild(input);
+                input.value = res.data.data;
+                input.select();
+                document.execCommand('copy');
+                document.body.removeChild(input);
+            })
+        },
     }
 
 }

+ 3 - 2
src/views/iosBasicData/SeafreightExportF/bills/assembly/mbinformation.vue

@@ -32,10 +32,11 @@
                                 <span slot="label">
                                     <span style="color: #1e9fff">航次</span>
                                 </span>
-                                <el-input type="age" style="width: 70%;" v-model="assemblyForm.voyageNo" size="small"
+                                <el-input type="age" style="width: 60%;" v-model="assemblyForm.voyageNo" size="small"
                                     autocomplete="off" :disabled="detailData.seeDisabled" clearable
                                     placeholder="请输入航次"></el-input>
-                                <el-button size="small" type="primary"  @click="copyReceiptUrl(assemblyForm.id)">背箱小票链接
+                                <el-button style="margin-left: 6px" size="small" type="primary"
+                                           :disabled="!assemblyForm.id" @click="copyReceiptUrl(assemblyForm.id)">背箱小票链接
                                 </el-button>
                             </el-form-item>
                         </el-col>