Forráskód Böngészése

Merge branch 'dev1.0' of http://192.168.0.200:3000/zhangxj/trade-platform-c-front-end into dev1.0

changjiaming 1 hete%!(EXTRA string=óta)
szülő
commit
96ca781d2f

+ 23 - 1
src/components/Upload/index.vue

@@ -67,15 +67,22 @@
         <el-button @click="handleCancle">关 闭</el-button>
       </div>
     </el-dialog> -->
+    <!-- <image-viewer v-if="showImage" :url-list="[imgUrl]" @close="closePreview" /> -->
+
   </div>
 </template>
 
 <script>
 import { getToken } from '@/utils/auth'
 import { getFilePerview } from '@/api/dictionary'
+// import { getImagePerview } from '@/api/dictionary'
 import { exportFile } from '@/utils'
+// import ImageViewer from '@/utils/perview/vendors/image/ImageViewer.vue'
 
 export default {
+  // components: {
+  //   ImageViewer
+  // },
   props: {
     disabled: {
       type: Boolean,
@@ -178,7 +185,9 @@ export default {
         Authorization: 'Bearer ' + getToken()
       },
       dialogVisible: false,
-      previewImageUrl: ''
+      previewImageUrl: '',
+      showImage: false,
+      imgUrl: ''
     }
   },
   computed: {
@@ -534,6 +543,14 @@ export default {
       if (imgType.includes(type?.toLowerCase()) || imgType.includes(fileType?.toLowerCase())) {
         const newName = `预览图片${fileType || type}`
         window.open(`#/perview?fileId=${idNum}&name=${newName}`)
+
+        // const params = {
+        //   fileId: idNum
+        // }
+        // getImagePerview(params).then(res => {
+        //   this.imgUrl = process.env.VUE_APP_BASE_API + res.data
+        //   this.showImage = true
+        // })
       } else {
         // window.open(`#/perview?fileId=${idNum}`)
         window.open(`${process.env.VUE_APP_BASE_API}/file_storage_oss/preview/${idNum}#toolbar=0&navpanes=0&scrollbar=0`)
@@ -559,6 +576,11 @@ export default {
       getFilePerview({ fileId }).then((res) => {
         exportFile(res)
       })
+    },
+
+    closePreview() {
+      this.showImage = false
+      this.imgUrl = ''
     }
   }
 }

+ 10 - 0
src/styles/element/ruleForm.scss

@@ -115,6 +115,11 @@ $orangeColor: #131820;
       padding: 5px 0px 5px;
       color: #222931;
     }
+    &.inline-item {
+      width: 50%;
+      margin-right: 0;
+      display: inline-block;
+    }
   }
   .slot-name-desc {
     color: #FF0000;
@@ -126,6 +131,11 @@ $orangeColor: #131820;
     color: #F56C6C;
     margin-right: 4px;
   }
+  .multiple-item {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: nowrap;
+  }
 }
 
 .rule-form-orange.list-form {

+ 155 - 11
src/views/businessManage/myBusiness/components/BasicInfo.vue

@@ -38,6 +38,13 @@
           />
         </custom-select>
       </el-form-item>
+      <el-form-item label="企业名称 (英文)" prop="i18n.name">
+        <el-input
+          v-model="ruleForm.i18n.name"
+          placeholder="请输入"
+          :disabled="disabled"
+        />
+      </el-form-item>
       <el-form-item label="统一社会信用代码" prop="certNo">
         <el-input
           v-model="ruleForm.certNo"
@@ -95,6 +102,13 @@
           disabled
         />
       </el-form-item>
+      <el-form-item label="注册地址 (英文)" prop="i18n.registerAddress">
+        <el-input
+          v-model="ruleForm.i18n.registerAddress"
+          placeholder="请输入"
+          :disabled="disabled"
+        />
+      </el-form-item>
 
       <el-form-item label="注册地址是否实际经营地址" prop="sameRegisterAndBusinessAddress">
         <el-select
@@ -122,9 +136,27 @@
           :disabled="disabled"
         />
       </el-form-item>
+      <el-form-item
+        v-if="ruleForm.sameRegisterAndBusinessAddress === 'N'"
+        label="经营地址 (英文)"
+        prop="i18n.businessAddress"
+        :rules="[{ required: true, message: '请输入经营地址', trigger: 'blur' }]"
+      >
+        <el-input
+          v-model="ruleForm.i18n.businessAddress"
+          placeholder="请输入经营地址(英文)"
+          :disabled="disabled"
+        />
+      </el-form-item>
 
-      <el-form-item label="联系人(授权代理人)姓名" prop="contactPerson.name">
-        <el-input v-model="ruleForm.contactPerson.name" :disabled="disabled" placeholder="请输入联系人(授权代理人)姓名" />
+      <el-form-item label="联系人(授权代理人)姓名(中英文)">
+        <span slot="label" class="required-label">联系人(授权代理人)姓名(中英文)</span>
+        <el-form-item prop="contactPerson.name" class="inline-item">
+          <el-input v-model="ruleForm.contactPerson.name" :disabled="disabled" placeholder="请输入中文" />
+        </el-form-item>
+        <el-form-item prop="contactPerson.i18n.name" class="inline-item">
+          <el-input v-model="ruleForm.contactPerson.i18n.name" :disabled="disabled" placeholder="请输入英文" />
+        </el-form-item>
       </el-form-item>
       <el-form-item label="联系人(授权代理人)手机号" prop="contactPerson.mobile">
         <el-input v-model="ruleForm.contactPerson.mobile" :disabled="disabled" placeholder="请输入常用手机号" />
@@ -266,9 +298,26 @@ export default {
         callback()
       }
     }
