修改InputTextArea

szh-new
sunzehua 2 months ago
parent c11c27d1f7
commit b56a32ee23

@ -142,20 +142,12 @@
const textareaBlur = (_, ...args) => {
if (attrs.value.disTrans) return
emit('blur', _, ...args)
if (cutList.length == 0 || !state.value) return
state.value = ToCDB(state.value).toUpperCase()
//
state.value = removeTrailingSpaces(state.value)
}
watch(
() => state.value,
(v) => {
emit('update:value', v)
if (v) {
if (attrs.value.disTrans) return
if (enInput) state.value = state.value.replace(/[\u4e00-\u9fa5]/ig,'')
state.value = ToCDB(state.value).toUpperCase()
}
}
)
return { attrs, t, props, state, toBig, contentFlag, cutList, changeCode, textareaBlur }

@ -525,6 +525,7 @@
ctnInfo
}
if (id.value) postData['id'] = id.value
console.log(postData)
//
loading.value = true
BookingOrderSave(postData)

@ -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)
},
}
}
},

@ -4,7 +4,7 @@
<div class="LeftHead">
<p class="title">
{{ props.title }} ({{ form.carrierId }})
<i @click="reload" class="icon-refresh-1-copy iconfont"></i>
<i @click="reload" style="cursor: pointer;" class="icon-refresh-1-copy iconfont"></i>
</p>
<p>订舱时间{{ form.bookingConfirmDate }}</p>
</div>
@ -62,7 +62,7 @@
<a-col :span="pdfUrl?12:6">
<a-form-item label="">
<div>样单截止时间:</div>
<span class="text"> {{ form.siCutDate }}</span>
<span class="text"> {{ form.cutSingleTime }}</span>
</a-form-item>
</a-col>
<a-col :span="pdfUrl?12:6">
@ -271,7 +271,7 @@ const form = ref({}) as any
const compareResultList = ref([]) as any
const compareResultFlag = ref(false)
function reload() {
getInfo(taskType.value)
}
const router = useRouter();
function FnSee() {
@ -298,7 +298,7 @@ function Rcolor(hexColor) {
const blue = parseInt(hex.substring(4, 6), 16) - 50
return `rgb(${red}, ${green}, ${blue})`
}
const taskType = ref('')
function getInfo(type) {
const ApiData = {
taskId: taskPKId.value
@ -316,6 +316,7 @@ function getInfo(type) {
compareResultList.value = res.data
})
}
taskType.value = type
}
defineExpose({ getInfo })

@ -62,9 +62,9 @@ const columns = [
},
{
title: '样单截止时间',
dataIndex: 'siCutDateTxt',
dataIndex: 'cutSingleTime',
width: 150,
key: 'siCutDateTxt',
key: 'cutSingleTime',
align: 'center'
},
{

Loading…
Cancel
Save