|
@@ -848,7 +848,13 @@ $(document).ready(() => {
|
|
|
const data = {};
|
|
|
if (field === 'expr') {
|
|
|
data.type = 'stage';
|
|
|
- data.updateData = { pid: select.pid, tp: null, expr: newValue }
|
|
|
+ data.updateData = { pid: select.pid, tp: null, expr: newValue };
|
|
|
+ const [valid, msg] = paySpreadObj._checkSExpr(select, newValue, data.updateData);
|
|
|
+ if (!valid) {
|
|
|
+ toastr.warning(msg);
|
|
|
+ this.value = select.expr;
|
|
|
+ return;
|
|
|
+ }
|
|
|
} else if (field === 'sexpr') {
|
|
|
data.type = 'info';
|
|
|
data.updateData = {id: select.pid};
|
|
@@ -876,7 +882,10 @@ $(document).ready(() => {
|
|
|
loadUpdateDealPays(result);
|
|
|
SpreadJsObj.reLoadSheetData(paySpread.getActiveSheet());
|
|
|
});
|
|
|
- })
|
|
|
+ });
|
|
|
+ // $('#expr').bind('onpaste', function (e) {
|
|
|
+ // console.log(e);
|
|
|
+ // });
|
|
|
}
|
|
|
|
|
|
const deadlineObj = {
|
|
@@ -1186,3 +1195,8 @@ $(document).ready(() => {
|
|
|
});
|
|
|
})
|
|
|
});
|
|
|
+const pasteExpr = function (e, obj) {
|
|
|
+ const text = e.clipboardData.getData('text');
|
|
|
+ e.preventDefault();
|
|
|
+ obj.value = obj.value + trimInvalidChar(_.trim(text));
|
|
|
+};
|