diff --git a/src/components/Form/src/components/InputTextArea.vue b/src/components/Form/src/components/InputTextArea.vue index 63bbae80..37a8c2ff 100644 --- a/src/components/Form/src/components/InputTextArea.vue +++ b/src/components/Form/src/components/InputTextArea.vue @@ -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 } diff --git a/src/views/operation/seaexport/detail/index.vue b/src/views/operation/seaexport/detail/index.vue index ae68cc1d..9c60462d 100644 --- a/src/views/operation/seaexport/detail/index.vue +++ b/src/views/operation/seaexport/detail/index.vue @@ -526,6 +526,7 @@ ctnInfo } if (id.value) postData['id'] = id.value + console.log(postData) // 发送请求 loading.value = true BookingOrderSave(postData) diff --git a/src/views/operation/seaexport/detail/modules/baseInfo.tsx b/src/views/operation/seaexport/detail/modules/baseInfo.tsx index 76b30f5f..ffdd605c 100644 --- a/src/views/operation/seaexport/detail/modules/baseInfo.tsx +++ b/src/views/operation/seaexport/detail/modules/baseInfo.tsx @@ -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) + }, } } }, diff --git a/src/views/taskmanage/components/taskData.vue b/src/views/taskmanage/components/taskData.vue index 1d90df9f..70ad1292 100644 --- a/src/views/taskmanage/components/taskData.vue +++ b/src/views/taskmanage/components/taskData.vue @@ -4,7 +4,7 @@

{{ props.title }} ({{ form.carrierId }}) - +

订舱时间:{{ form.bookingConfirmDate }}

@@ -62,7 +62,7 @@
样单截止时间:
- {{ form.siCutDate }} + {{ form.cutSingleTime }}
@@ -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 }) diff --git a/src/views/taskmanage/taskList/cutModify.vue b/src/views/taskmanage/taskList/cutModify.vue index a51dd808..877776c8 100644 --- a/src/views/taskmanage/taskList/cutModify.vue +++ b/src/views/taskmanage/taskList/cutModify.vue @@ -62,9 +62,9 @@ const columns = [ }, { title: '样单截止时间', - dataIndex: 'siCutDateTxt', + dataIndex: 'cutSingleTime', width: 150, - key: 'siCutDateTxt', + key: 'cutSingleTime', align: 'center' }, {