|
@@ -126,8 +126,8 @@ $(document).ready(() => {
|
|
|
const select = SpreadJsObj.getSelectObject(sheet);
|
|
|
setObjEnable($('#add'), !readOnly);
|
|
|
setObjEnable($('#del'), !readOnly && select);
|
|
|
- setObjEnable($('#up-move'), !readOnly && select && dealPay.indexOf(select) > 0);
|
|
|
- setObjEnable($('#down-move'), !readOnly && select && dealPay.indexOf(select) < dealPay.length - 1);
|
|
|
+ setObjEnable($('#up-move'), !readOnly && select && select.ptype === 1 && dealPay.indexOf(select) > 3);
|
|
|
+ setObjEnable($('#down-move'), !readOnly && select && select.ptype === 1 && dealPay.indexOf(select) < dealPay.length - 1);
|
|
|
setObjEnable($('#unlock'), !readOnly);
|
|
|
},
|
|
|
add: function () {
|
|
@@ -160,7 +160,7 @@ $(document).ready(() => {
|
|
|
const sheet = paySpread.getActiveSheet();
|
|
|
const cur = SpreadJsObj.getSelectObject(sheet);
|
|
|
const up = dealPay[dealPay.indexOf(cur) - 1];
|
|
|
- postData(window.location.pathname + '/save', {type: 'changeOrder', id1: cur.id, id2: up.id}, function () {
|
|
|
+ postData(window.location.pathname + '/save', {type: 'changeOrder', id1: cur.pid, id2: up.pid}, function () {
|
|
|
const order = cur.order;
|
|
|
cur.order = up.order;
|
|
|
up.order = order;
|
|
@@ -176,7 +176,7 @@ $(document).ready(() => {
|
|
|
const sheet = paySpread.getActiveSheet();
|
|
|
const cur = SpreadJsObj.getSelectObject(sheet);
|
|
|
const down = dealPay[dealPay.indexOf(cur) + 1];
|
|
|
- postData(window.location.pathname + '/save', {type: 'changeOrder', id1: cur.id, id2: down.id}, function () {
|
|
|
+ postData(window.location.pathname + '/save', {type: 'changeOrder', id1: cur.pid, id2: down.pid}, function () {
|
|
|
const order = cur.order;
|
|
|
cur.order = down.order;
|
|
|
down.order = order;
|