|
@@ -911,8 +911,20 @@ $('.gljSubTab ul li a').on('shown.bs.tab', function () {
|
|
|
$('#tzCharacterText').blur(async function () {
|
|
|
let billID = $("#xmtz_billID").val();
|
|
|
let htmlString = $(this).html();
|
|
|
- let value = htmlString.replace(/<br>/g,"\n");
|
|
|
- value = value.replace(/ /g," ");
|
|
|
+ let value = htmlString.replace(/ /g," ");
|
|
|
+ if(value.indexOf("<div>")!= -1){
|
|
|
+ let preString = value.substring(0,value.indexOf("<div>"));
|
|
|
+ let arrayText =[];
|
|
|
+ let divArray = value.match(/<div>(.*?)<\/div>/g);
|
|
|
+ for(let d of divArray){
|
|
|
+ t = d.match(/<div>(\S*)<\/div>/)[1];
|
|
|
+ if(t == "<br>") t="";
|
|
|
+ arrayText.push(t)
|
|
|
+ }
|
|
|
+ value = preString +"\n"+ arrayText.join("\n");
|
|
|
+ }
|
|
|
+ value = value.replace(/<br>/g,"\n");
|
|
|
+
|
|
|
let billNode = projectObj.project.mainTree.getNodeByID(billID);
|
|
|
if(billNode && value == billNode.data.itemCharacterText) return;
|
|
|
let datas = [{
|