正在显示
1 个修改的文件
包含
74 行增加
和
22 行删除
@@ -2980,27 +2980,28 @@ Handling Information | @@ -2980,27 +2980,28 @@ Handling Information | ||
2980 | const worksheetName = '格式化打印'; // 指定工作表名称 | 2980 | const worksheetName = '格式化打印'; // 指定工作表名称 |
2981 | const worksheet = workbook.Sheets[worksheetName]; | 2981 | const worksheet = workbook.Sheets[worksheetName]; |
2982 | if (worksheet) { | 2982 | if (worksheet) { |
2983 | - const AF1 = (worksheet['AF1'] && worksheet['AF1'].v) || '单元格不存在'; | ||
2984 | - const A16 = (worksheet['A16'] && worksheet['A16'].v) || '单元格不存在'; | ||
2985 | - const C16 = (worksheet['C16'] && worksheet['C16'].v) || '单元格不存在'; | ||
2986 | - const K16 = (worksheet['K16'] && worksheet['K16'].v) || '单元格不存在'; | ||
2987 | - const L16 = (worksheet['L16'] && worksheet['L16'].v) || '单元格不存在'; | ||
2988 | - const S16 = (worksheet['S16'] && worksheet['S16'].v) || '单元格不存在'; | ||
2989 | - const I18 = (worksheet['I18'] && worksheet['I18'].v) || '单元格不存在'; | ||
2990 | - const M18 = (worksheet['M18'] && worksheet['M18'].v) || '单元格不存在'; | ||
2991 | - const A20 = (worksheet['A20'] && worksheet['A20'].v) || '单元格不存在'; | ||
2992 | - const A22 = (worksheet['A22'] && worksheet['A22'].v) || '单元格不存在'; | ||
2993 | - const C22 = (worksheet['C22'] && worksheet['C22'].v) || '单元格不存在'; | ||
2994 | - const K22 = (worksheet['K22'] && worksheet['K22'].v) || '单元格不存在'; | ||
2995 | - const P22 = (worksheet['P22'] && worksheet['P22'].v) || '单元格不存在'; | ||
2996 | - const U22 = (worksheet['U22'] && worksheet['U22'].v) || '单元格不存在'; | ||
2997 | - const AF22 = (worksheet['AF22'] && worksheet['AF22'].v) || '单元格不存在'; | ||
2998 | - const AF23 = (worksheet['AF23'] && worksheet['AF23'].v) || '单元格不存在'; | ||
2999 | - const O34 = (worksheet['O34'] && worksheet['O34'].v) || '单元格不存在'; | ||
3000 | - //const O38 = (worksheet['O38'] && worksheet['O38'].v) || '单元格不存在'; | ||
3001 | - const X38 = (worksheet['X38'] && worksheet['X38'].v) || '单元格不存在'; | ||
3002 | - const AF38 = (worksheet['AF38'] && worksheet['AF38'].v) || '单元格不存在'; | 2983 | + const AF1 = (worksheet['AF1'] && worksheet['AF1'].v) || ''; |
2984 | + const A16 = (worksheet['A16'] && worksheet['A16'].v) || ''; | ||
2985 | + const C16 = (worksheet['C16'] && worksheet['C16'].v) || ''; | ||
2986 | + const K16 = (worksheet['K16'] && worksheet['K16'].v) || ''; | ||
2987 | + const L16 = (worksheet['L16'] && worksheet['L16'].v) || ''; | ||
2988 | + const S16 = (worksheet['S16'] && worksheet['S16'].v) || ''; | ||
2989 | + const I18 = (worksheet['I18'] && worksheet['I18'].v) || ''; | ||
2990 | + const M18 = (worksheet['M18'] && worksheet['M18'].v) || ''; | ||
2991 | + const A20 = (worksheet['A20'] && worksheet['A20'].v) || ''; | ||
2992 | + const A22 = (worksheet['A22'] && worksheet['A22'].v) || ''; | ||
2993 | + const C22 = (worksheet['C22'] && worksheet['C22'].v) || ''; | ||
2994 | + const K22 = (worksheet['K22'] && worksheet['K22'].v) || ''; | ||
2995 | + const P22 = (worksheet['P22'] && worksheet['P22'].v) || ''; | ||
2996 | + const U22 = (worksheet['U22'] && worksheet['U22'].v) || ''; | ||
2997 | + const AF22 = (worksheet['AF22'] && worksheet['AF22'].v) || ''; | ||
2998 | + const AF23 = (worksheet['AF23'] && worksheet['AF23'].v) || ''; | ||
2999 | + const O34 = (worksheet['O34'] && worksheet['O34'].v) || ''; | ||
3000 | + //const O38 = (worksheet['O38'] && worksheet['O38'].v) || ''; | ||
3001 | + const X38 = (worksheet['X38'] && worksheet['X38'].v) || ''; | ||
3002 | + const AF38 = (worksheet['AF38'] && worksheet['AF38'].v) || ''; | ||
3003 | 3003 | ||
3004 | + if(I18.includes("/")){ | ||
3004 | const inFlightInfo = I18.split('/'); | 3005 | const inFlightInfo = I18.split('/'); |
3005 | const outFlightInfo = M18.split('/'); | 3006 | const outFlightInfo = M18.split('/'); |
3006 | const inFlightNumber = inFlightInfo[0]; | 3007 | const inFlightNumber = inFlightInfo[0]; |
@@ -3036,7 +3037,6 @@ Handling Information | @@ -3036,7 +3037,6 @@ Handling Information | ||
3036 | X38: X38, | 3037 | X38: X38, |
3037 | AF38: cleanString(AF38), | 3038 | AF38: cleanString(AF38), |
3038 | }; | 3039 | }; |
3039 | - | ||
3040 | this.form.bill.waybillNum=this.fileContent.AF1; | 3040 | this.form.bill.waybillNum=this.fileContent.AF1; |
3041 | this.form.cvd.cvd_currency_code=this.fileContent.S16; | 3041 | this.form.cvd.cvd_currency_code=this.fileContent.S16; |
3042 | this.form.rtg.destinationAirport=this.fileContent.A16; | 3042 | this.form.rtg.destinationAirport=this.fileContent.A16; |
@@ -3055,15 +3055,67 @@ Handling Information | @@ -3055,15 +3055,67 @@ Handling Information | ||
3055 | this.form.rtd.rtd_charge_weight=parseFloat(this.fileContent.K22).toFixed(2); | 3055 | this.form.rtd.rtd_charge_weight=parseFloat(this.fileContent.K22).toFixed(2); |
3056 | this.form.rtd.rtd_rate_charge=this.fileContent.P22; | 3056 | this.form.rtd.rtd_rate_charge=this.fileContent.P22; |
3057 | this.form.rtd.rtd_total=parseFloat(this.fileContent.U22).toFixed(2); | 3057 | this.form.rtd.rtd_total=parseFloat(this.fileContent.U22).toFixed(2); |
3058 | - this.form.rtd.rtd_goods_DES=this.fileContent.AF22; | ||
3059 | this.form.ppd.ppd_weight_amount=parseFloat(this.fileContent.U22).toFixed(2); | 3058 | this.form.ppd.ppd_weight_amount=parseFloat(this.fileContent.U22).toFixed(2); |
3060 | this.form.ppd.ppd_charge_summary_total=parseFloat(this.fileContent.U22).toFixed(2); | 3059 | this.form.ppd.ppd_charge_summary_total=parseFloat(this.fileContent.U22).toFixed(2); |
3060 | + this.form.rtd.rtd_goods_DES=this.fileContent.AF22; | ||
3061 | + this.form.cer.cer_signature=this.fileContent.O34; | ||
3062 | + this.form.isu.isu_signature=this.fileContent.AF38; | ||
3063 | + this.dimension_textarea=this.fileContent.AF23; | ||
3064 | + this.convertAndCalculateVolume(); | ||
3065 | + | ||
3066 | + this.form.isu.isu_day_mounth_year=this.formattedDate(); | ||
3067 | + }else{ | ||
3068 | + //const outFlightInfo = M18.split('/'); | ||
3069 | + //const outFlightDate = outFlightInfo.length > 1 ? outFlightInfo[2].split(' ')[0] : ''; | ||
3070 | + | ||
3071 | + const SSRInfo = A20.replace(/[^a-zA-Z0-9\s]/g, ''); | ||
3072 | + //const signatureDate = parseCustomDate(O38); | ||
3073 | + const formattedAF23 = formatAF23(AF23); | ||
3074 | + | ||
3075 | + this.fileContent = { | ||
3076 | + AF1: AF1, | ||
3077 | + A16: A16, | ||
3078 | + C16: C16, | ||
3079 | + K16: K16, | ||
3080 | + L16: L16, | ||
3081 | + S16: S16, | ||
3082 | + //outFlightDate: outFlightDate, | ||
3083 | + I18:I18, | ||
3084 | + SSRInfo: SSRInfo, | ||
3085 | + A22: A22, | ||
3086 | + C22: C22, | ||
3087 | + K22: K22, | ||
3088 | + P22: P22, | ||
3089 | + U22: U22, | ||
3090 | + AF22: cleanString(AF22), | ||
3091 | + AF23: formattedAF23, | ||
3092 | + O34: cleanString(O34), | ||
3093 | + //signatureDate: signatureDate, | ||
3094 | + X38: X38, | ||
3095 | + AF38: cleanString(AF38), | ||
3096 | + }; | ||
3097 | + this.form.bill.waybillNum=this.fileContent.AF1; | ||
3098 | + this.form.cvd.cvd_currency_code=this.fileContent.S16; | ||
3099 | + this.form.rtg.destinationAirport=this.fileContent.A16; | ||
3100 | + this.form.rtg.destinationCarrier=this.fileContent.C16; | ||
3101 | + this.form.rtg.onwardAirport=this.fileContent.K16; | ||
3102 | + this.form.rtg.onwardCarrier=this.fileContent.L16; | ||
3103 | + this.form.flt.cariier=this.fileContent.I18.substring(0,2); | ||
3104 | + this.form.flt.flightNumber=this.fileContent.I18.substring(2); | ||
3105 | + this.ssr_content=this.fileContent.SSRInfo; | ||
3106 | + this.form.bill.quantity_picecs=this.fileContent.A22; | ||
3107 | + this.form.bill.quantity_weight=parseFloat(this.fileContent.C22).toFixed(2); | ||
3108 | + this.form.rtd.rtd_charge_weight=parseFloat(this.fileContent.K22).toFixed(2); | ||
3109 | + this.form.rtd.rtd_rate_charge=''; | ||
3110 | + this.form.rtd.rtd_goods_DES=this.fileContent.AF22; | ||
3061 | this.form.cer.cer_signature=this.fileContent.O34; | 3111 | this.form.cer.cer_signature=this.fileContent.O34; |
3062 | this.form.isu.isu_signature=this.fileContent.AF38; | 3112 | this.form.isu.isu_signature=this.fileContent.AF38; |
3063 | this.dimension_textarea=this.fileContent.AF23; | 3113 | this.dimension_textarea=this.fileContent.AF23; |
3064 | this.convertAndCalculateVolume(); | 3114 | this.convertAndCalculateVolume(); |
3065 | 3115 | ||
3066 | this.form.isu.isu_day_mounth_year=this.formattedDate(); | 3116 | this.form.isu.isu_day_mounth_year=this.formattedDate(); |
3117 | + } | ||
3118 | + | ||
3067 | } else { | 3119 | } else { |
3068 | this.fileContent = { AF1: '工作表不存在' }; | 3120 | this.fileContent = { AF1: '工作表不存在' }; |
3069 | } | 3121 | } |
-
请 注册 或 登录 后发表评论