+    const validateCharacter = (rule, value, callback) => {
+      if (value === '') {
+        callback()
+      } else if (/[\u4e00-\u9fa5]/.test(value)) {
+        callback(new Error('请输入英文'))
+      } else {
+        callback()
+      }
+    }
     return {
       listData: [],
       ruleForm: {
+        xtEid: '',
+        businessProduct: '',
+        taxRebateAgreementSignStatus: '',
+        taxRebateAgreementNo: '',
+        taxRebateAgreementSignDate: '',
+        taxRebateEffectiveStart: '',
+        taxRebateEffectiveEnd: '',
+        remark: '',
         changeRecordId: '',
         certificationStatus: '',
         enterpriseType: '',
@@ -284,7 +333,15 @@ export default {
           personalCertNo: '',
           mobile: '',
           email: '',
-          isAuthorizedPerson: 'Y'
+          isAuthorizedPerson: 'Y',
+          enterpriseChangeRecordId: '',
+          authorizationFileSigned: '',
+          signDate: '',
+          remark: '',
+
+          i18n: {
+            name: ''
+          }
         },
         sameRegisterAndBusinessAddress: '',
         businessAddress: '',
@@ -293,7 +350,13 @@ export default {
         proxyDistrictCode: '',
         customsEnterpriseCode: '',
         taxAuthorityArea: '',
-        emailAuthCode: null
+        emailAuthCode: null,
+
+        i18n: {
+          name: '',
+          registerAddress: '',
+          businessAddress: ''
+        }
       },
       rules: {
         enterpriseType: [
@@ -318,13 +381,24 @@ export default {
         registerAddress: [
           { required: true, message: `请输入注册地址`, trigger: 'blur' }
         ],
+
         'contactPerson.name': [{ required: true, message: '请输入姓名', trigger: 'blur' }],
+        'contactPerson.i18n.name': [{ required: true, message: '请输入英文', trigger: 'blur' }, { validator: validateCharacter, trigger: 'blur' }],
         'contactPerson.mobile': [{ required: true, message: '请输入常用手机号', trigger: 'blur' }, { validator: validContactPhone, trigger: 'blur' }],
         'contactPerson.email': [{ required: true, message: '请输入常用邮箱', trigger: 'blur' }, { validator: validContactEmail, trigger: 'blur' }],
         'contactPerson.personalCertNo': [{ required: true, message: '请输入有效的身份证号码', trigger: 'blur' }, { validator: validContactIdcard, trigger: 'blur' }],
         sameRegisterAndBusinessAddress: [{ required: true, message: '请选择注册地址是否实际经营地址', trigger: 'change' }],
         exportType: [{ required: true, message: '请选择出口类型', trigger: 'change' }],
-        customsEnterpriseCode: [{ required: true, message: '请输入海关企业代码', trigger: 'blur' }, { validator: validEnterCode, trigger: 'blur' }]
+        customsEnterpriseCode: [{ required: true, message: '请输入海关企业代码', trigger: 'blur' }, { validator: validEnterCode, trigger: 'blur' }],
+
+        i18n: {
+          name: [
+            { required: true, message: '请输入企业名称', trigger: 'blur' }, { validator: validateCharacter, trigger: 'blur' }
+          ],
+          registerAddress: [
+            { required: true, message: `请输入注册地址(英文)`, trigger: 'blur' }, { validator: validateCharacter, trigger: 'blur' }
+          ]
+        }
       }
     }
   },
@@ -339,14 +413,42 @@ export default {
         if (Object.keys(newV).length) {
           const details = JSON.parse(JSON.stringify(newV))
           for (const k in this.ruleForm) {
-            if (k !== 'contactPerson') {
+            if (k !== 'contactPerson' && k !== 'i18n') {
               if (details[k] !== '' && details[k] !== null && details[k] !== undefined) {
                 this.ruleForm[k] = details[k]
               }
             } else {
-              for (const key in this.ruleForm.contactPerson) {
-                if (details[k][key] !== '' && details[k][key] !== null && details[k][key] !== undefined) {
-                  this.ruleForm[k][key] = details[k][key]
+              if (k === 'contactPerson') {
+                for (const key in this.ruleForm.contactPerson) {
+                  if (key !== 'i18n') {
+                    if (details[k][key] !== '' && details[k][key] !== null && details[k][key] !== undefined) {
+                      this.ruleForm[k][key] = details[k][key]
+                    }
+                  } else {
+                    if (details[k].i18n) {
+                      for (const kk in this.ruleForm[k].i18n) {
+                        if (details[k].i18n[kk].length) {
+                          details[k].i18n[kk].map(item => {
+                            if (item.language === 'en' && item.value !== '' && item.value !== null && item.value !== undefined) {
+                              this.ruleForm.contactPerson.i18n[kk] = item.value
+                            }
+                          })
+                        }
+                      }
+                    }
+                  }
+                }
+              } else if (k === 'i18n') {
+                if (details.i18n) {
+                  for (const key in this.ruleForm.i18n) {
+                    if (details.i18n[key].length) {
+                      details.i18n[key].map(item => {
+                        if (item.language === 'en' && item.value !== '' && item.value !== null && item.value !== undefined) {
+                          this.ruleForm.i18n[key] = item.value
+                        }
+                      })
+                    }
+                  }
                 }
               }
             }
@@ -399,11 +501,52 @@ export default {
     },
     async validate(type) {
       const businessLicenseFiles = this.$refs.businessLicense.getFileLists
+      // var params = {
+      //   ...this.ruleForm,
+      //   businessLicense: businessLicenseFiles.length ? { id: businessLicenseFiles.map(item => item.id)[0] } : null
+      // }
+      const { contactPerson, businessLicense, ...rest } = this.ruleForm
+      const { i18n, ...personRest } = this.ruleForm.contactPerson
       var params = {
-        ...this.ruleForm,
-        businessLicense: businessLicenseFiles.length ? { id: businessLicenseFiles.map(item => item.id)[0] } : null
+        businessLicense: businessLicenseFiles.length ? { id: businessLicenseFiles.map(item => item.id)[0] } : null,
+        ...rest,
+        contactPerson: { ...personRest }
       }
       delete params.certificationStatus
+
+      const i18nRuleForm = {}
+      for (const k in this.ruleForm.i18n) {
+        if (this.ruleForm.i18n[k] !== '' && this.ruleForm.i18n[k] !== null && this.ruleForm.i18n[k] !== undefined) {
+          i18nRuleForm[k] = [
+            {
+              language: 'cn',
+              value: this.ruleForm[k]
+            },
+            {
+              language: 'en',
+              value: this.ruleForm.i18n[k]
+            }
+          ]
+        }
+      }
+      params.i18n = Object.keys(i18nRuleForm).length ? i18nRuleForm : null
+
+      const i18nContactPerson = {}
+      for (const k in this.ruleForm.contactPerson.i18n) {
+        if (this.ruleForm.contactPerson.i18n[k] !== '' && this.ruleForm.contactPerson.i18n[k] !== null && this.ruleForm.contactPerson.i18n[k] !== undefined) {
+          i18nContactPerson[k] = [
+            {
+              language: 'cn',
+              value: this.ruleForm.contactPerson[k]
+            },
+            {
+              language: 'en',
+              value: this.ruleForm.contactPerson.i18n[k]
+            }
+          ]
+        }
+      }
+      params.contactPerson.i18n = Object.keys(i18nContactPerson).length ? i18nContactPerson : null
       return new Promise((resolve, reject) => {
         if (type === 'submit') {
           this.$refs.ruleFormRef.validate(valid => {
@@ -423,6 +566,7 @@ export default {
         }
       })
     }
+
   }
 }
 </script>

+ 20 - 3
src/views/businessManage/myBusiness/components/BusinessBasic.vue

@@ -70,6 +70,14 @@ export default {
         this.detailInfo = response.data
         if (response.data) {
           const {
+            xtEid,
+            businessProduct,
+            taxRebateAgreementSignStatus,
+            taxRebateAgreementNo,
+            taxRebateAgreementSignDate,
+            taxRebateEffectiveStart,
+            taxRebateEffectiveEnd,
+            remark,
             changeRecordId,
             certificationStatus,
             enterpriseType,
@@ -89,9 +97,18 @@ export default {
             legalPerson,
             contactPerson,
             controlPerson,
-            taxAuthorityArea
+            taxAuthorityArea,
+            i18n
           } = response.data
           this.baseInfo = {
+            xtEid,
+            businessProduct,
+            taxRebateAgreementSignStatus,
+            taxRebateAgreementNo,
+            taxRebateAgreementSignDate,
+            taxRebateEffectiveStart,
+            taxRebateEffectiveEnd,
+            remark,
             changeRecordId,
             certificationStatus,
             enterpriseType,
@@ -109,7 +126,8 @@ export default {
             customsEnterpriseCode,
             emailAuthCode,
             contactPerson,
-            taxAuthorityArea
+            taxAuthorityArea,
+            i18n
           }
           this.legalInfo = legalPerson
           this.legalIsControl = this.legalInfo.isControl === 'Y'
@@ -125,7 +143,6 @@ export default {
     async submitClick(type) {
       const baseInfo = await this.$refs.baseInfo.validate(type)
       const legalInfo = await this.$refs.legal.validate(type)
-
       var postData = {
         Loading: true,
         ...baseInfo,

+ 8 - 2
src/views/businessManage/myBusiness/components/Person.vue

@@ -120,6 +120,9 @@ export default {
       ruleForm: {
         id: '',
         enterpriseChangeRecordId: '',
+        authorizationFileSigned: '',
+        signDate: '',
+        remark: '',
         name: '',
         personalCertNo: '',
         mobile: '',
@@ -144,7 +147,7 @@ export default {
     detailInfo: {
       handler(newV) {
         if (Object.keys(newV).length) {
-          const { id, name, personalCertNo, mobile, idCardFront, idCardBack, isControl, enterpriseChangeRecordId } = newV
+          const { id, name, personalCertNo, mobile, idCardFront, idCardBack, isControl, enterpriseChangeRecordId, authorizationFileSigned, signDate, remark } = newV
           this.ruleForm = {
             ...this.ruleForm,
             id,
@@ -154,7 +157,10 @@ export default {
             idCardFront: idCardFront ? [idCardFront] : [],
             idCardBack: idCardBack ? [idCardBack] : [],
             legalIsControl: isControl,
-            enterpriseChangeRecordId
+            enterpriseChangeRecordId,
+            authorizationFileSigned,
+            signDate,
+            remark
           }
         }
       },

+ 19 - 10
src/views/businessManage/tradeRelations/importer/components/BasicInfo.vue

@@ -35,7 +35,7 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="进口商名称" prop="entityName">
+      <el-form-item label="进口商名称(英文)" prop="entityName">
         <el-input v-model="ruleForm.entityName" placeholder="请输入" :disabled="disabled" />
       </el-form-item>
       <el-form-item label="注册号" prop="certNo">
@@ -44,13 +44,13 @@
       <el-form-item label="税号(VAT Number)" prop="vatNo">
         <el-input v-model="ruleForm.vatNo" placeholder="请输入" :disabled="disabled" />
       </el-form-item>
-      <el-form-item label="经营地址(省 / 州 / 区)" prop="businessProvince">
+      <el-form-item label="经营地址(省 / 州 / 区)(英文)" prop="businessProvince">
         <el-input v-model="ruleForm.businessProvince" placeholder="请输入" :disabled="disabled" />
       </el-form-item>
-      <el-form-item label="经营地址(市 / 区)" prop="businessCity">
+      <el-form-item label="经营地址(市 / 区)(英文)" prop="businessCity">
         <el-input v-model="ruleForm.businessCity" placeholder="请输入" :disabled="disabled" />
       </el-form-item>
-      <el-form-item label="经营地址(详细地址)" prop="businessAddress">
+      <el-form-item label="经营地址(详细地址)(英文)" prop="businessAddress">
         <el-input v-model="ruleForm.businessAddress" placeholder="街道、门牌号,或P.O.Box" :disabled="disabled" />
       </el-form-item>
       <el-form-item label="经营地址邮政编码" prop="businessPostCode">
@@ -66,7 +66,7 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="企业联系人姓名" prop="contactName">
+      <el-form-item label="企业联系人姓名(英文)" prop="contactName">
         <el-input v-model="ruleForm.contactName" placeholder="请输入" :disabled="disabled" />
       </el-form-item>
       <el-form-item label="企业联系人电话" prop="contactMobile">
@@ -194,6 +194,15 @@ export default {
         callback()
       }
     }
+    const validateCharacter = (rule, value, callback) => {
+      if (value === '') {
+        callback()
+      } else if (/[\u4e00-\u9fa5]/.test(value)) {
+        callback(new Error('请输入英文'))
+      } else {
+        callback()
+      }
+    }
     return {
       ruleForm: {
         customerUserId: null,
@@ -226,15 +235,15 @@ export default {
         businessCategory1: []
       },
       rules: {
-        entityName: [{ required: true, trigger: 'blur', message: '请输入进口商名称' }],
+        entityName: [{ required: true, trigger: 'blur', message: '请输入进口商名称' }, { validator: validateCharacter, trigger: 'blur' }],
         certNo: [{ required: true, trigger: 'blur', message: '请输入注册号' }],
         region: [{ required: true, trigger: 'blur', message: '请选择所属区域' }],
-        businessProvince: [{ required: true, trigger: 'blur', message: '请输入经营地址(省 / 州 / 区)' }],
-        businessCity: [{ required: true, trigger: 'blur', message: '请输入经营地址(市 / 区)' }],
-        businessAddress: [{ required: true, trigger: 'blur', message: '请输入经营地址(详细地址)' }],
+        businessProvince: [{ required: true, trigger: 'blur', message: '请输入经营地址(省 / 州 / 区)' }, { validator: validateCharacter, trigger: 'blur' }],
+        businessCity: [{ required: true, trigger: 'blur', message: '请输入经营地址(市 / 区)' }, { validator: validateCharacter, trigger: 'blur' }],
+        businessAddress: [{ required: true, trigger: 'blur', message: '请输入经营地址(详细地址)' }, { validator: validateCharacter, trigger: 'blur' }],
         businessPostCode: [{ required: true, validator: validContactPostCode, trigger: 'blur' }],
         contactDirectInd: [{ required: true, trigger: 'change', message: '请选择是否允许直接联系' }],
-        contactName: [{ required: true, trigger: 'blur', message: '请输入企业联系人姓名' }],
+        contactName: [{ required: true, trigger: 'blur', message: '请输入企业联系人姓名' }, { validator: validateCharacter, trigger: 'blur' }],
         // contactMobile: [{ required: true, validator: validateMobile, trigger: 'blur' }],
         contactMobile: [{ required: true, trigger: 'blur', message: '请输入联系电话' }],
         contactEmail: [{ required: true, validator: validContactEmail, trigger: 'blur' }],

+ 11 - 2
src/views/myTrade/purchaseAndSaleContract/salesContract/components/Basic.vue

@@ -147,6 +147,15 @@ export default {
     }
   },
   data() {
+    const validateCharacter = (rule, value, callback) => {
+      if (value === '') {
+        callback()
+      } else if (/[\u4e00-\u9fa5]/.test(value)) {
+        callback(new Error('请输入英文'))
+      } else {
+        callback()
+      }
+    }
     return {
       ruleForm: {
         templateType: '',
@@ -183,10 +192,10 @@ export default {
           { required: true, message: '请选择代理公司名称', trigger: 'blur' }
         ],
         portDeparture: [
-          { required: true, message: '请输入起运港', trigger: 'blur' }
+          { required: true, message: '请输入起运港', trigger: 'blur' }, { validator: validateCharacter, trigger: 'blur' }
         ],
         portDestination: [
-          { required: true, message: '请输入目的港', trigger: 'blur' }
+          { required: true, message: '请输入目的港', trigger: 'blur' }, { validator: validateCharacter, trigger: 'blur' }
         ],
         signDate: [
           { required: true, message: '请选择签署日期', trigger: 'blur' }

+ 96 - 5
src/views/myTrade/purchaseAndSaleContract/salesContract/components/GoodsInfo.vue

@@ -72,7 +72,12 @@ export default {
         amount: '',
         hsCode: '',
         addedTaxRate: 0,
-        exportTaxRebateRate: 0
+        exportTaxRebateRate: 0,
+
+        i18n: {
+          declarationName: '',
+          measurementUnit: ''
+        }
       }],
       supplierLsit: [],
       goodsList: [], // 商品名称
@@ -152,6 +157,21 @@ export default {
             )
           }
         },
+        {
+          label: '报关品名(英文)',
+          showTooltip: true,
+          width: 180,
+          ruleRequired: true,
+          render: (h, row) => {
+            return (
+              <el-input
+                v-model={ row.i18n.declarationName }
+                disabled={ this.$route.query.type === 'see' }
+                placeholder='请输入英文'
+              ></el-input>
+            )
+          }
+        },
         {
           label: '型号',
           showTooltip: true,
@@ -181,6 +201,21 @@ export default {
             )
           }
         },
+        {
+          label: '申报计量单位(英文)',
+          showTooltip: true,
+          width: 180,
+          ruleRequired: true,
+          render: (h, row) => {
+            return (
+              <el-input
+                v-model={ row.i18n.measurementUnit }
+                disabled={ this.$route.query.type === 'see' }
+                placeholder='请输入英文'
+              ></el-input>
+            )
+          }
+        },
         {
           label: '包装规格',
           showTooltip: true,
@@ -266,7 +301,32 @@ export default {
       handler(val) {
         if (val && val.length) {
           this.querySupplierLsit()
-          this.tableData = val
+          const tableList = []
+          val.map(item => {
+            const obj = {}
+            for (const key in item) {
+              if (key !== 'i18n') {
+                obj[key] = item[key]
+              }
+            }
+            obj.i18n = {
+              declarationName: '',
+              measurementUnit: ''
+            }
+            if (item.i18n) {
+              for (const k in item.i18n) {
+                if (item.i18n[k].length) {
+                  item.i18n[k].map(ele => {
+                    if (ele.language === 'en' && item.ele !== '' && ele.value !== null && ele.value !== undefined) {
+                      obj.i18n[k] = ele.value
+                    }
+                  })
+                }
+              }
+            }
+            tableList.push(obj)
+          })
+          this.tableData = tableList
         }
       },
       immediate: true
@@ -287,9 +347,35 @@ export default {
   },
   methods: {
     getParams(type) {
+      const tableList = []
+      this.tableData.map(item => {
+        const obj = {}
+        for (const key in item) {
+          if (key !== 'i18n') {
+            obj[key] = item[key]
+          }
+        }
+        const i18n = {}
+        for (const k in item.i18n) {
+          if (item.i18n[k] !== '' && item.i18n[k] !== null && item.i18n[k] !== undefined) {
+            i18n[k] = [
+              {
+                language: 'cn',
+                value: item[k]
+              },
+              {
+                language: 'en',
+                value: item.i18n[k]
+              }
+            ]
+          }
+        }
+        obj.i18n = Object.keys(i18n).length ? i18n : null
+        tableList.push(obj)
+      })
       return new Promise((resolve) => {
         if (type === 'temp') {
-          resolve(this.tableData)
+          resolve(tableList)
         } else {
           if (!this.validateTableData()) {
             return
@@ -300,7 +386,7 @@ export default {
             return
           }
 
-          resolve(this.tableData)
+          resolve(tableList)
         }
       })
     },
@@ -421,7 +507,12 @@ export default {
         amount: '',
         hsCode: '',
         addedTaxRate: 0,
-        exportTaxRebateRate: 0
+        exportTaxRebateRate: 0,
+
+        i18n: {
+          declarationName: '',
+          measurementUnit: ''
+        }
       })
     },
     deleteGoods(index) {

+ 264 - 34
src/views/myTrade/purchaseAndSaleContract/salesContract/components/Terms.vue

@@ -63,12 +63,19 @@
       </div>
 
       <cy-info-title style="margin-top: 10px;">收款账户信息</cy-info-title>
-      <el-form-item label="账户名称" prop="accountName">
-        <el-input
+      <el-form-item label="账户名称(中/英文)">
+        <span slot="label" class="required-label">账户名称(中/英文)</span>
+        <!-- <el-input
           v-model="ruleForm.accountName"
           :disabled="disabled"
           placeholder="请输入账户名称"
-        />
+        /> -->
+        <el-form-item prop="accountName" class="inline-item">
+          <el-input v-model="ruleForm.accountName" :disabled="disabled" placeholder="请输入中文" />
+        </el-form-item>
+        <el-form-item prop="i18n.accountName" class="inline-item">
+          <el-input v-model="ruleForm.i18n.accountName" :disabled="disabled" placeholder="请输入英文" />
+        </el-form-item>
       </el-form-item>
       <el-form-item label="银行账号" prop="accountNumber">
         <el-input
@@ -77,19 +84,23 @@
           placeholder="请输入银行账号"
         />
       </el-form-item>
-      <el-form-item label="开户行" prop="openingBank">
-        <el-input
-          v-model="ruleForm.openingBank"
-          :disabled="disabled"
-          placeholder="请输入开户行"
-        />
+      <el-form-item label="开户行">
+        <span slot="label" class="required-label">开户行(中/英文)</span>
+        <el-form-item prop="openingBank" class="inline-item">
+          <el-input v-model="ruleForm.openingBank" :disabled="disabled" placeholder="请输入中文" />
+        </el-form-item>
+        <el-form-item prop="i18n.openingBank" class="inline-item">
+          <el-input v-model="ruleForm.i18n.openingBank" :disabled="disabled" placeholder="请输入英文" />
+        </el-form-item>
       </el-form-item>
-      <el-form-item label="银行名称" prop="bankName">
-        <el-input
-          v-model="ruleForm.bankName"
-          :disabled="disabled"
-          placeholder="请输入银行名称"
-        />
+      <el-form-item label="银行名称">
+        <span slot="label" class="required-label">银行名称(中/英文)</span>
+        <el-form-item prop="bankName" class="inline-item">
+          <el-input v-model="ruleForm.bankName" :disabled="disabled" placeholder="请输入中文" />
+        </el-form-item>
+        <el-form-item prop="i18n.bankName" class="inline-item">
+          <el-input v-model="ruleForm.i18n.bankName" :disabled="disabled" placeholder="请输入英文" />
+        </el-form-item>
       </el-form-item>
       <el-form-item label="Swift Code" prop="swiftCode">
         <el-input
@@ -173,7 +184,12 @@ export default {
         bankName: '',
         swiftCode: '',
         remark: '',
-        bankNane: ''
+
+        i18n: {
+          accountName: '',
+          openingBank: '',
+          bankName: ''
+        }
       },
       rules: {
         paymentWay: [
@@ -200,7 +216,14 @@ export default {
         swiftCode: [
           { required: true, validator: validateSwiftCode, trigger: 'blur' }
         ],
-        bankNane: [
+
+        'i18n.accountName': [
+          { required: true, message: `请输入账户名称`, trigger: 'blur' }
+        ],
+        'i18n.openingBank': [
+          { required: true, message: `请输入开户行`, trigger: 'blur' }
+        ],
+        'i18n.bankName': [
           { required: true, message: `请输入银行名称`, trigger: 'blur' }
         ]
       },
@@ -210,7 +233,12 @@ export default {
           paymentRatio: '',
           paymentName: '',
           paymentTime: '',
-          paymentTerm: ''
+          paymentTerm: '',
+
+          i18n: {
+            paymentName: '',
+            paymentTime: ''
+          }
         }
       ], // 付款信息表格
       columns: [
@@ -235,7 +263,7 @@ export default {
           }
         },
         {
-          label: '款名称',
+          label: '款名称',
           showTooltip: true,
           ruleRequired: true,
           render: (h, row) => {
@@ -243,7 +271,22 @@ export default {
               <el-input
                 v-model={ row.paymentName }
                 disabled={ this.disabled }
-                placeholder='请输入付款名称'
+                placeholder='请输入款项名称'
+              ></el-input>
+
+            )
+          }
+        },
+        {
+          label: '款项名称(英文)',
+          showTooltip: true,
+          ruleRequired: true,
+          render: (h, row) => {
+            return (
+              <el-input
+                v-model={ row.i18n.paymentName }
+                disabled={ this.disabled }
+                placeholder='请输入款项名称'
               ></el-input>
             )
           }
@@ -262,6 +305,20 @@ export default {
             )
           }
         },
+        {
+          label: '付款时点(英文)',
+          showTooltip: true,
+          ruleRequired: true,
+          render: (h, row) => {
+            return (
+              <el-input
+                v-model={ row.i18n.paymentTime }
+                disabled={ this.disabled }
+                placeholder='请输入,例如:合同签署后'
+              ></el-input>
+            )
+          }
+        },
         {
           label: '付款期限',
           showTooltip: true,
@@ -317,6 +374,19 @@ export default {
             )
           }
         },
+        {
+          label: '条款标题(英文)',
+          showTooltip: true,
+          render: (h, row) => {
+            return (
+              <el-input
+                v-model={ row.i18n.termTitle }
+                disabled={ this.disabled }
+                placeholder='请输入条款标题'
+              ></el-input>
+            )
+          }
+        },
         {
           label: '条款内容',
           showTooltip: true,
@@ -330,6 +400,19 @@ export default {
             )
           }
         },
+        {
+          label: '条款内容(英文)',
+          showTooltip: true,
+          render: (h, row) => {
+            return (
+              <el-input
+                v-model={ row.i18n.content }
+                disabled={ this.disabled }
+                placeholder='请输入条款标题'
+              ></el-input>
+            )
+          }
+        },
         {
           label: '操作',
           show: true,
@@ -380,7 +463,7 @@ export default {
             remark,
             titleInfo,
             paymentInfo,
-            bankNane
+            i18n
           } = newV
           this.ruleForm = {
             paymentWay,
@@ -392,11 +475,82 @@ export default {
             bankName,
             swiftCode,
             remark,
-            bankNane
+
+            i18n: {
+              accountName: '',
+              openingBank: '',
+              bankName: ''
+            }
+          }
+          if (i18n) {
+            for (const key in i18n) {
+              if (i18n[key].length) {
+                i18n[key].map(item => {
+                  if (item.language === 'en' && item.value !== '' && item.value !== null && item.value !== undefined) {
+                    this.ruleForm.i18n[key] = item.value
+                  }
+                })
+              }
+            }
+          }
+
+          const titleList = []
+          if (titleInfo && titleInfo.length) {
+            titleInfo.map((item, index) => {
+              const obj = {}
+              for (const key in item) {
+                if (key !== 'i18n') {
+                  obj[key] = item[key]
+                }
+              }
+              obj.i18n = {
+                termTitle: '',
+                content: ''
+              }
+              if (item.i18n) {
+                for (const k in item.i18n) {
+                  if (item.i18n[k].length) {
+                    item.i18n[k].map(ele => {
+                      if (ele.language === 'en' && item.ele !== '' && ele.value !== null && ele.value !== undefined) {
+                        obj.i18n[k] = ele.value
+                      }
+                    })
+                  }
+                }
+              }
+              titleList.push(obj)
+            })
+          }
+          this.titleInfo = titleList
+
+          const paymentList = []
+          if (paymentInfo.length) {
+            paymentInfo.map((item, index) => {
+              const obj = {}
+              for (const key in item) {
+                if (key !== 'i18n') {
+                  obj[key] = item[key]
+                }
+              }
+              obj.i18n = {
+                paymentName: '',
+                paymentTime: ''
+              }
+              if (item.i18n) {
+                for (const k in item.i18n) {
+                  if (item.i18n[k].length) {
+                    item.i18n[k].map(ele => {
+                      if (ele.language === 'en' && item.ele !== '' && ele.value !== null && ele.value !== undefined) {
+                        obj.i18n[k] = ele.value
+                      }
+                    })
+                  }
+                }
+              }
+              paymentList.push(obj)
+            })
           }
-          this.titleInfo = titleInfo || []
-          this.paymentInfo = paymentInfo || []
-          console.log(this.paymentInfo)
+          this.paymentInfo = paymentList
         }
       },
       immediate: true
@@ -423,18 +577,86 @@ export default {
   },
   methods: {
     async getParams(type) {
-      this.paymentInfo.map(item => {
-        item.paymentTerm = Number(item.paymentTerm)
-        item.paymentRatio = Number(item.paymentRatio)
-      })
+      const { i18n, ...rest } = this.ruleForm
       const params = {
-        ...this.ruleForm,
-        paymentInfo: this.paymentInfo,
-        titleInfo: this.titleInfo
+        ...rest
       }
       // 临时处理
       params.settlementCycle = Number(params.settlementCycle)
 
+      const i18nRuleForm = {}
+      for (const k in this.ruleForm.i18n) {
+        if (this.ruleForm.i18n[k] !== '' && this.ruleForm.i18n[k] !== null && this.ruleForm.i18n[k] !== undefined) {
+          i18nRuleForm[k] = [
+            {
+              language: 'cn',
+              value: this.ruleForm[k]
+            },
+            {
+              language: 'en',
+              value: this.ruleForm.i18n[k]
+            }
+          ]
+        }
+      }
+      params.i18n = Object.keys(i18nRuleForm).length ? i18nRuleForm : null
+
+      const paymentInfo = []
+      this.paymentInfo.map(item => {
+        const obj = {}
+        for (const k in item) {
+          if (k !== 'i18n') {
+            obj[k] = item[k]
+          }
+        }
+        const i18n = {}
+        for (const key in item.i18n) {
+          if (item.i18n[key] !== '') {
+            i18n[key] = [
+              {
+                language: 'cn',
+                value: item[key]
+              },
+              {
+                language: 'en',
+                value: item.i18n[key]
+              }
+            ]
+          }
+        }
+        obj.i18n = Object.keys(i18n).length ? i18n : null
+        obj.paymentRatio = Number(item.paymentRatio)
+        obj.paymentTerm = Number(item.paymentTerm)
+        paymentInfo.push(obj)
+      })
+      params.paymentInfo = paymentInfo.length ? paymentInfo : null
+
+      const titleInfo = []
+      this.titleInfo.map(item => {
+        const obj = {}
+        for (const key in item.i18n) {
+          if (item.i18n[key] !== '') {
+            obj.i18n[key] = [
+              {
+                language: 'cn',
+                value: item[key]
+              },
+              {
+                language: 'en',
+                value: item.i18n[key]
+              }
+            ]
+          }
+        }
+        for (const k in item) {
+          if (k !== 'i18n') {
+            obj[k] = item[k]
+          }
+        }
+        titleInfo.push(obj)
+      })
+      params.titleInfo = titleInfo.length ? titleInfo : null
+
       return new Promise((resolve, reject) => {
         if (type === 'submit') {
           if (!this.validatePayInfo()) {
@@ -479,7 +701,11 @@ export default {
         paymentRatio: '',
         paymentName: '',
         paymentTime: '',
-        paymentTerm: ''
+        paymentTerm: '',
+        i18n: {
+          paymentName: '',
+          paymentTime: ''
+        }
       })
     },
     deletePayInfo(index) {
@@ -522,7 +748,11 @@ export default {
         {
           termTitle: '',
           content: '',
-          type: 2
+          type: 2,
+          i18n: {
+            termTitle: '',
+            content: ''
+          }
         }
       )
     },

+ 24 - 0
src/views/myTrade/salesBill/salesInvoices/view.vue

@@ -65,8 +65,10 @@
           <el-table-column label="HS编码" prop="hsCode" :show-overflow-tooltip="true" />
           <el-table-column label="商品名称" prop="name" :show-overflow-tooltip="true" />
           <el-table-column label="报关品名" prop="declarationName" :show-overflow-tooltip="true" />
+          <el-table-column label="报关品名(英文)" prop="declarationNameEn" :show-overflow-tooltip="true" />
           <el-table-column label="型号 " prop="model" :show-overflow-tooltip="true" />
           <el-table-column label="申报计量单位" prop="unit" :show-overflow-tooltip="true" />
+          <el-table-column label="申报计量单位(英文)" prop="measurementUnitEn" :show-overflow-tooltip="true" />
           <el-table-column label="包装规格" prop="packingSpecifications" :show-overflow-tooltip="true" />
           <el-table-column label="销售单价 (USD)" prop="price" :show-overflow-tooltip="true" />
           <el-table-column prop="count" label="数量">
@@ -133,6 +135,28 @@ export default {
       getInvoiceDetail(params).then(({ data }) => {
         this.ruleForm = data || []
         this.goodsInfo = data.salesOrderGoodsList || []
+
+        this.goodsInfo.forEach(item => {
+          let declarationNameEn = ''; let measurementUnitEn = ''
+          if (item.i18n) {
+            if (item.i18n.declarationName) {
+              item.i18n.declarationName.map(ele => {
+                if (ele.language === 'en') {
+                  declarationNameEn = ele.value
+                }
+              })
+            }
+            if (item.i18n.measurementUnit) {
+              item.i18n.measurementUnit.map(ele => {
+                if (ele.language === 'en') {
+                  measurementUnitEn = ele.value
+                }
+              })
+            }
+          }
+          item.declarationNameEn = declarationNameEn
+          item.measurementUnitEn = measurementUnitEn
+        })
       })
     },
     codeToName(list, type, code, name) {

+ 64 - 1
src/views/myTrade/salesBill/salesOrder/components/BasicInfo.vue

@@ -94,8 +94,10 @@
             <el-table-column label="HS编码" prop="hsCode" :show-overflow-tooltip="true" />
             <el-table-column label="商品名称" prop="name" :show-overflow-tooltip="true" />
             <el-table-column label="报关品名" prop="declarationName" :show-overflow-tooltip="true" />
+            <el-table-column label="报关品名(英文)" prop="declarationNameEn" :show-overflow-tooltip="true" />
             <el-table-column label="型号" prop="model" :show-overflow-tooltip="true" />
             <el-table-column label="申报计量单位" prop="measurementUnit" :show-overflow-tooltip="true" />
+            <el-table-column label="申报计量单位(英文)" prop="measurementUnitEn" :show-overflow-tooltip="true" />
             <el-table-column label="包装规格" prop="packSpec" :show-overflow-tooltip="true" />
             <el-table-column prop="priceUnit" label="销售单价 (USD)" :show-overflow-tooltip="true">
               <template #default="scope">
@@ -212,6 +214,26 @@ export default {
           showTooltip: true,
           prop: 'declarationName'
         },
+        {
+          label: '报关品名(英文)',
+          showTooltip: true,
+          prop: 'declarationName',
+          render: (h, row) => {
+            let name = ''
+            if (row.i18n && row.i18n.declarationName) {
+              row.i18n.declarationName.map(ele => {
+                if (ele.language === 'en') {
+                  name = ele.value
+                }
+              })
+            }
+            return <div> <el-tooltip class='item' effect='dark' content={name} placement='top'>
+              <div class='one-ellipsis'>
+                {name}
+              </div>
+            </el-tooltip></div>
+          }
+        },
         {
           label: '型号',
           showTooltip: true,
@@ -222,6 +244,26 @@ export default {
           showTooltip: true,
           prop: 'measurementUnit'
         },
+        {
+          label: '申报计量单位(英文)',
+          showTooltip: true,
+          prop: 'measurementUnit',
+          render: (h, row) => {
+            let name = ''
+            if (row.i18n && row.i18n.measurementUnit) {
+              row.i18n.measurementUnit.map(ele => {
+                if (ele.language === 'en') {
+                  name = ele.value
+                }
+              })
+            }
+            return <div> <el-tooltip class='item' effect='dark' content={name} placement='top'>
+              <div class='one-ellipsis'>
+                {name}
+              </div>
+            </el-tooltip></div>
+          }
+        },
         {
           label: '包装规格',
           showTooltip: true,
@@ -308,6 +350,26 @@ export default {
         let price = 0
         this.selectedGoods.forEach(item => {
           price += Number(item.amount)
+
+          let declarationNameEn = ''; let measurementUnitEn = ''
+          if (item.i18n) {
+            if (item.i18n.declarationName) {
+              item.i18n.declarationName.map(ele => {
+                if (ele.language === 'en') {
+                  declarationNameEn = ele.value
+                }
+              })
+            }
+            if (item.i18n.measurementUnit) {
+              item.i18n.measurementUnit.map(ele => {
+                if (ele.language === 'en') {
+                  measurementUnitEn = ele.value
+                }
+              })
+            }
+          }
+          item.declarationNameEn = declarationNameEn
+          item.measurementUnitEn = measurementUnitEn
         })
 
         this.ruleForm.amount = price ? price.toFixed(2) : 0
@@ -360,7 +422,8 @@ export default {
           priceTotal: item.amount,
           taxRefundRate: item.addedTaxRate,
           count: item.number,
-          vendorEntityNo: item.entityNo
+          vendorEntityNo: item.entityNo,
+          i18n: item.i18n
         })
       })
       const data = {

+ 40 - 0
src/views/myTrade/salesBill/salesOrder/view.vue

@@ -338,6 +338,26 @@ export default {
           showTooltip: true,
           prop: 'declarationName'
         },
+        {
+          label: '报关品名(英文)',
+          showTooltip: true,
+          prop: 'declarationName',
+          render: (h, row) => {
+            let name = ''
+            if (row.i18n && row.i18n.declarationName) {
+              row.i18n.declarationName.map(ele => {
+                if (ele.language === 'en') {
+                  name = ele.value
+                }
+              })
+            }
+            return <div> <el-tooltip class='item' effect='dark' content={name} placement='top'>
+              <div class='one-ellipsis'>
+                {name}
+              </div>
+            </el-tooltip></div>
+          }
+        },
         {
           label: '型号',
           showTooltip: true,
@@ -348,6 +368,26 @@ export default {
           showTooltip: true,
           prop: 'unit'
         },
+        {
+          label: '申报计量单位(英文)',
+          showTooltip: true,
+          prop: 'measurementUnit',
+          render: (h, row) => {
+            let name = ''
+            if (row.i18n && row.i18n.measurementUnit) {
+              row.i18n.measurementUnit.map(ele => {
+                if (ele.language === 'en') {
+                  name = ele.value
+                }
+              })
+            }
+            return <div> <el-tooltip class='item' effect='dark' content={name} placement='top'>
+              <div class='one-ellipsis'>
+                {name}
+              </div>
+            </el-tooltip></div>
+          }
+        },
         {
           label: '包装规格',
           showTooltip: true,

+ 1 - 0
src/views/perview/index.vue

@@ -101,6 +101,7 @@ export default {
       if (!fileId) return
       this.loading = true
       getImagePerview({ fileId }).then(async(res) => {
+        console.log(res.data)
         const url = res.data
         this.handleChange(url)
         this.loading = false