|
|
|
@ -53,6 +53,34 @@ let Rtime = (type) => {
|
|
|
|
|
}
|
|
|
|
|
return RData
|
|
|
|
|
}
|
|
|
|
|
function ToCDB(str: any) {
|
|
|
|
|
if (!str) return
|
|
|
|
|
var tmp = ''
|
|
|
|
|
for (var i = 0; i < str.length; i++) {
|
|
|
|
|
if (str.charCodeAt(i) > 65248 && str.charCodeAt(i) < 65375) {
|
|
|
|
|
tmp += String.fromCharCode(str.charCodeAt(i) - 65248)
|
|
|
|
|
} else {
|
|
|
|
|
tmp += String.fromCharCode(str.charCodeAt(i))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
tmp = tmp.replace(/,/gi, ',')
|
|
|
|
|
tmp = tmp.replace(/。/gi, '.')
|
|
|
|
|
tmp = tmp.replace(/;/gi, ';')
|
|
|
|
|
tmp = tmp.replace(/:/gi, ':')
|
|
|
|
|
tmp = tmp.replace(/?/gi, '?')
|
|
|
|
|
tmp = tmp.replace(/!/gi, '!')
|
|
|
|
|
tmp = tmp.replace(/《/gi, '<<')
|
|
|
|
|
tmp = tmp.replace(/》/gi, '>>')
|
|
|
|
|
tmp = tmp.replace(/‘/gi, "'")
|
|
|
|
|
tmp = tmp.replace(/’/gi, "'")
|
|
|
|
|
tmp = tmp.replace(/、/gi, ',')
|
|
|
|
|
// tab键转换暂时屏蔽,看后台转换的效果,再放开
|
|
|
|
|
tmp = tmp.replace(/\t/gi, ' ')
|
|
|
|
|
return tmp
|
|
|
|
|
}
|
|
|
|
|
const removeTrailingSpaces = (text) => {
|
|
|
|
|
return text.replace(/ \s*$/gm, '')
|
|
|
|
|
}
|
|
|
|
|
// 贸易方式字典
|
|
|
|
|
const FntermDelivery = ref([])
|
|
|
|
|
getDictOption('term_delivery').then((res) => {
|
|
|
|
@ -583,7 +611,12 @@ export const mailingInfoFormSchemaL: FormSchema[] = [
|
|
|
|
|
slice: [30, 35, 40],
|
|
|
|
|
onCut: (v) => {
|
|
|
|
|
formModel.shipperContent = v
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
oninput: () => {
|
|
|
|
|
formModel.shipperContent = ToCDB(formModel.shipperContent)
|
|
|
|
|
formModel.shipperContent = formModel.shipperContent.toUpperCase()
|
|
|
|
|
formModel.shipperContent = removeTrailingSpaces(formModel.shipperContent)
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -597,7 +630,12 @@ export const mailingInfoFormSchemaL: FormSchema[] = [
|
|
|
|
|
slice: [30, 35, 40],
|
|
|
|
|
onCut: (v) => {
|
|
|
|
|
formModel.consigneeContent = v
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
oninput: () => {
|
|
|
|
|
formModel.consigneeContent = ToCDB(formModel.consigneeContent)
|
|
|
|
|
formModel.consigneeContent = formModel.consigneeContent.toUpperCase()
|
|
|
|
|
formModel.consigneeContent = removeTrailingSpaces(formModel.consigneeContent)
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -613,7 +651,12 @@ export const mailingInfoFormSchemaL: FormSchema[] = [
|
|
|
|
|
slice: [30, 35, 40],
|
|
|
|
|
onCut: (v) => {
|
|
|
|
|
formModel.notifyPartyContent = v
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
oninput: () => {
|
|
|
|
|
formModel.notifyPartyContent = ToCDB(formModel.notifyPartyContent)
|
|
|
|
|
formModel.notifyPartyContent = formModel.notifyPartyContent.toUpperCase()
|
|
|
|
|
formModel.notifyPartyContent = removeTrailingSpaces(formModel.notifyPartyContent)
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
@ -1164,6 +1207,9 @@ export const noteFormSchema: FormSchema[] = [
|
|
|
|
|
enInput: true,
|
|
|
|
|
oninput: () => {
|
|
|
|
|
formModel.soRemark = formModel.soRemark.replace(/[\u4e00-\u9fa5]/ig,'')
|
|
|
|
|
formModel.soRemark = ToCDB(formModel.soRemark)
|
|
|
|
|
formModel.soRemark = formModel.soRemark.toUpperCase()
|
|
|
|
|
formModel.soRemark = removeTrailingSpaces(formModel.soRemark)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1182,6 +1228,9 @@ export const noteFormSchema: FormSchema[] = [
|
|
|
|
|
enInput: true,
|
|
|
|
|
oninput: () => {
|
|
|
|
|
formModel.closeDocRemark = formModel.closeDocRemark.replace(/[\u4e00-\u9fa5]/ig,'')
|
|
|
|
|
formModel.closeDocRemark = ToCDB(formModel.closeDocRemark)
|
|
|
|
|
formModel.closeDocRemark = formModel.closeDocRemark.toUpperCase()
|
|
|
|
|
formModel.closeDocRemark = removeTrailingSpaces(formModel.closeDocRemark)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1812,6 +1861,9 @@ export const cargoInfoFormSchema1: FormSchema[] = [
|
|
|
|
|
enInput: true,
|
|
|
|
|
oninput: () => {
|
|
|
|
|
formModel.marks = formModel.marks.replace(/[\u4e00-\u9fa5]/ig,'')
|
|
|
|
|
formModel.marks = ToCDB(formModel.marks)
|
|
|
|
|
formModel.marks = formModel.marks.toUpperCase()
|
|
|
|
|
formModel.marks = removeTrailingSpaces(formModel.marks)
|
|
|
|
|
},
|
|
|
|
|
onCut: (v) => {
|
|
|
|
|
formModel.marks = v
|
|
|
|
@ -1831,7 +1883,12 @@ export const cargoInfoFormSchema1: FormSchema[] = [
|
|
|
|
|
slice: [30, 35, 40],
|
|
|
|
|
onCut: (v) => {
|
|
|
|
|
formModel.description = v
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
oninput: () => {
|
|
|
|
|
formModel.description = ToCDB(formModel.description)
|
|
|
|
|
formModel.description = formModel.description.toUpperCase()
|
|
|
|
|
formModel.description = removeTrailingSpaces(formModel.description)
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|