diff --git a/src/ic/ic/pub/afterEvents/adjust4LAnd4MBodyAfterEvents.js b/src/ic/ic/pub/afterEvents/adjust4LAnd4MBodyAfterEvents.js index b98e0cf7..9a65ed99 100644 --- a/src/ic/ic/pub/afterEvents/adjust4LAnd4MBodyAfterEvents.js +++ b/src/ic/ic/pub/afterEvents/adjust4LAnd4MBodyAfterEvents.js @@ -1,4 +1,3 @@ -/*AUyQQ2otIZtZVYw4Vp1UwxfAflXWc1r8zmcCOYFK2ZaUlUveT32NH63YKxcE0f4i*/ /* * @Author: yinliang * @PageInfo: 库存调整,组装、拆卸,单据使用的特殊的公共编辑后事件 @@ -191,5 +190,3 @@ function createBodyAfterEventData( } return data; } - -/*AUyQQ2otIZtZVYw4Vp1UwxfAflXWc1r8zmcCOYFK2ZaUlUveT32NH63YKxcE0f4i*/ \ No newline at end of file diff --git a/src/ic/ic/pub/afterEvents/adjustCmaterialAfterEvent.js b/src/ic/ic/pub/afterEvents/adjustCmaterialAfterEvent.js index 135e78dc..9814dbf1 100644 --- a/src/ic/ic/pub/afterEvents/adjustCmaterialAfterEvent.js +++ b/src/ic/ic/pub/afterEvents/adjustCmaterialAfterEvent.js @@ -1,4 +1,3 @@ -/*mzNJ6TAzI7cdHAQfVuHqtok1/qsAGhZh1ApdnXO+Q9LqYlGtymcwlJH+lK0VnKzO*/ /* * @Author: yinliang * @PageInfo: 库存调整单据,物料公共编辑后事件 @@ -191,5 +190,3 @@ export default function cmaterialAfterEvent(props, moduleId, key, value, changed }); } } - -/*mzNJ6TAzI7cdHAQfVuHqtok1/qsAGhZh1ApdnXO+Q9LqYlGtymcwlJH+lK0VnKzO*/ \ No newline at end of file diff --git a/src/ic/ic/pub/afterEvents/adjustCommonBodyAfterEvents.js b/src/ic/ic/pub/afterEvents/adjustCommonBodyAfterEvents.js index d0484896..7f122769 100644 --- a/src/ic/ic/pub/afterEvents/adjustCommonBodyAfterEvents.js +++ b/src/ic/ic/pub/afterEvents/adjustCommonBodyAfterEvents.js @@ -1,4 +1,3 @@ -/*+qNzC8BhERHWYnJYS1BAY+30KhnKRJWLIqCc4Sxf9w7dCBUP6Y/Bassq/zVeq7Yk*/ /* * @Author: yinliang * @PageInfo: 库存调整单据,数量、主数量、单价、金额等只会导致单行变化的公共编辑后事件 @@ -89,5 +88,3 @@ function getUpdateRows(index, rows) { return [ { index: index, data: rows[0] } ]; } } - -/*+qNzC8BhERHWYnJYS1BAY+30KhnKRJWLIqCc4Sxf9w7dCBUP6Y/Bassq/zVeq7Yk*/ \ No newline at end of file diff --git a/src/ic/ic/pub/afterEvents/castunitidAfterEvent.js b/src/ic/ic/pub/afterEvents/castunitidAfterEvent.js index febab74a..f586a096 100644 --- a/src/ic/ic/pub/afterEvents/castunitidAfterEvent.js +++ b/src/ic/ic/pub/afterEvents/castunitidAfterEvent.js @@ -1,4 +1,3 @@ -/*xWyFPW5coWP2PlRk1hOCNoIiv3xnLWMMFwnl4jy8kbA=*/ import { ajax, base, toast } from 'nc-lightapp-front'; import { locationUtil } from '../../pub/utils'; import { updateFeeDetail } from '../../purchasein/card/afterEvents/bodyAfterEvent'; @@ -49,5 +48,3 @@ export default function afterEvent(props, moduleId, key, changedrows, index, con } }); } - -/*xWyFPW5coWP2PlRk1hOCNoIiv3xnLWMMFwnl4jy8kbA=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/afterEvents/clocationidQueryAfterEvent.js b/src/ic/ic/pub/afterEvents/clocationidQueryAfterEvent.js index 03b6f81d..843d7c9e 100644 --- a/src/ic/ic/pub/afterEvents/clocationidQueryAfterEvent.js +++ b/src/ic/ic/pub/afterEvents/clocationidQueryAfterEvent.js @@ -1,4 +1,3 @@ -/*wBi03ug+JB0SCAC2h37b4vPJV+Wn4pMOz3NVJN/3Gb4aYrQNOPxPQfPZLG3Z9IQn*/ import { ajax, toast } from 'nc-lightapp-front'; /** * @@ -33,5 +32,4 @@ function clocationidQueryAfterEvent(newValue,currentIndex) { }); } -export { clocationidQueryAfterEvent}; -/*wBi03ug+JB0SCAC2h37b4vPJV+Wn4pMOz3NVJN/3Gb4aYrQNOPxPQfPZLG3Z9IQn*/ \ No newline at end of file +export { clocationidQueryAfterEvent}; \ No newline at end of file diff --git a/src/ic/ic/pub/afterEvents/commonBodyEvent.js b/src/ic/ic/pub/afterEvents/commonBodyEvent.js index 85341fae..bfd76b0e 100644 --- a/src/ic/ic/pub/afterEvents/commonBodyEvent.js +++ b/src/ic/ic/pub/afterEvents/commonBodyEvent.js @@ -1,4 +1,3 @@ -/*8qmVI9P5f8WKM9EVOYlAs2qj1QzBa0Cxjc5Ubtod4IA=*/ /* * @Author: raoczh * @PageInfo: 通用表体编辑后事件功能(提供成功后回调函数) @@ -150,5 +149,3 @@ function getUpdateRows(index, rows) { return [ { index: index, data: rows[0] } ]; } } - -/*8qmVI9P5f8WKM9EVOYlAs2qj1QzBa0Cxjc5Ubtod4IA=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/afterEvents/commonHeadEvent.js b/src/ic/ic/pub/afterEvents/commonHeadEvent.js index 74024fcd..67fdc6c1 100644 --- a/src/ic/ic/pub/afterEvents/commonHeadEvent.js +++ b/src/ic/ic/pub/afterEvents/commonHeadEvent.js @@ -1,4 +1,3 @@ -/*DXsN6NBKcdw209OlGknNibXuiAC6mM2aIDUGVAxXYdE=*/ /* * @Author: raoczh * @PageInfo: 通用表头编辑后事件功能 @@ -98,5 +97,3 @@ export default function afterEvent( }); } } - -/*DXsN6NBKcdw209OlGknNibXuiAC6mM2aIDUGVAxXYdE=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/afterEvents/index.js b/src/ic/ic/pub/afterEvents/index.js index c7d6492d..43af9cc1 100644 --- a/src/ic/ic/pub/afterEvents/index.js +++ b/src/ic/ic/pub/afterEvents/index.js @@ -1,4 +1,3 @@ -/*8CdHYS+a9Q2smogIeoYriEP5x7vzqBeEXoSMjia1I4E=*/ import orgAfterEvent from './orgAfterEvent'; import materialAfterEvent from './materialAfterEvent'; import commonBodyEvent from './commonBodyEvent'; @@ -19,5 +18,3 @@ export { adjustCommonBodyAfterEvents, adjust4LAnd4MBodyAfterEvents }; - -/*8CdHYS+a9Q2smogIeoYriEP5x7vzqBeEXoSMjia1I4E=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/afterEvents/materialAfterEvent.js b/src/ic/ic/pub/afterEvents/materialAfterEvent.js index 607dd5e3..90c87c3d 100644 --- a/src/ic/ic/pub/afterEvents/materialAfterEvent.js +++ b/src/ic/ic/pub/afterEvents/materialAfterEvent.js @@ -1,4 +1,3 @@ -/*4SrEs5VVpsI6N9do6I+3UFJprTEJMfIPGJxrZ168Jt8=*/ /* * @Author: raoczh * @PageInfo: 物料编辑后事件 @@ -231,5 +230,3 @@ export default function afterEvent(props, moduleId, key, changedrows, index, con }); } } - -/*4SrEs5VVpsI6N9do6I+3UFJprTEJMfIPGJxrZ168Jt8=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/afterEvents/orgAfterEvent.js b/src/ic/ic/pub/afterEvents/orgAfterEvent.js index d96a59aa..0629f4cb 100644 --- a/src/ic/ic/pub/afterEvents/orgAfterEvent.js +++ b/src/ic/ic/pub/afterEvents/orgAfterEvent.js @@ -1,4 +1,3 @@ -/*50WLnzGeq39Tfv85RWLaWbCisqQm+aXAH5k2ejpw428=*/ /* * @Author: raoczh * @PageInfo: 主组织编辑后事件功能 @@ -180,5 +179,3 @@ const changeOrg = function (props, moduleId, key, value, constance, callback, .. } } }; - -/*50WLnzGeq39Tfv85RWLaWbCisqQm+aXAH5k2ejpw428=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/afterEvents/serialcodeBodyAfterEvent.js b/src/ic/ic/pub/afterEvents/serialcodeBodyAfterEvent.js index 839f70a7..c4cc8ccd 100644 --- a/src/ic/ic/pub/afterEvents/serialcodeBodyAfterEvent.js +++ b/src/ic/ic/pub/afterEvents/serialcodeBodyAfterEvent.js @@ -1,4 +1,3 @@ -/*xx+NJ0Env0EIX9ukWkHgyW98ijYQ96Tew79BNRZH/Wb61dfJnJ5TL6lW0q+rOd/e*/ /* * @Author: zhengxinm * @PageInfo: 页面功能描述 @@ -142,5 +141,3 @@ export default function afterEvent(props, moduleId, value, changedrows, index, r // callback: afterEvent //请求成功的回调(业务组自己的编辑后事件) // }); } - -/*xx+NJ0Env0EIX9ukWkHgyW98ijYQ96Tew79BNRZH/Wb61dfJnJ5TL6lW0q+rOd/e*/ \ No newline at end of file diff --git a/src/ic/ic/pub/batchEvents/index.js b/src/ic/ic/pub/batchEvents/index.js index e5f7143b..1332a7ee 100644 --- a/src/ic/ic/pub/batchEvents/index.js +++ b/src/ic/ic/pub/batchEvents/index.js @@ -1,6 +1,3 @@ -/*8CdHYS+a9Q2smogIeoYriEP5x7vzqBeEXoSMjia1I4E=*/ import pubBatchEvents from './pubBatchEvents'; export { pubBatchEvents }; - -/*8CdHYS+a9Q2smogIeoYriEP5x7vzqBeEXoSMjia1I4E=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/batchEvents/pubBatchEvents.js b/src/ic/ic/pub/batchEvents/pubBatchEvents.js index 7d9c07ce..a6833c08 100644 --- a/src/ic/ic/pub/batchEvents/pubBatchEvents.js +++ b/src/ic/ic/pub/batchEvents/pubBatchEvents.js @@ -1,4 +1,3 @@ -/*LAz++BtTYn4fNSKmfT2TYKaXAaP8RSoOaBxQxocvquk=*/ /* * @Author: zhengxinm * @PageInfo: 表体编辑后事件 批量 @@ -744,5 +743,3 @@ function bodyAfterEdit(res, areaCode, attrcode, constance, callFun) { } }); } - -/*LAz++BtTYn4fNSKmfT2TYKaXAaP8RSoOaBxQxocvquk=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/beforeEvents/batchcodeMultiBeforeEdit.js b/src/ic/ic/pub/beforeEvents/batchcodeMultiBeforeEdit.js index 60447685..2be172e7 100644 --- a/src/ic/ic/pub/beforeEvents/batchcodeMultiBeforeEdit.js +++ b/src/ic/ic/pub/beforeEvents/batchcodeMultiBeforeEdit.js @@ -1,4 +1,3 @@ -/*/X0hEifPZfQqQw9tLsMEmBXxWfZ9mKX4md4i1rMiFWfIE6I0M3fkVn/mFRR0aE2/*/ import { ajax, toast } from 'nc-lightapp-front'; /** * @@ -46,5 +45,3 @@ function batchcodeMultiBeforeEdit(index, pk_org, cmaterialvid, data) { export { batchcodeMultiBeforeEdit}; - -/*/X0hEifPZfQqQw9tLsMEmBXxWfZ9mKX4md4i1rMiFWfIE6I0M3fkVn/mFRR0aE2/*/ \ No newline at end of file diff --git a/src/ic/ic/pub/beforeEvents/cstateidBeforeEvent.js b/src/ic/ic/pub/beforeEvents/cstateidBeforeEvent.js index 1d1d28ee..1b518cb5 100644 --- a/src/ic/ic/pub/beforeEvents/cstateidBeforeEvent.js +++ b/src/ic/ic/pub/beforeEvents/cstateidBeforeEvent.js @@ -1,4 +1,3 @@ -/*OPdKo1ixwIpSxwd8Nf0fjych4LcXRNJNAM14x3uwfcg=*/ /** * 库存状态编辑前处理,需要物料的固定辅助属性库存状态启用 * 这类方法必须有返回值,返回true为可编辑,false为不可编辑 @@ -46,5 +45,3 @@ export default function(props, constance) { } }); } - -/*OPdKo1ixwIpSxwd8Nf0fjych4LcXRNJNAM14x3uwfcg=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/beforeEvents/cstateidMiltiBeforeEvent.js b/src/ic/ic/pub/beforeEvents/cstateidMiltiBeforeEvent.js index 04fd0c09..ef7d16ff 100644 --- a/src/ic/ic/pub/beforeEvents/cstateidMiltiBeforeEvent.js +++ b/src/ic/ic/pub/beforeEvents/cstateidMiltiBeforeEvent.js @@ -1,4 +1,3 @@ -/*//T2pnv+zhyRaUMoO08P5igQRllhICswVvEUQckq62929jgCkOxZVy5gf3byyCBq*/ import { ajax, toast } from 'nc-lightapp-front'; /** * @@ -45,5 +44,3 @@ function cstateidMiltiBeforeEvent(index, pk_org, cmaterialvid, data) { export { cstateidMiltiBeforeEvent}; - -/*//T2pnv+zhyRaUMoO08P5igQRllhICswVvEUQckq62929jgCkOxZVy5gf3byyCBq*/ \ No newline at end of file diff --git a/src/ic/ic/pub/beforeEvents/cwarhouseidBeforeEvent.js b/src/ic/ic/pub/beforeEvents/cwarhouseidBeforeEvent.js index 02f4a42b..3977a11a 100644 --- a/src/ic/ic/pub/beforeEvents/cwarhouseidBeforeEvent.js +++ b/src/ic/ic/pub/beforeEvents/cwarhouseidBeforeEvent.js @@ -1,4 +1,3 @@ -/*YHHaNIF/RZ2idEJC+q3i310N4gtBN6Zlk3MoSywdCXdOyC6KhSW93/7sAGmjV/Lf*/ /** * 暂时只判断仓库是否是直运采购 */ @@ -53,5 +52,3 @@ export default function(props, constance) { } }); } - -/*YHHaNIF/RZ2idEJC+q3i310N4gtBN6Zlk3MoSywdCXdOyC6KhSW93/7sAGmjV/Lf*/ \ No newline at end of file diff --git a/src/ic/ic/pub/beforeEvents/dproducedateBeforeEvent.js b/src/ic/ic/pub/beforeEvents/dproducedateBeforeEvent.js index 554f03dd..cd1a6122 100644 --- a/src/ic/ic/pub/beforeEvents/dproducedateBeforeEvent.js +++ b/src/ic/ic/pub/beforeEvents/dproducedateBeforeEvent.js @@ -1,4 +1,3 @@ -/*QJ0MxOiSS+uFpuqFtUGLlDPMtYCENMeBKSl07I0cVAN2ZZJRB15uhXb7cq4kbuyH*/ /* * @Author: 李浩 * @PageInfo: 生效日期编辑前 @@ -48,5 +47,3 @@ export default function (props, key, pk_org, cmaterialvid) { } }); } - -/*QJ0MxOiSS+uFpuqFtUGLlDPMtYCENMeBKSl07I0cVAN2ZZJRB15uhXb7cq4kbuyH*/ \ No newline at end of file diff --git a/src/ic/ic/pub/beforeEvents/hslBeforeEvent.js b/src/ic/ic/pub/beforeEvents/hslBeforeEvent.js index 90e8ba84..93e9a1ed 100644 --- a/src/ic/ic/pub/beforeEvents/hslBeforeEvent.js +++ b/src/ic/ic/pub/beforeEvents/hslBeforeEvent.js @@ -1,4 +1,3 @@ -/*OTa4jH+s+Xy1bcd9ZPZMCesuRQlXYmpWPLzyZGi48nM=*/ /** * 换算率编辑前处理,只适用于cardtable * 这类方法必须有返回值,返回true为可编辑,false为不可编辑 @@ -79,5 +78,3 @@ export default function(props, constance) { } }); } - -/*OTa4jH+s+Xy1bcd9ZPZMCesuRQlXYmpWPLzyZGi48nM=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/beforeEvents/hslMultiBeforeEvent.js b/src/ic/ic/pub/beforeEvents/hslMultiBeforeEvent.js index 708f14e7..18442972 100644 --- a/src/ic/ic/pub/beforeEvents/hslMultiBeforeEvent.js +++ b/src/ic/ic/pub/beforeEvents/hslMultiBeforeEvent.js @@ -1,4 +1,3 @@ -/*w9yDONqr21hXJLv7cY6LkK3INZAemK/72SH9H+KkU2M=*/ import { ajax } from 'nc-lightapp-front'; /** * @@ -46,5 +45,4 @@ function hslMultiBeforeEvent(index, pk_org, cmaterialvid,cuntid,castunid,ccorres } } -export { hslMultiBeforeEvent}; -/*w9yDONqr21hXJLv7cY6LkK3INZAemK/72SH9H+KkU2M=*/ \ No newline at end of file +export { hslMultiBeforeEvent}; \ No newline at end of file diff --git a/src/ic/ic/pub/beforeEvents/index.js b/src/ic/ic/pub/beforeEvents/index.js index f60e6732..173f1381 100644 --- a/src/ic/ic/pub/beforeEvents/index.js +++ b/src/ic/ic/pub/beforeEvents/index.js @@ -1,4 +1,3 @@ -/*8CdHYS+a9Q2smogIeoYriEP5x7vzqBeEXoSMjia1I4E=*/ import cstateidBeforeEvent from './cstateidBeforeEvent'; import vbatchcodeBeforeEvent from './vbatchcodeBeforeEvent'; import vfreeBeforeEvent from './vfreeBeforeEvent'; @@ -19,5 +18,3 @@ export { locationBeforeEvent, serialcodeBodyBeforeEvent }; - -/*8CdHYS+a9Q2smogIeoYriEP5x7vzqBeEXoSMjia1I4E=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/beforeEvents/locationBeforeEvent.js b/src/ic/ic/pub/beforeEvents/locationBeforeEvent.js index f90adde4..e9b568db 100644 --- a/src/ic/ic/pub/beforeEvents/locationBeforeEvent.js +++ b/src/ic/ic/pub/beforeEvents/locationBeforeEvent.js @@ -1,4 +1,3 @@ -/*3irMiIv9m7p/8mmQh7YExcMuBfJy4YFkiPMUyfpD5s4=*/ /** * 库存状态编辑前处理,需要物料的固定辅助属性库存状态启用 * 这类方法必须有返回值,返回true为可编辑,false为不可编辑 @@ -37,5 +36,3 @@ export default function(props, params, key) { }); }); } - -/*3irMiIv9m7p/8mmQh7YExcMuBfJy4YFkiPMUyfpD5s4=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/beforeEvents/serialcodeBodyBeforeEvent.js b/src/ic/ic/pub/beforeEvents/serialcodeBodyBeforeEvent.js index f9446da9..472781a9 100644 --- a/src/ic/ic/pub/beforeEvents/serialcodeBodyBeforeEvent.js +++ b/src/ic/ic/pub/beforeEvents/serialcodeBodyBeforeEvent.js @@ -1,4 +1,3 @@ -/*O91RlCur1cKC1PywqjsYAHAsfFxZCu3HHbpFC+rSUVnaxqxXwH1b8KUcywPTTfLD*/ /* * @Author: 李浩 * @PageInfo: 序列号编辑控制 @@ -73,5 +72,3 @@ export default async function (props, moduleId, index, record, headarea) { } } } - -/*O91RlCur1cKC1PywqjsYAHAsfFxZCu3HHbpFC+rSUVnaxqxXwH1b8KUcywPTTfLD*/ \ No newline at end of file diff --git a/src/ic/ic/pub/beforeEvents/vbatchcodeBeforeEvent.js b/src/ic/ic/pub/beforeEvents/vbatchcodeBeforeEvent.js index e8960dce..dde9b5d3 100644 --- a/src/ic/ic/pub/beforeEvents/vbatchcodeBeforeEvent.js +++ b/src/ic/ic/pub/beforeEvents/vbatchcodeBeforeEvent.js @@ -1,4 +1,3 @@ -/*2QSFMHzFNRTkiDh+kC5tFxkSofKBH3TJ+SCyzBYNNgRCJ4wvGDJbiMnNxSvrrBSG*/ import { ajax, toast } from 'nc-lightapp-front'; /** * @@ -68,5 +67,3 @@ export default function (props, constance, record) { }); }); } - -/*2QSFMHzFNRTkiDh+kC5tFxkSofKBH3TJ+SCyzBYNNgRCJ4wvGDJbiMnNxSvrrBSG*/ \ No newline at end of file diff --git a/src/ic/ic/pub/beforeEvents/vbillcodeBeforeEvent.js b/src/ic/ic/pub/beforeEvents/vbillcodeBeforeEvent.js index 7dbebc2f..b8035171 100644 --- a/src/ic/ic/pub/beforeEvents/vbillcodeBeforeEvent.js +++ b/src/ic/ic/pub/beforeEvents/vbillcodeBeforeEvent.js @@ -1,4 +1,3 @@ -/*rV0bQibesG0UGdyoLFMSM3+sPuNKyFsqfWAJfuqNZ4k=*/ /** * 库存状态编辑前处理,需要物料的固定辅助属性库存状态启用 * 这类方法必须有返回值,返回true为可编辑,false为不可编辑 @@ -47,5 +46,3 @@ export default function (props, constance) { } }); } - -/*rV0bQibesG0UGdyoLFMSM3+sPuNKyFsqfWAJfuqNZ4k=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/beforeEvents/vfreeBeforeEvent.js b/src/ic/ic/pub/beforeEvents/vfreeBeforeEvent.js index 6463d4fe..b3037e94 100644 --- a/src/ic/ic/pub/beforeEvents/vfreeBeforeEvent.js +++ b/src/ic/ic/pub/beforeEvents/vfreeBeforeEvent.js @@ -1,4 +1,3 @@ -/*VN6N61ClU/zPuqLSyAXrv8u+w2MHKRRnUQpWLWei33I=*/ /** * 物料自由辅助属性编辑前处理,需要物料的固定辅助属性库存状态启用 * 这类方法必须有返回值,返回true为可编辑,false为不可编辑 @@ -57,5 +56,3 @@ export default function(props, constance) { } }); } - -/*VN6N61ClU/zPuqLSyAXrv8u+w2MHKRRnUQpWLWei33I=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/addBtnClick.js b/src/ic/ic/pub/btnClicks/addBtnClick.js index 127609df..180f01fa 100644 --- a/src/ic/ic/pub/btnClicks/addBtnClick.js +++ b/src/ic/ic/pub/btnClicks/addBtnClick.js @@ -1,4 +1,3 @@ -/*QwCcdu/06Kz5BGRJW8BXmLtsb+2grawkWZtrnedNMfA=*/ import { ajax } from 'nc-lightapp-front'; export default function addBtnClick(props, constance) { props.pushTo('/card', { @@ -9,5 +8,3 @@ export default function addBtnClick(props, constance) { // status: 'edit' // }); } - -/*QwCcdu/06Kz5BGRJW8BXmLtsb+2grawkWZtrnedNMfA=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/approveInfoBtnClick.js b/src/ic/ic/pub/btnClicks/approveInfoBtnClick.js index 32c1b815..b5fb6114 100644 --- a/src/ic/ic/pub/btnClicks/approveInfoBtnClick.js +++ b/src/ic/ic/pub/btnClicks/approveInfoBtnClick.js @@ -1,4 +1,3 @@ -/*7SDMIgexLY9TFEYuO69iBrPYs0O9JerGMRgAZ2k3sUo=*/ /* * @Author: maopch * @PageInfo: 列表页面审批详情点击事件 @@ -22,5 +21,3 @@ export default function(record, hidcode, vbilltypecode, billtypeCode = 'vtrantyp let hid = record[hidcode].value; this.setState({ billtype, showApprove: true, hid }); } - -/*7SDMIgexLY9TFEYuO69iBrPYs0O9JerGMRgAZ2k3sUo=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/barCodePrintBtnClick.js b/src/ic/ic/pub/btnClicks/barCodePrintBtnClick.js index 132f3d93..d94f4138 100644 --- a/src/ic/ic/pub/btnClicks/barCodePrintBtnClick.js +++ b/src/ic/ic/pub/btnClicks/barCodePrintBtnClick.js @@ -1,4 +1,3 @@ -/*a6tRBI3RAFEYxGMChuDg5RgpfzMrDD5bJzXQDDXFFYM=*/ import { print } from 'nc-lightapp-front'; import codeNfig from 'uap/common/components/codeConfigModal'; import { showErrorInfo } from '../../../../scmpub/scmpub/pub/tool/messageUtil'; @@ -48,5 +47,3 @@ export default function(props, params) { false ); } - -/*a6tRBI3RAFEYxGMChuDg5RgpfzMrDD5bJzXQDDXFFYM=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/borrowoutInfBtnClick.js b/src/ic/ic/pub/btnClicks/borrowoutInfBtnClick.js new file mode 100644 index 00000000..cc5502df --- /dev/null +++ b/src/ic/ic/pub/btnClicks/borrowoutInfBtnClick.js @@ -0,0 +1,124 @@ +import { ajax } from 'nc-lightapp-front'; +import { showErrorInfo, showSuccessInfo } from '../../../../scmpub/scmpub/pub/tool/messageUtil'; +import { getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil'; +import { processBillBeforeAfterEvent } from '../utils'; +/* +* @Author: fangmj7 +* @PageInfo: 取借出信息按钮点击事件 +* @Date: 2018-05-10 15:29:46 + * @Last Modified by: yangtaow + * @Last Modified time: 2023-05-27 16:51:24 +*/ + +export default function(props, constance, record) { + const { FIELD, PAGECODE, URL, ATTRCODE, SUBCHILD, appcode, pagecodecard, pagecodechi, AREA } = constance; + let seletedrows = props.cardTable.getCheckedRows(AREA.bodyTable); + let indexs = []; + let visibleRows = props.cardTable.getAllRows(AREA.bodyTable); + let index = 0; + if (record) { + for (let j = 0; j < visibleRows.length; j++) { + if (visibleRows[j].rowid == record.rowid) { + indexs.push(index); + } + index++; + } + } else { + for (let k = 0; k < seletedrows.length; k++) { + indexs.push(seletedrows[k].index); + } + } + + let pk_org = props.form.getFormItemsValue(AREA.formArea, 'pk_org'); + if (!pk_org && !pk_org.value) { + showErrorInfo(null, getLangByResId(this, '4008PUB-000018')); /* 国际化处理: 库粗组织为空*/ + + return; + } + let cwarehouseid = props.form.getFormItemsValue(AREA.formArea, FIELD.cwarehouseid); + if (!cwarehouseid || !cwarehouseid.value || cwarehouseid.value == '') { + showErrorInfo(null, getLangByResId(this, '4008PUB-000019')); /* 国际化处理: 仓库为空*/ + + return false; + } + //传给后台的行数据数组 + let rows = []; + if (record) { + let data = { + record + }; + if (!record.values.cmaterialvid.value) { + showErrorInfo(null, getLangByResId(this, '4008PUB-000020')); /* 国际化处理: 表体物料行为空*/ + return false; + } + rows.push(record); + } else { + //获取选中的行,不包括删除行 + let selectedrows = props.cardTable.getCheckedRows(AREA.bodyTable); + if (!selectedrows && selectedrows.length == 0) { + showErrorInfo(null, getLangByResId(this, '4008PUB-000020')); /* 国际化处理: 表体物料行为空*/ + return false; + } + selectedrows.map((item) => { + if (item.data.values.cmaterialvid.value) { + rows.push(item); + } + }); + } + //先触发应收/发主数量的编辑后 + let data = props.createBodyAfterEventData('400800836_card', 'head', 'body', 'body', 'nnum', [ + { oldvalue: { value: '' }, newvalue: { value: 1 } } + ]); + data.index = -1; + let lastrows = []; + if (record) { + lastrows.push(rows[0]); + } else { + for (let i = 0; i < rows.length; i++) { + lastrows.push(rows[i].data); + } + } + + data.card.body['body'].rows = lastrows; + + processBillBeforeAfterEvent(data, 'head', 'body'); + let updateArray = []; + if (!data || data.card.body['body'].rows.length < 1) { + showErrorInfo('', getLangByResId(this, '4008RETURNIN-000022')); /* 国际化处理: 请先选择数据*/ + return; + } + ajax({ + url: URL.getBorrowoutInformationURL, + mode: 'normal', + data: data, + success: (res) => { + if (res.data && res.data.error && res.data.error.message) { + if (res.data.error.message == '04008011-0043') { + showErrorInfo('', getLangByResId(this, '4008RETURNIN-000021')); /* 国际化处理: 表头仓库与表体货位不一致*/ + } else { + showErrorInfo(res.data.error.message); + } + } else if (res.data.data) { + let rows = res.data.data.billCard.body['body'].rows; + for (let i = 0; i < rows.length; i++) { + let obj = { index: indexs[i], data: rows[i] }; + // if (obj.data.values.clocationid.value) { + //let nnum = obj.data.values.nnum.value; + //for (let j = 0; j < nnum; j++) { + // let lo = locationUtil.clocationidAfterEvent(rows[i]); + // props.cardTable.updateDataByIndexs('body', [ { index: index, data: lo } ]); + //} + // } + + updateArray.push(obj); + } + //更新数据 + props.cardTable.updateDataByIndexs('body', updateArray); + + showSuccessInfo(getLangByResId(this, '4008RETURNIN-000023')); /* 国际化处理: 处理成功!*/ + } + } + }); + + this.setState(this.state); +} diff --git a/src/ic/ic/pub/btnClicks/cardAddBtnClick.js b/src/ic/ic/pub/btnClicks/cardAddBtnClick.js new file mode 100644 index 00000000..7d266866 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/cardAddBtnClick.js @@ -0,0 +1,12 @@ +import { ajax } from 'nc-lightapp-front'; +export default function cardAddBtnClick(props, constance) { + const { cardURL, AREA } = constance; + props.pushTo('/card', { + status: 'edit', + id: '' + }); + + props.form.EmptyAllFormValue(AREA.formArea); + props.cardTable.setTableData(AREA.bodyTable, []); + this.toggleShow(); +} diff --git a/src/ic/ic/pub/btnClicks/combinePrintInOrOutBtnClick.js b/src/ic/ic/pub/btnClicks/combinePrintInOrOutBtnClick.js index d31d372d..6ad98357 100644 --- a/src/ic/ic/pub/btnClicks/combinePrintInOrOutBtnClick.js +++ b/src/ic/ic/pub/btnClicks/combinePrintInOrOutBtnClick.js @@ -1,4 +1,3 @@ -/*cz2SA5FACCMgP10cWLuQJYluQi812iqkLx8sPBuGVz5YJyYPRihS7VdqhH5zrnL+*/ /* * @Author: yinliang * @PageInfo: 出库入库合并显示 @@ -185,5 +184,3 @@ function getNumColumnAll(props, right, constance) { }); return numColumnAll; } - -/*cz2SA5FACCMgP10cWLuQJYluQi812iqkLx8sPBuGVz5YJyYPRihS7VdqhH5zrnL+*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/config.json b/src/ic/ic/pub/btnClicks/config.json new file mode 100644 index 00000000..22cea217 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/config.json @@ -0,0 +1,4 @@ +{ + "dependModuleName": [ "uap/common/components/codeConfigModal" ], + "dependjs": [ "../../../../uap/common/components/codeConfigModal/index.js" ] +} diff --git a/src/ic/ic/pub/btnClicks/copyBtnClick.js b/src/ic/ic/pub/btnClicks/copyBtnClick.js index 350a5e98..b2c70d9e 100644 --- a/src/ic/ic/pub/btnClicks/copyBtnClick.js +++ b/src/ic/ic/pub/btnClicks/copyBtnClick.js @@ -1,4 +1,3 @@ -/*j5Rddi+EiXr6lL+2HQtAzXKAs5uNyAYqlXB5AoVEuY0=*/ /* * @Author: hujieh * @PageInfo: 复制 @@ -25,5 +24,3 @@ export default function copyBtnClick(props, copyURL, PAGECARDCODE, id, constance } }); } - -/*j5Rddi+EiXr6lL+2HQtAzXKAs5uNyAYqlXB5AoVEuY0=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/delBtnClick.js b/src/ic/ic/pub/btnClicks/delBtnClick.js index ec291ea4..6aa7c9b1 100644 --- a/src/ic/ic/pub/btnClicks/delBtnClick.js +++ b/src/ic/ic/pub/btnClicks/delBtnClick.js @@ -1,4 +1,3 @@ -/*cxqDO8Y5zn4jjifkgQKk7lUgqBs5bprWAMQTAgABgc0=*/ /* * @Author: 李浩 * @PageInfo:按钮处理方法 @@ -165,5 +164,3 @@ function besureBtn(props, constance, text, dex, skipCodes) { } }); } - -/*cxqDO8Y5zn4jjifkgQKk7lUgqBs5bprWAMQTAgABgc0=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/editBtnClick.js b/src/ic/ic/pub/btnClicks/editBtnClick.js index 61d8c69c..5e7aff4b 100644 --- a/src/ic/ic/pub/btnClicks/editBtnClick.js +++ b/src/ic/ic/pub/btnClicks/editBtnClick.js @@ -1,4 +1,3 @@ -/*rzxqFeC1Q4Nf7h12KpqtZa+HKlhJRSPfpVA5T06lSbc=*/ import { ajax, cacheTools } from 'nc-lightapp-front'; export default function editBtnClick(props, constance, record) { const { cardURL, tabCodeKey, URL } = constance; @@ -28,5 +27,3 @@ export default function editBtnClick(props, constance, record) { }); } } - -/*rzxqFeC1Q4Nf7h12KpqtZa+HKlhJRSPfpVA5T06lSbc=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/exportSerialBtnClick.js b/src/ic/ic/pub/btnClicks/exportSerialBtnClick.js index 4736d716..c65d0dc4 100644 --- a/src/ic/ic/pub/btnClicks/exportSerialBtnClick.js +++ b/src/ic/ic/pub/btnClicks/exportSerialBtnClick.js @@ -1,4 +1,3 @@ -/*HZP0dfblajL4ikDSlpQ1bzHq+LuD35APDsWA9oXzeBs=*/ import { formDownload } from 'nc-lightapp-front'; export default function() { formDownload({ @@ -7,5 +6,3 @@ export default function() { enctype: 1 }); } - -/*HZP0dfblajL4ikDSlpQ1bzHq+LuD35APDsWA9oXzeBs=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/fileBatchDownLoadBtnClick.js b/src/ic/ic/pub/btnClicks/fileBatchDownLoadBtnClick.js index c12e6c5d..ff197410 100644 --- a/src/ic/ic/pub/btnClicks/fileBatchDownLoadBtnClick.js +++ b/src/ic/ic/pub/btnClicks/fileBatchDownLoadBtnClick.js @@ -1,4 +1,3 @@ -/*QcLSJcLBIfi1P6u/kyYYQlMbyShXTMTSbG4AgjJskfQG8PkDjzL3pYaMFvIx6t5R*/ /* * @Author: yangtaow * @PageInfo: 附件批量下载 @@ -43,5 +42,3 @@ export default function(props, tableArea, billType, hIdType) { }; batchDownloadAttachments(params, additionParams); } - -/*QcLSJcLBIfi1P6u/kyYYQlMbyShXTMTSbG4AgjJskfQG8PkDjzL3pYaMFvIx6t5R*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/fileMngBtnClick.js b/src/ic/ic/pub/btnClicks/fileMngBtnClick.js index 568b7c23..ad58f662 100644 --- a/src/ic/ic/pub/btnClicks/fileMngBtnClick.js +++ b/src/ic/ic/pub/btnClicks/fileMngBtnClick.js @@ -1,4 +1,3 @@ -/*UC3KFNsdJ4jV41rtqOOrw6DBCG3S9aDmZSukqcE475Q=*/ /* * @Author: raoczh * @PageInfo: 附件管理 @@ -30,5 +29,3 @@ export default function(props, constance) { pk: pk }); } - -/*UC3KFNsdJ4jV41rtqOOrw6DBCG3S9aDmZSukqcE475Q=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/importBtnClick.js b/src/ic/ic/pub/btnClicks/importBtnClick.js index c8972d86..dc94f76f 100644 --- a/src/ic/ic/pub/btnClicks/importBtnClick.js +++ b/src/ic/ic/pub/btnClicks/importBtnClick.js @@ -1,4 +1,3 @@ -/*M/R6A8jbfu8m8vUGf6G+3/FQfgooAUYvk94Ce4nY0aU=*/ /* * @Author: 李浩 * @PageInfo: 导入按钮 @@ -10,5 +9,3 @@ export default function importBtnClick(props, constance, billtype) { props.modal.show('exportFileModal'); } - -/*M/R6A8jbfu8m8vUGf6G+3/FQfgooAUYvk94Ce4nY0aU=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/index.js b/src/ic/ic/pub/btnClicks/index.js index 14eaddb0..2b7a0819 100644 --- a/src/ic/ic/pub/btnClicks/index.js +++ b/src/ic/ic/pub/btnClicks/index.js @@ -1,4 +1,3 @@ -/*YInZLc9/kvMC1mGq3o4LwAszAXwVlsNyvp/9X8WPLW8=*/ import searchBtnClick from './searchBtnClick'; import refreshBtnClick from './refreshBtnClick'; import addBtnClick from './addBtnClick'; @@ -45,5 +44,3 @@ export { barCodePrintBtnClick, printbarCodeBtnClick }; - -/*YInZLc9/kvMC1mGq3o4LwAszAXwVlsNyvp/9X8WPLW8=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/addRowBtnClick.js b/src/ic/ic/pub/btnClicks/invadjustcard/addRowBtnClick.js new file mode 100644 index 00000000..c7898ad0 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/addRowBtnClick.js @@ -0,0 +1,13 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整单,卡片页面,表体增行按钮 + * @Date: 2018-04-02 16:11:22 + * @Last Modified by: yinliang + * @Last Modified time: 2018-12-14 10:07:28 + */ +import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools'; +export default function(props, constance) { + let { AREA, FIELD } = constance; + props.cardTable.addRow(AREA.body); + RownoUtils.setRowNo(props, AREA.body, FIELD.crowno); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/approveInfo.js b/src/ic/ic/pub/btnClicks/invadjustcard/approveInfo.js new file mode 100644 index 00000000..f102baf8 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/approveInfo.js @@ -0,0 +1,22 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,卡片页面,审批详情按钮 + * @Date: 2018-07-20 13:58:42 + * @Last Modified by: yinliang + * @Last Modified time: 2019-04-13 16:38:09 + */ +export default function(props, constance) { + let { AREA, FIELD } = constance; + let pk = ''; + if (FIELD.cspecialhid) { + pk = props.form.getFormItemsValue(AREA.head, FIELD.cspecialhid).value; + } else if (FIELD.cgeneralhid) { + pk = props.form.getFormItemsValue(AREA.head, FIELD.cgeneralhid).value; + } + let vtrantypecode = props.form.getFormItemsValue(AREA.head, FIELD.vtrantypecode).value; + this.setState({ + show: true, + billId: pk, + vtrantypecode: vtrantypecode + }); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/backBtnClick.js b/src/ic/ic/pub/btnClicks/invadjustcard/backBtnClick.js new file mode 100644 index 00000000..79a25718 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/backBtnClick.js @@ -0,0 +1,13 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,返回按钮 + * @Date: 2018-04-02 16:08:20 + * @Last Modified by: yinliang + * @Last Modified time: 2018-12-14 10:08:27 + */ +export default function(props, constance) { + let { URL, AREA, UISTATE } = constance; + props.cardTable.setStatus(AREA.body, UISTATE.browse); + props.form.setFormStatus(AREA.head, UISTATE.browse); + props.pushTo(URL.gotoList); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/buttonUtil.js b/src/ic/ic/pub/btnClicks/invadjustcard/buttonUtil.js new file mode 100644 index 00000000..59dfc9d7 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/buttonUtil.js @@ -0,0 +1,35 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,卡片页面,按钮工具类 + * @Date: 2018-12-21 16:22:41 + * @Last Modified by: yinliang + * @Last Modified time: 2018-12-21 16:43:00 + */ + +/** + * 控制修改按钮是为主次按钮逻辑 + * @param {*} props + * @param {*} billflag + * @param {*} constance + */ +export function setEditBtnStatus(props, billflag, constance) { + let { BUTTONID } = constance; + /** + * 设置按钮为主要按钮或次要按钮(T 主要/ F 次要) + * 当单据状态为审批不通过时,修改按钮为主要按钮 + * 当单据状态不是审批不通过时,不是主要按钮 + * 审批类型单据的候选项: + * ****************************************** + * dispaly-----value + * 自由-----1 + * 审批中-----2 + * 审批未通过-----3 + * 审批通过-----4 + * 删除-----5 + */ + if (billflag == '3') { + props.button.setMainButton(BUTTONID.Edit, true); + } else { + props.button.setMainButton(BUTTONID.Edit, false); + } +} diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/cancelPasteBtnClick.js b/src/ic/ic/pub/btnClicks/invadjustcard/cancelPasteBtnClick.js new file mode 100644 index 00000000..2cdfff03 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/cancelPasteBtnClick.js @@ -0,0 +1,23 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,复制行取消按钮 + * @Date: 2018-04-02 16:11:22 + * @Last Modified by: yinliang + * @Last Modified time: 2018-12-21 10:19:41 + */ +import { rowCopyPasteUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/rowCopyPasteUtils'; +import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools'; +import setButtonUsability from './setButtonUsability'; +export default function(props, constance) { + let { COPYPASTEBTNS, DISABLEBTNS, AREA, FIELD, BUTTONID } = constance; + rowCopyPasteUtils.cancel.call( + this, + props, + AREA.body, + COPYPASTEBTNS.initBtns, + COPYPASTEBTNS.pasteBtns, + FIELD.crowno + ); + RownoUtils.setRowNo(props, AREA.body, FIELD.crowno); + setButtonUsability.call(this, this.props, { DISABLEBTNS, AREA, FIELD, BUTTONID }); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/copyBtnClick.js b/src/ic/ic/pub/btnClicks/invadjustcard/copyBtnClick.js new file mode 100644 index 00000000..aaedebf0 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/copyBtnClick.js @@ -0,0 +1,48 @@ +/* + * @Author: yinliang + * @PageInfo: 库存管理-库存调整,单据复制按钮 + * @Date: 2019-01-15 15:35:46 + * @Last Modified by: yinliang + * @Last Modified time: 2019-01-18 15:14:27 + */ +import { ajax } from 'nc-lightapp-front'; +export default function(props, id, constance, callback) { + let { AREA, FIELD, UISTATE, URL, PAGECODE, buttonController } = constance; + let data = { pageid: PAGECODE.card, pk: id }; + ajax({ + url: URL.copy, + data: data, + method: 'post', + success: (res) => { + // 效率优化添加,避免多次刷新state,导致刷多次页面,开关-开 + this.props.beforeUpdatePage(); + /** + * 设值 + */ + props.form.setAllFormValue({ [AREA.head]: res.data.billcard.head[AREA.head] }); + props.cardTable.setTableData(AREA.body, res.data.billcard.body[AREA.body]); + props.resMetaAfterPkorgEdit(); + this.billcode = ''; + this.status = UISTATE.add; + //更新路径中的状态和id + props.pushTo(URL.gotoCard, { + status: UISTATE.edit, + id: props.getUrlParam(FIELD.cardId), + copy: 'true' + }); + // 设值主组织为不可编辑 + props.form.setFormItemsDisabled(AREA.head, { pk_org_v: true }); + + // 执行回调函数,例如盘点需要设值一些列不可编辑 + if (typeof callback == 'function') { + callback.call(this, props); + } + + // 按钮控制 + buttonController.setButtonStatus.call(this, props, this.status); + buttonController.setRowButtonStatus.call(this, props); + // 效率优化添加,避免多次刷新state,导致刷多次页面,开关-关 + this.props.updatePage(AREA.head, AREA.body); + } + }); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/copyRowsBtnClick.js b/src/ic/ic/pub/btnClicks/invadjustcard/copyRowsBtnClick.js new file mode 100644 index 00000000..190c27d9 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/copyRowsBtnClick.js @@ -0,0 +1,18 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,复制行按钮 + * @Date: 2018-05-31 20:54:04 + * @Last Modified by: yinliang + * @Last Modified time: 2018-12-14 10:07:02 + */ +import { rowCopyPasteUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/rowCopyPasteUtils'; +export default function(props, record, index, constance) { + let { AREA, COPYPASTEBTNS } = constance; + if (index >= 0 && record) { + //行操作 + rowCopyPasteUtils.copyRow.call(this, props, AREA.body, record, COPYPASTEBTNS.initBtns, COPYPASTEBTNS.pasteBtns); + } else { + //批操作 + rowCopyPasteUtils.copyRows.call(this, props, AREA.body, COPYPASTEBTNS.initBtns, COPYPASTEBTNS.pasteBtns); + } +} diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/delRowBtnClick.js b/src/ic/ic/pub/btnClicks/invadjustcard/delRowBtnClick.js new file mode 100644 index 00000000..d34f3d01 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/delRowBtnClick.js @@ -0,0 +1,21 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,表体删行按钮 + * @Date: 2018-04-02 16:11:22 + * @Last Modified by: yinliang + * @Last Modified time: 2018-12-21 10:01:07 + */ +import setButtonUsability from './setButtonUsability'; +export default function(props, record, index, constance) { + let { DISABLEBTNS, AREA, FIELD, BUTTONID } = constance; + let rows = props.cardTable.getCheckedRows(AREA.body); + let rowIds = []; + rows.map((item, index) => { + rowIds.push(item.index); + }); + if (record) { + rowIds = index; + } + props.cardTable.delRowsByIndex(AREA.body, rowIds); + setButtonUsability.call(this, this.props, { DISABLEBTNS, AREA, FIELD, BUTTONID }); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/fileClick.js b/src/ic/ic/pub/btnClicks/invadjustcard/fileClick.js new file mode 100644 index 00000000..3dc684b0 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/fileClick.js @@ -0,0 +1,26 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,附件管理 + * @Date: 2018-06-25 10:17:12 + * @Last Modified by: yinliang + * @Last Modified time: 2019-02-13 16:49:06 + */ +export default function(props, constance) { + let { AREA, FIELD } = constance; + let pk = ''; + /** + * 废品处理,表头主键为cgeneralhid + * 盘点、转库、组装、拆卸、形态转换,表头主键为cspecialhid + */ + if (FIELD.cspecialhid) { + pk = props.form.getFormItemsValue(AREA.head, FIELD.cspecialhid).value; + } else if (FIELD.cgeneralhid) { + pk = props.form.getFormItemsValue(AREA.head, FIELD.cgeneralhid).value; + } + let fileFlag = this.state.showUploader; + this.setState({ + showUploader: !fileFlag, + pk: pk + // target: event.target + }); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/index.js b/src/ic/ic/pub/btnClicks/invadjustcard/index.js new file mode 100644 index 00000000..8d9fdba2 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/index.js @@ -0,0 +1,46 @@ +import addRowBtnClick from './addRowBtnClick'; +import approveInfo from './approveInfo'; +import backBtnClick from './backBtnClick'; +import cancelPasteBtnClick from './cancelPasteBtnClick'; +import copyRowsBtnClick from './copyRowsBtnClick'; +import delRowBtnClick from './delRowBtnClick'; +import fileClick from './fileClick'; +import insertRowBtnClick from './insertRowBtnClick'; +import linkQuery from './linkQuery'; +import outPut from './outPut'; +import printBtnClick from './printBtnClick'; +import pasteLineBtnClick from './pasteLineBtnClick'; +import rowChangeEditBtnClick from './rowChangeEditBtnClick'; +import rowChangeViewBtnClick from './rowChangeViewBtnClick'; +import sortLineNum from './sortLineNum'; +import setButtonUsability from './setButtonUsability'; +import saveBtnClick from './saveBtnClick'; +import saveAndCommitBtnClick from './saveAndCommitBtnClick'; +import copyBtnClick from './copyBtnClick'; +import onhandBtnClick from './onhandBtnClick'; +import { setBackButtonVisiblePub, setUIStatePub } from './pubButtonController'; + +export { + addRowBtnClick, + approveInfo, + backBtnClick, + cancelPasteBtnClick, + copyRowsBtnClick, + delRowBtnClick, + fileClick, + insertRowBtnClick, + linkQuery, + outPut, + printBtnClick, + pasteLineBtnClick, + rowChangeEditBtnClick, + rowChangeViewBtnClick, + sortLineNum, + setButtonUsability, + saveBtnClick, + saveAndCommitBtnClick, + setBackButtonVisiblePub, + setUIStatePub, + copyBtnClick, + onhandBtnClick +}; diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/insertRowBtnClick.js b/src/ic/ic/pub/btnClicks/invadjustcard/insertRowBtnClick.js new file mode 100644 index 00000000..5116ec7c --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/insertRowBtnClick.js @@ -0,0 +1,62 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整单,插入行按钮 + * @Date: 2018-05-31 21:31:46 + * @Last Modified by: yinliang + * @Last Modified time: 2018-12-18 09:16:11 + */ +import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil'; +import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools'; +export default function(props, index, constance) { + let { AREA, FIELD } = constance; + /** + * 废品处理,表头主键为cgeneralhid + * 盘点、转库、组装、拆卸、形态转换,表头主键为cspecialhid + */ + let headPk = ''; + if (FIELD.cspecialhid) { + // 调整单中,表头主键为cspecialhid分支 + headPk = props.form.getFormItemsValue(AREA.head, FIELD.cspecialhid); + // if (param.from != 'assembly' && param.from != 'teardown') { + // 组装 - 4L,拆卸 - 4M + if (FIELD.billtype != '4L' && FIELD.billtype != '4M') { + props.cardTable.addRow(AREA.body, index, { cspecialhid: headPk }); + // } else if (param.from == 'assembly' || param.from == 'teardown') { + } else if (FIELD.billtype == '4L' || FIELD.billtype == '4M') { + /** + * 组装、拆卸,对新增的表体行为套件、配件信息,有特殊处理,这里需要特殊处理一下 + */ + let rowsNum = props.cardTable.getAllRows(AREA.body); + + let typeDisplay = ''; + let typeValue = ''; + if (rowsNum.length) { + /** + * 这里需要处理一下多语的问题,组装、拆卸是不同的多语 + */ + if (FIELD.billtype == '4L') { + typeDisplay = getLangByResId(this, '4008ASSEMBLY-000007'); /* 国际化处理: 配件*/ + } else if (FIELD.billtype == '4M') { + typeDisplay = getLangByResId(this, '4008TEARDOWN-000007'); /* 国际化处理: 配件*/ + } + typeValue = '1'; + } + + props.cardTable.addRow(AREA.body, index, { + cspecialhid: headPk, + type: { + display: typeDisplay, + value: typeValue + } + }); + } + } else if (FIELD.cgeneralhid) { + // 调整单中,表头主键为cgeneralhid分支 + headPk = props.form.getFormItemsValue(AREA.head, FIELD.cgeneralhid); + if (FIELD.billtype != '4L' && FIELD.billtype != '4M') { + props.cardTable.addRow(AREA.body, index, { cgeneralhid: headPk }); + } + } + + RownoUtils.setRowNo(this.props, AREA.body, FIELD.crowno); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/linkQuery.js b/src/ic/ic/pub/btnClicks/invadjustcard/linkQuery.js new file mode 100644 index 00000000..04759b29 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/linkQuery.js @@ -0,0 +1,27 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,单据追溯 + * @Date: 2018-06-25 10:17:12 + * @Last Modified by: yinliang + * @Last Modified time: 2018-12-14 10:54:19 + */ +export default function(props, constance) { + let { AREA, FIELD } = constance; + let pk = ''; + if (FIELD.cspecialhid) { + /** + * 盘点、转库、形态转换、组装、拆卸,表头主键为cspecialhid + */ + pk = props.form.getFormItemsValue(AREA.head, FIELD.cspecialhid).value; + } else if (FIELD.cgeneralhid) { + /** + * 废品处理,表头主键为cgeneralhid + */ + pk = props.form.getFormItemsValue(AREA.head, FIELD.cgeneralhid).value; + } + + this.setState({ + pk: pk, + showTrack: true + }); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/onhandBtnClick.js b/src/ic/ic/pub/btnClicks/invadjustcard/onhandBtnClick.js new file mode 100644 index 00000000..5cd8b1aa --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/onhandBtnClick.js @@ -0,0 +1,42 @@ +/* + * @Author: zhengxinm + * @PageInfo: 存量查拣点击按钮 + * @Date: 2019-01-21 10:22:28 + * @Last Modified by: fangmj7 + * @Last Modified time: 2021-07-29 10:15:34 + */ + +import { processBeforeOnHand } from '../../../pub/utils'; +export default function onhandBtnClick(constance) { + const { AREA, FIELD } = constance; + let head = this.props.form.getAllFormValue(AREA.head); + //勾选表体行之后展示勾选的表体行数据,不勾选的话,展示所有表体行物料的数据的涉及到的单据 + let body = this.props.cardTable.getCheckedRows(AREA.body); + body = body.map((item) => item.data); + if (body.length == 0) { + body = this.props.cardTable.getVisibleRows(AREA.body); + } + //需要知道传入的是第几行的数据 后面存量查拣需要对表体赋值 map的key为rowid value为行序号 + let rowAndrowid = new Map(); + let indexToRowMap = new Map(); + let allrows = this.props.cardTable.getVisibleRows(AREA.body); + for (let i = 0; i < allrows.length; i++) { + rowAndrowid.set(allrows[i].rowid, i); + } + for (let j = 0; j < body.length; j++) { + indexToRowMap.set(body[j].rowid, rowAndrowid.get(body[j].rowid)); + } + let onHandRows = processBeforeOnHand.call( + this, + FIELD.billtype, + head, + { rows: body }, + [ FIELD.pk_org, FIELD.cwarehouseid ], + indexToRowMap + ); + this.setState({ + headRows: onHandRows, + indexToRowMap: indexToRowMap + }); + this.toggleOnhandShow(); // 控制弹窗的显示隐藏 +} diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/outPut.js b/src/ic/ic/pub/btnClicks/invadjustcard/outPut.js new file mode 100644 index 00000000..39ea7ba2 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/outPut.js @@ -0,0 +1,34 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,输出 + * @Date: 2018-07-19 18:59:04 + * @Last Modified by: yinliang + * @Last Modified time: 2018-12-14 11:09:46 + */ + +import { output } from 'nc-lightapp-front'; +export default function(props, constance) { + let { FIELD, URL, AREA } = constance; + let pk = ''; + if (FIELD.cspecialhid) { + /** + * 盘点、转库、形态转换、组装、拆卸,表头主键为cspecialhid + */ + pk = props.form.getFormItemsValue(AREA.head, FIELD.cspecialhid).value; + } else if (FIELD.cgeneralhid) { + /** + * 废品处理,表头主键为cgeneralhid + */ + pk = props.form.getFormItemsValue(AREA.head, FIELD.cgeneralhid).value; + } + let pks = []; + pks.push(pk); + output({ + url: URL.print, + data: { + oids: pks, + nodekey: null, //模板节点标识, + outputType: 'output' + } + }); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/pasteLineBtnClick.js b/src/ic/ic/pub/btnClicks/invadjustcard/pasteLineBtnClick.js new file mode 100644 index 00000000..d8fa43e4 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/pasteLineBtnClick.js @@ -0,0 +1,55 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,表体粘贴按钮 + * @Date: 2018-12-17 14:06:04 + * @Last Modified by: yinliang + * @Last Modified time: 2019-07-16 15:50:15 + */ + +import { rowCopyPasteUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools/rowCopyPasteUtils'; +import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools'; +import setButtonUsability from './setButtonUsability'; +export default function(props, record, index = -1, constance) { + let { DISABLEBTNS, COPYPASTEBTNS, FIELD, AREA, BUTTONID } = constance; + let hid = ''; + if (FIELD.cspecialbid) { + /** + * 盘点、转库、形态转换、组装、拆卸,表体主键为cspecialbid + */ + hid = FIELD.cspecialbid; + } else if (FIELD.cgeneralbid) { + /** + * 废品处理,表体主键为cgeneralbid + */ + hid = FIELD.cgeneralbid; + } + // 效率优化开启 + props.beforeUpdatePage(); + if (index >= 0 && record) { + //行操作 + rowCopyPasteUtils.pasteRowsToIndex.call( + this, + props, + AREA.body, + index, + COPYPASTEBTNS.initBtns, + COPYPASTEBTNS.pasteBtns, + [ FIELD.crowno, hid, FIELD.ts ] + ); + } else { + //批操作 + rowCopyPasteUtils.pasteRowsToTail.call( + this, + props, + AREA.body, + COPYPASTEBTNS.initBtns, + COPYPASTEBTNS.pasteBtns, + [ FIELD.crowno, hid, FIELD.ts ] + ); + } + // 行号处理 + RownoUtils.setRowNo(this.props, AREA.body, FIELD.crowno); + setButtonUsability.call(this, this.props, { DISABLEBTNS, AREA, FIELD, BUTTONID }); + // 效率优化关闭 + props.updatePage(AREA.head, AREA.body); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/printBtnClick.js b/src/ic/ic/pub/btnClicks/invadjustcard/printBtnClick.js new file mode 100644 index 00000000..f8ada433 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/printBtnClick.js @@ -0,0 +1,87 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,卡片,打印按钮 + * @Date: 2018-04-02 13:49:46 + * @Last Modified by: yangtaow + * @Last Modified time: 2023-07-19 15:12:32 + */ +import { print, ajax } from 'nc-lightapp-front'; +import { showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil'; +import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil'; +import poc from 'uap/common/components/printOnClient'; +const { printPreview } = poc; +export default function(props, constance) { + let { FIELD, URL, AREA } = constance; + let pk = ''; + // 废品处理不需要打印次数控制 + let printLimitFlag = false; + if (FIELD.cspecialhid) { + /** + * 盘点、转库、形态转换、组装、拆卸,表头主键为cspecialhid + */ + pk = props.form.getFormItemsValue(AREA.head, FIELD.cspecialhid).value; + } else if (FIELD.cgeneralhid) { + /** + * 废品处理,表头主键为cgeneralhid + */ + pk = props.form.getFormItemsValue(AREA.head, FIELD.cgeneralhid).value; + printLimitFlag = true; + } + if (!pk) { + showErrorInfo(null, getLangByResId(this, '4008PUB-000208')); /* 国际化处理: 请选择要打印的单据!*/ + return; + } + let pk_org = props.form.getFormItemsValue(AREA.head, FIELD.pk_org).value; + let pks = []; + pks.push(pk); + let delinfos = [ { id: pk } ]; + // 用于校验的数组 + let data = { delinfos: delinfos }; + // 先发一个请求校验权限,然后再发请求去打印 + ajax({ + url: URL.printpermission, + data: data, + method: 'post', + success: (res) => { + if (res.success) { + if (printLimitFlag) { + print( + 'pdf', //支持两类: 'html'为模板打印, 'pdf'为pdf打印 + URL.print, + { + nodekey: null, //模板节点标识 + oids: pks // 功能节点的数据主键 oids含有多个元素(['1001A41000000000A9LR','1001A410000000009JDD'])时为批量打印, + } + ); + } else { + let printParams = { + appcode: props.getAppCode(), + nodekey: null, + oids: pks, + printType: true, + realData: true, + pk_org: [ pk_org ], + billtype: FIELD.billtype, + controlPrintNum: true + }; + // 审批场景再传这个参数(transactiontype-交易类型编码, billtype-单据类型,这两个参数每次只能传一个) + if (FIELD.approve == props.getUrlParam(FIELD.scene)) { + // 其他情况,需要根据单据类型找维护应用 + //printParams.appcode = null; + printParams.istransbilltype = true; + printParams.userjson = JSON.stringify({ istransbilltype: true }); + } + /** + * appcode 单据的应用编码(一般不用传,方法内部自己抓取,如果需要打印的模板和当前appcode不同,需要业务组自己传一下) + * nodekey 模板节点标识 + * oids 单据主键 + * printType 传true表示根据打印次数设置走插件打印,传false直接走pdf打印 + * realData 传true表示打印真数据,传false表示打印假数据 + * controlPrintNum 加了这个参数前端才会走打印次数查询,默认不走次数查询 + */ + printPreview(props, URL.print, printParams); + } + } + } + }); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/pubButtonController.js b/src/ic/ic/pub/btnClicks/invadjustcard/pubButtonController.js new file mode 100644 index 00000000..92bd79f1 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/pubButtonController.js @@ -0,0 +1,71 @@ +/* + * @Author: yinliang + * @PageInfo: 按钮控制公共方法 + * @Date: 2019-01-07 15:24:54 + * @Last Modified by: yinliang + * @Last Modified time: 2019-01-07 15:47:35 + */ + +/** + * 设置卡片页面返回按钮显示隐藏逻辑 + * @param {*} props + * @param {*} status 单据状态,浏览、新怎、修改 + * @param {*} constance 常量 + */ +function setBackButtonVisiblePub(props, status, constance) { + let { FIELD, UISTATE } = constance; + let showBackBtn = false; // 显示返回按钮标志,true为显示 + let showBillCode = false; // 显示单据编号标志,true为显示 + let billCode = this.billcode; // 单据号 + let scene = props.getUrlParam(FIELD.scene); // 审批中心来源标志 + if (status == UISTATE.add) { + /** + * 新增时,隐藏返回按钮,清空单据号 + * 复制时,同新增处理 + */ + showBackBtn = false; + showBillCode = false; + billCode = ''; + } else if (status == UISTATE.edit) { + /** + * 修改时,隐藏返回按钮,显示单据号 + */ + showBackBtn = false; + showBillCode = true; + billCode = this.billcode; + } else if (status == UISTATE.browse) { + /** + * 浏览态时,页面有数据,显示返回按钮,显示单据号 + * 浏览态时,页面无数据,显示返回按钮,清空单据号 + * 审批中心不展示返回按钮 + */ + if (scene == FIELD.approve) { + showBackBtn = false; + } else { + showBackBtn = true; + } + showBillCode = this.billcode ? true : false; + billCode = this.billcode; + } + // 设置返回按钮 + props.BillHeadInfo.setBillHeadInfoVisible({ + showBackBtn: showBackBtn, //控制显示返回按钮: true为显示,false为隐藏 ---非必传 + showBillCode: showBillCode, //控制显示单据号:true为显示,false为隐藏 ---非必传 + billCode: billCode //修改单据号---非必传 + }); +} + +/** + * 设置页面状态-浏览态、编辑态 + * @param {*} props + * @param {*} status + */ +function setUIStatePub(props, status, param, constance) { + let { UISTATE } = constance; + const { setFormStatus } = props.form; + const { setStatus } = props.cardTable; + // cardTable,状态add不能变成编辑态,只有edit才能使表格变成编辑态 + setStatus(param.tableArea, status != UISTATE.browse ? UISTATE.edit : UISTATE.browse); + setFormStatus(param.formArea, status); +} +export { setBackButtonVisiblePub, setUIStatePub }; diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/rowChangeEditBtnClick.js b/src/ic/ic/pub/btnClicks/invadjustcard/rowChangeEditBtnClick.js new file mode 100644 index 00000000..041e1311 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/rowChangeEditBtnClick.js @@ -0,0 +1,11 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,卡片,编辑态,行操作:展开(更多) + * @Date: 2018-05-25 15:30:36 + * @Last Modified by: yinliang + * @Last Modified time: 2018-12-17 14:51:19 + */ +export default function(props, record, index, constance) { + let { AREA, UISTATE } = constance; + props.cardTable.openModel(AREA.body, UISTATE.edit, record, index); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/rowChangeViewBtnClick.js b/src/ic/ic/pub/btnClicks/invadjustcard/rowChangeViewBtnClick.js new file mode 100644 index 00000000..a04a2ac7 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/rowChangeViewBtnClick.js @@ -0,0 +1,11 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,卡片,浏览态,行操作:展开(切换视图) + * @Date: 2018-05-25 15:31:42 + * @Last Modified by: yinliang + * @Last Modified time: 2018-12-17 15:52:14 + */ +export default function(props, record, constance) { + let { AREA } = constance; + props.cardTable.toggleRowView(AREA.body, record); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/saveAndCommitBtnClick.js b/src/ic/ic/pub/btnClicks/invadjustcard/saveAndCommitBtnClick.js new file mode 100644 index 00000000..07276414 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/saveAndCommitBtnClick.js @@ -0,0 +1,294 @@ +/* + * @Author: yinliang + * @PageInfo: 保存 提交 + * @Date: 2018-04-12 10:39:26 + * @Last Modified by: guoylei + * @Last Modified time: 2021-07-29 10:15:24 + */ +import { ajax } from 'nc-lightapp-front'; +import { addCacheData, updateCacheData } from '../../../../../scmpub/scmpub/pub/cache'; +import { showResumeModal } from 'scmpub/scmpub/components/ResumeModal'; +import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil'; +import { showErrorInfo, showSaveAndCommitInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil'; +import { beforeSave } from '../../../pub/utils'; +import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil'; +/** + * 库存调整 + * @param {*} props + * @param {*} param 参数,其中存放常量信息constance,以及是否保存提交标志isCommit + * @param {*} skipCodes + */ +export default function(props, param = {}, skipCodes, assign) { + let { PAGECODE, FIELD, URL, UISTATE, AREA, CONSTFIELD } = param.constance; + // 表头必输校验 + // let formCheck = props.form.isCheckNow(AREA.head); + // if (!formCheck) { + // return; + // } + + // 保存时,清空子表空行 + if (FIELD.billtype && [ '4R', '4K', '4P', '4L', '4N', '4M' ].includes(FIELD.billtype)) { + // 盘点(4R)、转库(4K)、废品处理(4P)、组装(4L)、拆卸(4N)、形态转换(4M),只要表体行上没有物料vid,就是空行 + this.props.cardTable.filterEmptyRows(AREA.body, [ FIELD.cmaterialvid ], 'include'); + } else { + this.props.cardTable.filterEmptyRows(AREA.body, [ FIELD.crowno ]); + } + + //校验,在保存单据时,单据表头和表体同时校验,如果有错误信息,同时提示 + let flag = this.props.validatePageToToast([ + { + name: AREA.head, + type: 'form' + }, + { + name: AREA.body, + type: 'cardTable' + } + ]); + if (!flag.allPassed) { + return; + } + + // 保存时,清空子表空行 + // if (FIELD.type) { + // this.props.cardTable.filterEmptyRows(AREA.body, [ FIELD.crowno, FIELD.type ]); + // } else + + // 表体必输项校验 + // let tableCheck = this.props.cardTable.checkTableRequired(AREA.body); + // if (!tableCheck) { + // return; + // } + // 校验保存时,表体行是否为空,解决修改时,删除表体行之后,只是修改了表体行的status状态的情况 + let checkRows = this.props.cardTable.getVisibleRows(AREA.body); + if (checkRows <= 0) { + showWarningInfo(null, getLangByResId(this, '4008PUB-000035'), 'infinity'); /* 国际化处理: 无表体行,无法保存!*/ + return; + } + // 拼接主子表json方法,参数分别为:pageid(模板id),form区id,table区id,调用此方法即可自动拼接向后台传的json(data) + let data = props.createMasterChildDataSimple(PAGECODE.card, AREA.head, AREA.body); + + // 删除表体没有主键,且status为3的表体数据 + data = beforeSave(data, AREA.body, FIELD.cspecialbid); + + // 交互式异常 begin + skipCodes = skipCodes ? skipCodes : new Array(); + data['skipCodes'] = skipCodes; + // 交互式异常 end + + // 提交指派 + if (assign) { + data['assign'] = JSON.stringify(assign); + } + + // 自定义参数:isCommit是否保存提交操作 + data.userjson = `{isCommit:${param.isCommit}}`; + + /* + * 转库修改保存时,如果应到货日期、因发货日期为空时,会在查询可用量的时候报错,因此这里需要控制一下,只改了NCC + * 校验逻辑:修改保存时,前端校验应到货日期(dshldarrivedate)、应发货日期(dshlddiliverdate)为空时,提示这两个日期不可为空 + */ + if (FIELD.billtype == '4K' && this.status == 'edit') { + let dshldarrivedate = props.form.getFormItemsValue(AREA.head, FIELD.dshldarrivedate); + let dshlddiliverdate = props.form.getFormItemsValue(AREA.head, FIELD.dshlddiliverdate); + let ddErrMsg = null; + if (dshldarrivedate && !dshldarrivedate.value && dshlddiliverdate && !dshlddiliverdate.value) { + ddErrMsg = getLangByResId(this, '4008WHSTRANS-000012'); /* 国际化处理: 应到货日期、应发货日期不能为空!*/ + } else if (dshldarrivedate && !dshldarrivedate.value) { + ddErrMsg = getLangByResId(this, '4008WHSTRANS-000013'); /* 国际化处理: 应到货日期不能为空!*/ + } else if (dshlddiliverdate && !dshlddiliverdate.value) { + ddErrMsg = getLangByResId(this, '4008WHSTRANS-000014'); /* 国际化处理: 应发货日期不能为空!*/ + } + if (ddErrMsg) { + showErrorInfo(null, ddErrMsg); + return; + } + } + /** + * 形态转换 表体行校验 + * 必须存在一个转换前行一个转换后行 + */ + if (FIELD.billtype == '4N' && this.status == 'edit') { + let rows = data.body.transform_b.rows; + if (rows) { + let flag1 = false; + let flag2 = false; + if (rows.length == 1) { + showErrorInfo(null, getLangByResId(this, '4008TRANSFORM-000008')); /* 国际化处理: 至少存在一个转换前行和一个转换后行!*/ + return; + } else { + for (let i = 0; i < rows.length; i++) { + if (rows[i].status != '3') { + if (rows[i].values.fbillrowflag.value == '2') { + flag1 = true; + } else { + flag2 = true; + } + } + } + } + if (!flag1 || !flag2) { + showErrorInfo(null, getLangByResId(this, '4008TRANSFORM-000008')); /* 国际化处理: 至少存在一个转换前行和一个转换后行!*/ + return; + } + } + } + // 调用平台的保存方法,单据模板用例添加逻辑,add by yinl 20180822 begin + this.props.validateToSave(data, () => { + //原来的 ajax 请求 + ajax({ + url: URL.saveAndCommit, + data: data, + success: (res) => { + // 交互式异常 + if (res.data && res.data.isResume && res.data.isResume == true) { + showResumeModal.bind(this)( + props, + 'ResumeMessageDlg', + skipCodes, + res.data, + saveAndCommitBtnClick, + props, + text, + record, + index + ); + return; + } else { + let pkCache = ''; + // 提交指派添加 begin + if ( + res.data && + res.data.workflow && + (res.data.workflow == 'approveflow' || res.data.workflow == 'workflow') + ) { + // 提示 + // showSuccessInfo(getLangByResId(this, '4008PUB-000036')); /* 国际化处理: 保存成功!*/ + //缓存当前数据 + this.skipCodes = data['skipCodes']; + this.saveAndCommit = true; + //缓存当前数据 + this.setState({ + compositedata: res.data, + compositedisplay: true + }); + return; + } else { + this.props.beforeUpdatePage(); + /** + * 变成编辑态时,不保留勾选 + * selectAllRows(moduleId, checked) + * moduleId 区域ID + * checked为true 全选 + * checked为false 全不选 + */ + this.props.cardTable.selectAllRows(AREA.body, false); + // 差异化处理之后,返回的表体字段不全,需要这里不全,然后再放入缓存中 + let fullTableData = props.cardTable.updateDataByRowId( + AREA.body, + res.data.retcard.body[AREA.body], + true + ); + res.data.retcard.body[AREA.body] = fullTableData; + // 填充子表数据 + if (this.status == 'edit') { + // 修改后处理逻辑 + pkCache = this.props.getUrlParam(FIELD.cardId); + /* + * FIELD.cspecialhid: 数据主键的命名 + * pkCache:数据主键的值 + * AREA.head: 卡片表头的区域编码 + * CONSTFIELD.dataSource: 缓存数据命名空间 + */ + updateCacheData( + this.props, + FIELD.cspecialhid, + pkCache, + res.data.retcard, + AREA.head, + CONSTFIELD.dataSource + ); + } else { + // 新增处理逻辑 + // 需要将新增的pk添加到cardPagination中,卡片态翻页时使用 + pkCache = res.data.retcard.head.head.rows[0].values[FIELD.cspecialhid].value; + /* + * 新增后操作: + * pkCache:数据主键的值 + * AREA.head: 卡片表头的区域编码 + * CONSTFIELD.dataSource: 缓存数据命名空间 + */ + addCacheData( + this.props, + FIELD.cspecialhid, + pkCache, + res.data.retcard, + AREA.head, + CONSTFIELD.dataSource + ); + } + + //更新路径中的状态和id + let scene = this.props.getUrlParam(FIELD.scene); + this.props.pushTo(URL.gotoCard, { + status: UISTATE.browse, + id: pkCache, + scene: scene + }); + /** + * 提示需要放在pushTo后面,否则提示会被冲掉 + * 保存操作时,提示保存成功 + * 保存提交操作时,提示保存成功,提交成功 + */ + showSaveAndCommitInfo(); + // 填充form数据 + props.form.setAllFormValue({ head: res.data.retcard.head.head }); + + // 拼装提示信息 + let toastMsg = ''; + if (res.data.errorMsg) { + // toastMsg = res.data.errorMsg; + // // 提示 + // showErrorInfo(null, toastMsg); + } else { + // 单据模板用例添加,保存成功之后,要执行如下代码 add by yinl 20180822 begin + if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) { + props.dealFormulamsg( + res.formulamsg //参数一:返回的公式对象 + ); + } + // 单据模板用例添加,保存成功之后,要执行如下代码 add by yinl 20180822 end + } + // 设置界面状态为浏览态 + this.status = UISTATE.browse; + this.billcode = res.data.retcard.head.head.rows[0].values.vbillcode.value; + + // 回调函数,这里控制按钮显示等逻辑 + if (typeof param.callback == 'function') { + param.callback.call( + this, + props, + res.data.retcard.head.head.rows[0].values[FIELD.fbillflag].value + ); + } + // 清空复制行缓存数据 + this.copyRowDatas = null; //复制行数据 + // 将所有的多选框置为可用 + props.cardTable.setAllCheckboxAble(AREA.body, true); + //设置状态,设置肩头的单据号 + // this.props.BillHeadInfo.setBillHeadInfoVisible({ + // showBackBtn: true, //控制显示返回按钮: true为显示,false为隐藏 ---非必传 + // showBillCode: true, //控制显示单据号:true为显示,false为隐藏 ---非必传 + // billCode: res.data.retcard.head.head.rows[0].values.vbillcode.value //修改单据号---非必传 + // }); + this.props.updatePage(AREA.head, AREA.body); + } + // 提交指派添加 end + + this.skipCodes = []; // 清空交互式异常数组 + } + } + }); + }); + // 调用平台的保存方法,单据模板用例添加逻辑,add by yinl 20180822 end +} diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/saveBtnClick.js b/src/ic/ic/pub/btnClicks/invadjustcard/saveBtnClick.js new file mode 100644 index 00000000..a947f8c0 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/saveBtnClick.js @@ -0,0 +1,255 @@ +/* + * @Author: yinliang + * @PageInfo: 保存 + * @Date: 2018-04-12 10:39:26 + * @Last Modified by: zhengylr + * @Last Modified time: 2022-10-27 10:45:01 + */ +import { ajax } from 'nc-lightapp-front'; +import { addCacheData, updateCacheData } from '../../../../../scmpub/scmpub/pub/cache'; +import { showResumeModal } from 'scmpub/scmpub/components/ResumeModal'; +import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil'; +import { showSuccessInfo, showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil'; +import { beforeSave } from '../../../pub/utils'; +import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil'; +import { changeUrlParam } from '../../../../../scmpub/scmpub/pub/cache'; +/** + * 库存调整 + * @param {*} props + * @param {*} param 参数,其中存放常量信息constance,以及是否保存提交标志isCommit + * @param {*} skipCodes + */ +export default function(props, param = {}, skipCodes) { + let { PAGECODE, FIELD, URL, UISTATE, AREA, CONSTFIELD } = param.constance; + // 表头必输校验 + // let formCheck = props.form.isCheckNow(AREA.head); + // if (!formCheck) { + // return; + // } + // + + // 保存时,清空子表空行 + if (FIELD.billtype && [ '4R', '4K', '4P', '4L', '4N', '4M' ].includes(FIELD.billtype)) { + // 盘点(4R)、转库(4K)、废品处理(4P)、组装(4L)、拆卸(4N)、形态转换(4M),只要表体行上没有物料vid,就是空行 + this.props.cardTable.filterEmptyRows(AREA.body, [ FIELD.cmaterialvid ], 'include'); + } else { + this.props.cardTable.filterEmptyRows(AREA.body, [ FIELD.crowno ]); + } + + //校验,在保存单据时,单据表头和表体同时校验,如果有错误信息,同时提示 + let flag = this.props.validatePageToToast([ + { + name: AREA.head, + type: 'form' + }, + { + name: AREA.body, + type: 'cardTable' + } + ]); + if (!flag.allPassed) { + return; + } + + // // 表体必输项校验 + // let tableCheck = this.props.cardTable.checkTableRequired(AREA.body); + // if (!tableCheck) { + // return; + // } + // 校验保存时,表体行是否为空,解决修改时,删除表体行之后,只是修改了表体行的status状态的情况 + let checkRows = this.props.cardTable.getVisibleRows(AREA.body); + if (checkRows <= 0) { + showWarningInfo(null, getLangByResId(this, '4008PUB-000035'), 'infinity'); /* 国际化处理: 无表体行,无法保存!*/ + return; + } + // 拼接主子表json方法,参数分别为:pageid(模板id),form区id,table区id,调用此方法即可自动拼接向后台传的json(data) + // props.createMasterChildData(PAGECODE.card, AREA.head, AREA.body)这个方法不会去掉display + // props.createMasterChildDataSimple(PAGECODE.card, AREA.head, AREA.body)这个方法会去掉display + let data = props.createMasterChildDataSimple(PAGECODE.card, AREA.head, AREA.body); + + // 删除表体没有主键,且status为3的表体数据 + data = beforeSave(data, AREA.body, FIELD.cspecialbid); + + // 交互式异常 begin + skipCodes = skipCodes ? skipCodes : new Array(); + data['skipCodes'] = skipCodes; + // 交互式异常 end + + // 自定义参数:isCommit是否保存提交操作,这个参数在云原生去掉了,保存提交走单独的action + // data.userjson = `{isCommit:${param.isCommit}}`; + + /* + * 转库修改保存时,如果应到货日期、因发货日期为空时,会在查询可用量的时候报错,因此这里需要控制一下,只改了NCC + * 校验逻辑:修改保存时,前端校验应到货日期(dshldarrivedate)、应发货日期(dshlddiliverdate)为空时,提示这两个日期不可为空 + */ + if (FIELD.billtype == '4K' && this.status == 'edit') { + let dshldarrivedate = props.form.getFormItemsValue(AREA.head, FIELD.dshldarrivedate); + let dshlddiliverdate = props.form.getFormItemsValue(AREA.head, FIELD.dshlddiliverdate); + let ddErrMsg = null; + if (dshldarrivedate && !dshldarrivedate.value && dshlddiliverdate && !dshlddiliverdate.value) { + ddErrMsg = getLangByResId(this, '4008WHSTRANS-000012'); /* 国际化处理: 应到货日期、应发货日期不能为空!*/ + } else if (dshldarrivedate && !dshldarrivedate.value) { + ddErrMsg = getLangByResId(this, '4008WHSTRANS-000013'); /* 国际化处理: 应到货日期不能为空!*/ + } else if (dshlddiliverdate && !dshlddiliverdate.value) { + ddErrMsg = getLangByResId(this, '4008WHSTRANS-000014'); /* 国际化处理: 应发货日期不能为空!*/ + } + if (ddErrMsg) { + showErrorInfo(null, ddErrMsg); + return; + } + } + /** + * 形态转换 表体行校验 + * 必须存在一个转换前行一个转换后行 + */ + if (FIELD.billtype == '4N' && this.status == 'edit') { + let rows = data.body.transform_b.rows; + if (rows) { + let flag1 = false; + let flag2 = false; + if (rows.length == 1) { + showErrorInfo(null, getLangByResId(this, '4008TRANSFORM-000008')); /* 国际化处理: 至少存在一个转换前行和一个转换后行!*/ + return; + } else { + for (let i = 0; i < rows.length; i++) { + if (rows[i].status != '3') { + if (rows[i].values.fbillrowflag.value == '2') { + flag1 = true; + } else { + flag2 = true; + } + } + } + } + if (!flag1 || !flag2) { + showErrorInfo(null, getLangByResId(this, '4008TRANSFORM-000008')); /* 国际化处理: 至少存在一个转换前行和一个转换后行!*/ + return; + } + } + } + // 调用平台的保存方法,单据模板用例添加逻辑,add by yinl 20180822 begin + this.props.validateToSave(data, () => { + //原来的 ajax 请求 + ajax({ + url: URL.save, + data: data, + success: (res) => { + // 交互式异常 + if (res.data && res.data.isResume && res.data.isResume == true) { + showResumeModal.bind(this)( + props, + 'ResumeMessageDlg', + skipCodes, + res.data, + commitBtnClick, + props, + text, + record, + index + ); + return; + } else { + let pkCache = ''; + this.props.beforeUpdatePage(); + /** + * 变成编辑态时,不保留勾选 + * selectAllRows(moduleId, checked) + * moduleId 区域ID + * checked为true 全选 + * checked为false 全不选 + */ + this.props.cardTable.selectAllRows(AREA.body, false); + // 差异化处理之后,返回的表体字段不全,需要这里不全,然后再放入缓存中 + let fullTableData = props.cardTable.updateDataByRowId( + AREA.body, + res.data.retcard.body[AREA.body], + true + ); + res.data.retcard.body[AREA.body] = fullTableData; + // 填充子表数据 + if (this.status == 'edit') { + // 修改后处理逻辑 + pkCache = this.props.getUrlParam(FIELD.cardId); + /* + * FIELD.cspecialhid: 数据主键的命名 + * pkCache:数据主键的值 + * AREA.head: 卡片表头的区域编码 + * CONSTFIELD.dataSource: 缓存数据命名空间 + */ + updateCacheData( + this.props, + FIELD.cspecialhid, + pkCache, + res.data.retcard, + AREA.head, + CONSTFIELD.dataSource + ); + } else { + // 新增处理逻辑 + // 需要将新增的pk添加到cardPagination中,卡片态翻页时使用 + pkCache = res.data.retcard.head.head.rows[0].values[FIELD.cspecialhid].value; + /* + * 新增后操作: + * pkCache:数据主键的值 + * AREA.head: 卡片表头的区域编码 + * CONSTFIELD.dataSource: 缓存数据命名空间 + */ + addCacheData( + this.props, + FIELD.cspecialhid, + pkCache, + res.data.retcard, + AREA.head, + CONSTFIELD.dataSource + ); + } + + //更新路径中的状态和id + let scene = this.props.getUrlParam(FIELD.scene); + // this.props.pushTo(URL.gotoCard, { + changeUrlParam(this.props, { + status: UISTATE.browse, + id: pkCache, + scene: scene + }); + // props.cardTable.setStatus(AREA.body, UISTATE.browse); + // 填充form数据 + props.form.setAllFormValue({ head: res.data.retcard.head.head }); + // props.form.setFormStatus(AREA.head, UISTATE.browse); + + // 拼装提示信息 + let toastMsg = ''; + if (!res.data.errorMsg) { + // 单据模板用例添加,保存成功之后,要执行如下代码 add by yinl 20180822 begin + if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) { + props.dealFormulamsg( + res.formulamsg //参数一:返回的公式对象 + ); + } + // 单据模板用例添加,保存成功之后,要执行如下代码 add by yinl 20180822 end + } + // 设置界面状态为浏览态 + this.status = UISTATE.browse; + this.billcode = res.data.retcard.head.head.rows[0].values.vbillcode.value; + + showSuccessInfo(getLangByResId(this, '4008PUB-000036')); /* 国际化处理: 保存成功!*/ + + // 回调函数,这里控制按钮显示等逻辑 + if (typeof param.callback == 'function') { + param.callback.call( + this, + props, + res.data.retcard.head.head.rows[0].values[FIELD.fbillflag].value + ); + } + // 清空复制行缓存数据 + this.copyRowDatas = null; //复制行数据 + // 将所有的多选框置为可用 + props.cardTable.setAllCheckboxAble(AREA.body, true); + this.props.updatePage(AREA.head, AREA.body); + } + } + }); + }); + // 调用平台的保存方法,单据模板用例添加逻辑,add by yinl 20180822 end +} diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/setButtonUsability.js b/src/ic/ic/pub/btnClicks/invadjustcard/setButtonUsability.js new file mode 100644 index 00000000..737d9f28 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/setButtonUsability.js @@ -0,0 +1,45 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整单据,审批流单据,卡片,按钮可用性设置 + * @Date: 2018-07-05 21:15:32 + * @Last Modified by: yinliang + * @Last Modified time: 2018-12-26 16:58:44 + */ +export default function(props, constance) { + let { DISABLEBTNS, AREA, FIELD, BUTTONID } = constance; + + // 调整单按钮可用性控制,公共逻辑 + let pk_org = this.props.form.getFormItemsValue(AREA.head, FIELD.pk_org_v); + if (!pk_org || !pk_org.value) { + props.button.setButtonDisabled( + DISABLEBTNS.card.upd.concat(DISABLEBTNS.card.oth).concat(DISABLEBTNS.card.add), + true + ); + } else { + //2.选择了主组织,表体没有行,除了增行,其它都不可用 + let rows = props.cardTable.getAllRows(AREA.body); + if (!rows || rows.length == 0) { + props.button.setButtonDisabled(DISABLEBTNS.card.add.concat(DISABLEBTNS.card.oth), false); + props.button.setButtonDisabled(DISABLEBTNS.card.upd, true); + } else { + //3.表体有行,没有勾选,除了删行、复制行,其它都可用 + let checkedrows = props.cardTable.getCheckedRows(AREA.body); + if (!checkedrows || Object.keys(checkedrows).length == 0) { + //没有选中 + props.button.setButtonDisabled(DISABLEBTNS.card.upd, true); + props.button.setButtonDisabled(DISABLEBTNS.card.add.concat(DISABLEBTNS.card.oth), false); + } else { + //4.表体有行且有勾选,所有都可用 + props.button.setButtonDisabled( + DISABLEBTNS.card.add.concat(DISABLEBTNS.card.upd).concat(DISABLEBTNS.card.oth), + false + ); + } + // 特殊处理转库单的逻辑 begin + if (FIELD.billtype == '4K') { + props.button.setButtonDisabled(BUTTONID.OnhandQuery, false); + } + // 特殊处理转库单的逻辑 end + } + } +} diff --git a/src/ic/ic/pub/btnClicks/invadjustcard/sortLineNum.js b/src/ic/ic/pub/btnClicks/invadjustcard/sortLineNum.js new file mode 100644 index 00000000..31979431 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustcard/sortLineNum.js @@ -0,0 +1,15 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,重排行号 + * @Date: 2018-06-25 11:15:04 + * @Last Modified by: yinliang + * @Last Modified time: 2019-07-30 15:12:32 + */ + +import { RownoUtils } from '../../../../../scmpub/scmpub/pub/tool/cardTableTools'; +export default function sortLineNum(props, constance) { + let { FIELD, AREA } = constance; + props.beforeUpdatePage(); // 效率优化开启 + RownoUtils.resetRowNo(props, AREA.body, FIELD.crowno); + props.updatePage(AREA.head, AREA.body); // 效率优化关闭 +} diff --git a/src/ic/ic/pub/btnClicks/invadjustlist/adjustBtnClick.js b/src/ic/ic/pub/btnClicks/invadjustlist/adjustBtnClick.js new file mode 100644 index 00000000..0555a2ec --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustlist/adjustBtnClick.js @@ -0,0 +1,62 @@ +/* + * @Author: zhengxinm + * @PageInfo: 生成出入库按钮事件 + * @Date: 2019-01-02 15:32:24 + * @Last Modified by: yinliang + * @Last Modified time: 2019-01-05 19:48:13 + */ + +import { ajax } from 'nc-lightapp-front'; +import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil'; +import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil'; +/** + * 生成其它出其它入弹窗按钮控制时间 + * @param {*} props + * @param {*} head + * @param {*} url + * @param {*} param 转库添加的参数,其他单据也可以用,这个 参数中可以传各种参数,from:标识来源单据,currentTab:默认页签,inflag,outflag标识其它出,其它入是否置灰 + */ +export default function(props, head, url, param = { from: null, currentTab: 1, inflag: false, outflag: false }) { + let checkdatas = props.table.getCheckedRows(head); + if (!checkdatas || Object.keys(checkdatas).length == 0) { + showWarningInfo(null, getLangByResId(this, '4008PUB-000206')); /* 国际化处理: 请先选择数据!*/ + return; + } + let pks = []; + checkdatas.forEach((element) => { + let pk = ''; + pk = element.data.values.cspecialhid.value; + this.rowPK = pk; + let fbillflag = element.data.values.fbillflag.value; + if (fbillflag == 4) { + pks.push(pk); + } + }); + let data = JSON.stringify({ + type: 'list', + pks: pks + }); + // 查询数据,并展示其他入其他出弹框 + ajax({ + url: url, + data: data, + success: (res) => { + // let inTabFlag = false; // 其他入库单页签是否可用标志,true为不可用 + // let outTabFlag = false; // 其他出库单页签是否可用标志,true为不可用 + if (!res.data) { + showWarningInfo(null, getLangByResId(this, '4008PUB-000222')); /* 国际化处理: 没有符合条件的数据!*/ + return; + } + let showRealationModal = true; + let inTab = param.inflag ? true : false; + let outTab = param.outflag ? true : false; + this.setState({ + showRealationModal: showRealationModal, + currentTab: param.currentTab, + inoutData: res.data, + inTab: inTab, + outTab: outTab + }); + } + }); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustlist/approveInfo.js b/src/ic/ic/pub/btnClicks/invadjustlist/approveInfo.js new file mode 100644 index 00000000..4801d403 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustlist/approveInfo.js @@ -0,0 +1,14 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,列表页面,审批详情按钮 + * @Date: 2018-07-20 13:58:42 + * @Last Modified by: yinliang + * @Last Modified time: 2019-04-13 16:33:32 + */ +export default function(record) { + this.setState({ + show: true, + billId: record.cspecialhid ? record.cspecialhid.value : record.cgeneralhid.value, + vtrantypecode: record.vtrantypecode.value + }); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustlist/doubleClick.js b/src/ic/ic/pub/btnClicks/invadjustlist/doubleClick.js new file mode 100644 index 00000000..f17f77a5 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustlist/doubleClick.js @@ -0,0 +1,30 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,列表,双击跳转页面 + * @Date: 2018-05-13 15:02:02 + * @Last Modified by: yinliang + * @Last Modified time: 2018-12-18 13:36:27 + */ +export default function doubleClick(record, constance) { + let { URL, FIELD, UISTATE } = constance; + /** + * 废品处理,表头主键为cgeneralhid + * 盘点、转库、组装、拆卸、形态转换,表头主键为cspecialhid + */ + let hid = ''; + if (FIELD.cspecialhid) { + /** + * 盘点、转库、形态转换、组装、拆卸,表头主键为cspecialhid + */ + hid = FIELD.cspecialhid; + } else if (FIELD.cgeneralhid) { + /** + * 废品处理,表头主键为cgeneralhid + */ + hid = FIELD.cgeneralhid; + } + this.props.pushTo(URL.gotoCard, { + status: UISTATE.browse, + id: record[hid].value + }); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustlist/fileClick.js b/src/ic/ic/pub/btnClicks/invadjustlist/fileClick.js new file mode 100644 index 00000000..141f44a5 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustlist/fileClick.js @@ -0,0 +1,35 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,附件管理 + * @Date: 2018-06-25 10:17:12 + * @Last Modified by: yinliang + * @Last Modified time: 2019-02-13 16:49:15 + */ +import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil'; +import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil'; +export default function(props, constance) { + let { AREA } = constance; + let checkdatas = props.table.getCheckedRows(AREA.head); + if (!checkdatas || Object.keys(checkdatas).length == 0) { + showWarningInfo(null, getLangByResId(this, '4008ASSEMBLY-000038')); /* 国际化处理: 请先选择数据!*/ + return; + } + /** + * 废品处理,表头主键为cgeneralhid + * 盘点、转库、组装、拆卸、形态转换,表头主键为cspecialhid + */ + let pk = ''; + if (props.table.getCheckedRows(AREA.head)[0].data.values.cspecialhid) { + pk = props.table.getCheckedRows(AREA.head)[0].data.values.cspecialhid.value; + } else if (props.table.getCheckedRows(AREA.head)[0].data.values.cgeneralhid) { + pk = props.table.getCheckedRows(AREA.head)[0].data.values.cgeneralhid.value; + } + let billcode = props.table.getCheckedRows(AREA.head)[0].data.values.vbillcode.value; + let fileFlag = this.state.showUploader; + this.setState({ + showUploader: !fileFlag, + pk: pk, + // target: event.target, + billcode: billcode + }); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustlist/index.js b/src/ic/ic/pub/btnClicks/invadjustlist/index.js new file mode 100644 index 00000000..c5752c6a --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustlist/index.js @@ -0,0 +1,23 @@ +import approveInfo from './approveInfo'; +import fileClick from './fileClick'; +import linkQuery from './linkQuery'; +import outPut from './outPut'; +import printBtnClick from './printBtnClick'; +import printListBtnClick from './printListBtnClick'; +import setButtonUsability4Approve from './setButtonUsability4Approve'; +import setButtonUsability4Sign from './setButtonUsability4Sign'; +import pubDoubleClick from './doubleClick'; +import adjustBtnClick from './adjustBtnClick'; + +export { + approveInfo, + fileClick, + linkQuery, + outPut, + printBtnClick, + printListBtnClick, + setButtonUsability4Approve, + setButtonUsability4Sign, + pubDoubleClick, + adjustBtnClick +}; diff --git a/src/ic/ic/pub/btnClicks/invadjustlist/linkQuery.js b/src/ic/ic/pub/btnClicks/invadjustlist/linkQuery.js new file mode 100644 index 00000000..95b1c172 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustlist/linkQuery.js @@ -0,0 +1,33 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,单据追溯 + * @Date: 2018-06-25 10:17:12 + * @Last Modified by: yinliang + * @Last Modified time: 2018-12-14 10:54:18 + */ +import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil'; +import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil'; +export default function(props, constance) { + let { AREA } = constance; + let checkdatas = props.table.getCheckedRows(AREA.head); + if (!checkdatas || Object.keys(checkdatas).length == 0) { + showWarningInfo(null, getLangByResId(this, '4008PUB-000206')); /* 国际化处理: 请先选择数据!*/ + return; + } + let pk = ''; + if (props.table.getCheckedRows(AREA.head)[0].data.values.cspecialhid) { + /** + * 盘点、转库、形态转换、组装、拆卸,表头主键为cspecialhid + */ + pk = props.table.getCheckedRows(AREA.head)[0].data.values.cspecialhid.value; + } else if (props.table.getCheckedRows(AREA.head)[0].data.values.cgeneralhid) { + /** + * 废品处理,表头主键为cgeneralhid + */ + pk = props.table.getCheckedRows(AREA.head)[0].data.values.cgeneralhid.value; + } + this.setState({ + pk: pk, + showTrack: true + }); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustlist/outPut.js b/src/ic/ic/pub/btnClicks/invadjustlist/outPut.js new file mode 100644 index 00000000..04e13525 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustlist/outPut.js @@ -0,0 +1,43 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,输出 + * @Date: 2018-07-19 18:59:04 + * @Last Modified by: yinliang + * @Last Modified time: 2018-12-14 11:08:39 + */ +import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil'; +import { output } from 'nc-lightapp-front'; +import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil'; +export default function(props, constance) { + let { URL, AREA } = constance; + let checkeddatas = props.table.getCheckedRows(AREA.head); + if (checkeddatas.length == 0) { + showWarningInfo(null, getLangByResId(this, '4008PUB - 000206')); /* 国际化处理: 请先选择数据!*/ + return; + } + let pks = []; + checkeddatas.forEach((element) => { + let pk = ''; + if (element.data.values.cspecialhid) { + /** + * 盘点、转库、形态转换、组装、拆卸,表头主键为cspecialhid + */ + pk = element.data.values.cspecialhid.value; + } else if (element.data.values.cgeneralhid) { + /** + * 废品处理,表头主键为cgeneralhid + */ + pk = element.data.values.cgeneralhid.value; + } + + pks.push(pk); + }); + output({ + url: URL.print, + data: { + oids: pks, + nodekey: null, //模板节点标识, + outputType: 'output' + } + }); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustlist/printBtnClick.js b/src/ic/ic/pub/btnClicks/invadjustlist/printBtnClick.js new file mode 100644 index 00000000..bcfacc6b --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustlist/printBtnClick.js @@ -0,0 +1,90 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,列表,打印按钮 + * @Date: 2018-04-02 13:49:46 + * @Last Modified by: yangtaow + * @Last Modified time: 2023-07-10 10:52:48 + */ +import { print, ajax } from 'nc-lightapp-front'; +import { showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil'; +import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil'; +import poc from 'uap/common/components/printOnClient'; +const { printPreview } = poc; +export default function(props, constance) { + let { URL, AREA, FIELD } = constance; + let checkeddatas = props.table.getCheckedRows(AREA.head); + if (checkeddatas.length == 0) { + showErrorInfo(null, getLangByResId(this, '4008PUB-000208')); /* 国际化处理: 请选择要打印的单据!*/ + return; + } + let pks = []; + let delinfos = []; + let pk_orgs = new Set(); + let billtype = FIELD ? FIELD.billtype : null; + // 废品处理不需要打印次数控制 + let printLimitFlag = false; + checkeddatas.forEach((element) => { + let pk = ''; + if (element.data.values.cspecialhid) { + /** + * 盘点、转库、形态转换、组装、拆卸,表头主键为cspecialhid + */ + pk = element.data.values.cspecialhid.value; + } else if (element.data.values.cgeneralhid) { + /** + * 废品处理,表头主键为cgeneralhid + */ + pk = element.data.values.cgeneralhid.value; + printLimitFlag = true; + } + + pks.push(pk); + // 拼装校验打印权限的数组 + let pkData = { + id: pk + }; + delinfos.push(pkData); + pk_orgs.add(element.data.values.pk_org.value); + }); + // 用于校验的数组 + let data = { delinfos: delinfos }; + // 先发一个请求校验权限,然后再发请求去打印 + ajax({ + url: URL.printpermission, + data: data, + method: 'post', + success: (res) => { + if (res.success) { + if (printLimitFlag) { + print( + 'pdf', //支持两类: 'html'为模板打印, 'pdf'为pdf打印 + URL.print, + { + nodekey: null, //模板节点标识 + oids: pks // 功能节点的数据主键 oids含有多个元素(['1001A41000000000A9LR','1001A410000000009JDD'])时为批量打印, + } + ); + } else { + /** + * appcode 单据的应用编码(一般不用传,方法内部自己抓取,如果需要打印的模板和当前appcode不同,需要业务组自己传一下) + * nodekey 模板节点标识 + * oids 单据主键 + * printType 传true表示根据打印次数设置走插件打印,传false直接走pdf打印 + * realData 传true表示打印真数据,传false表示打印假数据 + * controlPrintNum 加了这个参数前端才会走打印次数查询,默认不走次数查询 + */ + printPreview(props, URL.print, { + appcode: props.getAppCode(), + nodekey: null, + oids: pks, + printType: true, + realData: true, + pk_org: pk_orgs, + billtype: billtype, + controlPrintNum: true + }); + } + } + } + }); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustlist/printListBtnClick.js b/src/ic/ic/pub/btnClicks/invadjustlist/printListBtnClick.js new file mode 100644 index 00000000..cb6a5de2 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustlist/printListBtnClick.js @@ -0,0 +1,88 @@ +/* + * @Author: zhengylr + * @PageInfo: 库存调整,列表,打印清单按钮 + * @Date: 2022-01-06 16:39:35 + */ +import { print, ajax } from 'nc-lightapp-front'; +import { showErrorInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil'; +import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil'; +import poc from 'uap/common/components/printOnClient'; +const { printPreview } = poc; +export default function(props, constance) { + let { URL, AREA, FIELD } = constance; + let checkeddatas = props.table.getCheckedRows(AREA.head); + if (checkeddatas.length == 0) { + showErrorInfo(null, getLangByResId(this, '4008PUB-000208')); /* 国际化处理: 请选择要打印的单据!*/ + return; + } + let pks = []; + let delinfos = []; + let pk_orgs = new Set(); + let billtype = FIELD ? FIELD.billtype : null; + // 废品处理不需要打印次数控制 + let printLimitFlag = false; + checkeddatas.forEach((element) => { + let pk = ''; + if (element.data.values.cspecialhid) { + /** + * 盘点、转库、形态转换、组装、拆卸,表头主键为cspecialhid + */ + pk = element.data.values.cspecialhid.value; + } else if (element.data.values.cgeneralhid) { + /** + * 废品处理,表头主键为cgeneralhid + */ + pk = element.data.values.cgeneralhid.value; + printLimitFlag = true; + } + + pks.push(pk); + // 拼装校验打印权限的数组 + let pkData = { + id: pk + }; + delinfos.push(pkData); + pk_orgs.add(element.data.values.pk_org.value); + }); + // 用于校验的数组 + let data = { delinfos: delinfos }; + // 先发一个请求校验权限,然后再发请求去打印 + ajax({ + url: URL.printpermission, + data: data, + method: 'post', + success: (res) => { + if (res.success) { + if (printLimitFlag) { + print( + 'pdf', //支持两类: 'html'为模板打印, 'pdf'为pdf打印 + URL.print, + { + nodekey: null, //模板节点标识 + oids: pks // 功能节点的数据主键 oids含有多个元素(['1001A41000000000A9LR','1001A410000000009JDD'])时为批量打印, + } + ); + } else { + /** + * appcode 单据的应用编码(一般不用传,方法内部自己抓取,如果需要打印的模板和当前appcode不同,需要业务组自己传一下) + * nodekey 模板节点标识 + * oids 单据主键 + * printType 传true表示根据打印次数设置走插件打印,传false直接走pdf打印 + * realData 传true表示打印真数据,传false表示打印假数据 + * controlPrintNum 加了这个参数前端才会走打印次数查询,默认不走次数查询 + */ + printPreview(props, URL.print, { + appcode: props.getAppCode(), + nodekey: 'listing_print', + oids: pks, + pk_org: pk_orgs, + billtype: billtype, + printType: true, + realData: true, + controlPrintNum: true + }); + } + } + } + }); +} diff --git a/src/ic/ic/pub/btnClicks/invadjustlist/setButtonUsability4Approve.js b/src/ic/ic/pub/btnClicks/invadjustlist/setButtonUsability4Approve.js new file mode 100644 index 00000000..5d77b2c3 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustlist/setButtonUsability4Approve.js @@ -0,0 +1,128 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,审批流单据,列表,按钮可用性设置 + * @Date: 2018-12-17 16:57:21 + * @Last Modified by: yinliang + * @Last Modified time: 2019-01-05 19:24:48 + */ + +export default function clickBtn(props, refresh, constance) { + let { BUTTONID, DISABLEBTNS, AREA, FIELD, GENERATEBILL } = constance; + let checkedrows = props.table.getCheckedRows(AREA.head); + //处理卡片态返回 按钮控制问题 + let data = this.props.ViewModel.getData(FIELD.dataSource); + if (data && data.simpleTable && checkedrows.length == 0 && !refresh) { + let rows = data.simpleTable.rows; + for (let i = 0; i < rows.length; i++) { + if (rows[i].selected) { + checkedrows.push({ index: i, data: rows[i] }); + } + } + } + if (!checkedrows || Object.keys(checkedrows).length == 0) { + //没有选中 + props.button.setButtonDisabled(DISABLEBTNS.list, true); + props.button.setButtonDisabled(GENERATEBILL, true); + } else { + //有选中,设置全部可用 + props.button.setButtonDisabled(DISABLEBTNS.list, false); + props.button.setButtonDisabled(GENERATEBILL, true); + let tabCode = this.state.tabInfo; + if (tabCode == 0) { + //自由态 + props.button.setButtonDisabled([ BUTTONID.UnCommit ], true); + // 待提交页签下,如果选中的数据有一条审批中、审批通过的单据,收回按钮可用 + if (checkedrows && checkedrows.length > 1) { + // 选择多条数据时,如果有一条单据是审批中状态的,收回按钮可用 + for (let i = 0; i < checkedrows.length; i++) { + if ( + checkedrows[i].data.values.fbillflag.value == 2 || + checkedrows[i].data.values.fbillflag.value == 4 + ) { + props.button.setButtonDisabled([ BUTTONID.UnCommit ], false); + //审批通过的单据生成出入库可用 + if (checkedrows[i].data.values.fbillflag.value == 4) { + props.button.setButtonDisabled(GENERATEBILL, false); + break; + } + } + } + } else if (checkedrows.length == 1) { + // 选中一条数据时,如果单据状态不是自由态,提交按钮不可用 + if (checkedrows[0].data.values.fbillflag.value != 1) { + props.button.setButtonDisabled([ BUTTONID.Commit ], true); + } + // 选中一条数据时,如果单据状态为审批中或者审批通过的单据,收回按钮可用 + if ( + checkedrows[0].data.values.fbillflag.value == 2 || + checkedrows[0].data.values.fbillflag.value == 4 + ) { + props.button.setButtonDisabled([ BUTTONID.UnCommit ], false); + props.button.setButtonDisabled([ BUTTONID.Delete ], true); + //审批通过的单据生成出入库可用 + if (checkedrows[0].data.values.fbillflag.value == 4) { + props.button.setButtonDisabled(GENERATEBILL, false); + } + } + } + } else if (tabCode == 1) { + //审批中 + props.button.setButtonDisabled([ BUTTONID.Delete, BUTTONID.Commit ], true); + // 待提交页签下,如果选中的数据有一条自由态的单据,提交按钮可用 + if (checkedrows && checkedrows.length > 1) { + // 选择多条数据时,如果有一条单据是自由状态的,提交按钮可用 + for (let i = 0; i < checkedrows.length; i++) { + if (checkedrows[i].data.values.fbillflag.value == 1) { + props.button.setButtonDisabled([ BUTTONID.Commit ], false); + break; + } + //选择多条时 如果是审批通过状态 设置生成出入库可用 + if (checkedrows[i].data.values.fbillflag.value == 4) { + props.button.setButtonDisabled(GENERATEBILL, false); + } + } + } else if (checkedrows.length == 1) { + // 选中一条数据时,如果单据状态不是审批中、审批通过的状态,收回按钮不可用 + if ( + checkedrows[0].data.values.fbillflag.value != 2 && + checkedrows[0].data.values.fbillflag.value != 4 + ) { + props.button.setButtonDisabled([ BUTTONID.UnCommit ], true); + if (checkedrows[0].data.values.fbillflag.value == 4) { + props.button.setButtonDisabled(GENERATEBILL, false); + } + } + // 选中一条数据时,如果单据状态为自由态,提交可用 + if (checkedrows[0].data.values.fbillflag.value == 1) { + props.button.setButtonDisabled([ BUTTONID.Commit ], false); + props.button.setButtonDisabled([ BUTTONID.Delete ], false); + } + } + } else { + if (checkedrows && checkedrows.length == 1) { + let billflag = checkedrows[0].data.values.fbillflag.value; + if (billflag == 1) { + //自由 + props.button.setButtonDisabled([ BUTTONID.UnCommit ], true); + } else if (billflag == 2 || billflag == 4) { + props.button.setButtonDisabled([ BUTTONID.Delete, BUTTONID.Commit ], true); + //审批中 审批通过 + if (billflag == 4) { + props.button.setButtonDisabled(GENERATEBILL, false); + } + } else { + props.button.setButtonDisabled([ BUTTONID.UnCommit, BUTTONID.Commit ], true); + //审批不通过 + } + } else if (checkedrows && checkedrows.length > 1) { + // 选择多条数据时,如果有一条单据是自由状态的,提交按钮可用 + for (let i = 0; i < checkedrows.length; i++) { + //选择多条时 如果是审批通过状态 设置生成出入库可用 + if (checkedrows[i].data.values.fbillflag.value == 4) { + props.button.setButtonDisabled(GENERATEBILL, false); + } + } + } + } + } +} diff --git a/src/ic/ic/pub/btnClicks/invadjustlist/setButtonUsability4Sign.js b/src/ic/ic/pub/btnClicks/invadjustlist/setButtonUsability4Sign.js new file mode 100644 index 00000000..820221a1 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/invadjustlist/setButtonUsability4Sign.js @@ -0,0 +1,63 @@ +/* + * @Author: yinliang + * @PageInfo: 库存调整,签字单据,列表,按钮可用性设置 + * @Date: 2018-12-17 16:58:43 + * @Last Modified by: yinliang + * @Last Modified time: 2018-12-17 17:43:02 + */ + +export default function clickBtn(props, refresh, constance) { + let { BUTTONID, DISABLEBTNS, AREA, CONSTFIELD } = constance; + let checkedrows = props.table.getCheckedRows(AREA.head); + //处理卡片态返回 按钮控制问题 + let data = this.props.ViewModel.getData(CONSTFIELD.dataSource); + if (data && data.simpleTable && checkedrows.length == 0 && !refresh) { + let rows = data.simpleTable.rows; + for (let i = 0; i < rows.length; i++) { + if (rows[i].selected) { + checkedrows.push({ index: i, data: rows[i] }); + } + } + } + if (!checkedrows || Object.keys(checkedrows).length == 0) { + //没有选中 + props.button.setButtonDisabled(DISABLEBTNS.list, true); + } else { + //有选中,设置全部可用 + props.button.setButtonDisabled(DISABLEBTNS.list, false); + let tabCode = this.state.tabInfo; + if (tabCode == 0) { + //待签字 + props.button.setButtonDisabled([ BUTTONID.CancelSign ], true); + // 待提待签字页签下,如果选中的数据有一条签字的单据,取消按钮可用 + if (checkedrows && checkedrows.length > 1) { + // 选择多条数据时,如果有一条单据是签字状态的,取消按钮可用 + for (let i = 0; i < checkedrows.length; i++) { + if (checkedrows[i].data.values.fbillflag.value == 3) { + props.button.setButtonDisabled([ BUTTONID.CancelSign ], false); + break; + } + } + } else if (checkedrows.length == 1) { + // 选中一条数据时,如果单据状态不是自由态,签字按钮不可用 + if (checkedrows[0].data.values.fbillflag.value != 2) { + props.button.setButtonDisabled([ BUTTONID.Sign ], true); + } + // 选中一条数据时,如果单据状态为签字状态的单据,取消签字按钮可用 + if (checkedrows[0].data.values.fbillflag.value == 3) { + props.button.setButtonDisabled([ BUTTONID.CancelSign ], false); + } + } + } else { + if (checkedrows && checkedrows.length == 1) { + let billflag = checkedrows[0].data.values.fbillflag.value; + if (billflag == '2') { + //自由 + } else if (billflag == '3') { + //签字 + props.button.setButtonDisabled([ BUTTONID.Delete, BUTTONID.Sign ], true); + } + } + } + } +} diff --git a/src/ic/ic/pub/btnClicks/linkQueryBtnClick.js b/src/ic/ic/pub/btnClicks/linkQueryBtnClick.js index 9cb17f6f..ba9ead86 100644 --- a/src/ic/ic/pub/btnClicks/linkQueryBtnClick.js +++ b/src/ic/ic/pub/btnClicks/linkQueryBtnClick.js @@ -1,4 +1,3 @@ -/*PPY79RJFFJyDYoTmREUl4+NJDAezS6CHL3b8zM+buPc=*/ /* * @Author: raoczh * @PageInfo: 单据追溯 @@ -30,5 +29,3 @@ export default function(props, constance) { showTrack: true }); } - -/*PPY79RJFFJyDYoTmREUl4+NJDAezS6CHL3b8zM+buPc=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/locBtnClick.js b/src/ic/ic/pub/btnClicks/locBtnClick.js index ddb96e73..47c1ac60 100644 --- a/src/ic/ic/pub/btnClicks/locBtnClick.js +++ b/src/ic/ic/pub/btnClicks/locBtnClick.js @@ -1,4 +1,3 @@ -/*uT5k+oEednkc6hjX29M6fNGikoAFYg/c44Tc1jMGGIE=*/ import { ajax, toast } from 'nc-lightapp-front'; import { locationUtil } from '../utils'; import { deepClone } from '../../../../scmpub/scmpub/pub/tool/index'; @@ -193,5 +192,3 @@ export default function(props, constance, record) { // 设置按钮可用性 props.button.setButtonDisabled([ 'CopyLine', 'DeleteLine' ], selectRowNum.length > 0 ? false : true); } - -/*uT5k+oEednkc6hjX29M6fNGikoAFYg/c44Tc1jMGGIE=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/onHandSelected.js b/src/ic/ic/pub/btnClicks/onHandSelected.js index b25d4110..975ad6f7 100644 --- a/src/ic/ic/pub/btnClicks/onHandSelected.js +++ b/src/ic/ic/pub/btnClicks/onHandSelected.js @@ -1,4 +1,3 @@ -/*oWmnioR2+Pc+eaaaFt06wq2c8PguFVOei2c+rhN2Aqc=*/ import { deepClone } from '../../../../scmpub/scmpub/pub/tool'; import { RownoUtils } from '../../../../scmpub/scmpub/pub/tool/cardTableTools'; /* @@ -341,5 +340,3 @@ function processCurRow(oldRow, newRow, cwarehouseid) { // } // }); // } - -/*oWmnioR2+Pc+eaaaFt06wq2c8PguFVOei2c+rhN2Aqc=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/onhandOutBtnClick.js b/src/ic/ic/pub/btnClicks/onhandOutBtnClick.js index 84976c4d..0c1c9b73 100644 --- a/src/ic/ic/pub/btnClicks/onhandOutBtnClick.js +++ b/src/ic/ic/pub/btnClicks/onhandOutBtnClick.js @@ -1,4 +1,3 @@ -/*oqNJ9vD5fVuRxk3NBUNHcZxWoYSR88QmXRLGljqSDSM=*/ /* * @Author: xiaoyaoj * @PageInfo: 存量出库按钮处理 @@ -22,5 +21,3 @@ export default function clickOutBtn(props, FIELDS) { { paramInUrl: true } ); } - -/*oqNJ9vD5fVuRxk3NBUNHcZxWoYSR88QmXRLGljqSDSM=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/addBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/addBtnClick.js index 45353894..d75c67e3 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/addBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/addBtnClick.js @@ -1,4 +1,3 @@ -/*QwCcdu/06Kz5BGRJW8BXmKNGYP2hO1xB37vODmyNC7s=*/ import { ajax } from 'nc-lightapp-front'; export default function addBtnClick(props, constance) { const { cardURL, FIELD } = constance; @@ -15,5 +14,3 @@ export default function addBtnClick(props, constance) { }); } - -/*QwCcdu/06Kz5BGRJW8BXmKNGYP2hO1xB37vODmyNC7s=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/addRowBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/addRowBtnClick.js index bb31a7c5..1d7e912b 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/addRowBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/addRowBtnClick.js @@ -1,4 +1,3 @@ -/*yEFK9g/tfoYPkEA8EqhQNj4QR7wohdZB/9Cq3qiITsY=*/ /* * @Author: raoczh * @PageInfo: 表体增行按钮 @@ -19,5 +18,3 @@ export default function (props, constance) { props.cardTable.addRow(FIELD.cardTable, undefined, null, false); RownoUtils.resetRowNo(props, FIELD.cardTable, 'crowno'); } - -/*yEFK9g/tfoYPkEA8EqhQNj4QR7wohdZB/9Cq3qiITsY=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/againNumBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/againNumBtnClick.js index 47dff909..bdbac6c8 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/againNumBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/againNumBtnClick.js @@ -1,4 +1,3 @@ -/*VS6KhMdCTBC0OlqaTf/zeGRd0D4NI50OQ1Zw30KJ7Ws=*/ /* * @Author: raoczh * @PageInfo: 重排行号 @@ -13,5 +12,3 @@ export default function addBtnClick(props, constance) { RownoUtils.resetRowNo(props, FIELD.cardTable, 'crowno'); props.updatePage(FIELD.formArea, FIELD.cardTable); } - -/*VS6KhMdCTBC0OlqaTf/zeGRd0D4NI50OQ1Zw30KJ7Ws=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/autoBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/autoBtnClick.js new file mode 100644 index 00000000..3299b2e3 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/outboundcard/autoBtnClick.js @@ -0,0 +1,16 @@ +export default function(actionTab, props, id) { + if (!this.state.editAble) { + this.setState({ + editAble: true + }); + } + //需要为新增的表体行付默认值 + props.editTable.addRow(actionTab); + let addRowNum = props.editTable.getNumberOfRows(actionTab) - 1; + props.editTable.setValByKeyAndIndex(actionTab, addRowNum, 'pk_billtype', { value: this.state.selectTypePk }); + if (actionTab == 'inTable') { + props.editTable.setValByKeyAndIndex(actionTab, addRowNum, 'binoutflag', { value: true }); + } else { + props.editTable.setValByKeyAndIndex(actionTab, addRowNum, 'binoutflag', { value: false }); + } +} diff --git a/src/ic/ic/pub/btnClicks/outboundcard/backBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/backBtnClick.js index 586a9fc5..5e0d91b2 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/backBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/backBtnClick.js @@ -1,4 +1,3 @@ -/*6Z/9eaUjZ0gHlRPudBRnSfebN+TeXpmy0MFw0VL5JAo=*/ /* * @Author: raoczh * @PageInfo: 表体返回按钮 @@ -61,5 +60,3 @@ function backtotransfer(props, PAGECODE) { props.pushTo('/' + type); } } - -/*6Z/9eaUjZ0gHlRPudBRnSfebN+TeXpmy0MFw0VL5JAo=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/cancelPasteBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/cancelPasteBtnClick.js index 7c76e6d0..c63a0b2f 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/cancelPasteBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/cancelPasteBtnClick.js @@ -1,4 +1,3 @@ -/*LI4ozYO5aJWbG8se1wkPZfLMZj3S9EDqz1BpZEl9cTk=*/ /* * @Author: raoczh * @PageInfo: 表体粘贴按钮 @@ -21,5 +20,3 @@ export default function(props, constance, btnIsDisableCard) { RownoUtils.setRowNo(props, FIELD.cardTable, 'crowno'); btnIsDisableCard.call(this, props); } - -/*LI4ozYO5aJWbG8se1wkPZfLMZj3S9EDqz1BpZEl9cTk=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/canelBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/canelBtnClick.js index 8e768a8f..da53031e 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/canelBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/canelBtnClick.js @@ -1,4 +1,3 @@ -/*80feFbJ2zfdDk/nMUVsyf13PygOqt2SeoRBvYQhv8yE=*/ /* * @Author: raoczh * @PageInfo: 卡片编辑态点击取消事件 @@ -125,5 +124,3 @@ function cancel(props, constance, index, pageQueryClick) { } } } - -/*80feFbJ2zfdDk/nMUVsyf13PygOqt2SeoRBvYQhv8yE=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/changeViewBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/changeViewBtnClick.js index 5f7957db..58a7ba5f 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/changeViewBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/changeViewBtnClick.js @@ -1,4 +1,3 @@ -/*bOOCONlzfbox0QKiuTCgtxXaWWPDIZBhg8V/NpAfP40=*/ import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil'; /* * @Author: raoczh @@ -21,5 +20,3 @@ export default function(props, record, constance) { // } props.cardTable.toggleRowView(FIELD.cardTable, record); } - -/*bOOCONlzfbox0QKiuTCgtxXaWWPDIZBhg8V/NpAfP40=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/copyBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/copyBtnClick.js index c49caed3..aa1daf30 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/copyBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/copyBtnClick.js @@ -1,4 +1,3 @@ -/*j5Rddi+EiXr6lL+2HQtAzXt3RxX+hO4+JWaOUy3eH0E=*/ /* * @Author: hujieh * @PageInfo: 复制 @@ -46,5 +45,3 @@ export default function copyBtnClick(props, constance, id) { } }); } - -/*j5Rddi+EiXr6lL+2HQtAzXt3RxX+hO4+JWaOUy3eH0E=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/copyLineBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/copyLineBtnClick.js index 441b296a..530a963a 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/copyLineBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/copyLineBtnClick.js @@ -1,4 +1,3 @@ -/*fY9EK5oz8qtmIQT4kSi2nuiZGI3A6cH/WSc5WQI5ukY=*/ /* * @Author: raoczh * @PageInfo: 表体复制行按钮 @@ -18,5 +17,3 @@ export default function (props, constance, index = -1, record) { rowCopyPasteUtils.copyRows.call(this, props, FIELD.cardTable, COPYPASTEBTNS.initBtns, COPYPASTEBTNS.pasteBtns); } } - -/*fY9EK5oz8qtmIQT4kSi2nuiZGI3A6cH/WSc5WQI5ukY=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/deleteBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/deleteBtnClick.js index 59d56b6e..b6f1ec47 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/deleteBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/deleteBtnClick.js @@ -1,4 +1,3 @@ -/*D6qijQE+tseVhRgdMUhc8Lk1xlF0I+nvKrcoao23eRc=*/ /* * @Author: raoczh * @PageInfo: 出库主子孙表卡片态删除功能公共方法 @@ -145,5 +144,3 @@ function deleteCard(props, skipCodes, constance, pageQueryClick, _this) { } }); } - -/*D6qijQE+tseVhRgdMUhc8Lk1xlF0I+nvKrcoao23eRc=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/deleteLineBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/deleteLineBtnClick.js index 8b8319d4..cf0679d0 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/deleteLineBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/deleteLineBtnClick.js @@ -1,4 +1,3 @@ -/*zA55aoHexmQNw+wGMcURwtW7gJpeWJQkd4uBmjq3Q5s=*/ /* * @Author: raoczh * @PageInfo: 表体删行按钮 @@ -33,5 +32,3 @@ export default function(props, constance, index = -1, btnIsDisableCard) { btnIsDisableCard.call(this, props); // RownoUtils.resetRowNo(props, FIELD.cardTable, 'crowno'); } - -/*zA55aoHexmQNw+wGMcURwtW7gJpeWJQkd4uBmjq3Q5s=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/editBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/editBtnClick.js index 533620c5..dcb53436 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/editBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/editBtnClick.js @@ -1,4 +1,3 @@ -/*rzxqFeC1Q4Nf7h12KpqtZRnBtQE7DgwwLtJydoBDRPY=*/ /* * @Author: raoczh * @PageInfo: 卡片态编辑按钮事件 @@ -58,5 +57,3 @@ export default function(props, constance) { } }); } - -/*rzxqFeC1Q4Nf7h12KpqtZRnBtQE7DgwwLtJydoBDRPY=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/fileClick.js b/src/ic/ic/pub/btnClicks/outboundcard/fileClick.js index 33c0cae8..30b6619d 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/fileClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/fileClick.js @@ -1,4 +1,3 @@ -/*1irVoS/YA3FpVMu4JkeSu6cOMa/OivQVlVs2dcWG/Mg=*/ /* * @Author: raoczh * @PageInfo: 单据追溯 @@ -19,5 +18,3 @@ export default function(props, constance) { // target: event.target }); } - -/*1irVoS/YA3FpVMu4JkeSu6cOMa/OivQVlVs2dcWG/Mg=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/launchRowBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/launchRowBtnClick.js index 70e96d0d..096a9d23 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/launchRowBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/launchRowBtnClick.js @@ -1,4 +1,3 @@ -/*KXGQxSWEZWuz3kk8NlEum3ZVWirIA1FbpfHB4an8fGs=*/ /* * @Author: raoczh * @PageInfo: 展开按钮 @@ -10,5 +9,3 @@ export default function(props, record, index, constance) { const { FIELD, UISTATE } = constance; props.cardTable.openModel(FIELD.cardTable, UISTATE.edit, record, index); } - -/*KXGQxSWEZWuz3kk8NlEum3ZVWirIA1FbpfHB4an8fGs=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/linkQuery.js b/src/ic/ic/pub/btnClicks/outboundcard/linkQuery.js index 85b4fe5f..7fd0aa09 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/linkQuery.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/linkQuery.js @@ -1,4 +1,3 @@ -/*PS48wEDdYZYrknmCqqbR2vSm8D2tyaq6MAiAMqBDKn8=*/ /* * @Author: raoczh * @PageInfo: 单据追溯 @@ -17,5 +16,3 @@ export default function (props, constance) { showTrack: true }) } - -/*PS48wEDdYZYrknmCqqbR2vSm8D2tyaq6MAiAMqBDKn8=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/pageQueryClick.js b/src/ic/ic/pub/btnClicks/outboundcard/pageQueryClick.js new file mode 100644 index 00000000..dc581bec --- /dev/null +++ b/src/ic/ic/pub/btnClicks/outboundcard/pageQueryClick.js @@ -0,0 +1,38 @@ +/* + * @Author: hujieh + * @PageInfo: 卡片态翻页查询 + * @Date: 2018-05-15 17:55:30 + * @Last Modified by: raoczh + * @Last Modified time: 2018-06-02 16:03:18 + */ +import { ajax } from 'nc-lightapp-front'; +import { PAGECODE, URL, AREA, FIELD } from '../../constance'; +export default function(props, pk) { + /* + * 1.this.props.setUrlParam('id具体值')//动态修改地址栏中的id的值 + * 2.this.props.cardPagination.setCardPaginationVisible('cardPaginationBtn', false);//设置看片翻页的显隐性 + * 3.this.props.cardPagination.setCardPaginationId (idObj)//暴露出最新的id值(idObj={id:'sdfas',status:1;}) 1 修改、2 新增、3 删除 + */ + if (!pk || pk == 'undefined') { + return; + } + props.setUrlParam(pk); //动态修改地址栏中的id的值(路径中一定要是id,否则会导致切换下一条的时候,pk取不到) + + let data = { pageid: PAGECODE.card, pk: pk }; + ajax({ + url: URL.queryCardURL, + data: data, + method: 'post', + success: (res) => { + if (!res.data) { + this.props.cardTable.setTableData(FIELD.cardTable, { rows: [] }); + return; + } + this.props.form.setAllFormValue({ [AREA.formArea]: res.data.head[AREA.formArea] }); + this.props.cardTable.setTableData(AREA.bodyTable, res.data.body[AREA.bodyTable]); + this.setState({ + billcode: res.data.head[AREA.formArea].rows[0].values.vbillcode.value + }); + } + }); +} diff --git a/src/ic/ic/pub/btnClicks/outboundcard/pasteLineBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/pasteLineBtnClick.js index b8632b13..bc5b7bd4 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/pasteLineBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/pasteLineBtnClick.js @@ -1,4 +1,3 @@ -/*f0JfMjUngRu2xmNXuho8gsZ+iJhwg1FHK1soeG5C4GU=*/ /* * @Author: raoczh * @PageInfo: 表体粘贴按钮 @@ -98,5 +97,3 @@ export default function(props, constance, btnIsDisableCard, index = -1, record) // RownoUtils.resetRowNo(props, FIELD.cardTable, 'crowno'); props.updatePage(FIELD.formArea, FIELD.cardTable); } - -/*f0JfMjUngRu2xmNXuho8gsZ+iJhwg1FHK1soeG5C4GU=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/printBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/printBtnClick.js index f197b024..8a5b1c97 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/printBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/printBtnClick.js @@ -1,4 +1,3 @@ -/*VqFTX17u5c5T6CGoj9nmVaA5WcDCfkQEdaz6QYwY2Gg=*/ /* * @Author: raoczh * @PageInfo: 打印按钮功能 @@ -74,5 +73,3 @@ export default function printBtnClick(props, constance, type) { }); } } - -/*VqFTX17u5c5T6CGoj9nmVaA5WcDCfkQEdaz6QYwY2Gg=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/printCertBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/printCertBtnClick.js index 229f3dfa..2e6beb97 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/printCertBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/printCertBtnClick.js @@ -1,4 +1,3 @@ -/*nTIuhwFhJrt5GOmheaYSQVGYOgIJXx7GcLYasGcTx30=*/ /* * @Author: raoczh * @PageInfo: 打印按钮功能 @@ -36,5 +35,3 @@ export default function printBtnClick(props, constance, type) { }); return; } - -/*nTIuhwFhJrt5GOmheaYSQVGYOgIJXx7GcLYasGcTx30=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/printLocBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/printLocBtnClick.js index 286e61ea..e456fc98 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/printLocBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/printLocBtnClick.js @@ -1,4 +1,3 @@ -/*2Biq5HLF0vaXR5VkEa+QwhEp9t/C8l8tEaFqJeCR1Ig=*/ /* * @Author: raoczh * @PageInfo: 打印按钮功能 @@ -43,5 +42,3 @@ export default function printBtnClick(props, constance, nodekey) { } ); } - -/*2Biq5HLF0vaXR5VkEa+QwhEp9t/C8l8tEaFqJeCR1Ig=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/quitBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/quitBtnClick.js index 767db486..34a025f5 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/quitBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/quitBtnClick.js @@ -1,4 +1,3 @@ -/*zliMT9fL4kUDipldcD83ZI27L877eTGJfcbIVn8yLTg=*/ /* * @Author: raoczh * @PageInfo: 退出转单按钮 @@ -45,5 +44,3 @@ function quit(props, constance) { const { URL } = constance; props.pushTo(URL.gotoList); } - -/*zliMT9fL4kUDipldcD83ZI27L877eTGJfcbIVn8yLTg=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/saveBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/saveBtnClick.js index 97d2365a..72e8f9fa 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/saveBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/saveBtnClick.js @@ -1,4 +1,3 @@ -/*txBx9FIYfUQl2UukqRyP758mq0Xbc9mhrcywxIEB7Ts=*/ /* * @Author: raoczh * @PageInfo: 出库主子孙表单公共保存方法 @@ -182,5 +181,3 @@ export default function saveBtnClick(props, constance, skipCodes) { }); }); } - -/*txBx9FIYfUQl2UukqRyP758mq0Xbc9mhrcywxIEB7Ts=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outboundcard/signBtnClick.js b/src/ic/ic/pub/btnClicks/outboundcard/signBtnClick.js index ebb1119c..4d32a1fe 100644 --- a/src/ic/ic/pub/btnClicks/outboundcard/signBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outboundcard/signBtnClick.js @@ -1,4 +1,3 @@ -/*Jjcv9HFE1HdyrK/CXJsnx55+tKa+5ZdO2KwlWocEG44=*/ /* * @Author: raoczh * @PageInfo: 卡片态签字功能 @@ -112,5 +111,3 @@ export default function signBtnClick(props, flag, constance, id, ts, vtrantypeco } }); } - -/*Jjcv9HFE1HdyrK/CXJsnx55+tKa+5ZdO2KwlWocEG44=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/outputBtnClick.js b/src/ic/ic/pub/btnClicks/outputBtnClick.js index 12515001..aab01e13 100644 --- a/src/ic/ic/pub/btnClicks/outputBtnClick.js +++ b/src/ic/ic/pub/btnClicks/outputBtnClick.js @@ -1,4 +1,3 @@ -/*kU2KplAnFs/qPdYvdu53wii9AemgL4z61S6Gp241pt4=*/ /* * @Author: maopch * @PageInfo: 输出按钮点击事件 @@ -49,5 +48,3 @@ export default function(props, flag, areaCode, nodekey = null, key, url, callBac success: () => callBack && callBack.call() }); } - -/*kU2KplAnFs/qPdYvdu53wii9AemgL4z61S6Gp241pt4=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/pageInfoClick.js b/src/ic/ic/pub/btnClicks/pageInfoClick.js index c9c21e1a..970932fd 100644 --- a/src/ic/ic/pub/btnClicks/pageInfoClick.js +++ b/src/ic/ic/pub/btnClicks/pageInfoClick.js @@ -1,4 +1,3 @@ -/*j07c8riwYnz20MYibuDbtPCPJjiv06v2qfX04jxZNNk=*/ import { ajax } from 'nc-lightapp-front'; export default function pageInfoClick(constance, props, config, pks) { const { AREA, PAGECODE, URL } = constance; @@ -26,5 +25,3 @@ export default function pageInfoClick(constance, props, config, pks) { } }); } - -/*j07c8riwYnz20MYibuDbtPCPJjiv06v2qfX04jxZNNk=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/pickAutoBtnClick.js b/src/ic/ic/pub/btnClicks/pickAutoBtnClick.js index 363d25c6..4468e02f 100644 --- a/src/ic/ic/pub/btnClicks/pickAutoBtnClick.js +++ b/src/ic/ic/pub/btnClicks/pickAutoBtnClick.js @@ -1,4 +1,3 @@ -/*ohWugFz6gWoQ89o4yHRKgt57nVJNKx12bXH1INUckvA=*/ import { ajax } from 'nc-lightapp-front'; /* * @Author: hujieh @@ -141,5 +140,3 @@ function checkBody(rows) { }); return msg; } - -/*ohWugFz6gWoQ89o4yHRKgt57nVJNKx12bXH1INUckvA=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/print_BtnClick.js b/src/ic/ic/pub/btnClicks/print_BtnClick.js index bf390d48..232f9306 100644 --- a/src/ic/ic/pub/btnClicks/print_BtnClick.js +++ b/src/ic/ic/pub/btnClicks/print_BtnClick.js @@ -1,4 +1,3 @@ -/*9a1eTd5yO0nmu7639LcU5sCoU1HACH/C90odhEYY9MI=*/ /* * @Author: maopch * @PageInfo: 打印按钮 @@ -75,5 +74,3 @@ export default function printBtnClick(props, constance, funcode, billtype, nodek }); } } - -/*9a1eTd5yO0nmu7639LcU5sCoU1HACH/C90odhEYY9MI=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/printbarCodeBtnClick.js b/src/ic/ic/pub/btnClicks/printbarCodeBtnClick.js index f64a81ec..370784fb 100644 --- a/src/ic/ic/pub/btnClicks/printbarCodeBtnClick.js +++ b/src/ic/ic/pub/btnClicks/printbarCodeBtnClick.js @@ -1,4 +1,3 @@ -/*ALdFj/64Km01KK1c0Zu2dC32AuYYNDwyQAk3rgCdmhM=*/ import { print, ajax } from 'nc-lightapp-front'; import codeNfig from 'uap/common/components/codeConfigModal'; import { showErrorInfo } from '../../../../scmpub/scmpub/pub/tool/messageUtil'; @@ -89,5 +88,3 @@ export default function(props, params) { } }); } - -/*ALdFj/64Km01KK1c0Zu2dC32AuYYNDwyQAk3rgCdmhM=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/printlocBtnClick.js b/src/ic/ic/pub/btnClicks/printlocBtnClick.js index 30410c6f..11aae5bb 100644 --- a/src/ic/ic/pub/btnClicks/printlocBtnClick.js +++ b/src/ic/ic/pub/btnClicks/printlocBtnClick.js @@ -1,4 +1,3 @@ -/*HE8ri+2f1DUQj9tA5OIFtc+LFCk432K1Jn1rGFBrYjY=*/ import poc from 'uap/common/components/printOnClient'; const { printPreview } = poc; @@ -29,5 +28,3 @@ export default function(props, nodekey, url, id, billtype, pk_org) { pk_org: pk_org }); } - -/*HE8ri+2f1DUQj9tA5OIFtc+LFCk432K1Jn1rGFBrYjY=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/refreshBtnClick.js b/src/ic/ic/pub/btnClicks/refreshBtnClick.js index 550600bd..21e8db17 100644 --- a/src/ic/ic/pub/btnClicks/refreshBtnClick.js +++ b/src/ic/ic/pub/btnClicks/refreshBtnClick.js @@ -1,4 +1,3 @@ -/*X0E7xZC/2PX1QC7E4ufUtuYcqtnY4D2AN+45DBMNkG8=*/ import { ajax } from 'nc-lightapp-front'; import { getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil'; import { showWarningInfo, showSuccessInfo } from '../../../../scmpub/scmpub/pub/tool/messageUtil'; @@ -71,5 +70,3 @@ export default function refreshBtnClick(props, constance) { } }); } - -/*X0E7xZC/2PX1QC7E4ufUtuYcqtnY4D2AN+45DBMNkG8=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/saveBtnClick.js b/src/ic/ic/pub/btnClicks/saveBtnClick.js new file mode 100644 index 00000000..65b1be77 --- /dev/null +++ b/src/ic/ic/pub/btnClicks/saveBtnClick.js @@ -0,0 +1,247 @@ +/* + * @Author: yinliang + * @PageInfo: 保存 + * @Date: 2018-04-12 10:39:26 + * @Last Modified by: hechenk + * @Last Modified time: 2023-06-21 11:08:29 + */ +import { + getCacheDataByPk, + addCacheData, + rewriteTransferSrcBids, + rewriteTransferSrcBidsByKeys, + updateCacheData +} from '../../../../scmpub/scmpub/pub/cache'; +import { ajax, toast } from 'nc-lightapp-front'; +import { showSuccessInfo } from '../../../../scmpub/scmpub/pub/tool/messageUtil'; +import { showResumeModal } from 'scmpub/scmpub/components/ResumeModal'; +import { locationUtil, beforeSave } from '../../pub/utils'; +import { getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil'; +import { creatGrandsonDataForSave } from '../utils/grandsonUtils'; +export default function saveBtnClick(props, constance, currentindex, skipCodes) { + let { URL, AREA, SUBCHILD, PAGECARDCODE, datasourceKey, BILLTYPE } = constance; + + // 过滤掉没有物料的行 + props.cardTable.filterEmptyRows(AREA.bodyTable, [ 'cmaterialvid' ], 'include'); + if(BILLTYPE == '45'){ + props.cardTable.filterEmptyRows(AREA.card_fee, ['cfeematerialvid', 'cfeesuppliervid'], 'include'); + props.cardTable.filterEmptyRows(AREA.card_fee_detail, ['cfeematerialvid', 'cfeesuppliervid'], 'include'); + } + //let flag = props.form.isCheckNow(AREA.formArea); + let flag = this.props.validatePageToToast([ + { + // creteForm 使用的areaCode + name: AREA.formArea, + type: 'form' + }, + { + name: AREA.bodyTable, + type: 'cardTable' + } + ]); + if (!flag.allPassed) { + return; + } + let rows = props.cardTable.getVisibleRows(AREA.bodyTable); + // 校验必输 + //if (!props.form.isCheckNow(AREA.formArea) || !props.cardTable.checkTableRequired(AREA.bodyTable)) return; + if (rows.length == 0) { + toast({ color: 'warning', content: getLangByResId(this, '4008PUB-000046') }); /* 国际化处理: 无表体行*/ + return; + } + rows.map((item) => { + if (!item.values.locationVOs) { + item.values.locationVOs = {}; + } + }); + + // 拼接主子表json方法,参数分别为:pageid(模板id),form区id,table区id,调用此方法即可自动拼接向后台传的json(data) + let data = props.createMasterChildDataSimple(PAGECARDCODE, AREA.formArea, AREA.bodyTable); + data = beforeSave(data, AREA.bodyTable, 'cgeneralbid'); + if(BILLTYPE == '45'){ + data = creatGrandsonDataForSave.call( + this, + this.props, + PAGECARDCODE, + AREA.formArea, + { [AREA.bodyTable]: 'cgeneralbid', [AREA.card_fee]: 'pk_purchasein_f' }, + AREA.card_fee_detail, + null, + 'pk_purchasein_bf' + ); + } + data['skipCodes'] = skipCodes; + data.userjson = SUBCHILD.pagecode; + locationUtil.toServer(data, AREA.bodyTable); + + let url = URL.saveURL; + let type = props.getUrlParam('type'); + //用于判断是修改保存还是新增保存 + let pk = props.getUrlParam('id'); + if (flag.allPassed) { + this.props.validateToSave(data, () => { + ajax({ + method: 'post', + data: data, + url: url, + success: (res) => { + if (res.data.isResume && res.data.isResume == true) { + showResumeModal.bind(this)( + props, + 'ResumeMessageDlg', + skipCodes, + res.data, + saveBtnClick, + props, + constance, + currentindex + ); + return; + } else { + let tabcode = ''; + let icbillstatus = res.data.head[AREA.formArea].rows[0].values.icbillstatus.value; + props.beforeUpdatePage(AREA.formArea, AREA.bodyTable); + if (icbillstatus == 1) { + tabcode = 'processing'; + } else if (icbillstatus == 2) { + tabcode = 'unsign'; + } else { + tabcode = 'sign'; + } + + // props.button.setOprationBtnsRenderStatus([ 'card_body_inner' ], true); + props.delUrlParam('copyid'); + if (res.formulamsg && res.formulamsg instanceof Array && res.formulamsg.length > 0) { + props.dealFormulamsg( + res.formulamsg //参数一:返回的公式对象 + ); + } + //处理孙表删除后 没有差异更新到前台 导致下次修改保存出现并发问题 是因为孙表没有彻底被删除 而是值更新了状态 + //这里如果后台没有返回孙表信息 那么补充孙表的字段为null 差异化 清空当前页面上的孙表 + if(BILLTYPE == '45'){ + locationUtil.processUpdateLocationVO(res.data.bodys[AREA.bodyTable].rows); + this.props.cardTable.updateDataByRowId(AREA.bodyTable, res.data.bodys[AREA.bodyTable], true); + this.props.cardTable.updateDataByRowId(AREA.card_fee, res.data.bodys[AREA.card_fee], true); + this.props.cardTable.updateDataByRowId(AREA.card_fee_detail, res.data.grandSons[AREA.card_fee_detail], true); + }else{ + locationUtil.processUpdateLocationVO(res.data.body[AREA.bodyTable].rows); + this.props.cardTable.updateDataByRowId(AREA.bodyTable, res.data.body[AREA.bodyTable], true); + } + let id = ''; + + this.props.form.setAllFormValue({ [AREA.formArea]: res.data.head[AREA.formArea] }); + + + id = res.data.head[AREA.formArea].rows[0].values.cgeneralhid.value; + props.setUrlParam({ id: id, tabcode: tabcode }); + // 需要将新增的pk添加到cardPagination中,卡片态翻页时使用(status:3---删除) + //let idObj = { id: id, status: 2 }; + let retdata = props.createMasterChildData(PAGECARDCODE, AREA.formArea, AREA.bodyTable); + if (type) { + let bodysdata = this.props.cardTable.getVisibleRows(AREA.bodyTable); + if ( + getCacheDataByPk(props, datasourceKey.listCardKey, id) || + getCacheDataByPk(props, datasourceKey.transferKey, id) + ) { + updateCacheData( + props, + 'cgeneralhid', + id, + retdata, + AREA.formArea, + datasourceKey.listCardKey + ); + updateCacheData( + props, + 'cgeneralhid', + id, + retdata, + AREA.formArea, + datasourceKey.transferKey + ); + } else { + addCacheData( + props, + 'cgeneralhid', + id, + retdata, + AREA.formArea, + datasourceKey.transferKey + ); + addCacheData( + props, + 'cgeneralhid', + id, + retdata, + AREA.formArea, + datasourceKey.listCardKey + ); + } + let datass = {}; + if(BILLTYPE == '45'){ + let cardData = props.createExtCardData(PAGECARDCODE, AREA.formArea, [AREA.bodyTable, AREA.card_fee, AREA.card_fee_detail]); + datass.head = cardData.head; + datass.bodys = cardData.bodys; + datass.pageid = cardData.pageid; + this.props.transferTable.setTransformFormStatus('left', { + status: true, + onChange: (current, next, currentIndex) => { + this.transferStatus[currentIndex] = 'browse'; + showSuccessInfo(getLangByResId(this, '4008PUB-000036')); /* 国际化处理: 保存成功!*/ + let csourcetype = datass.bodys.body.rows[0].values.csourcetype.value + if(csourcetype == '23'){ + rewriteTransferSrcBidsByKeys(props, ['csourcebillbid','carriveorder_bbid'],'@', bodysdata); + } else { + rewriteTransferSrcBids(props, 'csourcebillbid', bodysdata); + } + this.props.transferTable.updateTransferListValueByIndex('left', datass, currentIndex); + } + }); + }else{ + this.props.transferTable.setTransformFormStatus('left', { + status: true, + onChange: (current, next, currentIndex) => { + this.transferStatus[currentIndex] = 'browse'; + showSuccessInfo(getLangByResId(this, '4008PUB-000036')); /* 国际化处理: 保存成功!*/ + rewriteTransferSrcBids(props, 'csourcebillbid', bodysdata); + this.props.transferTable.setTransferListValueByIndex('left', retdata, currentIndex); + } + }); + } + } else { + this.props.cardTable.selectAllRows(AREA.bodyTable, false); + showSuccessInfo(getLangByResId(this, '4008PUB-000036')); /* 国际化处理: 保存成功!*/ + if (pk) { + updateCacheData( + props, + 'cgeneralhid', + pk, + retdata, + AREA.formArea, + datasourceKey.listCardKey + ); + } else { + addCacheData( + props, + 'cgeneralhid', + id, + retdata, + AREA.formArea, + datasourceKey.listCardKey + ); + this.props.cardPagination.setCardPaginationId({ id: id, status: 1 }); + } + props.setUrlParam({ + status: 'browse', + id: id, + tabcode: tabcode + }); + this.toggleShow(); + } + props.updatePage(AREA.formArea, AREA.bodyTable); + } + } + }); + }); + } +} diff --git a/src/ic/ic/pub/btnClicks/searchBtnClick.js b/src/ic/ic/pub/btnClicks/searchBtnClick.js index db35a756..b9cb2e52 100644 --- a/src/ic/ic/pub/btnClicks/searchBtnClick.js +++ b/src/ic/ic/pub/btnClicks/searchBtnClick.js @@ -1,4 +1,3 @@ -/*YuO8szH0cVixePu/Bt+mGzbz32XgzuRwOJauCnGtY6c=*/ /* * @Author: zhangjyp * @PageInfo: 查询按钮处理方法 @@ -111,5 +110,3 @@ export default function searchBtnClick(props, constance, refresh) { } }); } - -/*YuO8szH0cVixePu/Bt+mGzbz32XgzuRwOJauCnGtY6c=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/signBtnClick.js b/src/ic/ic/pub/btnClicks/signBtnClick.js index 01bcf3e6..56994dac 100644 --- a/src/ic/ic/pub/btnClicks/signBtnClick.js +++ b/src/ic/ic/pub/btnClicks/signBtnClick.js @@ -1,4 +1,3 @@ -/*Jjcv9HFE1HdyrK/CXJsnx8AM6sPvcLppTA2YyvgWrLk=*/ /* * @Author: 李浩 * @PageInfo:签字按钮处理方法 @@ -164,5 +163,3 @@ export default function signBtnClick(props, constance, skipCodes) { } }); } - -/*Jjcv9HFE1HdyrK/CXJsnx8AM6sPvcLppTA2YyvgWrLk=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/btnClicks/unSignBtnClick.js b/src/ic/ic/pub/btnClicks/unSignBtnClick.js index a42a9dba..8d85ebe7 100644 --- a/src/ic/ic/pub/btnClicks/unSignBtnClick.js +++ b/src/ic/ic/pub/btnClicks/unSignBtnClick.js @@ -1,4 +1,3 @@ -/*t+gCfQpD5bULzKPONnKw+LoR3DtYjsPuztV1d8wCikE=*/ /* * @Author: 李浩 * @PageInfo:按钮处理方法 @@ -166,5 +165,3 @@ export default function unSignBtnClick(props, constance, skipCodes) { } }); } - -/*t+gCfQpD5bULzKPONnKw+LoR3DtYjsPuztV1d8wCikE=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/addBtnClick.js b/src/ic/ic/pub/cardBtnClicks/addBtnClick.js index e58f5f72..912946d1 100644 --- a/src/ic/ic/pub/cardBtnClicks/addBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/addBtnClick.js @@ -1,4 +1,3 @@ -/*QwCcdu/06Kz5BGRJW8BXmKNGYP2hO1xB37vODmyNC7s=*/ import { getDefData } from '../../../../scmpub/scmpub/pub/cache'; import { orgAfterEvent } from '../afterEvents'; import { transtypeUtils } from '../../../../scmpub/scmpub/pub/tool'; @@ -70,5 +69,3 @@ export default function addBtnClick(props, constance) { this.toggleShow(); } } - -/*QwCcdu/06Kz5BGRJW8BXmKNGYP2hO1xB37vODmyNC7s=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/allBtnVisibleFalse.js b/src/ic/ic/pub/cardBtnClicks/allBtnVisibleFalse.js new file mode 100644 index 00000000..82495f17 --- /dev/null +++ b/src/ic/ic/pub/cardBtnClicks/allBtnVisibleFalse.js @@ -0,0 +1,45 @@ +export default function allBtnVisibleFalse(props) { + let btns = [ + 'DeductCalculate', + 'Edit', + 'Add', + 'Ref61', + 'AddGroup', + 'Print', + 'Preview', + 'Ref4Y', + 'AddMenu', + 'File', + 'SumPrint', + 'DirPrintBarcode', + 'PrintBarcode', + 'LinkQryAction', + 'Output', + 'Copy', + 'Save', + 'FetchAuto', + 'UnSign', + 'ImportMenu', + 'More3', + 'Cancel', + 'Import', + 'Ref', + 'QuitTrans', + 'AddMenu1', + 'CombinePrint', + 'ExSnTem', + 'More2', + 'BtnPrintLoc', + 'ImportSrcBillSN', + 'Delete', + 'Sign', + 'Generate4453', + 'SaveSign', + 'ExportTem', + 'Ref21', + 'MaterialFetch', + 'Refresh', + 'ImportMenu2' + ]; + props.button.setButtonVisible(btns, false); +} diff --git a/src/ic/ic/pub/cardBtnClicks/approveInfoBtnClick.js b/src/ic/ic/pub/cardBtnClicks/approveInfoBtnClick.js new file mode 100644 index 00000000..be4fdfad --- /dev/null +++ b/src/ic/ic/pub/cardBtnClicks/approveInfoBtnClick.js @@ -0,0 +1,20 @@ +/* + * @Author: maopch + * @PageInfo: 卡片页面审批详情点击事件 + * @Date: 2018-08-23 10:31:08 + * @Last Modified by: maopch + * @Last Modified time: 2018-08-23 11:12:30 + */ +/** + * + * @param {*} headcode 表头code + * @param {*} hidcode 表头主键code + * @param {*} vbilltypecode 单据类型类型 + */ +export default function(headcode, hidcode, vbilltypecode) { + let billtype = this.props.form.getFormItemsValue(headcode, 'vbilltypecode'); + + billtype = billtype && billtype.value ? billtype.value : vbilltypecode; + let hid = this.props.form.getFormItemsValue(headcode, hidcode); + this.setState({ billtype, showApprove: true, hid: hid.value }); +} diff --git a/src/ic/ic/pub/cardBtnClicks/backBtnClick.js b/src/ic/ic/pub/cardBtnClicks/backBtnClick.js index 35a92ee5..29ebd8fc 100644 --- a/src/ic/ic/pub/cardBtnClicks/backBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/backBtnClick.js @@ -1,4 +1,3 @@ -/*6Z/9eaUjZ0gHlRPudBRnSfebN+TeXpmy0MFw0VL5JAo=*/ /* * @Author: 李浩 * @PageInfo:按钮处理方法 @@ -71,5 +70,3 @@ function back(props) { props.pushTo('/assetinRef', { type: 'assetinRef', status: 'browse' }); } } - -/*6Z/9eaUjZ0gHlRPudBRnSfebN+TeXpmy0MFw0VL5JAo=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/cancelBackBtn.js b/src/ic/ic/pub/cardBtnClicks/cancelBackBtn.js index 3d1bfedf..1ded31f2 100644 --- a/src/ic/ic/pub/cardBtnClicks/cancelBackBtn.js +++ b/src/ic/ic/pub/cardBtnClicks/cancelBackBtn.js @@ -1,4 +1,3 @@ -/*utq1beopbg7hLq/58G3J504Zv/ex6xW3xNQ395vJCHw=*/ /* * @Author: 李浩 * @PageInfo:按钮处理方法 @@ -69,5 +68,3 @@ function back(props) { props.pushTo('/ref4A63', { type: 'ref4A63', status: 'browse' }); } } - -/*utq1beopbg7hLq/58G3J504Zv/ex6xW3xNQ395vJCHw=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/cancelPasteBtnClick.js b/src/ic/ic/pub/cardBtnClicks/cancelPasteBtnClick.js index bc279e4b..b020abd3 100644 --- a/src/ic/ic/pub/cardBtnClicks/cancelPasteBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/cancelPasteBtnClick.js @@ -1,4 +1,3 @@ -/*LI4ozYO5aJWbG8se1wkPZfLMZj3S9EDqz1BpZEl9cTk=*/ import { rowCopyPasteUtils } from '../../../../scmpub/scmpub/pub/tool/cardTableTools/rowCopyPasteUtils'; import { RownoUtils } from '../../../../scmpub/scmpub/pub/tool/cardTableTools'; export default function(props, constance) { @@ -16,5 +15,3 @@ export default function(props, constance) { props.button.setButtonDisabled({ DeleteLine: true, CopyLine: true }); RownoUtils.setRowNo(props, AREA.bodyTable, 'crowno'); } - -/*LI4ozYO5aJWbG8se1wkPZfLMZj3S9EDqz1BpZEl9cTk=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/cancelgenerate4a00BtnClick.js b/src/ic/ic/pub/cardBtnClicks/cancelgenerate4a00BtnClick.js index 44827e2c..d27d7e18 100644 --- a/src/ic/ic/pub/cardBtnClicks/cancelgenerate4a00BtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/cancelgenerate4a00BtnClick.js @@ -1,4 +1,3 @@ -/*Hu7Wr2zkZBbxHWmX4WIVdC+by9tGQtag55q5p/h2dctg1J9StBrFuzX4FEMbLN7Y*/ /* * @Author: 李浩 * @PageInfo: 取消生成资产卡片 @@ -61,5 +60,3 @@ export default function cancelgenerate4a00BtnClick(props, constance, record) { } }); } - -/*Hu7Wr2zkZBbxHWmX4WIVdC+by9tGQtag55q5p/h2dctg1J9StBrFuzX4FEMbLN7Y*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/canelBtnClick.js b/src/ic/ic/pub/cardBtnClicks/canelBtnClick.js index 7a9d4093..56dd7e36 100644 --- a/src/ic/ic/pub/cardBtnClicks/canelBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/canelBtnClick.js @@ -1,4 +1,3 @@ -/*80feFbJ2zfdDk/nMUVsyf13PygOqt2SeoRBvYQhv8yE=*/ import { showSuccessInfo, showWarningDialog } from '../../../../scmpub/scmpub/pub/tool/messageUtil'; import cancelBackBtn from './cancelBackBtn'; import { getCurrentLastId } from '../../../../scmpub/scmpub/pub/cache'; @@ -144,5 +143,3 @@ export default function canelBtnClick(props, constance, currentindex) { //this.props.delUrlParam(['ret', 'copyid']); } } - -/*80feFbJ2zfdDk/nMUVsyf13PygOqt2SeoRBvYQhv8yE=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/config.json b/src/ic/ic/pub/cardBtnClicks/config.json new file mode 100644 index 00000000..22cea217 --- /dev/null +++ b/src/ic/ic/pub/cardBtnClicks/config.json @@ -0,0 +1,4 @@ +{ + "dependModuleName": [ "uap/common/components/codeConfigModal" ], + "dependjs": [ "../../../../uap/common/components/codeConfigModal/index.js" ] +} diff --git a/src/ic/ic/pub/cardBtnClicks/copyBtnClick.js b/src/ic/ic/pub/cardBtnClicks/copyBtnClick.js index 56ab0a35..db7a80fe 100644 --- a/src/ic/ic/pub/cardBtnClicks/copyBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/copyBtnClick.js @@ -1,4 +1,3 @@ -/*j5Rddi+EiXr6lL+2HQtAzXt3RxX+hO4+JWaOUy3eH0E=*/ /* * @Author: hujieh * @PageInfo: 复制 @@ -112,5 +111,3 @@ export default function copyBtnClick(props, copyURL, PAGECARDCODE, id, constance } }); } - -/*j5Rddi+EiXr6lL+2HQtAzXt3RxX+hO4+JWaOUy3eH0E=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/copyLineBtnClick.js b/src/ic/ic/pub/cardBtnClicks/copyLineBtnClick.js index e6a92c7c..9e1e8988 100644 --- a/src/ic/ic/pub/cardBtnClicks/copyLineBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/copyLineBtnClick.js @@ -1,4 +1,3 @@ -/*fY9EK5oz8qtmIQT4kSi2nuiZGI3A6cH/WSc5WQI5ukY=*/ /* * @Author: raoczh * @PageInfo: 表体复制行按钮 @@ -28,5 +27,3 @@ export default function (props, constance, record, index) { } } - -/*fY9EK5oz8qtmIQT4kSi2nuiZGI3A6cH/WSc5WQI5ukY=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/delBtnClick.js b/src/ic/ic/pub/cardBtnClicks/delBtnClick.js index cb0241b0..ca7a05bf 100644 --- a/src/ic/ic/pub/cardBtnClicks/delBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/delBtnClick.js @@ -1,4 +1,3 @@ -/*cxqDO8Y5zn4jjifkgQKk7n93nONvE3RPrToVAs9qICE=*/ /* * @Author: 李浩 * @PageInfo:按钮处理方法 @@ -118,5 +117,3 @@ export default function delBtnClick(props, constance, currentindex, skipCodes) { } }); } - -/*cxqDO8Y5zn4jjifkgQKk7n93nONvE3RPrToVAs9qICE=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/deltransassetbillBtnClick.js b/src/ic/ic/pub/cardBtnClicks/deltransassetbillBtnClick.js index 32718836..b2d68654 100644 --- a/src/ic/ic/pub/cardBtnClicks/deltransassetbillBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/deltransassetbillBtnClick.js @@ -1,4 +1,3 @@ -/*sN+eOK5JGtE/M80i0+kMgQlOoRp5YLGpPnoZcxq1usnCIrTzJPDtPaBLta6OFxV9*/ /* * @Author: 李浩 * @PageInfo:按钮处理方法 @@ -66,5 +65,3 @@ export default function deltransassetbillBtnClick(props, constance, record) { } }); } - -/*sN+eOK5JGtE/M80i0+kMgQlOoRp5YLGpPnoZcxq1usnCIrTzJPDtPaBLta6OFxV9*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/editBtnClick.js b/src/ic/ic/pub/cardBtnClicks/editBtnClick.js index 4674238c..191f0436 100644 --- a/src/ic/ic/pub/cardBtnClicks/editBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/editBtnClick.js @@ -1,4 +1,3 @@ -/*rzxqFeC1Q4Nf7h12KpqtZRnBtQE7DgwwLtJydoBDRPY=*/ import { ajax } from 'nc-lightapp-front'; import { orgController } from '../viewController/inbound_card/index'; export default function editBtnClick(props, constance) { @@ -52,5 +51,3 @@ export default function editBtnClick(props, constance) { }); } } - -/*rzxqFeC1Q4Nf7h12KpqtZRnBtQE7DgwwLtJydoBDRPY=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/exportSerialBtnClick.js b/src/ic/ic/pub/cardBtnClicks/exportSerialBtnClick.js index a0e4f54a..6e791706 100644 --- a/src/ic/ic/pub/cardBtnClicks/exportSerialBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/exportSerialBtnClick.js @@ -1,4 +1,3 @@ -/*HZP0dfblajL4ikDSlpQ1b2RZhikdsG7Tvvs5mpF8lTw=*/ import { formDownload } from 'nc-lightapp-front'; export default function() { formDownload({ @@ -7,5 +6,3 @@ export default function() { enctype: 1 }); } - -/*HZP0dfblajL4ikDSlpQ1b2RZhikdsG7Tvvs5mpF8lTw=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/fetchAutoBtnClick.js b/src/ic/ic/pub/cardBtnClicks/fetchAutoBtnClick.js index a668ff98..8322ac21 100644 --- a/src/ic/ic/pub/cardBtnClicks/fetchAutoBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/fetchAutoBtnClick.js @@ -1,4 +1,3 @@ -/*QmWmP2NxQoIxk9Ye8PXzqIl/gXaDsnhe1m514BCG7v8=*/ /* * @Author: 李浩 * @PageInfo:自动取数 @@ -217,5 +216,3 @@ function filterRows(props, data, bodyArea) { } data.card.body[bodyArea].rows = rows; } - -/*QmWmP2NxQoIxk9Ye8PXzqIl/gXaDsnhe1m514BCG7v8=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/generate4A00BtnClick.js b/src/ic/ic/pub/cardBtnClicks/generate4A00BtnClick.js index 2396bdd5..8415dddb 100644 --- a/src/ic/ic/pub/cardBtnClicks/generate4A00BtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/generate4A00BtnClick.js @@ -1,4 +1,3 @@ -/*jaAr57nwhgo/pRGPmx6iJomUtn1oY2tg5uFUKVEvSxI=*/ /* * @Author: 李浩 * @PageInfo: 生成资产卡片 @@ -62,5 +61,3 @@ export default function generate4A00BtnClick(props, constance, record) { } }); } - -/*jaAr57nwhgo/pRGPmx6iJomUtn1oY2tg5uFUKVEvSxI=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/generatehjBtnClick.js b/src/ic/ic/pub/cardBtnClicks/generatehjBtnClick.js index c2db1a01..a08069e2 100644 --- a/src/ic/ic/pub/cardBtnClicks/generatehjBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/generatehjBtnClick.js @@ -1,4 +1,3 @@ -/*S59VOS80Xu9wilyGa89UJN+85Su/V6Z4RqlACWaAfuA=*/ /* * @Author: 李浩 * @PageInfo:按钮处理方法 @@ -62,5 +61,3 @@ export default function generatehjBtnClick(props, constance, record) { } }); } - -/*S59VOS80Xu9wilyGa89UJN+85Su/V6Z4RqlACWaAfuA=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/importSrcBillSNBtnClick.js b/src/ic/ic/pub/cardBtnClicks/importSrcBillSNBtnClick.js index 980034b4..ce8459d9 100644 --- a/src/ic/ic/pub/cardBtnClicks/importSrcBillSNBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/importSrcBillSNBtnClick.js @@ -1,4 +1,3 @@ -/*pH7nP562nyXurHaijGNnBIX+onqDUbf8RPAadMeioXLDGS37E/TKx2ociZW2uUnR*/ import { ajax, toast } from 'nc-lightapp-front'; import { showErrorInfo, showSuccessInfo } from '../../../../scmpub/scmpub/pub/tool/messageUtil'; import { locationUtil } from '../utils'; @@ -42,5 +41,3 @@ export default function importSrcBillSNBtnClick(props, constance) { //} }); } - -/*pH7nP562nyXurHaijGNnBIX+onqDUbf8RPAadMeioXLDGS37E/TKx2ociZW2uUnR*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/inboundOnhandBtnClick.js b/src/ic/ic/pub/cardBtnClicks/inboundOnhandBtnClick.js index 9e946e39..06d3272c 100644 --- a/src/ic/ic/pub/cardBtnClicks/inboundOnhandBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/inboundOnhandBtnClick.js @@ -1,4 +1,3 @@ -/*Hlad7awSR126gB7D76m8Gfi1tgvh6wxs1jJFwPsJpEQtZFhSwwwNIl3E89v0+bTG*/ /* 存量查拣 * @Author: 李浩 * @PageInfo: 页面功能描述 @@ -64,5 +63,3 @@ export default function inboundOnhandBtnClick(props, formArea, cardTable, billty this.onhandToggleShow(); // 控制弹窗的显示隐藏 } - -/*Hlad7awSR126gB7D76m8Gfi1tgvh6wxs1jJFwPsJpEQtZFhSwwwNIl3E89v0+bTG*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/index.js b/src/ic/ic/pub/cardBtnClicks/index.js index 3a52c322..bac72633 100644 --- a/src/ic/ic/pub/cardBtnClicks/index.js +++ b/src/ic/ic/pub/cardBtnClicks/index.js @@ -1,4 +1,3 @@ -/*8CdHYS+a9Q2smogIeoYriEP5x7vzqBeEXoSMjia1I4E=*/ import refreshBtnClick from './refreshBtnClick'; import addBtnClick from './addBtnClick'; import unSignBtnClick from './unSignBtnClick'; @@ -56,5 +55,3 @@ export { printbarCodeBtnClick, inboundOnhandBtnClick }; - -/*8CdHYS+a9Q2smogIeoYriEP5x7vzqBeEXoSMjia1I4E=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/openCardBtnClick.js b/src/ic/ic/pub/cardBtnClicks/openCardBtnClick.js index 176762db..b4679187 100644 --- a/src/ic/ic/pub/cardBtnClicks/openCardBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/openCardBtnClick.js @@ -1,4 +1,3 @@ -/*qAGWb3i75MoCIXEYIXw0ZwSVg39ftByExSfwvRsRkSs=*/ /* * @Author: 李浩 * @PageInfo:按钮处理方法 @@ -32,5 +31,3 @@ export default function openCardBtnClick(props, constance, record, index) { // props.cardTable.openModel(AREA.bodyTable, 'add', record, index); // } } - -/*qAGWb3i75MoCIXEYIXw0ZwSVg39ftByExSfwvRsRkSs=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/pasteLineBtnClick.js b/src/ic/ic/pub/cardBtnClicks/pasteLineBtnClick.js index b72298a3..c4f5afa5 100644 --- a/src/ic/ic/pub/cardBtnClicks/pasteLineBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/pasteLineBtnClick.js @@ -1,4 +1,3 @@ -/*f0JfMjUngRu2xmNXuho8gsZ+iJhwg1FHK1soeG5C4GU=*/ import { rowCopyPasteUtils } from '../../../../scmpub/scmpub/pub/tool/cardTableTools/rowCopyPasteUtils'; import { RownoUtils } from '../../../../scmpub/scmpub/pub/tool/cardTableTools'; export default function (props, constance, record, index) { @@ -81,5 +80,3 @@ export default function (props, constance, record, index) { // 效率优化结束 props.updatePage(AREA.formArea, AREA.bodyTable); } - -/*f0JfMjUngRu2xmNXuho8gsZ+iJhwg1FHK1soeG5C4GU=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/printbarCodeBtnClick.js b/src/ic/ic/pub/cardBtnClicks/printbarCodeBtnClick.js index 8faaba2f..65f9ef4e 100644 --- a/src/ic/ic/pub/cardBtnClicks/printbarCodeBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/printbarCodeBtnClick.js @@ -1,4 +1,3 @@ -/*ALdFj/64Km01KK1c0Zu2dC32AuYYNDwyQAk3rgCdmhM=*/ /* * @Author: zhengxinm * @PageInfo: 条码打印卡片 @@ -121,5 +120,3 @@ export default function(props, params) { } }); } - -/*ALdFj/64Km01KK1c0Zu2dC32AuYYNDwyQAk3rgCdmhM=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/queryCardBtnClick.js b/src/ic/ic/pub/cardBtnClicks/queryCardBtnClick.js index fa9bb2bc..a0358281 100644 --- a/src/ic/ic/pub/cardBtnClicks/queryCardBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/queryCardBtnClick.js @@ -1,4 +1,3 @@ -/*wJN8TqBTLQGwNzFGVn+goBTXTHiv16MON0Ixgl+CZ+k=*/ /* * @Author: hujieh * @PageInfo: 卡片态翻页查询 @@ -150,5 +149,3 @@ export default function(props, pk, constance, isrefresh) { } }); } - -/*wJN8TqBTLQGwNzFGVn+goBTXTHiv16MON0Ixgl+CZ+k=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/queryCardBtnClick40.js b/src/ic/ic/pub/cardBtnClicks/queryCardBtnClick40.js index af1d6587..acc76049 100644 --- a/src/ic/ic/pub/cardBtnClicks/queryCardBtnClick40.js +++ b/src/ic/ic/pub/cardBtnClicks/queryCardBtnClick40.js @@ -1,4 +1,3 @@ -/*wJN8TqBTLQGwNzFGVn+goOJ9hQIpAg/P131ozDw/EbM=*/ /* * @Author: hujieh * @PageInfo: 卡片态翻页查询 @@ -135,5 +134,3 @@ export default function(props, pk, constance, isrefresh) { } }); } - -/*wJN8TqBTLQGwNzFGVn+goOJ9hQIpAg/P131ozDw/EbM=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/quitTransferBtnClick.js b/src/ic/ic/pub/cardBtnClicks/quitTransferBtnClick.js index b22d26c7..8fba6325 100644 --- a/src/ic/ic/pub/cardBtnClicks/quitTransferBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/quitTransferBtnClick.js @@ -1,4 +1,3 @@ -/*XpMN2r/YzNT3hntXrOIw9qPHX8USgiBzzd14y7odvsk=*/ import { showWarningDialog } from '../../../../scmpub/scmpub/pub/tool/messageUtil'; import { getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil'; export default function quitTransferBtnClick(props) { @@ -18,5 +17,3 @@ export default function quitTransferBtnClick(props) { } } } - -/*XpMN2r/YzNT3hntXrOIw9qPHX8USgiBzzd14y7odvsk=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/refreshBtnClick.js b/src/ic/ic/pub/cardBtnClicks/refreshBtnClick.js index 12a50c16..7c4cfa2e 100644 --- a/src/ic/ic/pub/cardBtnClicks/refreshBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/refreshBtnClick.js @@ -1,4 +1,3 @@ -/*X0E7xZC/2PX1QC7E4ufUttrw/JdUoR11pIdevSTkkRc=*/ import { ajax, toast, cacheTools } from 'nc-lightapp-front'; import { getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil'; export default function refreshBtnClick(props, constance) { @@ -55,5 +54,3 @@ export default function refreshBtnClick(props, constance) { } }); } - -/*X0E7xZC/2PX1QC7E4ufUttrw/JdUoR11pIdevSTkkRc=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/setPieceBtnClick.js b/src/ic/ic/pub/cardBtnClicks/setPieceBtnClick.js index e3c74787..2918508a 100644 --- a/src/ic/ic/pub/cardBtnClicks/setPieceBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/setPieceBtnClick.js @@ -1,4 +1,3 @@ -/*MJcV5g1bYVOVo9i1P/yXs+jKDp0H4FNXW/efr8DtV/U=*/ /* * @Author: 李浩 * @PageInfo:按钮处理方法 @@ -38,5 +37,3 @@ export default function setPieceBtnClick(props, constance, record, index) { } }); } - -/*MJcV5g1bYVOVo9i1P/yXs+jKDp0H4FNXW/efr8DtV/U=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/signBtnClick.js b/src/ic/ic/pub/cardBtnClicks/signBtnClick.js index 27398c3a..e0da0030 100644 --- a/src/ic/ic/pub/cardBtnClicks/signBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/signBtnClick.js @@ -1,4 +1,3 @@ -/*Jjcv9HFE1HdyrK/CXJsnx55+tKa+5ZdO2KwlWocEG44=*/ /* * @Author: 李浩 * @PageInfo:按钮处理方法 @@ -108,5 +107,3 @@ export default function signBtnClick(props, constance, skipCodes) { }, }); } - -/*Jjcv9HFE1HdyrK/CXJsnx55+tKa+5ZdO2KwlWocEG44=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/sumPrintClick.js b/src/ic/ic/pub/cardBtnClicks/sumPrintClick.js index bfadfc96..5208089e 100644 --- a/src/ic/ic/pub/cardBtnClicks/sumPrintClick.js +++ b/src/ic/ic/pub/cardBtnClicks/sumPrintClick.js @@ -1,4 +1,3 @@ -/*XFTCsVjxYETBCu9I+desMwER8ZHQ9Om5n7RakMwH/rY=*/ /* * @Author: zhengxinm * @PageInfo: 汇总打印按钮 @@ -45,5 +44,3 @@ export default function(props, pagecode, head, body) { }); // } } - -/*XFTCsVjxYETBCu9I+desMwER8ZHQ9Om5n7RakMwH/rY=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/cardBtnClicks/toggerShow.js b/src/ic/ic/pub/cardBtnClicks/toggerShow.js new file mode 100644 index 00000000..30271412 --- /dev/null +++ b/src/ic/ic/pub/cardBtnClicks/toggerShow.js @@ -0,0 +1,341 @@ +import { getDefData } from '../../../../scmpub/scmpub/pub/cache'; +export default function(props) { + let allCardBtnArr = [ + 'CopyInnerLine', //复制行 + 'Print', //打印 + 'SumPrint', //汇总打印 + 'Save', //保存 + 'FetchAuto', //自动取数 + 'ImportSrcBillSN', //导入来源单据序列号 + 'CopyLine', // 复制行 + 'Add', //新增 + 'SaveSign', // 保存签字 + 'PasteEnd', // 粘贴至末行 + 'PasteThis', //粘至此处 + 'DelInnerLine', // 删行 + 'Match', //套件拆卸入库 + 'MaterialFetch', //材料直领 + 'File', // 附件 + 'PrintBarcode', // 打印条形码 + 'DeductCalculate', // 扣吨计算 + 'DeleteLine', // 删行 + + 'Generate4A00', //生成设备卡片 + 'Generate4A', + 'DelTransAsset', + 'ExSnTem', //导出序列号模板 + '', //货位序列号 + 'ReOrderRowNum', //重排行号 + 'Generate4453', //生成途损 + 'ExportTem', // 导出模板 + 'QuitTrans', // 退出转单 + 'SetPiece', // 成套件信息 + 'Output', // 输出 + 'BtnPrintLoc', // 打印货位 + 'Edit', //修改 + 'Sign', //签字 + 'InsertInnerLine', // 插行 + 'Ref21', //采购业务入库 + 'Import', //导入 + 'ImportSN', // 导入序列号 + 'Preview', //预览 + 'Dir', //直接打印条形码 + 'Copy', //复制 + 'Cancel', //取消 + 'Ref4Y', //新增 + 'UnSign', //取消签字 + 'LinkQryAction', //单据追溯 + '', // 增行 + 'Delete', //删除 + 'GenerateHJ', // 生成转固单 + 'Add', //自制 + 'Ref61', //委外业务入库 + 'CancelGenerate4A00', // 取消设备卡片 + 'CancelGenerate4A', + 'ImportMenu', //导入 + 'CombinePrint', //合并显示 + '', // 存量查拣 + 'DelTransAssetBill', // 取消转固单 + 'CancelPaste', //取消 + 'Ref', //资产入库 + 'Refresh', //刷新 + 'FetchOutOnhand' + ]; + let editCardBtnArr = [ + 'Save', //保存 + 'Cancel', //取消 + 'FetchAuto', //自动取数 + 'AddLine', // 增行 + 'DeleteLine', // 删行 + 'CopyLine', // 复制行 + 'LOCSNBarCode', //货位序列号 + 'OnhandnumQuery', // 存量查拣 + 'ReOrderRowNum', //重排行号 + 'DelInnerLine', // 删行 + 'DeductCalculate', // 扣吨计算 + // 'CopyInnerLine', //复制行 + 'InsertInnerLine', // 插行 + 'ImportSN', // 导入序列号 + 'SetPiece' // 成套件信息 + ]; + let editTransCardBtnArr = [ + 'Save', //保存 + 'LOCSNBarCode', + 'ReOrderRowNum', + 'OnhandnumQuery', + 'Cancel', //取消 + 'FetchAuto', //自动取数 + 'DeductCalculate', // 扣吨计算 + '', // 增行 + 'DeleteLine', // 删行 + 'CopyLine', // 复制行 + '', //货位序列号 + 'OnhandnumQuery', // 存量查拣 + 'ReOrderRowNum', //重排行号 + 'DelInnerLine', // 删行 + 'CopyInnerLine', //复制行 + 'InsertInnerLine', // 插行 + 'ImportSN', // 导入序列号 + 'SetPiece', // 成套件信息 + 'QuitTrans' // 退出转单 + ]; + let browseProcessCardBtnArr = [ + 'LOCSNBarCode', + 'OnhandnumQuery', + 'Add', //新增 + 'Edit', //修改 + 'Delete', //删除 + 'Copy', //复制 + 'Import', //导入 + 'ExportTem', // 导出模板 + 'ExSnTem', //导出序列号模板 + 'Generate4453', //生成途损 + 'File', // 附件 + 'LinkQryAction', //单据追溯 + 'Print', //打印 + 'Output', // 输出 + 'CombinePrint', //合并显示 + 'SumPrint', //汇总打印 + 'BtnPrintLoc', // 打印货位 + 'Dir', //直接打印条形码 + '', // 打印条形码 + '', //货位序列号 + '', // 存量查拣 + 'SetPiece', // 成套件信息 + 'Refresh' //刷新 + ]; + let browseUnSignCardBtnArr = [ + 'LOCSNBarCode', + 'OnhandnumQuery', + 'Add', //新增 + 'Edit', //修改 + 'Delete', //删除 + 'Copy', //复制 + 'Sign', //签字 + 'Generate4453', //生成途损 + 'MaterialFetch', //材料直领 + 'File', // 附件 + 'LinkQryAction', //单据追溯 + 'Print', //打印 + 'Output', // 输出 + 'CombinePrint', //合并显示 + 'SumPrint', //汇总打印 + 'BtnPrintLoc', // 打印货位 + 'Dir', //直接打印条形码 + '', // 打印条形码 + '', //货位序列号 + 'Match', //套件拆卸入库 + '', // 存量查拣 + 'SetPiece', // 成套件信息 + 'Refresh' //刷新 + ]; + let browseSignCBtnArr = [ + 'LOCSNBarCode', + 'OnhandnumQuery', + 'Add', //新增 + 'Copy', //复制 + 'UnSign', //取消签字 + 'Generate4453', //生成途损 + 'File', // 附件 + 'LinkQryAction', //单据追溯 + 'Print', //打印 + 'Output', // 输出 + 'CombinePrint', //合并显示 + 'SumPrint', //汇总打印 + 'BtnPrintLoc', // 打印货位 + 'Dir', //直接打印条形码 + '', // 打印条形码 + '', //货位序列号 + '', // 存量查拣 + 'Generate4A00', //生成设备卡片 + 'Generate4A', + 'MaterialFetch', //材料直领 + 'CancelGenerate4A', + 'CancelGenerate4A00', // 取消设备卡片 + 'GenerateHJ', // 生成转固单 + 'DelTransAssetBill', // 取消转固单 + 'DelTransAsset', + 'SetPiece', // 成套件信息 + 'Refresh' //刷新 + ]; + let bodybuttons = [ + '', + 'Generate4A00', + 'Generate4A', + 'CancelGenerate4A', + 'CancelGenerate4A00', + 'GenerateHJ', + 'DelTransAssetBill', + 'DelTransAsset', + '', + 'DeleteLine', // 删行 + 'CopyLine', + '', + '' + ]; + let cancelBtnVisible = [ 'Import', 'ExportTem', 'Add', 'ImportMenu' ]; + let tabcode = props.getUrlParam('tabcode'); + let status = props.getUrlParam('status'); + let type = props.getUrlParam('type'); + let copyid = props.getUrlParam('copyid'); + //设置全部按钮不显示 + props.button.setButtonVisible(allCardBtnArr, false); + //设置一般编辑按钮显示 + if (status != 'browse' && !type) { + props.button.setButtonVisible(editCardBtnArr, true); + if (status == 'add') { + let pk_org_v = props.form.getFormItemsValue('head', 'pk_org_v'); + // if (!(pk_org_v && pk_org_v.value)) { + // pk_org_v = props.form.getFormItemsValue('generalinhead', 'pk_org_v'); + // } + if (!(pk_org_v && pk_org_v.value)) { + // props.initMetaByPkorg('pk_org_v'); + props.button.setButtonDisabled(bodybuttons, true); + } else { + props.button.setButtonDisabled([ 'LOCSNBarCode', 'ReOrderRowNum', 'OnhandnumQuery' ], false); + } + + props.button.setButtonVisible('ImportSrcBillSN', '', true); //导入来源单据序列号 + } else if (status == 'edit' || copyid) { + //props.resMetaAfterPkorgEdit(); + props.form.setFormItemsDisabled('head', { pk_org_v: true }); + //props.form.setFormItemsDisabled('generalinhead', { pk_org_v: true }); + } + props.button.setMainButton('Save', true); + } + if (props.getUrlParam('copyid')) { + props.button.setButtonDisabled([ 'LOCSNBarCode', 'ReOrderRowNum', 'OnhandnumQuery' ], false); + } + //设置转单编辑按钮显示 + if (status != 'browse' && type) { + props.button.setButtonVisible(editTransCardBtnArr, true); + let ids = props.form.getFormItemsValue('head', 'cgeneralhid'); + if (!(ids && ids.value)) { + props.button.setButtonVisible('ImportSrcBillSN', true); //导入来源单据序列号 + } + props.form.setFormItemsDisabled('head', { pk_org_v: true }); + props.button.setMainButton('Save', true); + } + if (type) { + props.button.setButtonVisible('', false); + props.button.setButtonVisible('QuitTrans', true); + } + + //设置浏览处理中按钮显示 + if (status == 'browse' && tabcode == 'processing') { + props.button.setButtonVisible(browseProcessCardBtnArr, true); + props.button.setMainButton('Edit', true); + props.button.setMainButton('Sign', false); + //props.button.setMainButton('UnSign', false); + } + //设置浏览待签字按钮显示 + if (status == 'browse' && tabcode == 'unsign') { + props.button.setButtonVisible(browseUnSignCardBtnArr, true); + props.button.setMainButton('Sign', true); + //props.button.setMainButton('UnSign', false); + props.button.setMainButton('Edit', false); + } + //设置浏览已签字按钮显示 + if (status == 'browse' && tabcode == 'sign') { + props.button.setButtonVisible(browseSignCBtnArr, true); + props.button.setButtonDisabled( + [ + 'Generate4A00', //生成设备卡片 + 'Generate4A', + + 'CancelGenerate4A', + 'CancelGenerate4A00', // 取消设备卡片 + 'GenerateHJ', // 生成转固单 + 'DelTransAssetBill', // 取消转固单 + 'DelTransAsset' + ], + false + ); + props.button.setMainButton('Sign', false); + props.button.setMainButton('Edit', false); + } + //转单界面不要新增和复制 + if (status == 'browse' && type) { + props.button.setButtonVisible([ 'AddMenu', 'Copy', 'Ref4Y', '' ], false); + // props.button.setButtonVisible('Copy', false); + // props.button.setButtonVisible('Ref4Y', false); + } + //设置没有数据时应该显示的按钮 + let id = props.getUrlParam('id'); + if (status == 'browse' && !id) { + props.button.setButtonVisible(cancelBtnVisible, true); + props.button.setButtonVisible([ 'LOCSNBarCode' ], false); + } + //浏览 + if (status == 'browse') { + props.BillHeadInfo.setBillHeadInfoVisible({ + showBackBtn: true, + showBillCode: true + }); + } + let cgeneralhid = props.form.getFormItemsValue('head', 'cgeneralhid'); + let vbillcode = props.form.getFormItemsValue('head', 'vbillcode'); + // if (!(cgeneralhid && cgeneralhid.value)) { + // cgeneralhid = props.form.getFormItemsValue('generalinhead', 'cgeneralhid'); + // } + // if (!(vbillcode && vbillcode.value)) { + // vbillcode = props.form.getFormItemsValue('generalinhead', 'vbillcode'); + // } + //修改 + if (status != 'browse' && (cgeneralhid && cgeneralhid.value)) { + props.BillHeadInfo.setBillHeadInfoVisible({ + showBackBtn: false, + showBillCode: true, + billCode: vbillcode.value + }); + } + //拉单修改 + if (status != 'browse' && (cgeneralhid && cgeneralhid.value) && type) { + props.BillHeadInfo.setBillHeadInfoVisible({ + showBackBtn: false, + showBillCode: true, + billCode: vbillcode.value + }); + } + //新增 + if (status != 'browse' && !(cgeneralhid && cgeneralhid.value)) { + props.BillHeadInfo.setBillHeadInfoVisible({ + showBackBtn: false, + showBillCode: false + }); + } + //拉单新增 + if (type && status != 'browse' && !(cgeneralhid && cgeneralhid.value)) { + props.BillHeadInfo.setBillHeadInfoVisible({ + showBackBtn: true, + showBillCode: false + }); + } + //,没有数据浏览 + if (status == 'browse' && !(cgeneralhid && cgeneralhid.value)) { + props.BillHeadInfo.setBillHeadInfoVisible({ + showBackBtn: true, + showBillCode: false + }); + } +} diff --git a/src/ic/ic/pub/cardBtnClicks/unSignBtnClick.js b/src/ic/ic/pub/cardBtnClicks/unSignBtnClick.js index 9e2bd318..f8f9eed1 100644 --- a/src/ic/ic/pub/cardBtnClicks/unSignBtnClick.js +++ b/src/ic/ic/pub/cardBtnClicks/unSignBtnClick.js @@ -1,4 +1,3 @@ -/*t+gCfQpD5bULzKPONnKw+MlPvaE6/QWkGu68qYVeglE=*/ /* * @Author: 李浩 * @PageInfo:按钮处理方法 @@ -104,5 +103,3 @@ export default function unSignBtnClick(props, constance, skipCodes) { } }); } - -/*t+gCfQpD5bULzKPONnKw+MlPvaE6/QWkGu68qYVeglE=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/constance/index.js b/src/ic/ic/pub/constance/index.js index 5c3bef63..b47a5637 100644 --- a/src/ic/ic/pub/constance/index.js +++ b/src/ic/ic/pub/constance/index.js @@ -1,4 +1,3 @@ -/*8CdHYS+a9Q2smogIeoYriEP5x7vzqBeEXoSMjia1I4E=*/ const AREA = { headForm: 'head', bodyTable: 'bodytable', @@ -494,5 +493,3 @@ export { FREEFIELD, AUMBILLTYPE }; - -/*8CdHYS+a9Q2smogIeoYriEP5x7vzqBeEXoSMjia1I4E=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/locationEvents/afterEvents/index.js b/src/ic/ic/pub/locationEvents/afterEvents/index.js new file mode 100644 index 00000000..04078ac2 --- /dev/null +++ b/src/ic/ic/pub/locationEvents/afterEvents/index.js @@ -0,0 +1,90 @@ +/* + * @Author: maopch + * @PageInfo: 重写父类的表体行编辑后方法 + * @Date: 2018-05-16 09:58:54 + * @Last Modified by: gaoxwu + * @Last Modified time: 2021-12-03 15:26:06 + */ + +import numEvents from './numEvents'; +import loccodeEvent from './loccodeEvent'; +import { serialcodeEvent } from './serialcodeEvent'; +import { getTureFun } from '../util'; +import pubBatchEvents from './pubBatchEvents'; + +/** + * @param {*} props + * @param {*} moduleId 区域id + * @param {*} key 操作的键 + * @param {*} value 当前值 + * @param {*} changedrows 新旧值集合 + * @param {*} record 行数据 + * @param {*} index 当前index + */ +function bodyRowAfterEvent(props, moduleId, key, value, changedrows, index, record) { + if (changedrows && changedrows[0] && key != 'vserialcode') { + if ( + (!changedrows[0].oldvalue || !changedrows[0].oldvalue.value) && + (!changedrows[0].newvalue || !changedrows[0].newvalue.value) + ) { + //两个值同时为空或不存在 + return; + } else if ( + changedrows[0].oldvalue && + changedrows[0].oldvalue.value && + changedrows[0].newvalue && + changedrows[0].newvalue.value && + changedrows[0].oldvalue.value == changedrows[0].newvalue.value + ) { + //两个值相等 + return; + } + } + switch (key) { + case 'nassistnum': + case 'nnum': + case 'ngrossnum': + // 数量、主数量、毛重数量 + getTureFun(props, numEvents, 'numEvents').call( + this, + props, + moduleId, + key, + value, + changedrows, + index, + record + ); + break; + case 'vserialcode': + // 序列号 + getTureFun(props, serialcodeEvent, 'serialcodeEvent').call( + this, + props, + moduleId, + key, + value, + changedrows, + index, + record + ); + break; + case 'clocationid': + // 货位 + getTureFun(props, loccodeEvent, 'loccodeEvent').call( + this, + props, + moduleId, + key, + value, + changedrows, + index, + record + ); + break; + default: + break; + } +} + +export { bodyRowAfterEvent, pubBatchEvents }; diff --git a/src/ic/ic/pub/locationEvents/afterEvents/loccodeEvent.js b/src/ic/ic/pub/locationEvents/afterEvents/loccodeEvent.js new file mode 100644 index 00000000..a9aba361 --- /dev/null +++ b/src/ic/ic/pub/locationEvents/afterEvents/loccodeEvent.js @@ -0,0 +1,65 @@ +import { serialFields } from '../constance'; + +/* + * @Author: maopch + * @PageInfo: 货位编辑后 + * @Date: 2018-05-29 17:46:25 + * @Last Modified by: zhengylr + * @Last Modified time: 2022-10-27 15:34:55 + */ +import { cacheTool } from '../../../components/location/location'; + +export default function(props, moduleId, key, value, changedrows, index, record) { + let rowLoc; + if (value) { + rowLoc = { + refpk: value.value || value.refpk, + refname: value.display || value.refname, + refcode: value.display || value.refcode + }; + } else { + rowLoc = { + refpk: '', + refname: '', + refcode: '' + }; + } + record.values[key] = { value: value.value || value.refpk, display: value.display || value.refcode }; + // let rowLoc = { + // refpk: record.values.clocationid.value, + // refname: record.values.clocationid.display, + // refcode: record.values.clocationid.display + // }; + + // 删掉所有的序列号相关字段 + let allRows = props.editTable.getAllRows(moduleId); + + allRows.forEach((row) => { + if (row.rowid == record.rowid) { + for (const key in record.values) { + if (serialFields.includes(key)) { + record.values[key] = { display: null, value: null, scale: -1 }; + } + } + row = record; + } + }); + // for (let row of allRows) { + // if (row.rowid == record.rowid) { + // for (const key in record.values) { + // if (serialFields.includes(key)) { + // record.values[key] = { display: null, value: null, scale: -1 }; + // } + // } + // row = record; + // break; + // } + // } + + props.editTable.setTableData(moduleId, { rows: allRows }); + + // 更新缓存 + cacheTool.tableData.rows[cacheTool.currentIndex].rows = allRows; + + this.setState({ rowLoc }); +} diff --git a/src/ic/ic/pub/locationEvents/afterEvents/numEvents.js b/src/ic/ic/pub/locationEvents/afterEvents/numEvents.js new file mode 100644 index 00000000..0329a8c9 --- /dev/null +++ b/src/ic/ic/pub/locationEvents/afterEvents/numEvents.js @@ -0,0 +1,114 @@ +/* + * @Author: maopch + * @PageInfo: 数量与主数量的换算 + * @Date: 2018-05-16 10:08:47 + * @Last Modified by: fangmj7 + * @Last Modified time: 2021-09-03 15:10:37 + */ +import { cacheTool } from '../../../components/location/location'; +import { getTureFun } from '../util'; +import { countNum } from '../oprEvents'; +import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil'; +import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil'; + +// 因为数量和主数量相互联动,如果和上一次的value不进行比较控制话回造成死循环 +// 上一次编辑的数量 +let oldNassistnum = 0; +// 上一次编辑的主数量 +let oldNnum = 0; + +export default function(props, moduleId, key, value, changedrows, index, record) { + const bodyCode = props.uiInfo.bodyCode; + // console.log(cacheTool.tableData); + let headRecord = cacheTool.tableData.rows[cacheTool.currentIndex]; + // 换算率 + let rate = headRecord.values.vchangerate.value.split('/'); + //是否退库使用数量来看 + //let freplenishflag = headRecord.values.freplenishflag.value; + let oldnnum = headRecord.values.nnum.value; + let scale = headRecord.values[key].scale; + props.editTable.setValByKeyAndIndex(bodyCode, index, key, { + value: parseFloat(value).toFixed(scale), + scale + }); + // let isSer = props.locType.isSer; + let isSer = this.state.record.values.isSer.value; + if (key === 'nassistnum') { + //加上退库不能改变货位数量的正反 + if (oldnnum && oldnnum < 0 && value && value > 0) { + showWarningInfo('', getLangByResId(this, '4008PUB-000232'), 8); /* 国际化处理: 退库行货位不允许是正数*/ + props.editTable.setValByKeyAndIndex(bodyCode, index, 'nassistnum', { + value: null, + scale + }); + props.editTable.setValByKeyAndIndex(bodyCode, index, 'nnum', { + value: null, + scale + }); + return; + } + // if (oldNassistnum == value) return false; + // 主数量 + if (value || value === 0) { + let nnum = rate[0] / rate[1] * value; + oldNnum = nnum; + scale = headRecord.values.nnum.scale; + props.editTable.setValByKeyAndIndex(bodyCode, index, 'nnum', { + value: nnum.toFixed(scale), + scale + }); + } else { + props.editTable.setValByKeyAndIndex(bodyCode, index, 'nnum', { + value: null, + scale + }); + props.editTable.setValByKeyAndIndex(bodyCode, index, 'nassistnum', { + value: null, + scale + }); + } + } else if (key === 'nnum' && !isSer) { + // if (oldNnum == value) return false; + // 数量 + //加上退库不能改变货位数量的正反 + if (oldnnum && oldnnum < 0 && value && value > 0) { + showWarningInfo('', getLangByResId(this, '4008PUB-000232'), 8); /* 国际化处理: 退库行货位不允许是正数*/ + props.editTable.setValByKeyAndIndex(bodyCode, index, 'nassistnum', { + value: null, + scale + }); + props.editTable.setValByKeyAndIndex(bodyCode, index, 'nnum', { + value: null, + scale + }); + return; + } + if (value || value === 0) { + let nassistnum = value / rate[0] * rate[1]; + oldNassistnum = nassistnum; + scale = headRecord.values.nassistnum.scale; + props.editTable.setValByKeyAndIndex(bodyCode, index, 'nassistnum', { + value: nassistnum.toFixed(scale), + scale + }); + } else { + props.editTable.setValByKeyAndIndex(bodyCode, index, 'nassistnum', { + value: null, + scale + }); + props.editTable.setValByKeyAndIndex(bodyCode, index, 'nnum', { + value: null, + scale + }); + } + } else if (key === 'ngrossnum') { + let ngrossnum = value; + scale = headRecord.values.nnum.scale; + props.editTable.setValByKeyAndIndex(bodyCode, index, 'ngrossnum', { + value: ngrossnum, + scale + }); + } + // 计算合计 + getTureFun(props, countNum, 'countNum').call(this, props.editTable.getAllRows(bodyCode)); +} diff --git a/src/ic/ic/pub/locationEvents/afterEvents/pubBatchEvents.js b/src/ic/ic/pub/locationEvents/afterEvents/pubBatchEvents.js index 7be4dd4e..2703f177 100644 --- a/src/ic/ic/pub/locationEvents/afterEvents/pubBatchEvents.js +++ b/src/ic/ic/pub/locationEvents/afterEvents/pubBatchEvents.js @@ -1,4 +1,3 @@ -/*LAz++BtTYn4fNSKmfT2TYKaXAaP8RSoOaBxQxocvquk=*/ /* * @Author: zhengxinm * @PageInfo: 表体编辑后事件 批量 @@ -127,5 +126,3 @@ export default async function pubbatchEvents(obj) { extraAjaxParam }); } - -/*LAz++BtTYn4fNSKmfT2TYKaXAaP8RSoOaBxQxocvquk=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/locationEvents/afterEvents/serialcodeEvent.js b/src/ic/ic/pub/locationEvents/afterEvents/serialcodeEvent.js new file mode 100644 index 00000000..aa96a473 --- /dev/null +++ b/src/ic/ic/pub/locationEvents/afterEvents/serialcodeEvent.js @@ -0,0 +1,273 @@ +/* + * @Author: maopch + * @PageInfo: 序列号编辑后事件 + * @Date: 2018-05-17 13:23:09 + * @Last Modified by: zhengylr + * @Last Modified time: 2023-08-09 15:33:21 + */ +import { ajax } from 'nc-lightapp-front'; +import { cacheTool } from '../../../components/location/location'; +import { getDefualtValue, countNum } from '../oprEvents'; +import { getTureFun } from '../util'; +import { showWarningDialog } from '../../../../../scmpub/scmpub/pub/tool/messageUtil'; +import { getAllNext } from '../../utils'; +import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil'; + +let size = 0; // 显示了几条数据 +let nnum = 0; // 实收、实发数量 + +function serialcodeEvent(props, moduleId, key, value, changedrows, index, record) { + const { editTable, uiInfo, meta } = props; + const { getAllRows } = editTable; + const { bodyCode } = uiInfo; + //双击后复制粘贴多行数据时,会错误得进入单行的编辑后事件,在此清空输入并返回 + if (value.value && value.value.indexOf(' ') != -1) { + editTable.setValByKeyAndIndex(bodyCode, index, key, { value: null, display: null }); + return; + } + setTimeout(() => { + let items = meta.getMeta()[bodyCode].items; + // 获取序列号的模板类型 + let serMetaType = ''; + for (let i = 0; i < items.length; i++) { + if (items[i].attrcode === 'vserialcode') { + serMetaType = items[i].itemtype; + break; + } + } + // 正的入库和负的出库为input,否则为refer + if (serMetaType == 'input') { + // 重置 + size = 0; // 显示了几条数据 + nnum = 0; // 实收、实发数量 + + let allRows = getAllRows(bodyCode); + allRows.forEach((item) => { + if (item.status != 3) { + size++; + } + }); + + let headData = cacheTool.tableData; + // 对应表头行的序列号单位 + let csnunitid = headData.rows[cacheTool.currentIndex].values.csnunitid; + // 单位 + let castunitid = headData.rows[cacheTool.currentIndex].values.castunitid; + // 主单位 + let cunitid = headData.rows[cacheTool.currentIndex].values.cunitid; + if (csnunitid.value == cunitid.value) { + nnum = headData.rows[cacheTool.currentIndex].values.nnum; + } else if (csnunitid.value == castunitid.value) { + nnum = headData.rows[cacheTool.currentIndex].values.nassistnum; + } + if (nnum && nnum.value) { + nnum = parseFloat(nnum.value); + } else { + nnum = parseFloat(cacheTool.tableData.rows[cacheTool.currentIndex].values.nshouldnum.value); + if (isNaN(nnum)) { + nnum = 0; + } + } + + if (Math.abs(nnum) > size) { + showWarningDialog(getLangByResId(this, '4008PUB-000067'), getLangByResId(this, '4008PUB-000068'), { + /* 国际化处理: 请确认,序列号数量大于1,系统将要拆行自动生成序列号,是否自动生成,请您确认!*/ + beSureBtnClick: autoAddSer.bind(this, value, { + props, + moduleId, + key, + value, + changedrows, + index, + record + }) + }); + } else { + setTimeout(processData.bind(this, 'input', { moduleId, key, value, changedrows, index, record }), 0); + } + } else if (serMetaType == 'refer') { + if (value.length == 0) { + //序列号清空 + editTable.setValByKeyAndIndex(moduleId, index, 'clocationid', { + value: null, + display: null + }); + } else if (value.length == 1 && value[0] && value[0].clocationid) { + //序列号单行编辑后 + editTable.setValByKeyAndIndex(moduleId, index, 'clocationid', { + value: value[0].clocationid, + display: value[0].locname + }); + editTable.setValByKeyAndIndex(moduleId, index, 'pk_serialcode', { + value: value[0].refpk == value[0].refcode ? null : value[0].refpk, + display: value[0].refpk == value[0].refcode ? null : value[0].refpk, + scale: -1 + }); + } else if (value.length >= 2) { + //序列号多选 + let { rowLoc, loc } = this.state; + if (loc == null || JSON.stringify(loc) == '{}') { + loc = rowLoc != null ? rowLoc : {}; + } + editTable.deleteTableRowsByIndex(bodyCode, index); + let allRows = getTureFun(this.props, getDefualtValue, 'getDefualtValue').call(this, value, null, index); + editTable.setTableData(bodyCode, { rows: allRows }); + for (let j = 0; j < allRows.length; j++) { + let sc = allRows[j] && allRows[j].values.vserialcode ? allRows[j].values.vserialcode.display : null; + if (!sc || sc.includes(',')) { + editTable.deleteTableRowsByIndex(bodyCode, j, true); + break; + } + } + } + setTimeout(processData.bind(this), 0); + } else { + return false; + } + }, 0); +} + +/** + * 数据的后续处理, 计算合计, 更新缓存 + * @param {string} flag + * @param {object} target + */ +function processData(flag, target) { + const { editTable, uiInfo, locCode, handleRelationItems } = this.props; + const { setValByKeyAndIndex, getAllRows, setTableData } = editTable; + const { bodyCode, pageCode } = uiInfo; + let allRows = getAllRows(bodyCode); + + // 这里更新缓存, 因为后续操作有可能需要从缓存中获取最新数据 + let data = cacheTool.tableData.rows[cacheTool.currentIndex].values[locCode]; + if (data) { + if (!data.rows) { + data.rows = []; + } + } else { + data = { rows: [] }; + } + if (flag == 'input') { + let { moduleId, key, value, changedrows, index, record } = target; + let refName = value; + let condition = { + cmaterialvid: cacheTool.tableData.rows[cacheTool.currentIndex].values.cmaterialvid.value, + vserialcode: record.values.vserialcode.value + }; + ajax({ + url: '/nccloud/ic/pub/queryserialno.do', + data: condition, + mode: 'normal', + async: false, + success: (res) => { + value = { + pk_serialcode: res.data, + refname: refName && refName.length ? refName : '', + refpk: res.data, + value: refName && refName.length ? refName : '' + }; + setValByKeyAndIndex(bodyCode, index, 'pk_serialcode', { + value: value ? value.pk_serialcode : null + }); + setValByKeyAndIndex(moduleId, index, 'vserialcode', { + value: value ? value.refname : null, + display: value ? value.refname : null + }); + record.values.pk_serialcode = {}; + record.values.pk_serialcode.value = value.pk_serialcode ? value.pk_serialcode : null; + handleRelationItems({ + type: 'table', //编辑的是表单值为'form', 编辑的是表格值为'table' + areaCode: bodyCode, //编辑区域的编码 + key: 'pk_serialcode', //编辑字段英文名称 + value: value.pk_serialcode ? value.pk_serialcode : '-1', //编辑字段的新值 + changedrows: changedrows, // 若编辑的是表格,需要传该参数(编辑字段的旧值),表单不传 + index: index, //当前是第几行 : 从 0 开始,编辑表格时,需要传该参数,表单不传 + record: record, + callback: () => {} + }); + // 在这儿又设置了一次序列号, 不知道为什么上面的那次第一次设置的时候回失效 + setValByKeyAndIndex(moduleId, index, 'vserialcode', { + value: value ? value.refname : null, + display: value ? value.refname : null + }); + allRows = getAllRows(bodyCode); + } + }); + } else { + ajax({ + url: '/nccloud/ic/pub/dealserialcoderelation.do', + async: false, + mode: 'normal', + data: { + pageid: pageCode, + templetid: this.templetid, + model: { areacode: bodyCode, rows: allRows }, + userjson: cacheTool.tableData.rows[cacheTool.currentIndex].values.cmaterialvid.value + }, + success: (res) => { + allRows = res.data[bodyCode].rows; + setTableData(bodyCode, res.data[bodyCode]); + } + }); + } + data.rows = [ ...allRows ]; + cacheTool.tableData.rows[cacheTool.currentIndex].values[locCode] = data; + getTureFun(this.props, countNum, 'countNum').call(this, allRows); +} + +/** + * 自动生成序列号 + */ +function autoAddSer(sncode, target) { + let { rowLoc, loc } = this.state; + const { editTable, uiInfo } = this.props; + const { bodyCode, pageCode } = uiInfo; + const { getAllRows, deleteTableRowsByIndex, getNumberOfRows, setValByKeyAndIndex, setTableData } = editTable; + if (loc == null || JSON.stringify(loc) == '{}') { + loc = rowLoc != null ? rowLoc : {}; + } + + let lastIndex = getNumberOfRows(bodyCode); + // 为本行设置货位 + // setValByKeyAndIndex(bodyCode, lastIndex-1, 'clocationid', { + // value: loc.refpk, + // display: loc.refname + // }); + let allSn = getAllNext(sncode, Math.abs(nnum) - size); + let allRows = getTureFun(this.props, getDefualtValue, 'getDefualtValue').call(this, allSn, { + clocationid: { + value: loc.refpk, + display: loc.refname + } + }); + + ajax({ + url: '/nccloud/ic/pub/dealserialcoderelation.do', + async: false, + data: { + pageid: pageCode, + templetid: this.templetid, + model: { areacode: bodyCode, rows: allRows }, + userjson: cacheTool.tableData.rows[cacheTool.currentIndex].values.cmaterialvid.value + }, + mode: 'normal', + success: (res) => { + if (res.data) { + setTableData(bodyCode, res.data[bodyCode]); + } + } + }); + + // setTableData(bodyCode, { rows: allRows }); + // 去掉序列号为空的行 + for (let j = 0; j < allRows.length; j++) { + let sc = allRows[j] ? allRows[j].values.vserialcode.display || allRows[j].values.vserialcode.value : null; + if ((!sc || sc.includes(',')) && allRows[j].status != '3') { + deleteTableRowsByIndex(bodyCode, j, false); + break; + } + } + setTimeout(processData.bind(this, 'input', target), 0); +} + +export { serialcodeEvent }; diff --git a/src/ic/ic/pub/locationEvents/beforeEvents/hslBeforeEvent.js b/src/ic/ic/pub/locationEvents/beforeEvents/hslBeforeEvent.js new file mode 100644 index 00000000..102179e7 --- /dev/null +++ b/src/ic/ic/pub/locationEvents/beforeEvents/hslBeforeEvent.js @@ -0,0 +1,76 @@ +/** + * 换算率编辑前处理,只适用于cardtable + * 这类方法必须有返回值,返回true为可编辑,false为不可编辑 + */ +import { ajax, toast } from 'nc-lightapp-front'; +export default function(record) { + return new Promise(function(resolve, reject) { + let key = 'vchangerate'; + let pk_org_field = 'pk_org'; + let cmaterialvid_field = 'cmaterialvid'; + let cunitid_field = 'cunitid'; + let castunitid_field = 'castunitid'; + let ccorrespondhid_field = 'ccorrespondhid'; + + let pk_org = record.values.corpvid; + let cmaterialvid = record.values.cmaterialvid; + let cunitid = record.values.cunitid; + let castunitid = record.values.castunitid; + let ccorrespondhid = record.values.ccorrespondhid; + if ( + cunitid && + cunitid.value && + castunitid && + castunitid.value && + cmaterialvid && + cmaterialvid.value && + pk_org && + pk_org.value + ) { + //主单位和单位相同,换算率不可编辑 + if (cunitid.value === castunitid.value) { + resolve(false); + } else { + let params = {}; + params[pk_org_field] = pk_org.value; + params[cmaterialvid_field] = cmaterialvid.value; + params[cunitid_field] = cunitid.value; + params[castunitid_field] = castunitid.value; + if (ccorrespondhid && ccorrespondhid.value) { + params[ccorrespondhid_field] = ccorrespondhid.value; + } + let data = { + key: key, + params: params + }; + ajax({ + url: '/nccloud/ic/event/before.do', + data: data, + success: (res) => { + if (res.data) { + let isedit = res.data.isedit; + if (isedit) { + resolve(isedit); + } else if (res.data.message) { + toast({ + color: 'warning', + content: res.data.message + }); + } + resolve(false); + } + }, + error: (error) => { + toast({ + color: 'warning', + content: error.message + }); + resolve(false); + } + }); + } + } else { + resolve(false); + } + }); +} diff --git a/src/ic/ic/pub/locationEvents/beforeEvents/index.js b/src/ic/ic/pub/locationEvents/beforeEvents/index.js new file mode 100644 index 00000000..ae5bcaa7 --- /dev/null +++ b/src/ic/ic/pub/locationEvents/beforeEvents/index.js @@ -0,0 +1,94 @@ +/* + * @Author: maopch + * @PageInfo: + * @Date: 2018-06-14 17:16:18 + * @Last Modified by: yangtaow + * @Last Modified time: 2022-10-21 17:21:10 + */ +import { getTureFun } from '../util'; +import serialcodeBeforeEvent from './serialcodeBeforeEvent'; +import { serialFields, locFields, FIELDS } from '../constance'; +import hslBeforeEvent from './hslBeforeEvent'; +/** + * moduleId(区域id), item(模版当前列的项), index(当前索引),value(当前值), record(行数据) + * @param {*} moduleId 区域id + * @param {*} item 模版当前列的项 + * @param {*} index 当前索引 + * @param {*} value 当前值 + * @param {*} record 行数据 + */ +async function bodyRowBeforeEvent(props, moduleId, item, index, value, record) { + const { locType, uiInfo } = props; + const { bodyCode } = uiInfo; + record = this.state.record; + let { isLoc, isSer } = record.values; + // 是否货位取的是表头的 + isLoc = locType.isLoc; + // 是否序列号是去的表体的 + isSer = isSer && isSer.value ? true : false; + if (serialFields.includes(item.key)) { + if (item.key == 'vserialcode') { + getTureFun(props, serialcodeBeforeEvent, 'serialcodeBeforeEvent').call( + this, + moduleId, + item, + index, + value, + record + ); + } else if (item.key.startsWith(FIELDS.vsndef)) { + let meta = this.props.meta.getMeta(); + meta[bodyCode].items = meta[bodyCode].items.map((item) => { + // 组织过滤序列号自定义项 + item.queryCondition = () => { + let pk_org = record.values.pk_org.value; + return { pk_org: pk_org }; + }; + return item; + }); + this.props.meta.setMeta(meta); + } + return isSer; + } else if (item.attrcode == 'clocationid') { + let meta = this.props.meta.getMeta(); + meta[bodyCode].items = meta[bodyCode].items.map((item) => { + // 仓库过滤货位 + item.queryCondition = () => { + let warehouse = this.props.warehouse; + return { + pk_stordoc: warehouse, + TreeRefActionExt: 'nccloud.web.ic.pub.ref.ClocationRefSqlBuilder' + }; + }; + return item; + }); + this.props.meta.setMeta(meta); + } else if ([ 'nassistnum', 'nnum' ].includes(item.key)) { + if (isSer) { + let flag = await hslBeforeEvent.call(this, record); + return flag; + } + return !isSer; + } else if (locFields.includes(item.key)) { + return isLoc; + } + return true; + // switch (item.key) { + // case 'vserialcode': + // getTureFun(this.props, serialcodeBeforeEvent, 'serialcodeBeforeEvent').call( + // this, + // moduleId, + // item, + // index, + // value, + // record + // ); + // break; + // case '': + // return + // default: + // break; + // } +} + +export { bodyRowBeforeEvent }; diff --git a/src/ic/ic/pub/locationEvents/beforeEvents/serialcodeBeforeEvent.js b/src/ic/ic/pub/locationEvents/beforeEvents/serialcodeBeforeEvent.js new file mode 100644 index 00000000..7b743d71 --- /dev/null +++ b/src/ic/ic/pub/locationEvents/beforeEvents/serialcodeBeforeEvent.js @@ -0,0 +1,31 @@ +/* + * @Author: maopch + * @PageInfo: + * @Date: 2018-10-17 14:12:43 + * @Last Modified by: maopch + * @Last Modified time: 2018-11-10 16:55:16 + */ +import { cacheTool } from '../../../components/location/location'; + +export default function(moduleId, item1, index, value, record) { + const { uiInfo, locCode } = this.props; + const { bodyCode } = uiInfo; + this.setState({ vserialcode: value }); + let meta = this.props.meta.getMeta(); + let item = meta[bodyCode].items.find(item => item.attrcode == 'vserialcode' && item.itemtype == 'refer'); + if (item) { + // 序列号过滤 + item.queryCondition = () => { + let hrecord = cacheTool.tableData.rows[cacheTool.currentIndex]; + let warehouse = this.props.warehouse; + let bodyRows = hrecord.values[locCode] ? hrecord.values[locCode].rows : null; + let clocationid = null; + if (bodyRows && bodyRows.length > 0 && bodyRows.length > index) { + clocationid = bodyRows[index].values.clocationid ? bodyRows[index].values.clocationid.value : null; + } + return { record: hrecord, warehouse: warehouse, clocationid }; + }; + + this.props.meta.setMeta(meta); + } +} diff --git a/src/ic/ic/pub/locationEvents/constance/index.js b/src/ic/ic/pub/locationEvents/constance/index.js index 2f112d79..052b1433 100644 --- a/src/ic/ic/pub/locationEvents/constance/index.js +++ b/src/ic/ic/pub/locationEvents/constance/index.js @@ -1,4 +1,3 @@ -/*8CdHYS+a9Q2smogIeoYriEP5x7vzqBeEXoSMjia1I4E=*/ const locFields = [ 'clocationid' ]; const serialFields = [ 'vserialcode', @@ -60,5 +59,3 @@ const AREA = { }; export { locFields, serialFields, FIELDS, AREA }; - -/*8CdHYS+a9Q2smogIeoYriEP5x7vzqBeEXoSMjia1I4E=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/locationEvents/init/index.js b/src/ic/ic/pub/locationEvents/init/index.js new file mode 100644 index 00000000..54195f48 --- /dev/null +++ b/src/ic/ic/pub/locationEvents/init/index.js @@ -0,0 +1,2 @@ +import initTemplate from './initTemplate'; +export { initTemplate }; diff --git a/src/ic/ic/pub/locationEvents/init/initTemplate.js b/src/ic/ic/pub/locationEvents/init/initTemplate.js new file mode 100644 index 00000000..5485a307 --- /dev/null +++ b/src/ic/ic/pub/locationEvents/init/initTemplate.js @@ -0,0 +1,90 @@ +/* * @Author: hujieh * @PageInfo: 页面功能描述 * @Date: 2020-02-25 10:04:13 * @Last Modified by: hujieh * @Last Modified time: 2020-02-25 10:04:13 */ /* * @Author: hujieh * @PageInfo: 页面功能描述 * @Date: 2020-02-25 10:04:05 * @Last Modified by: hujieh * @Last Modified time: 2020-02-25 10:04:05 */ /* * @Author: hujieh * @PageInfo: 页面功能描述 * @Date: 2020-02-25 10:01:54 * @Last Modified by: hujieh * @Last Modified time: 2020-02-25 10:01:54 */ /* + * @Author: maopch + * @PageInfo: 初始化孙表模板 + * @Date: 2018-05-05 13:51:49 + * @Last Modified by: zhengxinm + * @Last Modified time: 2020-03-30 16:39:13 + */ +import { delRowEvent } from '../oprEvents'; +import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil'; + +export default function(props) { + const { uiInfo, meta } = this.props; + let params = { pagecode: uiInfo.pageCode }; + if (uiInfo.appCode) { + params = { pagecode: uiInfo.pageCode, appcode: uiInfo.appCode }; + } + props.createUIDom(params, (data) => { + if (data) { + if (data.template) { + // 这里要记下templetid + this.templetid = data.template.pageid; + let nmeta = data.template; + // 设置meta + nmeta = modifier.call(this, nmeta); + meta.setMeta(nmeta); + } + + // 货位序列号上的行删除按钮,以前采用a标签的形式,ue要求和其它列表一致,需要采用 createOprationButton 的形式创建,但模板分属于各个单据,为了不配模板,采用前端json的形式添加按钮数据 + let locLineDelBtn = { + type: 'general_btn', + key: 'loc_line_del', + title: getLangByResId(this, '4008PUB-000027') /* 国际化处理: 删除*/, + area: 'loc_line', + iskeyfunc: false, + btncolor: 'button_secondary', + isenable: true, + order: '0', + children: [] + }; + let buttonJson = data.button || []; + this.props.button.setButtons([ ...buttonJson, locLineDelBtn ]); + } + }); +} + +/** + * 为表体添加操作列 + * @param {*} meta + * @param {*} bodyCode 表体id + */ +function modifier(meta) { + const { uiInfo } = this.props; + const { bodyCode, headCode } = uiInfo; + meta[headCode].items = meta[headCode].items.map((item) => { + if (!item.width) { + item.width = 150; + } + return item; + }); + meta[bodyCode].items = meta[bodyCode].items.map((item) => { + if (!item.width) { + item.width = 150; + } + if (item.attrcode == 'clocationid') { + item.isMultiSelectedEnabled = false; + } + return item; + }); + meta[bodyCode].items.push({ + itemtype: 'customer', + visible: true, + label: getLangByResId(this, '4008PUB-000069') /* 国际化处理: 操作*/, + attrcode: 'opr', + key: 'opr', + fixed: 'right', + width: 100, + render: (text, record, index) => { + return this.props.button.createOprationButton([ 'loc_line_del' ], { + area: 'loc_line', + buttonLimit: 3, + onButtonClick: (props, key) => { + if (key === 'loc_line_del') { + delRowEvent.call(this, [ index ], [ record.rowid ]); + } + } + }); + } + }); + return meta; +} diff --git a/src/ic/ic/pub/locationEvents/lifeCycle/index.js b/src/ic/ic/pub/locationEvents/lifeCycle/index.js new file mode 100644 index 00000000..5131424f --- /dev/null +++ b/src/ic/ic/pub/locationEvents/lifeCycle/index.js @@ -0,0 +1,3 @@ +import willReceivePropsCallBack from './willReceivePropsCallBack'; + +export { willReceivePropsCallBack }; diff --git a/src/ic/ic/pub/locationEvents/lifeCycle/willReceivePropsCallBack.js b/src/ic/ic/pub/locationEvents/lifeCycle/willReceivePropsCallBack.js new file mode 100644 index 00000000..ba5d5f93 --- /dev/null +++ b/src/ic/ic/pub/locationEvents/lifeCycle/willReceivePropsCallBack.js @@ -0,0 +1,137 @@ +/* + * @Author: maopch + * @PageInfo: 生命周期:willreceive回调 + * @Date: 2018-05-21 09:58:26 + * @Last Modified by: zhengylr + * @Last Modified time: 2023-08-09 15:34:26 + */ +import { headRowClickEvent } from '../rowClickEvents'; +import { getTureFun } from '../util'; +import { cacheTool } from '../../../components/location/location'; +import { countNum } from '../oprEvents'; +import { locFields, serialFields } from '../constance'; +export default function(next) { + if (this.props.refreshFlag != next.refreshFlag) { + const { tableData: oldTableData, uiInfo, locStatus, editTable, locType, locCode, billType } = next; + let tableData = JSON.parse(JSON.stringify(oldTableData)); + const { setTableData, getAllRows, hideColByKey, showColByKey, setStatus } = editTable; + const { isLoc, isSer } = locType; + const bodyCode = uiInfo.bodyCode; + + // 更新缓存, 把当前孙表表头行下标重置为0 + cacheTool.currentIndex = 0; + + if (this.catchSerFields) { + isLoc ? showColByKey(uiInfo.bodyCode, locFields) : hideColByKey(uiInfo.bodyCode, locFields); + isSer + ? showColByKey(uiInfo.bodyCode, this.catchSerFields) + : hideColByKey(uiInfo.bodyCode, this.catchSerFields); + } else { + let flag = false; + let visibleFields = []; + serialFields.forEach((field) => { + flag = this.props.editTable.checkVisible.call(this, uiInfo.bodyCode, field); + flag && visibleFields.push(field); + }); + this.catchSerFields = visibleFields; + isLoc ? showColByKey(uiInfo.bodyCode, locFields) : hideColByKey(uiInfo.bodyCode, locFields); + isSer ? showColByKey(uiInfo.bodyCode, visibleFields) : hideColByKey(uiInfo.bodyCode, visibleFields); + } + this.setState({ loc: null, beginSer: '', endSer: '' }); + + // 增加tableData的判断,防止字表不是货位序列号管理时报错 + if (isLoc || isSer || (tableData.rows && tableData.rows.length > 0)) { + if (locStatus === 'add' || locStatus === 'edit') { + setStatus(bodyCode, 'edit'); + } else { + setStatus(bodyCode, 'browse'); + } + + // 根据状态初始化表体数据 + if (!tableData) { + return; + } + // 设置表头的点击行样式,默认是第一行 + tableData.currentIndex = 0; + cacheTool.tableData = tableData; + setTimeout(() => { + // 设置表头数据 + setTableData(uiInfo.headCode, tableData); + // 循环根据表头获取表体数量字段的精度 + for (let hrow of tableData.rows) { + let brow = hrow.values[locCode]; + if (brow) { + if (brow.value && typeof brow.value == 'string') { + brow = JSON.parse(brow.value); + } + for (let lrow of brow.rows) { + // 这里要处理货位参照的isEdit属性, 防止出现每行的货位参照下拉框都会出现的问题 + lrow.values.clocationid.isEdit = false; + // 处理精度 + lrow.values.nnum = lrow.values.nnum || {}; + lrow.values.nnum.scale = hrow.values.nnum.scale; + lrow.values.nassistnum = lrow.values.nassistnum || {}; + lrow.values.nassistnum.scale = hrow.values.nassistnum.scale; + // 处理序列号参照 + // 正的入库和负的出库序列号为input,否则为refer + let num = + hrow.values.nnum && hrow.values.nnum.value ? hrow.values.nnum : hrow.values.nshouldnum; + num = parseFloat(num && num.value ? num.value : 0); + let flag = true; // true是参照, false是输入框 + if (num >= 0) { + flag = billType === 'in'; + } else { + flag = billType === 'out'; + } + if (!flag) { + lrow.values.vserialcode.value = lrow.values.pk_serialcode.value; + } + } + } + } + let headData = tableData.rows[0].values; + let bodyCode = uiInfo.bodyCode; + showColByKey(bodyCode, 'opr'); // 设置操作列默认显示 + + if (locStatus === 'add' || !headData.cgeneralbid || !headData.cgeneralbid.value) { + // 新增 + setaddinit.call(this, headData, tableData, bodyCode); + } else { + // 有表体主键, 说明是edit或browse + if (locStatus === 'browse') { + hideColByKey(bodyCode, 'opr'); // 隐藏操作列 + } + let currentData = tableData.rows[0].values[locCode]; + if (currentData && currentData.value && typeof currentData.value == 'string') { + currentData = JSON.parse(currentData.value); + } + setTableData(bodyCode, currentData ? currentData : { rows: [] }); + getTureFun(this.props, headRowClickEvent, 'headRowClickEvent').call( + this, + null, + tableData.rows[0], + 0 + ); + } + setTimeout(() => { + getTureFun(this.props, countNum, 'countNum').call(this, getAllRows(bodyCode)); + }, 0); + }, 0); + } + } +} + +/** + * 单据为新增时初始化 + * @param {*} headData + * @param {*} tableData + * @param {*} bodyCode + */ +function setaddinit(headData, tableData, bodyCode) { + const { locCode, editTable } = this.props; + const { getAllRows, addRow, setTableData } = editTable; + headData[locCode] && headData[locCode].rows && headData[locCode].rows.length > 0 + ? setTableData(bodyCode, headData[locCode]) + : setTableData(bodyCode, { rows: [] }); + headRowClickEvent.call(this, null, tableData.rows[0], 0); +} diff --git a/src/ic/ic/pub/locationEvents/oprEvents/addDefualtValue.js b/src/ic/ic/pub/locationEvents/oprEvents/addDefualtValue.js new file mode 100644 index 00000000..d8e51430 --- /dev/null +++ b/src/ic/ic/pub/locationEvents/oprEvents/addDefualtValue.js @@ -0,0 +1,87 @@ +/** + * 设置新增行的默认值和可编辑性 + * @param {number} index 下标, -1为最后一行 + * @param {object} defVal 该行的默认值,格式为{key: {value: '', display: '', scale: -1}} + */ +import { cacheTool } from '../../../components/location/location'; + +export default function addDefualtValue(index, defVal) { + if (index === undefined || index === null || isNaN(parseFloat(index))) { + return false; + } + const { uiInfo, editTable } = this.props; + let { record, loc, rowLoc } = this.state; + const { isSer, vchangerate, csnunitid } = record.values; + const { setValByKeyAndIndex, setEditableRowKeyByRowId } = editTable; + if (loc == null || JSON.stringify(loc) == '{}') { + loc = rowLoc != null ? rowLoc : {}; + } + let bodyCode = uiInfo.bodyCode; + // 换算率 + let rate = vchangerate.value.split('/'); + + let rowId = null; + let allRows = this.props.editTable.getAllRows(bodyCode).filter(item => item.status != '3'); + + index = index == -1 ? allRows.length - 1 : index; + //货位 不用控制编辑性,只用控制显示隐藏 + setValByKeyAndIndex(bodyCode, index, 'clocationid', { + value: loc.refpk, + display: loc.refname + }); + if (isSer && isSer.value) { + // 序列号单位 + setValByKeyAndIndex(bodyCode, index, 'csnunitid', { + value: csnunitid.value, + display: csnunitid.display, + scale: -1 + }); + + let bodyNum = record.values.nnum && record.values.nnum.value ? record.values.nnum : record.values.nshouldnum; + bodyNum = bodyNum && bodyNum.value ? bodyNum.value : 0; + let headRecord = cacheTool.tableData.rows[cacheTool.currentIndex]; + + // 数量 + setValByKeyAndIndex(bodyCode, index, 'nassistnum', { + value: parseFloat(bodyNum) >= 0 ? 1 : -1, + display: parseFloat(bodyNum) >= 0 ? 1 : -1, + scale: headRecord.values.nassistnum.scale + }); + // 主数量 + let nnum = (rate[0] / rate[1]) * 1; + nnum = parseFloat(bodyNum) >= 0 ? nnum : -nnum; + setValByKeyAndIndex(bodyCode, index, 'nnum', { + value: nnum, + display: nnum, + scale: headRecord.values.nnum.scale + }); + rowId = getTrueRowId.call(this, index); + setEditableRowKeyByRowId(bodyCode, rowId, 'nassistnum', false); + rowId = getTrueRowId.call(this, index); + setEditableRowKeyByRowId(bodyCode, rowId, 'vserialcode', true); + } else { + rowId = getTrueRowId.call(this, index); + setEditableRowKeyByRowId(bodyCode, rowId, 'vserialcode', false); + rowId = getTrueRowId.call(this, index); + setEditableRowKeyByRowId(bodyCode, rowId, 'nassistnum', true); + } + rowId = getTrueRowId.call(this, index); + setEditableRowKeyByRowId(bodyCode, rowId, 'nnum', false); + // 设置传入的默认值 + for (let key in defVal) { + let item = defVal[key]; + setValByKeyAndIndex(bodyCode, index, key, { + value: item.value, + display: item.display ? item.display : item.value, + scale: item.scale ? item.scale : -1 + }); + } +} + +function getTrueRowId(index) { + let bodyCode = this.props.uiInfo.bodyCode; + // 得到正确的index 和 rowid + let allRows = this.props.editTable.getAllRows(bodyCode).filter(item => item.status != '3'); + + return allRows[index].rowid; +} diff --git a/src/ic/ic/pub/locationEvents/oprEvents/addLineBySerialcode.js b/src/ic/ic/pub/locationEvents/oprEvents/addLineBySerialcode.js index be98e5f2..2c929762 100644 --- a/src/ic/ic/pub/locationEvents/oprEvents/addLineBySerialcode.js +++ b/src/ic/ic/pub/locationEvents/oprEvents/addLineBySerialcode.js @@ -1,4 +1,3 @@ -/*nF4tZ94gHS/g09qZHEstOeMXoBvGfRiND9E6fNQ1vbg=*/ /* * @Author: zhengxinm * @PageInfo:序列号复制功能 @@ -90,5 +89,3 @@ export default function addLineBySerialcode(allSn, matchLocMap, newValue) { getTureFun(this.props, countNum, 'countNum').call(this, allRows); }, 0); } - -/*nF4tZ94gHS/g09qZHEstOeMXoBvGfRiND9E6fNQ1vbg=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/locationEvents/oprEvents/addSer.js b/src/ic/ic/pub/locationEvents/oprEvents/addSer.js index 1429aaea..36393d59 100644 --- a/src/ic/ic/pub/locationEvents/oprEvents/addSer.js +++ b/src/ic/ic/pub/locationEvents/oprEvents/addSer.js @@ -1,4 +1,3 @@ -/*/fAwlO7f+eoSag0UVD7Hb5//PpiMPmLx6FjSDIRzpKM=*/ /* * @Author: maopch * @PageInfo: @@ -74,5 +73,3 @@ export default function addSer() { }, 0); } } - -/*/fAwlO7f+eoSag0UVD7Hb5//PpiMPmLx6FjSDIRzpKM=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/locationEvents/oprEvents/barCodeEvents.js b/src/ic/ic/pub/locationEvents/oprEvents/barCodeEvents.js new file mode 100644 index 00000000..a955d31f --- /dev/null +++ b/src/ic/ic/pub/locationEvents/oprEvents/barCodeEvents.js @@ -0,0 +1,59 @@ +/* + * @Author: maopch + * @PageInfo: 导入序列号功能事件 + * @Date: 2018-10-11 20:49:30 + * @Last Modified by: maopch + * @Last Modified time: 2018-10-18 15:57:42 + */ +import { cacheTool } from '../../../components/location/location'; +import { countNum } from './countNum'; +import { getTureFun } from '../util'; + +/** + * 获取当前的孙表表头行 + */ +export function getHead() { + return cacheTool.tableData.rows[cacheTool.currentIndex]; +} + +/** + * 获取当前孙表的表体数据 + */ +export function getChlid() { + const { editTable, uiInfo } = this.props; + const { bodyCode } = uiInfo; + const { getAllRows } = editTable; + return getAllRows(bodyCode); +} + +/** + * 处理返回的数据, 将数据渲染到孙表表体上 + * @param {*} data 执行 "输入的条形码" 功能后返回的孙表表体数据 + */ +export function processBarCode(data) { + const { editTable, uiInfo, locCode } = this.props; + const { bodyCode } = uiInfo; + const { setTableData, getAllRows } = editTable; + // 更新缓存 + cacheTool.tableData.rows[cacheTool.currentIndex].values[locCode] = data; + // 设置孙表表体 + setTableData(bodyCode, data[bodyCode]); + // 计算合计字段 + let allRows = getAllRows(bodyCode); + let allRowId = allRows.map(item => { + return item.rowid; + }); + let count = 0; + if (allRowId.length > 0) { + count = getTureFun.call(this, this.props, countNum, 'countNum').call(this, allRows); + } + + this.setState({ count: count }); +} + +/** + * 返回仓库 + */ +export function getCwarehouseid() { + return this.props.warehouse; +} diff --git a/src/ic/ic/pub/locationEvents/oprEvents/countNum.js b/src/ic/ic/pub/locationEvents/oprEvents/countNum.js index 695ff510..b988782e 100644 --- a/src/ic/ic/pub/locationEvents/oprEvents/countNum.js +++ b/src/ic/ic/pub/locationEvents/oprEvents/countNum.js @@ -1,4 +1,3 @@ -/*UOpmPrsTIt797vC1HI9Gja5a9ogLRn/4/KapfJNXXdw=*/ /* * @Author: maopch * @PageInfo: @@ -89,5 +88,3 @@ function countNum(target) { } export { countNum }; - -/*UOpmPrsTIt797vC1HI9Gja5a9ogLRn/4/KapfJNXXdw=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/locationEvents/oprEvents/delRowEvent.js b/src/ic/ic/pub/locationEvents/oprEvents/delRowEvent.js index 74fbfb51..fafcbdad 100644 --- a/src/ic/ic/pub/locationEvents/oprEvents/delRowEvent.js +++ b/src/ic/ic/pub/locationEvents/oprEvents/delRowEvent.js @@ -1,4 +1,3 @@ -/*rLhaAJHTcH9Y6HYvLtXQLUMBH0xfnNqfi1Di+r5pvMw=*/ import { countNum } from '../oprEvents'; import { getTureFun } from '../util'; import { cacheTool } from '../../../components/location/location'; @@ -25,5 +24,3 @@ export default function delRowEvent(indexs, rowids) { ); }, 0); } - -/*rLhaAJHTcH9Y6HYvLtXQLUMBH0xfnNqfi1Di+r5pvMw=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/locationEvents/oprEvents/getDefualtValue.js b/src/ic/ic/pub/locationEvents/oprEvents/getDefualtValue.js index 9017a6f6..347d5cc6 100644 --- a/src/ic/ic/pub/locationEvents/oprEvents/getDefualtValue.js +++ b/src/ic/ic/pub/locationEvents/oprEvents/getDefualtValue.js @@ -1,4 +1,3 @@ -/*sdpDjxMsEvT31Swqrq5/qGhzvG5N0aOGCmTFa/P4Mbs=*/ import { cacheTool } from '../../../components/location/location'; import { deepClone } from 'src/scmpub/scmpub/pub/tool'; import { formatAcuracy } from 'nc-lightapp-front'; @@ -255,5 +254,3 @@ function processData(allRows, otherRows) { }); return rows.concat(otherRows); } - -/*sdpDjxMsEvT31Swqrq5/qGhzvG5N0aOGCmTFa/P4Mbs=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/locationEvents/oprEvents/index.js b/src/ic/ic/pub/locationEvents/oprEvents/index.js index ef9b322b..f256092d 100644 --- a/src/ic/ic/pub/locationEvents/oprEvents/index.js +++ b/src/ic/ic/pub/locationEvents/oprEvents/index.js @@ -1,4 +1,3 @@ -/*8CdHYS+a9Q2smogIeoYriEP5x7vzqBeEXoSMjia1I4E=*/ import addSer from './addSer'; import getDefualtValue from './getDefualtValue'; import { countNum } from './countNum'; @@ -7,5 +6,3 @@ import locCollectEvent from './locCollectEvent'; import delRowEvent from './delRowEvent'; export { addSer, getDefualtValue, countNum, okCallback, locCollectEvent, delRowEvent }; - -/*8CdHYS+a9Q2smogIeoYriEP5x7vzqBeEXoSMjia1I4E=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/locationEvents/oprEvents/locCollectEvent.js b/src/ic/ic/pub/locationEvents/oprEvents/locCollectEvent.js index f76e9838..1407779a 100644 --- a/src/ic/ic/pub/locationEvents/oprEvents/locCollectEvent.js +++ b/src/ic/ic/pub/locationEvents/oprEvents/locCollectEvent.js @@ -1,4 +1,3 @@ -/*oSu9SoglWUkIQTtSG54Kc1ZPPDLPjYyzUY239UqvYlU=*/ /* * @Author: maopch * @PageInfo: 货位汇总按钮事件 @@ -55,5 +54,3 @@ export default function() { }); this.setState({ locCollectData: data }); } - -/*oSu9SoglWUkIQTtSG54Kc1ZPPDLPjYyzUY239UqvYlU=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/locationEvents/oprEvents/okCallback.js b/src/ic/ic/pub/locationEvents/oprEvents/okCallback.js index ce2bc5a4..e5bf4727 100644 --- a/src/ic/ic/pub/locationEvents/oprEvents/okCallback.js +++ b/src/ic/ic/pub/locationEvents/oprEvents/okCallback.js @@ -1,4 +1,3 @@ -/*tLCEjcppJQgEhIPN1m9bU+JMDZZ9eMImCQJrLuroUjk=*/ import { locationUtil } from '../../utils'; import { serialFields } from '../constance'; import { formatAcuracy, sum, ajax } from 'nc-lightapp-front'; @@ -412,5 +411,3 @@ function querySN002Value() { function numAdd(num1, num2) { return sum(num1, num2); } - -/*tLCEjcppJQgEhIPN1m9bU+JMDZZ9eMImCQJrLuroUjk=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/locationEvents/rowClickEvents/headRowClickEvent.js b/src/ic/ic/pub/locationEvents/rowClickEvents/headRowClickEvent.js new file mode 100644 index 00000000..926f532c --- /dev/null +++ b/src/ic/ic/pub/locationEvents/rowClickEvents/headRowClickEvent.js @@ -0,0 +1,110 @@ +/* + * @Author: maopch + * @PageInfo: 表头行点击回调 + * @Date: 2018-05-21 09:57:09 + * @Last Modified by: fangmj7 + * @Last Modified time: 2021-09-30 14:22:10 + */ +import { countNum } from '../oprEvents'; +import { cacheTool } from '../../../components/location/location'; +import { getTureFun } from '../util'; +import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil'; + +export default function headRowClickEvent(id, record, index) { + const { editTable, uiInfo, locCode, billType, meta, locType } = this.props; + const { getAllRows, setColValue } = editTable; + const { getMeta, setMeta } = meta; + + let bodyCode = uiInfo.bodyCode; + // 正的入库和负的出库序列号为input,否则为refer + let num = record.values.nnum && record.values.nnum.value ? record.values.nnum : record.values.nshouldnum; + let locMeta = getMeta(); + num = parseFloat(num && num.value ? num.value : 0); + let item = locMeta[bodyCode].items.find((item) => item.attrcode == 'vserialcode'); + if (num >= 0) { + if (billType === 'in') { + item.itemtype = 'input'; + delete item.refcode; + } else { + item.itemtype = 'refer'; + item.refName = getLangByResId(this, '4008PUB-000075'); /* 国际化处理: 序列号档案*/ + item.isMultiSelectedEnabled = true; //多选 + item.refcode = 'ic/refer/serialNO/serialNOGridRef/index.js'; + item.queryCondition = () => { + let record = cacheTool.tableData.rows[cacheTool.currentIndex]; + let warehouse = this.props.warehouse; + let bodyRow = this.props.editTable.getAllRows(bodyCode); + return { record: record, warehouse: warehouse }; + }; + } + } else { + if (billType === 'out') { + item.itemtype = 'input'; + delete item.refcode; + } else { + item.itemtype = 'refer'; + item.refName = getLangByResId(this, '4008PUB-000075'); /* 国际化处理: 序列号档案*/ + item.isMultiSelectedEnabled = true; //多选 + item.refcode = 'ic/refer/serialNO/serialNOGridRef/index.js'; + item.queryCondition = () => { + let record = cacheTool.tableData.rows[cacheTool.currentIndex]; + let warehouse = this.props.warehouse; + let bodyRow = this.props.editTable.getAllRows(bodyCode); + return { record: record, warehouse: warehouse }; + }; + } + } //在途入库 没有序列号 需要跳过 + // setMeta(locMeta); + // if (this.state.record.values) { + // this.props.renderItem('table', uiInfo.bodyCode, 'vserialcode', null); + // } + + let { isLoc, isSer } = record.values; + // 是否货位取的是表头的 + isLoc = locType.isLoc; + // 是否序列号是取的表体的 + isSer = isSer && isSer.value ? true : false; + record = { ...record, isLoc, isSer }; + + let csnunitid = record.values.csnunitid; + // 设置序列号单位 + isSer && csnunitid && setColValue(bodyCode, 'csnunitid', csnunitid); + + let allRows = getAllRows(bodyCode); + let allRowId = allRows.map((item) => { + return item.rowid; + }); + // 修改编辑性 + locMeta[bodyCode].items.forEach((item) => { + if (item.attrcode == 'nassistnum') { + //|| item.attrcode == 'nnum' + item.disabled = !!isSer; + } else if (item.attrcode == 'vserialcode') { + item.disabled = !isSer; + } else if (item.attrcode == 'clocationid') { + item.disabled = !isLoc; + } + }); + setMeta(locMeta); + let changeNum = true; + if (cacheTool.tableData.rows) { + let chrow = cacheTool.tableData.rows[cacheTool.currentIndex].values[locCode]; + if (chrow && chrow.changeNum !== undefined) { + changeNum = chrow.changeNum; + } + } + this.setState({ unit: record.values.cunitid.display, record: record, changeNum }, () => { + let count = 0; + if (allRowId.length > 0) { + count = getTureFun.call(this, this.props, countNum, 'countNum').call(this, allRows); + } + // 判断是否需要重置扩展行的数据 + if (cacheTool.oldIndex == cacheTool.currentIndex) { + this.setState({ count }); + } else { + this.setState({ count, loc: null, beginSer: '', endSer: '' }); + } + }); + + // this.setState({ unit: record.values.cunitid.display, record: record, count: count, beginSer: '', endSer: '' }); +} diff --git a/src/ic/ic/pub/locationEvents/rowClickEvents/index.js b/src/ic/ic/pub/locationEvents/rowClickEvents/index.js new file mode 100644 index 00000000..8688a8a8 --- /dev/null +++ b/src/ic/ic/pub/locationEvents/rowClickEvents/index.js @@ -0,0 +1,3 @@ +import headRowClickEvent from './headRowClickEvent'; + +export { headRowClickEvent }; diff --git a/src/ic/ic/pub/locationEvents/util.js b/src/ic/ic/pub/locationEvents/util.js index 7ad5f157..b5e54df6 100644 --- a/src/ic/ic/pub/locationEvents/util.js +++ b/src/ic/ic/pub/locationEvents/util.js @@ -1,4 +1,3 @@ -/*cnszNhtSIeQVw7xI+k+g7A==*/ /* * @Author: maopch * @PageInfo: 提供给locationEvents 的方法 @@ -85,5 +84,3 @@ export function isTureSer(beginSer, endSer) { } return false; } - -/*cnszNhtSIeQVw7xI+k+g7A==*/ \ No newline at end of file diff --git a/src/ic/ic/pub/transfer/afterEvent/headAfterEvent.js b/src/ic/ic/pub/transfer/afterEvent/headAfterEvent.js index 13d94f36..78d4fc1f 100644 --- a/src/ic/ic/pub/transfer/afterEvent/headAfterEvent.js +++ b/src/ic/ic/pub/transfer/afterEvent/headAfterEvent.js @@ -1,4 +1,3 @@ -/*9oNSQ86zYBKgm3JBJdBE6O9v6tqcUxVQPP7jnAaBPPE=*/ /* * @Author: xiaoyaoj * @PageInfo: 存量出库-编辑后事件 @@ -85,5 +84,3 @@ function getUpdateRows(index, rows) { return [ { index: index, data: rows[0] } ]; } } - -/*9oNSQ86zYBKgm3JBJdBE6O9v6tqcUxVQPP7jnAaBPPE=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/transfer/afterEvent/index.js b/src/ic/ic/pub/transfer/afterEvent/index.js index f0a415aa..872b4655 100644 --- a/src/ic/ic/pub/transfer/afterEvent/index.js +++ b/src/ic/ic/pub/transfer/afterEvent/index.js @@ -1,7 +1,4 @@ -/*8CdHYS+a9Q2smogIeoYriEP5x7vzqBeEXoSMjia1I4E=*/ import searchAfterEvent from './searchAfterEvent'; import headAfterEvent from './headAfterEvent'; export { searchAfterEvent, headAfterEvent }; - -/*8CdHYS+a9Q2smogIeoYriEP5x7vzqBeEXoSMjia1I4E=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/transfer/afterEvent/searchAfterEvent.js b/src/ic/ic/pub/transfer/afterEvent/searchAfterEvent.js index 9bcf8fc6..7557cb2d 100644 --- a/src/ic/ic/pub/transfer/afterEvent/searchAfterEvent.js +++ b/src/ic/ic/pub/transfer/afterEvent/searchAfterEvent.js @@ -1,4 +1,3 @@ -/*VRi3nyqaeOPenSkOLNstN3LNgJjKndB9xVFvZX/jaRk=*/ /* * @Author: xiaoyaoj * @PageInfo: 查询区编辑后 @@ -40,5 +39,3 @@ export default function(pk_org, searcharea, key, val) { ); } } - -/*VRi3nyqaeOPenSkOLNstN3LNgJjKndB9xVFvZX/jaRk=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/transfer/btnClicks/buttonController.js b/src/ic/ic/pub/transfer/btnClicks/buttonController.js index 12cc1550..f5ba878d 100644 --- a/src/ic/ic/pub/transfer/btnClicks/buttonController.js +++ b/src/ic/ic/pub/transfer/btnClicks/buttonController.js @@ -1,4 +1,3 @@ -/*kmMeNHXPpdljPj98yiqeQYKSyIzYTFH/oj9Wv6hSse4=*/ /* * @Author: xiaoyaoj * @PageInfo: 存量出库查询界面,按钮控制 @@ -17,5 +16,3 @@ export default function(props) { props.button.setButtonDisabled(BUTTON.Refresh, false); } } - -/*kmMeNHXPpdljPj98yiqeQYKSyIzYTFH/oj9Wv6hSse4=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/transfer/btnClicks/index.js b/src/ic/ic/pub/transfer/btnClicks/index.js index 3fb853dd..07ab3379 100644 --- a/src/ic/ic/pub/transfer/btnClicks/index.js +++ b/src/ic/ic/pub/transfer/btnClicks/index.js @@ -1,7 +1,4 @@ -/*8CdHYS+a9Q2smogIeoYriEP5x7vzqBeEXoSMjia1I4E=*/ import serachOnhand_btnClick from './serachOnhand_btnClick'; import refresh_BtnClick from './refresh_BtnClick'; import buttonController from './buttonController'; export { serachOnhand_btnClick, refresh_BtnClick, buttonController }; - -/*8CdHYS+a9Q2smogIeoYriEP5x7vzqBeEXoSMjia1I4E=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/transfer/btnClicks/refresh_BtnClick.js b/src/ic/ic/pub/transfer/btnClicks/refresh_BtnClick.js index 6eded761..8a077c33 100644 --- a/src/ic/ic/pub/transfer/btnClicks/refresh_BtnClick.js +++ b/src/ic/ic/pub/transfer/btnClicks/refresh_BtnClick.js @@ -1,4 +1,3 @@ -/*iGEr7jsLTpd/n+WcDubKzUjOq+lWF/2bBKSzgp+ECZI=*/ /* * @Author: xiaoyaoj * @PageInfo: 存量出库-刷新 @@ -13,5 +12,3 @@ import { DATASOURCE, PAGEAREA } from '../const'; export default function buttonClick() { serachOnhand_btnClick.call(this, getDefData(DATASOURCE.refOnhandOutDataSource, PAGEAREA.onhandquery), true); } - -/*iGEr7jsLTpd/n+WcDubKzUjOq+lWF/2bBKSzgp+ECZI=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/transfer/btnClicks/serachOnhand_btnClick.js b/src/ic/ic/pub/transfer/btnClicks/serachOnhand_btnClick.js index f7e16af8..64f67c33 100644 --- a/src/ic/ic/pub/transfer/btnClicks/serachOnhand_btnClick.js +++ b/src/ic/ic/pub/transfer/btnClicks/serachOnhand_btnClick.js @@ -1,4 +1,3 @@ -/*MYnHZFwcm/HTmHixbHmY+Un3Ic42O9h4rVNBovu0DDBTU8O0WDc/FTXVoDQXPbE1*/ /* * @Author: xiaoyaoj * @PageInfo: 存量出库查询 @@ -74,5 +73,3 @@ export default function clickSerachBtn(cacheSearchData, isRefresh) { } }); } - -/*MYnHZFwcm/HTmHixbHmY+Un3Ic42O9h4rVNBovu0DDBTU8O0WDc/FTXVoDQXPbE1*/ \ No newline at end of file diff --git a/src/ic/ic/pub/transfer/const/index.js b/src/ic/ic/pub/transfer/const/index.js index 7dbf0f9e..6cbcc628 100644 --- a/src/ic/ic/pub/transfer/const/index.js +++ b/src/ic/ic/pub/transfer/const/index.js @@ -1,4 +1,3 @@ -/*8CdHYS+a9Q2smogIeoYriEP5x7vzqBeEXoSMjia1I4E=*/ /* * @Author: xiaoyaoj * @PageInfo: 存量出库-常量 @@ -97,5 +96,3 @@ export { STORE_REFEXT_CLASSPATH_ORG, LOCATION_REFEXT_CLASSPATH }; - -/*8CdHYS+a9Q2smogIeoYriEP5x7vzqBeEXoSMjia1I4E=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/transfer/init/index.js b/src/ic/ic/pub/transfer/init/index.js new file mode 100644 index 00000000..9e3941e6 --- /dev/null +++ b/src/ic/ic/pub/transfer/init/index.js @@ -0,0 +1,3 @@ +import initOnhandTemplate from './initOnhandTemplate'; + +export { initOnhandTemplate }; diff --git a/src/ic/ic/pub/transfer/init/initOnhandTemplate.js b/src/ic/ic/pub/transfer/init/initOnhandTemplate.js index b54f6120..f004ec02 100644 --- a/src/ic/ic/pub/transfer/init/initOnhandTemplate.js +++ b/src/ic/ic/pub/transfer/init/initOnhandTemplate.js @@ -1,4 +1,3 @@ -/*blhSS8YIHRgidSWJ3w1ivX7AhZgTVmoDmUn7+edXsFI=*/ /* * @Author: xiaoyaoj * @PageInfo: 存量出库拉单-初始化入库单模板 @@ -186,5 +185,3 @@ function modify(props, meta) { return meta; } - -/*blhSS8YIHRgidSWJ3w1ivX7AhZgTVmoDmUn7+edXsFI=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/transfer/onhandouttransfer/onhandouttransfer.js b/src/ic/ic/pub/transfer/onhandouttransfer/onhandouttransfer.js index 0159d3e2..92c167b9 100644 --- a/src/ic/ic/pub/transfer/onhandouttransfer/onhandouttransfer.js +++ b/src/ic/ic/pub/transfer/onhandouttransfer/onhandouttransfer.js @@ -1,4 +1,3 @@ -/*1R5KJHUAd0fxlj6q5uDS462Lec4MX0SujEOS5dp6C54=*/ /* * @Author: xiaoyaoj * @PageInfo: 存量出库转单页面 @@ -170,5 +169,3 @@ class TransferTable extends Component { TransferTable = createPage({})(TransferTable); export default TransferTable; - -/*1R5KJHUAd0fxlj6q5uDS462Lec4MX0SujEOS5dp6C54=*/ \ No newline at end of file diff --git a/src/ic/ic/pub/transtype/index.less b/src/ic/ic/pub/transtype/index.less new file mode 100644 index 00000000..f2f0c9b8 --- /dev/null +++ b/src/ic/ic/pub/transtype/index.less @@ -0,0 +1,29 @@ +// 这里的样式不生效, 需要将下面样式代码放到平台的页面代码中 +#transtypebusi { + .scm-transtype-wrap { + border-top: 1px solid var(--pui-black-derived-color-5, #d9d9d9); + padding: 8px 76px 16px 40px; + .list-item { + height: 32px; + min-width: 280px; + white-space: nowrap; + display: inline-flex; + align-items: center; + margin-right: 10px; + > label { + min-width: 150px; + max-width: 150px; + display: inline-block; + white-space: pre-wrap; + text-align: right; + color: inherit !important; + } + .colon { + margin-right: 10px; + } + .select-item-value { + width: 140px; + } + } + } +} diff --git a/src/ic/ic/pub/transtype/methods.js b/src/ic/ic/pub/transtype/methods.js new file mode 100644 index 00000000..80bc1f81 --- /dev/null +++ b/src/ic/ic/pub/transtype/methods.js @@ -0,0 +1,78 @@ +import { base } from 'nc-lightapp-front'; +import { getLangByResId } from '../../../../scmpub/scmpub/pub/tool/multiLangUtil'; +let { NCSelect, NCSwitch } = base; +export function renderForm(data) { + return data.map((item) => { + switch (item.itemtype) { + case 'select': + return ( +