feature-JimuReport-1106-yjl
张同海 4 weeks ago
commit db70d8060e

@ -17,6 +17,34 @@ const FnnoBill = ref([])
getDictOption('no_bill').then((res) => {
FnnoBill.value = res
})
const removeTrailingSpaces = (text) => {
return text.replace(/ \s*$/gm, '')
}
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
}
// 上面的表单1
export const formSchema1: FormSchema[] = [
{
@ -75,6 +103,11 @@ export const formSchema1: 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)
}
}
}
@ -130,6 +163,11 @@ export const formSchema1: FormSchema[] = [
onCut: (v) => {
formModel.consigneeContent = v
},
oninput: () => {
formModel.consigneeContent = ToCDB(formModel.consigneeContent)
formModel.consigneeContent = formModel.consigneeContent.toUpperCase()
formModel.consigneeContent = removeTrailingSpaces(formModel.consigneeContent)
},
}
},
},
@ -187,6 +225,11 @@ export const formSchema1: FormSchema[] = [
onCut: (v) => {
formModel.notifyPartyContent = v
},
oninput: () => {
formModel.notifyPartyContent = ToCDB(formModel.notifyPartyContent)
formModel.notifyPartyContent = formModel.notifyPartyContent.toUpperCase()
formModel.notifyPartyContent = removeTrailingSpaces(formModel.notifyPartyContent)
}
}
},
},

@ -219,7 +219,7 @@
<i class="iconfont icon-yuandian"></i>
<div v-html="remark.remark"></div>
</div>
<div style="padding-left: 12px;"><span class="remark-tag">{{ remark.createTime }}</span><span class="remark-tag">{{ remark.createUserName }}</span><span class="remark-tag">{{ remark.remarkType }}</span></div>
<div style="padding-left: 12px;"><span class="remark-tag">{{ remark.updateTime || remark.createTime }}</span><span class="remark-tag">{{ remark.updateUserName || remark.createUserName }}</span><span class="remark-tag">{{ remark.remarkType }}</span></div>
</div>
<div class="remark-btn">
<i class="iconfont icon-bianji1 mr15" @click="editRemark(remark)"></i>

Loading…
Cancel
Save